From adfe1205c3f079fc3c34490ce3cd47c58ca0acd7 Mon Sep 17 00:00:00 2001 From: "Ben Sheldon [he/him]" Date: Wed, 1 Nov 2023 17:47:06 -0700 Subject: [PATCH 1/2] Update development dependencies and light Rubocop'ing --- .github/dependabot.yml | 4 ++ Gemfile.lock | 116 +++++++++++++++---------------- spec/system/cron_entries_spec.rb | 8 +-- spec/system/i18n_spec.rb | 4 +- spec/system/jobs_spec.rb | 62 ++++++++--------- spec/system/theme_spec.rb | 2 +- 6 files changed, 98 insertions(+), 98 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 10fd5d25f..2447bbd9c 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,6 +4,10 @@ updates: directory: "/" schedule: interval: "monthly" + groups: + bundler-dependencies: + patterns: + - "*" - package-ecosystem: github-actions directory: "/" schedule: diff --git a/Gemfile.lock b/Gemfile.lock index b375c8783..ab78dc944 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -100,23 +100,23 @@ GEM rake thor (>= 0.14.0) ast (2.4.2) - async (2.6.4) + async (2.6.5) console (~> 1.10) fiber-annotation io-event (~> 1.1) timers (~> 4.1) - async-http (0.60.2) + async-http (0.61.0) async (>= 1.25) async-io (>= 1.28) async-pool (>= 0.2) - protocol-http (~> 0.24.0) - protocol-http1 (~> 0.15.0) + protocol-http (~> 0.25.0) + protocol-http1 (~> 0.16.0) protocol-http2 (~> 0.15.0) traces (>= 0.10.0) async-http-faraday (0.12.0) async-http (~> 0.42) faraday - async-io (1.36.0) + async-io (1.36.1) async async-pool (0.4.0) async (>= 1.25) @@ -142,7 +142,7 @@ GEM rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - chef-utils (18.2.7) + chef-utils (18.3.0) concurrent-ruby coderay (1.1.3) concurrent-ruby (1.2.2) @@ -170,18 +170,19 @@ GEM erubi (1.12.0) et-orbi (1.2.7) tzinfo - faraday (2.7.10) + faraday (2.7.11) + base64 faraday-net_http (>= 2.0, < 3.1) ruby2_keywords (>= 0.0.4) faraday-http-cache (2.5.0) faraday (>= 0.8) faraday-net_http (3.0.2) - ffi (1.15.5) - ffi (1.15.5-java) + ffi (1.16.3) + ffi (1.16.3-java) fiber-annotation (0.2.0) fiber-local (1.0.0) foreman (0.87.2) - fugit (1.8.1) + fugit (1.9.0) et-orbi (~> 1, >= 1.2.7) raabro (~> 1.4) gem-release (2.2.2) @@ -199,21 +200,21 @@ GEM highline (2.1.0) i18n (1.14.1) concurrent-ruby (~> 1.0) - i18n-tasks (1.0.12) + i18n-tasks (1.0.13) activesupport (>= 4.0.2) ast (>= 2.1.0) better_html (>= 1.0, < 3.0) erubi highline (>= 2.0.0) i18n - parser (>= 2.2.3.0) + parser (>= 3.2.2.1) rails-i18n rainbow (>= 2.2.2, < 4.0) terminal-table (>= 1.5.1) io-console (0.6.0) io-console (0.6.0-java) - io-event (1.3.2) - irb (1.8.1) + io-event (1.3.3) + irb (1.8.3) rdoc reline (>= 0.3.8) jar-dependencies (0.4.1) @@ -235,7 +236,7 @@ GEM net-smtp marcel (1.0.2) matrix (0.4.2) - mdl (0.12.0) + mdl (0.13.0) kramdown (~> 2.3) kramdown-parser-gfm (~> 1.1) mixlib-cli (~> 2.1, >= 2.1.1) @@ -253,7 +254,7 @@ GEM msgpack (1.7.2-java) multi_json (1.15.0) mutex_m (0.1.2) - net-imap (0.4.1) + net-imap (0.4.3) date net-protocol net-pop (0.1.2) @@ -278,14 +279,15 @@ GEM sawyer (~> 0.9) optimist (3.1.0) parallel (1.23.0) - parser (3.2.2.3) + parser (3.2.2.4) ast (~> 2.4.1) racc pg (1.5.4) prettier_print (1.2.1) + prism (0.16.0) protocol-hpack (1.4.2) - protocol-http (0.24.7) - protocol-http1 (0.15.1) + protocol-http (0.25.0) + protocol-http1 (0.16.0) protocol-http (~> 0.22) protocol-http2 (0.15.1) protocol-hpack (~> 1.4) @@ -302,9 +304,9 @@ GEM pry (>= 0.13, < 0.15) pry-rails (0.3.9) pry (>= 0.10.4) - psych (5.1.0) + psych (5.1.1.1) stringio - psych (5.1.0-java) + psych (5.1.1.1-java) jar-dependencies (>= 0.1.7) public_suffix (5.0.3) puma (5.6.7) @@ -312,8 +314,8 @@ GEM puma (5.6.7-java) nio4r (~> 2.0) raabro (1.4.0) - racc (1.7.1) - racc (1.7.1-java) + racc (1.7.2) + racc (1.7.2-java) rack (2.2.8) rack-mini-profiler (3.1.1) rack (>= 1.2.0) @@ -357,19 +359,17 @@ GEM 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.2) + prism (>= 0.15.1) sorbet-runtime (>= 0.5.9204) - unparser (>= 0.5.6) rbtrace (0.4.14) ffi (>= 1.0.6) msgpack (>= 0.4.3) optimist (>= 3.0.0) rdoc (6.5.0) psych (>= 4.0.0) - regexp_parser (2.8.1) + regexp_parser (2.8.2) reline (0.3.9) io-console (~> 0.5) rexml (3.2.6) @@ -390,33 +390,32 @@ GEM rspec-mocks (~> 3.12) rspec-support (~> 3.12) rspec-support (3.12.1) - rubocop (1.56.3) - base64 (~> 0.1.1) + rubocop (1.57.2) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) - parser (>= 3.2.2.3) + parser (>= 3.2.2.4) 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) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.29.0) + rubocop-ast (1.30.0) parser (>= 3.2.1.0) - rubocop-capybara (2.18.0) + rubocop-capybara (2.19.0) rubocop (~> 1.41) - rubocop-factory_bot (2.23.1) + rubocop-factory_bot (2.24.0) rubocop (~> 1.33) - rubocop-performance (1.19.0) + rubocop-performance (1.19.1) rubocop (>= 1.7.0, < 2.0) rubocop-ast (>= 0.4.0) - rubocop-rails (2.21.0) + rubocop-rails (2.22.1) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.33.0, < 2.0) - rubocop-rspec (2.24.0) - rubocop (~> 1.33) + rubocop-rspec (2.25.0) + rubocop (~> 1.40) rubocop-capybara (~> 2.17) rubocop-factory_bot (~> 2.22) ruby-progressbar (1.13.0) @@ -425,23 +424,23 @@ GEM sawyer (0.9.2) addressable (>= 2.3.5) faraday (>= 0.17.3, < 3) - selenium-webdriver (4.12.0) + selenium-webdriver (4.15.0) rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) - skylight (5.3.4) + skylight (6.0.1) activesupport (>= 5.2.0) smart_properties (1.17.0) - sorbet (0.5.11011) - sorbet-static (= 0.5.11011) - sorbet-runtime (0.5.11011) - sorbet-static (0.5.11011-java) - sorbet-static (0.5.11011-universal-darwin) - sorbet-static (0.5.11011-x86_64-linux) - sorbet-static-and-runtime (0.5.11011) - sorbet (= 0.5.11011) - sorbet-runtime (= 0.5.11011) - spoom (1.2.3) + sorbet (0.5.11109) + sorbet-static (= 0.5.11109) + sorbet-runtime (0.5.11109) + sorbet-static (0.5.11109-java) + sorbet-static (0.5.11109-universal-darwin) + sorbet-static (0.5.11109-x86_64-linux) + sorbet-static-and-runtime (0.5.11109) + sorbet (= 0.5.11109) + sorbet-runtime (= 0.5.11109) + spoom (1.2.4) erubi (>= 1.10.0) sorbet-static-and-runtime (>= 0.5.10187) syntax_tree (>= 6.1.1) @@ -450,20 +449,20 @@ GEM ffi stackprof (0.2.25) stringio (3.0.8) - syntax_tree (6.1.1) + syntax_tree (6.2.0) prettier_print (>= 1.2.0) - tapioca (0.11.8) + tapioca (0.11.10) bundler (>= 2.2.25) netrc (>= 0.11.0) parallel (>= 1.21.0) - rbi (~> 0.0.0, >= 0.0.16) + rbi (~> 0.1.0, >= 0.1.0) sorbet-static-and-runtime (>= 0.5.10187) spoom (~> 1.2.0, >= 1.2.0) thor (>= 1.2.0) yard-sorbet terminal-table (3.0.2) unicode-display_width (>= 1.1.1, < 3) - thor (1.2.2) + thor (1.3.0) thread (0.2.2) thread_safe (0.3.6) thread_safe (0.3.6-java) @@ -473,12 +472,9 @@ GEM traces (0.11.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) + unicode-display_width (2.5.0) webrick (1.8.1) - websocket (1.2.9) + websocket (1.2.10) websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-driver (0.7.6-java) diff --git a/spec/system/cron_entries_spec.rb b/spec/system/cron_entries_spec.rb index a70c684d6..d9d836e34 100644 --- a/spec/system/cron_entries_spec.rb +++ b/spec/system/cron_entries_spec.rb @@ -15,14 +15,14 @@ expect(cron_entry.last_job_at).to be_nil within "##{dom_id(cron_entry)}" do - accept_confirm { click_on "Enqueue cron entry now" } + accept_confirm { click_button "Enqueue cron entry now" } end wait_until do expect(cron_entry.last_job).to be_present end - click_on "Job #{cron_entry.last_job.id}" + click_link "Job #{cron_entry.last_job.id}" expect(page).to have_content cron_entry.last_job.id end @@ -30,12 +30,12 @@ visit '/good_job/cron_entries' within "##{dom_id(cron_entry)}" do - accept_confirm { click_on "Disable cron entry" } + accept_confirm { click_button "Disable cron entry" } end expect(cron_entry.enabled?).to be false within "##{dom_id(cron_entry)}" do - accept_confirm { click_on "Enable cron entry" } + accept_confirm { click_button "Enable cron entry" } end expect(cron_entry.enabled?).to be true diff --git a/spec/system/i18n_spec.rb b/spec/system/i18n_spec.rb index fcb222dfa..3b63d1f4b 100644 --- a/spec/system/i18n_spec.rb +++ b/spec/system/i18n_spec.rb @@ -10,7 +10,7 @@ expect(page).to have_content "Processes" find_by_id('localeOptions').click within ".navbar" do - click_on "es" + click_link "es" end expect(page).to have_content "Procesos" end @@ -21,7 +21,7 @@ expect(page).to have_content "Processes" find_by_id('localeOptions').click within ".navbar" do - click_on "uk" + click_link "uk" end expect(page).to have_content "Процеси" end diff --git a/spec/system/jobs_spec.rb b/spec/system/jobs_spec.rb index 2cf89473a..b37581529 100644 --- a/spec/system/jobs_spec.rb +++ b/spec/system/jobs_spec.rb @@ -16,13 +16,13 @@ visit good_job.jobs_path expect(page).to have_content 'GoodJob 👍' - click_on "Jobs" + click_link "Jobs" expect(page).to have_content 'GoodJob 👍' - click_on "Cron" + click_link "Cron" expect(page).to have_content 'GoodJob 👍' - click_on "Processes" + click_link "Processes" expect(page).to have_content 'GoodJob 👍' end @@ -60,7 +60,7 @@ expect(current_url).to match(/job_class=ConfigurableQueueJob/) table = page.find("[role=table]") - expect(table).to have_selector("[role=row]", count: 1) + expect(table).to have_css("[role=row]", count: 1) expect(table).to have_content(foo_queue_job.job_id) end @@ -68,13 +68,13 @@ visit good_job.jobs_path within "#filter" do - click_on "Scheduled" + click_link "Scheduled" end expect(current_url).to match(/state=scheduled/) table = page.find("[role=table]") - expect(table).to have_selector("[role=row]", count: 2) + expect(table).to have_css("[role=row]", count: 2) expect(table).to have_content(foo_queue_job.job_id) end @@ -85,7 +85,7 @@ expect(current_url).to match(/queue_name=foo/) table = page.find("[role=table]") - expect(table).to have_selector("[role=row]", count: 1) + expect(table).to have_css("[role=row]", count: 1) expect(table).to have_content(foo_queue_job.job_id) end @@ -104,23 +104,23 @@ it 'can search by argument' do visit '/good_job' - click_on "Jobs" + click_link "Jobs" - expect(page).to have_selector('[role=row]', count: 3) + expect(page).to have_css('[role=row]', count: 3) fill_in 'query', with: ExampleJob::DEAD_TYPE - click_on 'Search' - expect(page).to have_selector('[role=row]', count: 1) + click_button 'Search' + expect(page).to have_css('[role=row]', count: 1) end end it 'can retry discarded jobs' do visit '/good_job' - click_on "Jobs" + click_link "Jobs" expect do within "##{dom_id(discarded_job)}" do - click_on 'Actions' - accept_confirm { click_on 'Retry job' } + click_button 'Actions' + accept_confirm { click_link 'Retry job' } end expect(page).to have_content "Job has been retried" end.to change { discarded_job.reload.status }.from(:discarded).to(:queued) @@ -128,12 +128,12 @@ it 'can discard jobs' do visit '/good_job' - click_on "Jobs" + click_link "Jobs" expect do within "##{dom_id(unfinished_job)}" do - click_on 'Actions' - accept_confirm { click_on 'Discard job' } + click_button 'Actions' + accept_confirm { click_link 'Discard job' } end expect(page).to have_content "Job has been discarded" end.to change { unfinished_job.head_execution(reload: true).finished_at }.from(nil).to within(1.second).of(Time.current) @@ -157,12 +157,12 @@ locked_event.wait(10) visit '/good_job' - click_on "Jobs" + click_link "Jobs" expect do within "##{dom_id(unfinished_job)}" do - click_on 'Actions' - accept_confirm { click_on 'Force discard' } + click_button 'Actions' + accept_confirm { click_link 'Force discard' } end expect(page).to have_content "Job has been force discarded" end.to change { unfinished_job.head_execution(reload: true).finished_at }.from(nil).to within(1.second).of(Time.current) @@ -174,11 +174,11 @@ it 'can destroy jobs' do visit '/good_job' - click_on "Jobs" + click_link "Jobs" within "##{dom_id(discarded_job)}" do - click_on 'Actions' - accept_confirm { click_on 'Destroy job' } + click_button 'Actions' + accept_confirm { click_link 'Destroy job' } end expect(page).to have_content "Job has been destroyed" expect { discarded_job.reload }.to raise_error(ActiveRecord::RecordNotFound) @@ -186,7 +186,7 @@ it 'performs batch job actions' do visit "/good_job" - click_on "Jobs" + click_link "Jobs" expect(page).to have_field(checked: true, count: 0) @@ -198,19 +198,19 @@ expect do check "toggle_job_ids" - within("[role=table] header") { accept_confirm { click_on "Reschedule all" } } + within("[role=table] header") { accept_confirm { click_button "Reschedule all" } } expect(page).to have_field(checked: true, count: 0) end.to change { unfinished_job.reload.scheduled_at }.to within(1.second).of(Time.current) expect do check "toggle_job_ids" - within("[role=table] header") { accept_confirm { click_on "Discard all" } } + within("[role=table] header") { accept_confirm { click_button "Discard all" } } expect(page).to have_field(checked: true, count: 0) end.to change { GoodJob::Job.discarded.count }.from(1).to(2) expect do check "toggle_job_ids" - within("[role=table] header") { accept_confirm { click_on "Retry all" } } + within("[role=table] header") { accept_confirm { click_button "Retry all" } } expect(page).to have_field(checked: true, count: 0) end.to change { GoodJob::Job.discarded.count }.from(2).to(0) @@ -218,17 +218,17 @@ expect do check "toggle_job_ids" check "Apply to all 2 jobs" - within("[role=table] header") { accept_confirm { click_on "Discard all" } } + within("[role=table] header") { accept_confirm { click_button "Discard all" } } expect(page).to have_field(checked: true, count: 0) end.to change { GoodJob::Job.discarded.count }.from(0).to(2) visit "/good_job" - click_on "Jobs" + click_link "Jobs" expect do check "toggle_job_ids" within("[role=table] header") do - click_on "Toggle Actions" - accept_confirm { click_on "Destroy all" } + click_button "Toggle Actions" + accept_confirm { click_button "Destroy all" } end expect(page).to have_field(checked: true, count: 0) end.to change(GoodJob::Job, :count).from(2).to(0) diff --git a/spec/system/theme_spec.rb b/spec/system/theme_spec.rb index 47bfdb69e..35d90c655 100644 --- a/spec/system/theme_spec.rb +++ b/spec/system/theme_spec.rb @@ -8,7 +8,7 @@ expect(page).to have_css('html[data-bs-theme="light"]') find('button[data-theme-target="dropdown"]').click - click_on 'Dark' + click_button 'Dark' expect(page).to have_css('html[data-bs-theme="dark"]') visit good_job.jobs_path From d0e6e08550a74c23ce472065078ebba38a3c2a04 Mon Sep 17 00:00:00 2001 From: "Ben Sheldon [he/him]" Date: Wed, 1 Nov 2023 18:30:17 -0700 Subject: [PATCH 2/2] Update Sorbet / Tapioca --- bin/lint | 10 +- sorbet/rbi/annotations/.gitattributes | 1 + sorbet/rbi/annotations/actionmailer.rbi | 2 +- sorbet/rbi/annotations/actionpack.rbi | 6 +- sorbet/rbi/annotations/actionview.rbi | 6 +- sorbet/rbi/annotations/activemodel.rbi | 6 +- sorbet/rbi/annotations/activerecord.rbi | 12 +- sorbet/rbi/annotations/activesupport.rbi | 110 +- sorbet/rbi/annotations/faraday.rbi | 2 +- sorbet/rbi/annotations/globalid.rbi | 2 +- sorbet/rbi/annotations/railties.rbi | 2 +- sorbet/rbi/annotations/rainbow.rbi | 2 +- sorbet/rbi/dsl/.gitattributes | 1 + sorbet/rbi/dsl/action_dispatch/assertions.rbi | 9 + sorbet/rbi/dsl/action_mailer/callbacks.rbi | 22 + sorbet/rbi/dsl/action_mailer/form_builder.rbi | 19 + .../rbi/dsl/action_mailer/queued_delivery.rbi | 29 + sorbet/rbi/dsl/active_job/exceptions.rbi | 9 +- .../dsl/active_model/attribute_methods.rbi | 10 +- sorbet/rbi/dsl/active_model/attributes.rbi | 17 +- sorbet/rbi/dsl/active_model/conversion.rbi | 21 + sorbet/rbi/dsl/active_model/dirty.rbi | 10 +- .../dsl/active_record/attribute_methods.rbi | 13 +- .../active_record/attribute_methods/dirty.rbi | 10 +- .../attribute_methods/serialization.rbi | 19 + sorbet/rbi/dsl/active_record/core.rbi | 12 +- .../rbi/dsl/active_record/counter_cache.rbi | 19 + .../rbi/dsl/active_record/normalization.rbi | 23 + .../rbi/dsl/active_record/secure_password.rbi | 9 + .../rbi/dsl/active_record/test_fixtures.rbi | 16 +- sorbet/rbi/dsl/active_record/token_for.rbi | 20 + sorbet/rbi/gems/.gitattributes | 1 + ...ncable@7.0.6.rbi => actioncable@7.1.1.rbi} | 1121 +- ...lbox@7.0.6.rbi => actionmailbox@7.1.1.rbi} | 725 +- ...ailer@7.0.6.rbi => actionmailer@7.1.1.rbi} | 1024 +- ...ionpack@7.0.6.rbi => actionpack@7.1.1.rbi} | 5644 ++-- ...iontext@7.0.6.rbi => actiontext@7.1.1.rbi} | 864 +- ...ionview@7.0.6.rbi => actionview@7.1.1.rbi} | 3416 +- ...ctivejob@7.0.6.rbi => activejob@7.1.1.rbi} | 594 +- ...emodel@7.0.6.rbi => activemodel@7.1.1.rbi} | 1825 +- ...ecord@7.0.6.rbi => activerecord@7.1.1.rbi} | 15992 ++++++---- sorbet/rbi/gems/activestorage@7.0.6.rbi | 3106 -- sorbet/rbi/gems/activestorage@7.1.1.rbi | 1690 + ...port@7.0.6.rbi => activesupport@7.1.1.rbi} | 7004 ++-- ...ssable@2.8.4.rbi => addressable@2.8.5.rbi} | 224 +- ...1dbc4c46e4c04c.rbi => appraisal@2.5.0.rbi} | 0 ...-http@0.60.2.rbi => async-http@0.61.0.rbi} | 79 +- ...sync-io@1.35.0.rbi => async-io@1.36.1.rbi} | 326 +- .../gems/{async@2.6.2.rbi => async@2.6.5.rbi} | 188 +- sorbet/rbi/gems/base64@0.1.1.rbi | 172 + ...r_html@2.0.1.rbi => better_html@2.0.2.rbi} | 8 +- sorbet/rbi/gems/bigdecimal@3.1.4.rbi | 77 + ...utils@18.2.7.rbi => chef-utils@18.3.0.rbi} | 0 sorbet/rbi/gems/connection_pool@2.4.1.rbi | 8 + ...{console@1.17.2.rbi => console@1.23.2.rbi} | 172 +- .../{dotenv@2.7.6.rbi => dotenv@2.8.1.rbi} | 14 +- sorbet/rbi/gems/drb@2.1.1.rbi | 1313 + ...{erb_lint@0.4.0.rbi => erb_lint@0.5.0.rbi} | 0 sorbet/rbi/gems/faraday-http-cache@2.5.0.rbi | 34 +- sorbet/rbi/gems/faraday-net_http@3.0.2.rbi | 46 +- .../{faraday@2.7.7.rbi => faraday@2.7.11.rbi} | 62 +- .../gems/{ffi@1.15.5.rbi => ffi@1.16.3.rbi} | 0 .../gems/{fugit@1.8.1.rbi => fugit@1.9.0.rbi} | 311 +- ...{globalid@1.1.0.rbi => globalid@1.2.1.rbi} | 378 +- ...tasks@1.0.12.rbi => i18n-tasks@1.0.13.rbi} | 211 +- sorbet/rbi/gems/io-console@0.6.0.rbi | 8 + ...{io-event@1.2.2.rbi => io-event@1.3.3.rbi} | 77 +- sorbet/rbi/gems/irb@1.8.3.rbi | 2874 ++ .../{loofah@2.21.3.rbi => loofah@2.21.4.rbi} | 27 +- sorbet/rbi/gems/mail@2.8.1.rbi | 25 +- .../gems/{mdl@0.12.0.rbi => mdl@0.13.0.rbi} | 73 +- ...ini_mime@1.1.2.rbi => mini_mime@1.1.5.rbi} | 38 +- ...initest@5.18.1.rbi => minitest@5.20.0.rbi} | 326 +- .../{msgpack@1.7.1.rbi => msgpack@1.7.2.rbi} | 0 sorbet/rbi/gems/mutex_m@0.1.2.rbi | 91 + sorbet/rbi/gems/net-imap@0.3.6.rbi | 3781 --- sorbet/rbi/gems/net-imap@0.4.3.rbi | 7447 +++++ ...{net-smtp@0.3.3.rbi => net-smtp@0.4.0.rbi} | 348 +- ...okogiri@1.15.2.rbi => nokogiri@1.15.4.rbi} | 0 ...{optimist@3.0.1.rbi => optimist@3.1.0.rbi} | 0 ...{parser@3.2.2.3.rbi => parser@3.2.2.4.rbi} | 120 +- .../rbi/gems/{pg@1.5.3.rbi => pg@1.5.4.rbi} | 20 +- sorbet/rbi/gems/prism@0.16.0.rbi | 26307 ++++++++++++++++ ...1@0.15.0.rbi => protocol-http1@0.16.0.rbi} | 67 +- ...tp@0.24.3.rbi => protocol-http@0.25.0.rbi} | 419 +- sorbet/rbi/gems/psych@5.1.1.1.rbi | 1768 ++ ...ffix@5.0.1.rbi => public_suffix@5.0.3.rbi} | 4 +- .../gems/{puma@5.6.6.rbi => puma@5.6.7.rbi} | 85 +- .../gems/{racc@1.7.1.rbi => racc@1.7.2.rbi} | 70 +- ...3.1.0.rbi => rack-mini-profiler@3.1.1.rbi} | 139 +- sorbet/rbi/gems/rack-session@1.0.1.rbi | 8 + sorbet/rbi/gems/rack-test@2.1.0.rbi | 4 +- .../gems/{rack@2.2.7.rbi => rack@2.2.8.rbi} | 210 +- sorbet/rbi/gems/rackup@1.0.0.rbi | 8 + ...@2.1.1.rbi => rails-dom-testing@2.2.0.rbi} | 428 +- .../rbi/gems/rails-html-sanitizer@1.6.0.rbi | 96 +- ...ls-i18n@7.0.7.rbi => rails-i18n@7.0.8.rbi} | 0 .../gems/{rails@7.0.6.rbi => rails@7.1.1.rbi} | 0 ...{railties@7.0.6.rbi => railties@7.1.1.rbi} | 1902 +- .../gems/{rake@13.0.6.rbi => rake@13.1.0.rbi} | 133 +- .../gems/{rbi@0.0.16.rbi => rbi@0.1.2.rbi} | 1333 +- sorbet/rbi/gems/rdoc@6.5.0.rbi | 12323 ++++++++ ...rser@2.8.1.rbi => regexp_parser@2.8.2.rbi} | 70 +- sorbet/rbi/gems/reline@0.3.9.rbi | 2260 ++ .../gems/{rexml@3.2.5.rbi => rexml@3.2.6.rbi} | 168 +- ...ocks@3.12.5.rbi => rspec-mocks@3.12.6.rbi} | 0 ...rt@3.12.0.rbi => rspec-support@3.12.1.rbi} | 0 ...-ast@1.29.0.rbi => rubocop-ast@1.30.0.rbi} | 127 +- ...2.18.0.rbi => rubocop-capybara@2.19.0.rbi} | 386 +- ...3.1.rbi => rubocop-factory_bot@2.24.0.rbi} | 190 +- ...8.0.rbi => rubocop-performance@1.19.1.rbi} | 301 +- ...ls@2.20.2.rbi => rubocop-rails@2.22.1.rbi} | 969 +- ...ec@2.22.0.rbi => rubocop-rspec@2.25.0.rbi} | 742 +- ...{rubocop@1.54.0.rbi => rubocop@1.57.2.rbi} | 2328 +- ...10.0.rbi => selenium-webdriver@4.15.0.rbi} | 770 +- sorbet/rbi/gems/skylight@6.0.1.rbi | 5734 ++++ .../gems/{spoom@1.2.2.rbi => spoom@1.2.4.rbi} | 1039 +- sorbet/rbi/gems/stringio@3.0.8.rbi | 8 + ...x_tree@6.1.1.rbi => syntax_tree@6.2.0.rbi} | 4639 +-- ...tapioca@0.11.7.rbi => tapioca@0.11.10.rbi} | 880 +- .../gems/{thor@1.2.2.rbi => thor@1.3.0.rbi} | 1170 +- .../{traces@0.10.0.rbi => traces@0.11.1.rbi} | 14 +- ....2.rbi => unicode-display_width@2.5.0.rbi} | 0 sorbet/rbi/gems/unparser@0.6.8.rbi | 8 - sorbet/rbi/gems/webrick@1.8.1.rbi | 2604 ++ ...r@0.7.5.rbi => websocket-driver@0.7.6.rbi} | 189 +- .../rbi/gems/websocket-extensions@0.1.5.rbi | 8 +- ...bsocket@1.2.9.rbi => websocket@1.2.10.rbi} | 30 +- sorbet/rbi/gems/yard-sorbet@0.8.1.rbi | 2 +- sorbet/rbi/gems/yard@0.9.34.rbi | 14 +- ...zeitwerk@2.6.8.rbi => zeitwerk@2.6.12.rbi} | 147 +- sorbet/rbi/todo.rbi | 918 +- 132 files changed, 102493 insertions(+), 30859 deletions(-) create mode 100644 sorbet/rbi/annotations/.gitattributes create mode 100644 sorbet/rbi/dsl/.gitattributes create mode 100644 sorbet/rbi/dsl/action_dispatch/assertions.rbi create mode 100644 sorbet/rbi/dsl/action_mailer/callbacks.rbi create mode 100644 sorbet/rbi/dsl/action_mailer/form_builder.rbi create mode 100644 sorbet/rbi/dsl/action_mailer/queued_delivery.rbi create mode 100644 sorbet/rbi/dsl/active_model/conversion.rbi create mode 100644 sorbet/rbi/dsl/active_record/attribute_methods/serialization.rbi create mode 100644 sorbet/rbi/dsl/active_record/counter_cache.rbi create mode 100644 sorbet/rbi/dsl/active_record/normalization.rbi create mode 100644 sorbet/rbi/dsl/active_record/secure_password.rbi create mode 100644 sorbet/rbi/dsl/active_record/token_for.rbi create mode 100644 sorbet/rbi/gems/.gitattributes rename sorbet/rbi/gems/{actioncable@7.0.6.rbi => actioncable@7.1.1.rbi} (79%) rename sorbet/rbi/gems/{actionmailbox@7.0.6.rbi => actionmailbox@7.1.1.rbi} (63%) rename sorbet/rbi/gems/{actionmailer@7.0.6.rbi => actionmailer@7.1.1.rbi} (71%) rename sorbet/rbi/gems/{actionpack@7.0.6.rbi => actionpack@7.1.1.rbi} (87%) rename sorbet/rbi/gems/{actiontext@7.0.6.rbi => actiontext@7.1.1.rbi} (57%) rename sorbet/rbi/gems/{actionview@7.0.6.rbi => actionview@7.1.1.rbi} (88%) rename sorbet/rbi/gems/{activejob@7.0.6.rbi => activejob@7.1.1.rbi} (81%) rename sorbet/rbi/gems/{activemodel@7.0.6.rbi => activemodel@7.1.1.rbi} (79%) rename sorbet/rbi/gems/{activerecord@7.0.6.rbi => activerecord@7.1.1.rbi} (78%) delete mode 100644 sorbet/rbi/gems/activestorage@7.0.6.rbi create mode 100644 sorbet/rbi/gems/activestorage@7.1.1.rbi rename sorbet/rbi/gems/{activesupport@7.0.6.rbi => activesupport@7.1.1.rbi} (80%) rename sorbet/rbi/gems/{addressable@2.8.4.rbi => addressable@2.8.5.rbi} (92%) rename sorbet/rbi/gems/{appraisal@2.4.1-b200e636903700098bef25f4f51dbc4c46e4c04c.rbi => appraisal@2.5.0.rbi} (100%) rename sorbet/rbi/gems/{async-http@0.60.2.rbi => async-http@0.61.0.rbi} (98%) rename sorbet/rbi/gems/{async-io@1.35.0.rbi => async-io@1.36.1.rbi} (78%) rename sorbet/rbi/gems/{async@2.6.2.rbi => async@2.6.5.rbi} (89%) create mode 100644 sorbet/rbi/gems/base64@0.1.1.rbi rename sorbet/rbi/gems/{better_html@2.0.1.rbi => better_html@2.0.2.rbi} (98%) create mode 100644 sorbet/rbi/gems/bigdecimal@3.1.4.rbi rename sorbet/rbi/gems/{chef-utils@18.2.7.rbi => chef-utils@18.3.0.rbi} (100%) create mode 100644 sorbet/rbi/gems/connection_pool@2.4.1.rbi rename sorbet/rbi/gems/{console@1.17.2.rbi => console@1.23.2.rbi} (80%) rename sorbet/rbi/gems/{dotenv@2.7.6.rbi => dotenv@2.8.1.rbi} (95%) create mode 100644 sorbet/rbi/gems/drb@2.1.1.rbi rename sorbet/rbi/gems/{erb_lint@0.4.0.rbi => erb_lint@0.5.0.rbi} (100%) rename sorbet/rbi/gems/{faraday@2.7.7.rbi => faraday@2.7.11.rbi} (98%) rename sorbet/rbi/gems/{ffi@1.15.5.rbi => ffi@1.16.3.rbi} (100%) rename sorbet/rbi/gems/{fugit@1.8.1.rbi => fugit@1.9.0.rbi} (87%) rename sorbet/rbi/gems/{globalid@1.1.0.rbi => globalid@1.2.1.rbi} (52%) rename sorbet/rbi/gems/{i18n-tasks@1.0.12.rbi => i18n-tasks@1.0.13.rbi} (95%) create mode 100644 sorbet/rbi/gems/io-console@0.6.0.rbi rename sorbet/rbi/gems/{io-event@1.2.2.rbi => io-event@1.3.3.rbi} (82%) create mode 100644 sorbet/rbi/gems/irb@1.8.3.rbi rename sorbet/rbi/gems/{loofah@2.21.3.rbi => loofah@2.21.4.rbi} (98%) rename sorbet/rbi/gems/{mdl@0.12.0.rbi => mdl@0.13.0.rbi} (85%) rename sorbet/rbi/gems/{mini_mime@1.1.2.rbi => mini_mime@1.1.5.rbi} (82%) rename sorbet/rbi/gems/{minitest@5.18.1.rbi => minitest@5.20.0.rbi} (84%) rename sorbet/rbi/gems/{msgpack@1.7.1.rbi => msgpack@1.7.2.rbi} (100%) create mode 100644 sorbet/rbi/gems/mutex_m@0.1.2.rbi delete mode 100644 sorbet/rbi/gems/net-imap@0.3.6.rbi create mode 100644 sorbet/rbi/gems/net-imap@0.4.3.rbi rename sorbet/rbi/gems/{net-smtp@0.3.3.rbi => net-smtp@0.4.0.rbi} (79%) rename sorbet/rbi/gems/{nokogiri@1.15.2.rbi => nokogiri@1.15.4.rbi} (100%) rename sorbet/rbi/gems/{optimist@3.0.1.rbi => optimist@3.1.0.rbi} (100%) rename sorbet/rbi/gems/{parser@3.2.2.3.rbi => parser@3.2.2.4.rbi} (98%) rename sorbet/rbi/gems/{pg@1.5.3.rbi => pg@1.5.4.rbi} (99%) create mode 100644 sorbet/rbi/gems/prism@0.16.0.rbi rename sorbet/rbi/gems/{protocol-http1@0.15.0.rbi => protocol-http1@0.16.0.rbi} (87%) rename sorbet/rbi/gems/{protocol-http@0.24.3.rbi => protocol-http@0.25.0.rbi} (73%) create mode 100644 sorbet/rbi/gems/psych@5.1.1.1.rbi rename sorbet/rbi/gems/{public_suffix@5.0.1.rbi => public_suffix@5.0.3.rbi} (99%) rename sorbet/rbi/gems/{puma@5.6.6.rbi => puma@5.6.7.rbi} (98%) rename sorbet/rbi/gems/{racc@1.7.1.rbi => racc@1.7.2.rbi} (71%) rename sorbet/rbi/gems/{rack-mini-profiler@3.1.0.rbi => rack-mini-profiler@3.1.1.rbi} (95%) create mode 100644 sorbet/rbi/gems/rack-session@1.0.1.rbi rename sorbet/rbi/gems/{rack@2.2.7.rbi => rack@2.2.8.rbi} (97%) create mode 100644 sorbet/rbi/gems/rackup@1.0.0.rbi rename sorbet/rbi/gems/{rails-dom-testing@2.1.1.rbi => rails-dom-testing@2.2.0.rbi} (68%) rename sorbet/rbi/gems/{rails-i18n@7.0.7.rbi => rails-i18n@7.0.8.rbi} (100%) rename sorbet/rbi/gems/{rails@7.0.6.rbi => rails@7.1.1.rbi} (100%) rename sorbet/rbi/gems/{railties@7.0.6.rbi => railties@7.1.1.rbi} (73%) rename sorbet/rbi/gems/{rake@13.0.6.rbi => rake@13.1.0.rbi} (96%) rename sorbet/rbi/gems/{rbi@0.0.16.rbi => rbi@0.1.2.rbi} (72%) create mode 100644 sorbet/rbi/gems/rdoc@6.5.0.rbi rename sorbet/rbi/gems/{regexp_parser@2.8.1.rbi => regexp_parser@2.8.2.rbi} (98%) create mode 100644 sorbet/rbi/gems/reline@0.3.9.rbi rename sorbet/rbi/gems/{rexml@3.2.5.rbi => rexml@3.2.6.rbi} (97%) rename sorbet/rbi/gems/{rspec-mocks@3.12.5.rbi => rspec-mocks@3.12.6.rbi} (100%) rename sorbet/rbi/gems/{rspec-support@3.12.0.rbi => rspec-support@3.12.1.rbi} (100%) rename sorbet/rbi/gems/{rubocop-ast@1.29.0.rbi => rubocop-ast@1.30.0.rbi} (99%) rename sorbet/rbi/gems/{rubocop-capybara@2.18.0.rbi => rubocop-capybara@2.19.0.rbi} (69%) rename sorbet/rbi/gems/{rubocop-factory_bot@2.23.1.rbi => rubocop-factory_bot@2.24.0.rbi} (89%) rename sorbet/rbi/gems/{rubocop-performance@1.18.0.rbi => rubocop-performance@1.19.1.rbi} (94%) rename sorbet/rbi/gems/{rubocop-rails@2.20.2.rbi => rubocop-rails@2.22.1.rbi} (92%) rename sorbet/rbi/gems/{rubocop-rspec@2.22.0.rbi => rubocop-rspec@2.25.0.rbi} (92%) rename sorbet/rbi/gems/{rubocop@1.54.0.rbi => rubocop@1.57.2.rbi} (97%) rename sorbet/rbi/gems/{selenium-webdriver@4.10.0.rbi => selenium-webdriver@4.15.0.rbi} (96%) create mode 100644 sorbet/rbi/gems/skylight@6.0.1.rbi rename sorbet/rbi/gems/{spoom@1.2.2.rbi => spoom@1.2.4.rbi} (73%) create mode 100644 sorbet/rbi/gems/stringio@3.0.8.rbi rename sorbet/rbi/gems/{syntax_tree@6.1.1.rbi => syntax_tree@6.2.0.rbi} (86%) rename sorbet/rbi/gems/{tapioca@0.11.7.rbi => tapioca@0.11.10.rbi} (87%) rename sorbet/rbi/gems/{thor@1.2.2.rbi => thor@1.3.0.rbi} (80%) rename sorbet/rbi/gems/{traces@0.10.0.rbi => traces@0.11.1.rbi} (70%) rename sorbet/rbi/gems/{unicode-display_width@2.4.2.rbi => unicode-display_width@2.5.0.rbi} (100%) delete mode 100644 sorbet/rbi/gems/unparser@0.6.8.rbi create mode 100644 sorbet/rbi/gems/webrick@1.8.1.rbi rename sorbet/rbi/gems/{websocket-driver@0.7.5.rbi => websocket-driver@0.7.6.rbi} (85%) rename sorbet/rbi/gems/{websocket@1.2.9.rbi => websocket@1.2.10.rbi} (98%) rename sorbet/rbi/gems/{zeitwerk@2.6.8.rbi => zeitwerk@2.6.12.rbi} (89%) diff --git a/bin/lint b/bin/lint index 58e8b384f..b1c3550f5 100755 --- a/bin/lint +++ b/bin/lint @@ -20,10 +20,12 @@ FileUtils.chdir GEM_ROOT do system! "bundle exec srb tc", failure: <<~MESSAGE You may need to run one of the following commands - - bin/tapioca todo # generate RBI files for unresolved constants (e.g. RSpec `stub_const`) - - bin/tapioca dsl # generate RBIs for dynamic methods - - bin/tapioca gem # generate RBIs for gems - - bin/tapioca check-shims # check duplicated definitions in shim RBIs + 1. Regenerate gem RBIs by running `bin/tapioca gem --all` and `bin/tapioca annotations` + 2. Generate RBIs for DSLs by running `bin/tapioca dsl` + 3. If the missing constants are defined in files that a gem does not load by default, + manually require those files in `sorbet/tapioca/require.rb` and regenerate gem RBIs + 4. Manually create an RBI shim defining the missing constants + 5. Add files to sorbet/rbi/todo.rbi or `bin/tapioca todo` (though that's being deprecated) MESSAGE puts "\n== Rubocop ==" diff --git a/sorbet/rbi/annotations/.gitattributes b/sorbet/rbi/annotations/.gitattributes new file mode 100644 index 000000000..d2eacd2c6 --- /dev/null +++ b/sorbet/rbi/annotations/.gitattributes @@ -0,0 +1 @@ +**/*.rbi linguist-vendored=true diff --git a/sorbet/rbi/annotations/actionmailer.rbi b/sorbet/rbi/annotations/actionmailer.rbi index e806f9909..249c22ba6 100644 --- a/sorbet/rbi/annotations/actionmailer.rbi +++ b/sorbet/rbi/annotations/actionmailer.rbi @@ -1,4 +1,4 @@ -# typed: strict +# typed: true # DO NOT EDIT MANUALLY # This file was pulled from a central RBI files repository. diff --git a/sorbet/rbi/annotations/actionpack.rbi b/sorbet/rbi/annotations/actionpack.rbi index c4f521258..2da829f2e 100644 --- a/sorbet/rbi/annotations/actionpack.rbi +++ b/sorbet/rbi/annotations/actionpack.rbi @@ -1,4 +1,4 @@ -# typed: strict +# typed: true # DO NOT EDIT MANUALLY # This file was pulled from a central RBI files repository. @@ -75,8 +75,8 @@ class ActionController::Parameters sig { returns(String) } def inspect; end - sig { params(other_hash: T.untyped).returns(ActionController::Parameters) } - def merge!(other_hash); end + sig { params(other_hash: T.untyped, block: T.untyped).returns(ActionController::Parameters) } + def merge!(other_hash, &block); end sig { params(other_hash: T.untyped).returns(ActionController::Parameters) } def merge(other_hash); end diff --git a/sorbet/rbi/annotations/actionview.rbi b/sorbet/rbi/annotations/actionview.rbi index eb3b6b9ca..9c939f032 100644 --- a/sorbet/rbi/annotations/actionview.rbi +++ b/sorbet/rbi/annotations/actionview.rbi @@ -1,13 +1,11 @@ -# typed: strong +# typed: true # DO NOT EDIT MANUALLY # This file was pulled from a central RBI files repository. # Please run `bin/tapioca annotations` to update it. module ActionView - TemplateError = T.type_alias { - Template::Error -} + TemplateError = T.type_alias { Template::Error } class MissingTemplate < ActionView::ActionViewError sig { returns(String) } diff --git a/sorbet/rbi/annotations/activemodel.rbi b/sorbet/rbi/annotations/activemodel.rbi index d90bcfe90..1e1a64243 100644 --- a/sorbet/rbi/annotations/activemodel.rbi +++ b/sorbet/rbi/annotations/activemodel.rbi @@ -1,13 +1,11 @@ -# typed: strict +# typed: true # DO NOT EDIT MANUALLY # This file was pulled from a central RBI files repository. # Please run `bin/tapioca annotations` to update it. class ActiveModel::Errors - Elem = type_member { - { fixed: ActiveModel::Error } -} + Elem = type_member { { fixed: ActiveModel::Error } } sig { params(attribute: T.any(Symbol, String)).returns(T::Array[String]) } def [](attribute); end diff --git a/sorbet/rbi/annotations/activerecord.rbi b/sorbet/rbi/annotations/activerecord.rbi index 82e9f9ccc..3ad0b9c6c 100644 --- a/sorbet/rbi/annotations/activerecord.rbi +++ b/sorbet/rbi/annotations/activerecord.rbi @@ -1,4 +1,4 @@ -# typed: strict +# typed: true # DO NOT EDIT MANUALLY # This file was pulled from a central RBI files repository. @@ -74,4 +74,14 @@ class ActiveRecord::Base sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void } def self.after_rollback(*args, **options, &block); end + + sig { returns(FalseClass) } + def blank?; end + + # @shim: since `present?` is always true, `presence` always returns `self` + sig { returns(T.self_type) } + def presence; end + + sig { returns(TrueClass) } + def present?; end end diff --git a/sorbet/rbi/annotations/activesupport.rbi b/sorbet/rbi/annotations/activesupport.rbi index 56db82991..4afb77044 100644 --- a/sorbet/rbi/annotations/activesupport.rbi +++ b/sorbet/rbi/annotations/activesupport.rbi @@ -1,4 +1,4 @@ -# typed: strict +# typed: true # DO NOT EDIT MANUALLY # This file was pulled from a central RBI files repository. @@ -49,12 +49,29 @@ class ActiveSupport::TimeWithZone # @shim: Methods on ActiveSupport::TimeWithZone are delegated to `Time` using `method_missing include ::DateAndTime::Calculations + + sig { returns(FalseClass) } + def blank?; end + + # @shim: since `present?` is always true, `presence` always returns `self` + sig { returns(T.self_type) } + def presence; end + + # @shim: since `blank?` is always false, `present?` always returns `true` + sig { returns(TrueClass) } + def present?; end end class Object sig { returns(T::Boolean) } def blank?; end + sig { returns(T.nilable(T.self_type)) } + def presence; end + + sig { params(another_object: T.untyped).returns(T.nilable(T.self_type)) } + def presence_in(another_object); end + sig { returns(T::Boolean) } def present?; end end @@ -134,3 +151,94 @@ class Array sig { returns(ActiveSupport::ArrayInquirer) } def inquiry; end end + +class Date + sig { returns(FalseClass) } + def blank?; end + + # @shim: since `present?` is always true, `presence` always returns `self` + sig { returns(T.self_type) } + def presence; end + + # @shim: since `blank?` is always false, `present?` always returns `true` + sig { returns(TrueClass) } + def present?; end +end + +class DateTime + sig { returns(FalseClass) } + def blank?; end + + # @shim: since `present?` is always true, `presence` always returns `self` + sig { returns(T.self_type) } + def presence; end + + # @shim: since `blank?` is always false, `present?` always returns `true` + sig { returns(TrueClass) } + def present?; end +end + +class NilClass + sig { returns(TrueClass) } + def blank?; end + + # @shim: since `present?` is always false, `presence` always returns `nil` + sig { returns(NilClass) } + def presence; end + + # @shim: since `blank?` is always true, `present?` always returns `false` + sig { returns(FalseClass) } + def present?; end +end + +class FalseClass + sig { returns(TrueClass) } + def blank?; end + + # @shim: since `present?` is always false, `presence` always returns `nil` + sig { returns(NilClass) } + def presence; end + + # @shim: since `blank?` is always true, `present?` always returns `false` + sig { returns(FalseClass) } + def present?; end +end + +class TrueClass + sig { returns(FalseClass) } + def blank?; end + + # @shim: since `present?` is always true, `presence` always returns `self` + sig { returns(T.self_type) } + def presence; end + + # @shim: since `blank?` is always false, `present?` always returns `true` + sig { returns(TrueClass) } + def present?; end +end + +class Numeric + sig { returns(FalseClass) } + def blank?; end + + # @shim: since `present?` is always true, `presence` always returns `self` + sig { returns(T.self_type) } + def presence; end + + # @shim: since `blank?` is always false, `present?` always returns `true` + sig { returns(TrueClass) } + def present?; end +end + +class Time + sig { returns(FalseClass) } + def blank?; end + + # @shim: since `present?` is always true, `presence` always returns `self` + sig { returns(T.self_type) } + def presence; end + + # @shim: since `blank?` is always false, `present?` always returns `true` + sig { returns(TrueClass) } + def present?; end +end diff --git a/sorbet/rbi/annotations/faraday.rbi b/sorbet/rbi/annotations/faraday.rbi index 59240715c..c992c1afe 100644 --- a/sorbet/rbi/annotations/faraday.rbi +++ b/sorbet/rbi/annotations/faraday.rbi @@ -1,4 +1,4 @@ -# typed: strict +# typed: true # DO NOT EDIT MANUALLY # This file was pulled from a central RBI files repository. diff --git a/sorbet/rbi/annotations/globalid.rbi b/sorbet/rbi/annotations/globalid.rbi index e70d46b02..916b21d22 100644 --- a/sorbet/rbi/annotations/globalid.rbi +++ b/sorbet/rbi/annotations/globalid.rbi @@ -1,4 +1,4 @@ -# typed: strict +# typed: true # DO NOT EDIT MANUALLY # This file was pulled from a central RBI files repository. diff --git a/sorbet/rbi/annotations/railties.rbi b/sorbet/rbi/annotations/railties.rbi index f71f1350f..fd682925c 100644 --- a/sorbet/rbi/annotations/railties.rbi +++ b/sorbet/rbi/annotations/railties.rbi @@ -1,4 +1,4 @@ -# typed: strong +# typed: true # DO NOT EDIT MANUALLY # This file was pulled from a central RBI files repository. diff --git a/sorbet/rbi/annotations/rainbow.rbi b/sorbet/rbi/annotations/rainbow.rbi index 60ba90a9b..227f8797a 100644 --- a/sorbet/rbi/annotations/rainbow.rbi +++ b/sorbet/rbi/annotations/rainbow.rbi @@ -1,4 +1,4 @@ -# typed: strict +# typed: true # DO NOT EDIT MANUALLY # This file was pulled from a central RBI files repository. 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/action_dispatch/assertions.rbi b/sorbet/rbi/dsl/action_dispatch/assertions.rbi new file mode 100644 index 000000000..bf2f03155 --- /dev/null +++ b/sorbet/rbi/dsl/action_dispatch/assertions.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActionDispatch::Assertions`. +# Please instead update this file by running `bin/tapioca dsl ActionDispatch::Assertions`. + +module ActionDispatch::Assertions + mixes_in_class_methods ::ActionDispatch::Assertions::RoutingAssertions::ClassMethods +end diff --git a/sorbet/rbi/dsl/action_mailer/callbacks.rbi b/sorbet/rbi/dsl/action_mailer/callbacks.rbi new file mode 100644 index 000000000..e3a07fe2d --- /dev/null +++ b/sorbet/rbi/dsl/action_mailer/callbacks.rbi @@ -0,0 +1,22 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActionMailer::Callbacks`. +# Please instead update this file by running `bin/tapioca dsl ActionMailer::Callbacks`. + +module ActionMailer::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/dsl/action_mailer/form_builder.rbi b/sorbet/rbi/dsl/action_mailer/form_builder.rbi new file mode 100644 index 000000000..b81e0e089 --- /dev/null +++ b/sorbet/rbi/dsl/action_mailer/form_builder.rbi @@ -0,0 +1,19 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActionMailer::FormBuilder`. +# Please instead update this file by running `bin/tapioca dsl ActionMailer::FormBuilder`. + +module ActionMailer::FormBuilder + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + module GeneratedClassMethods + def _default_form_builder; end + def _default_form_builder=(value); end + def _default_form_builder?; end + end + + module GeneratedInstanceMethods; end +end diff --git a/sorbet/rbi/dsl/action_mailer/queued_delivery.rbi b/sorbet/rbi/dsl/action_mailer/queued_delivery.rbi new file mode 100644 index 000000000..e9e3716e0 --- /dev/null +++ b/sorbet/rbi/dsl/action_mailer/queued_delivery.rbi @@ -0,0 +1,29 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActionMailer::QueuedDelivery`. +# Please instead update this file by running `bin/tapioca dsl ActionMailer::QueuedDelivery`. + +module ActionMailer::QueuedDelivery + 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 diff --git a/sorbet/rbi/dsl/active_job/exceptions.rbi b/sorbet/rbi/dsl/active_job/exceptions.rbi index 1b49871aa..7cb1e11cf 100644 --- a/sorbet/rbi/dsl/active_job/exceptions.rbi +++ b/sorbet/rbi/dsl/active_job/exceptions.rbi @@ -10,9 +10,16 @@ module ActiveJob::Exceptions mixes_in_class_methods GeneratedClassMethods 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 diff --git a/sorbet/rbi/dsl/active_model/attribute_methods.rbi b/sorbet/rbi/dsl/active_model/attribute_methods.rbi index 093f939f7..6ca0b01b5 100644 --- a/sorbet/rbi/dsl/active_model/attribute_methods.rbi +++ b/sorbet/rbi/dsl/active_model/attribute_methods.rbi @@ -13,15 +13,15 @@ module ActiveModel::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 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 diff --git a/sorbet/rbi/dsl/active_model/attributes.rbi b/sorbet/rbi/dsl/active_model/attributes.rbi index 86ace17d1..f90c4014d 100644 --- a/sorbet/rbi/dsl/active_model/attributes.rbi +++ b/sorbet/rbi/dsl/active_model/attributes.rbi @@ -7,28 +7,23 @@ module ActiveModel::Attributes include GeneratedInstanceMethods + mixes_in_class_methods ::ActiveModel::AttributeRegistration::ClassMethods mixes_in_class_methods ::ActiveModel::AttributeMethods::ClassMethods mixes_in_class_methods GeneratedClassMethods 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 diff --git a/sorbet/rbi/dsl/active_model/conversion.rbi b/sorbet/rbi/dsl/active_model/conversion.rbi new file mode 100644 index 000000000..cecf18992 --- /dev/null +++ b/sorbet/rbi/dsl/active_model/conversion.rbi @@ -0,0 +1,21 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveModel::Conversion`. +# Please instead update this file by running `bin/tapioca dsl ActiveModel::Conversion`. + +module ActiveModel::Conversion + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + 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 diff --git a/sorbet/rbi/dsl/active_model/dirty.rbi b/sorbet/rbi/dsl/active_model/dirty.rbi index d8c8dcb1c..2b359ea5c 100644 --- a/sorbet/rbi/dsl/active_model/dirty.rbi +++ b/sorbet/rbi/dsl/active_model/dirty.rbi @@ -14,15 +14,15 @@ module ActiveModel::Dirty 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 diff --git a/sorbet/rbi/dsl/active_record/attribute_methods.rbi b/sorbet/rbi/dsl/active_record/attribute_methods.rbi index af6eba2ac..04a737823 100644 --- a/sorbet/rbi/dsl/active_record/attribute_methods.rbi +++ b/sorbet/rbi/dsl/active_record/attribute_methods.rbi @@ -14,9 +14,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 @@ -37,8 +40,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 diff --git a/sorbet/rbi/dsl/active_record/attribute_methods/dirty.rbi b/sorbet/rbi/dsl/active_record/attribute_methods/dirty.rbi index 4eaba8359..1e40f17b5 100644 --- a/sorbet/rbi/dsl/active_record/attribute_methods/dirty.rbi +++ b/sorbet/rbi/dsl/active_record/attribute_methods/dirty.rbi @@ -14,9 +14,9 @@ module ActiveRecord::AttributeMethods::Dirty 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 @@ -28,8 +28,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 diff --git a/sorbet/rbi/dsl/active_record/attribute_methods/serialization.rbi b/sorbet/rbi/dsl/active_record/attribute_methods/serialization.rbi new file mode 100644 index 000000000..4b04a0d66 --- /dev/null +++ b/sorbet/rbi/dsl/active_record/attribute_methods/serialization.rbi @@ -0,0 +1,19 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveRecord::AttributeMethods::Serialization`. +# Please instead update this file by running `bin/tapioca dsl ActiveRecord::AttributeMethods::Serialization`. + +module ActiveRecord::AttributeMethods::Serialization + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + module GeneratedClassMethods + def default_column_serializer; end + def default_column_serializer=(value); end + def default_column_serializer?; end + end + + module GeneratedInstanceMethods; end +end diff --git a/sorbet/rbi/dsl/active_record/core.rbi b/sorbet/rbi/dsl/active_record/core.rbi index cd1ffaf2d..21413f54c 100644 --- a/sorbet/rbi/dsl/active_record/core.rbi +++ b/sorbet/rbi/dsl/active_record/core.rbi @@ -10,6 +10,9 @@ module ActiveRecord::Core mixes_in_class_methods GeneratedClassMethods 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 @@ -22,8 +25,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 @@ -33,6 +36,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 @@ -48,7 +54,7 @@ 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 diff --git a/sorbet/rbi/dsl/active_record/counter_cache.rbi b/sorbet/rbi/dsl/active_record/counter_cache.rbi new file mode 100644 index 000000000..f7c75ad99 --- /dev/null +++ b/sorbet/rbi/dsl/active_record/counter_cache.rbi @@ -0,0 +1,19 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveRecord::CounterCache`. +# Please instead update this file by running `bin/tapioca dsl ActiveRecord::CounterCache`. + +module ActiveRecord::CounterCache + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + module GeneratedClassMethods + def _counter_cache_columns; end + def _counter_cache_columns=(value); end + def _counter_cache_columns?; end + end + + module GeneratedInstanceMethods; end +end diff --git a/sorbet/rbi/dsl/active_record/normalization.rbi b/sorbet/rbi/dsl/active_record/normalization.rbi new file mode 100644 index 000000000..1bdd5800c --- /dev/null +++ b/sorbet/rbi/dsl/active_record/normalization.rbi @@ -0,0 +1,23 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveRecord::Normalization`. +# Please instead update this file by running `bin/tapioca dsl ActiveRecord::Normalization`. + +module ActiveRecord::Normalization + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + module GeneratedClassMethods + def normalized_attributes; end + def normalized_attributes=(value); end + def normalized_attributes?; end + end + + module GeneratedInstanceMethods + def normalized_attributes; end + def normalized_attributes=(value); end + def normalized_attributes?; end + end +end diff --git a/sorbet/rbi/dsl/active_record/secure_password.rbi b/sorbet/rbi/dsl/active_record/secure_password.rbi new file mode 100644 index 000000000..3bbf2a723 --- /dev/null +++ b/sorbet/rbi/dsl/active_record/secure_password.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveRecord::SecurePassword`. +# Please instead update this file by running `bin/tapioca dsl ActiveRecord::SecurePassword`. + +module ActiveRecord::SecurePassword + mixes_in_class_methods ::ActiveModel::SecurePassword::ClassMethods +end diff --git a/sorbet/rbi/dsl/active_record/test_fixtures.rbi b/sorbet/rbi/dsl/active_record/test_fixtures.rbi index 0cef89b73..5eb41c81c 100644 --- a/sorbet/rbi/dsl/active_record/test_fixtures.rbi +++ b/sorbet/rbi/dsl/active_record/test_fixtures.rbi @@ -13,9 +13,12 @@ module ActiveRecord::TestFixtures def fixture_class_names; end def fixture_class_names=(value); end def fixture_class_names?; end - def fixture_path; end - def fixture_path=(value); end - def fixture_path?; end + def fixture_paths; end + def fixture_paths=(value); end + def fixture_paths?; end + def fixture_sets; end + def fixture_sets=(value); end + def fixture_sets?; end def fixture_table_names; end def fixture_table_names=(value); end def fixture_table_names?; end @@ -37,8 +40,11 @@ module ActiveRecord::TestFixtures def fixture_class_names; end def fixture_class_names=(value); end def fixture_class_names?; end - def fixture_path; end - def fixture_path?; end + def fixture_paths; end + def fixture_paths?; end + def fixture_sets; end + def fixture_sets=(value); end + def fixture_sets?; end def fixture_table_names; end def fixture_table_names=(value); end def fixture_table_names?; end diff --git a/sorbet/rbi/dsl/active_record/token_for.rbi b/sorbet/rbi/dsl/active_record/token_for.rbi new file mode 100644 index 000000000..7f7075cda --- /dev/null +++ b/sorbet/rbi/dsl/active_record/token_for.rbi @@ -0,0 +1,20 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveRecord::TokenFor`. +# Please instead update this file by running `bin/tapioca dsl ActiveRecord::TokenFor`. + +module ActiveRecord::TokenFor + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + 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 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.1.rbi similarity index 79% rename from sorbet/rbi/gems/actioncable@7.0.6.rbi rename to sorbet/rbi/gems/actioncable@7.1.1.rbi index 87051014b..e4e139ce6 100644 --- a/sorbet/rbi/gems/actioncable@7.0.6.rbi +++ b/sorbet/rbi/gems/actioncable@7.1.1.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.1/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.1/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.1/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.1/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/lib/active_support/callbacks.rb#70 + def __callbacks; end + + # source://activesupport/7.1.1/lib/active_support/callbacks.rb#70 + def __callbacks?; end + + # source://activesupport/7.1.1/lib/active_support/callbacks.rb#963 + def _command_callbacks; end + + # source://activesupport/7.1.1/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.1/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.1/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.1/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.1/lib/active_support/callbacks.rb#70 + def __callbacks; end + + # source://activesupport/7.1.1/lib/active_support/callbacks.rb#70 + def __callbacks=(value); end + + # source://activesupport/7.1.1/lib/active_support/callbacks.rb#70 + def __callbacks?; end + + # source://activesupport/7.1.1/lib/active_support/callbacks.rb#955 + def _command_callbacks; end + + # source://activesupport/7.1.1/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.1/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.1/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.1/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.1/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.1/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.1/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.1/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.1/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.1/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.1/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.1/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.1/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.1/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.1/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.1/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.1/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.1/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,68 @@ class ActionCable::SubscriptionAdapter::Inline < ::ActionCable::SubscriptionAdap def subscriber_map; end end +# source://actioncable//lib/action_cable/subscription_adapter/postgresql.rb#9 +class ActionCable::SubscriptionAdapter::PostgreSQL < ::ActionCable::SubscriptionAdapter::Base + include ::ActionCable::SubscriptionAdapter::ChannelPrefix + + # @return [PostgreSQL] a new instance of PostgreSQL + # + # source://actioncable//lib/action_cable/subscription_adapter/postgresql.rb#12 + 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/postgresql.rb#31 + 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 + + # source://actioncable//lib/action_cable/subscription_adapter/postgresql.rb#50 + def with_broadcast_connection(&block); end + + # source://actioncable//lib/action_cable/subscription_adapter/postgresql.rb#35 + def with_subscriptions_connection(&block); end + + private + + # source://actioncable//lib/action_cable/subscription_adapter/postgresql.rb#59 + def channel_identifier(channel); end + + # source://actioncable//lib/action_cable/subscription_adapter/postgresql.rb#63 + def listener; end + + # source://actioncable//lib/action_cable/subscription_adapter/postgresql.rb#67 + def verify!(pg_conn); end +end + +# source://actioncable//lib/action_cable/subscription_adapter/postgresql.rb#73 +class ActionCable::SubscriptionAdapter::PostgreSQL::Listener < ::ActionCable::SubscriptionAdapter::SubscriberMap + # @return [Listener] a new instance of Listener + # + # source://actioncable//lib/action_cable/subscription_adapter/postgresql.rb#74 + def initialize(adapter, event_loop); end + + # source://actioncable//lib/action_cable/subscription_adapter/postgresql.rb#118 + def add_channel(channel, on_success); end + + # source://actioncable//lib/action_cable/subscription_adapter/postgresql.rb#126 + def invoke_callback(*_arg0); end + + # source://actioncable//lib/action_cable/subscription_adapter/postgresql.rb#87 + def listen; end + + # source://actioncable//lib/action_cable/subscription_adapter/postgresql.rb#122 + def remove_channel(channel); end + + # source://actioncable//lib/action_cable/subscription_adapter/postgresql.rb#113 + def shutdown; end +end + # source://actioncable//lib/action_cable/subscription_adapter/subscriber_map.rb#5 class ActionCable::SubscriptionAdapter::SubscriberMap # @return [SubscriberMap] a new instance of SubscriberMap @@ -2612,33 +2902,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 +2959,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 +2973,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 +3013,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 diff --git a/sorbet/rbi/gems/actionmailbox@7.0.6.rbi b/sorbet/rbi/gems/actionmailbox@7.1.1.rbi similarity index 63% rename from sorbet/rbi/gems/actionmailbox@7.0.6.rbi rename to sorbet/rbi/gems/actionmailbox@7.1.1.rbi index 3330434ab..23388605e 100644 --- a/sorbet/rbi/gems/actionmailbox@7.0.6.rbi +++ b/sorbet/rbi/gems/actionmailbox@7.1.1.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.1/lib/rails/engine.rb#405 def railtie_helpers_paths; end - # source://railties/7.0.6/lib/rails/engine.rb#394 + # source://railties/7.1.1/lib/rails/engine.rb#394 def railtie_namespace; end - # source://railties/7.0.6/lib/rails/engine.rb#409 + # source://railties/7.1.1/lib/rails/engine.rb#409 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.1/lib/rails/engine.rb#397 def table_name_prefix; end - # source://railties/7.0.6/lib/rails/engine.rb#401 + # source://railties/7.1.1/lib/rails/engine.rb#401 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.1/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.1/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.1/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.1/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.1/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.1/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.1/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.1/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.1/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.1/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.1/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.1/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.1/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.1/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.1/lib/active_support/rescuable.rb#15 def rescue_handlers?; end # source://actionmailbox//lib/action_mailbox/routing.rb#9 @@ -272,29 +298,11 @@ class ActionMailbox::Base end end -class ActionMailbox::BaseController < ::ActionController::Base - private - - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 - def _layout(lookup_context, formats); end - - def authenticate_by_password; end - def ensure_configured; end - def ingress_name; end - def password; end - - class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://actionpack/7.0.6/lib/action_controller/metal.rb#210 - 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,389 +327,56 @@ 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 - def __callbacks; end - end -end - -class ActionMailbox::InboundEmail < ::ActionMailbox::Record - include ::ActionMailbox::InboundEmail::GeneratedAttributeMethods - include ::ActionMailbox::InboundEmail::GeneratedAssociationMethods - include ::ActionMailbox::InboundEmail::Routable - include ::ActionMailbox::InboundEmail::MessageId - include ::ActionMailbox::InboundEmail::Incineratable - extend ::ActionMailbox::InboundEmail::MessageId::ClassMethods - - # source://activerecord/7.0.6/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 - def autosave_associated_records_for_raw_email_blob(*args); end - - def mail; end - def processed?; end - def source; end - - class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activerecord/7.0.6/lib/active_record/reflection.rb#11 - def _reflections; end - - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 - def _validators; end - - # source://activestorage/7.0.6/lib/active_storage/reflection.rb#53 - def attachment_reflections; end - - # source://activerecord/7.0.6/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 - def bounced(*args, **_arg1); end - - # source://activerecord/7.0.6/lib/active_record/enum.rb#116 - def defined_enums; end - - # source://activerecord/7.0.6/lib/active_record/scoping/named.rb#174 - def delivered(*args, **_arg1); end - - # source://activerecord/7.0.6/lib/active_record/scoping/named.rb#174 - def failed(*args, **_arg1); end - - # source://activerecord/7.0.6/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 - def not_delivered(*args, **_arg1); end - - # source://activerecord/7.0.6/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 - def not_pending(*args, **_arg1); end - - # source://activerecord/7.0.6/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 - def pending(*args, **_arg1); end - - # source://activerecord/7.0.6/lib/active_record/scoping/named.rb#174 - def processing(*args, **_arg1); end - - # source://activerecord/7.0.6/lib/active_record/enum.rb#188 - def statuses; end - - # source://activerecord/7.0.6/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 - def build_raw_email_attachment(*args, &block); end - - # source://activerecord/7.0.6/lib/active_record/associations/builder/singular_association.rb#28 - def build_raw_email_blob(*args, &block); end - - # source://activerecord/7.0.6/lib/active_record/associations/builder/singular_association.rb#32 - def create_raw_email_attachment(*args, &block); end - - # source://activerecord/7.0.6/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#32 - def create_raw_email_blob(*args, &block); end - - # source://activerecord/7.0.6/lib/active_record/associations/builder/singular_association.rb#36 - def create_raw_email_blob!(*args, &block); end - - # source://activestorage/7.0.6/lib/active_storage/attached/model.rb#55 - def raw_email; end - - # source://activestorage/7.0.6/lib/active_storage/attached/model.rb#60 - def raw_email=(attachable); end - - # source://activerecord/7.0.6/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 - def raw_email_attachment=(value); end - - # source://activerecord/7.0.6/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 - def raw_email_blob=(value); end - - # source://activerecord/7.0.6/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 - def reload_raw_email_blob; end -end - -module ActionMailbox::InboundEmail::GeneratedAttributeMethods; end - -module ActionMailbox::InboundEmail::Incineratable - extend ::ActiveSupport::Concern - - def incinerate; end - def incinerate_later; end -end - -class ActionMailbox::InboundEmail::Incineratable::Incineration - def initialize(inbound_email); end - - def run; end - - private - - def due?; end - def processed?; end -end - -module ActionMailbox::InboundEmail::MessageId - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActionMailbox::InboundEmail::MessageId::ClassMethods -end - -module ActionMailbox::InboundEmail::MessageId::ClassMethods - def create_and_extract_message_id!(source, **options); end - - private - - def create_and_upload_raw_email!(source); end - def extract_message_id(source); end - def generate_missing_message_id(message_checksum); end -end - -module ActionMailbox::InboundEmail::Routable - extend ::ActiveSupport::Concern - - def route; end - def route_later; end -end - -class ActionMailbox::IncinerationJob < ::ActiveJob::Base - def perform(inbound_email); end - - class << self - # source://activejob/7.0.6/lib/active_job/queue_name.rb#55 - def queue_name; end - - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 - def rescue_handlers; end - - def schedule(inbound_email); end - end -end - -module ActionMailbox::Ingresses; end -module ActionMailbox::Ingresses::Mailgun; end - -class ActionMailbox::Ingresses::Mailgun::InboundEmailsController < ::ActionMailbox::BaseController - def create; end - - private - - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 - def _layout(lookup_context, formats); end - - def authenticate; end - def authenticated?; end - def key; end - def mail; end - - class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.1/lib/active_support/callbacks.rb#70 def __callbacks; end - - # source://actionpack/7.0.6/lib/action_controller/metal.rb#210 - def middleware_stack; end end end -class ActionMailbox::Ingresses::Mailgun::InboundEmailsController::Authenticator - def initialize(key:, timestamp:, token:, signature:); end - - def authenticated?; end - def key; end - def signature; end - def timestamp; end - def token; end - - private - - def expected_signature; end - def recent?; end - def signed?; end -end - -module ActionMailbox::Ingresses::Mandrill; end - -class ActionMailbox::Ingresses::Mandrill::InboundEmailsController < ::ActionMailbox::BaseController - def create; end - def health_check; end - - private - - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 - def _layout(lookup_context, formats); end - - def authenticate; end - def authenticated?; end - def events; end - def key; end - def raw_emails; end - - class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://actionpack/7.0.6/lib/action_controller/metal.rb#210 - def middleware_stack; end - end -end - -class ActionMailbox::Ingresses::Mandrill::InboundEmailsController::Authenticator - def initialize(request, key); end - - def authenticated?; end - def key; end - def request; end - - private - - def expected_signature; end - def given_signature; end - def message; end -end - -module ActionMailbox::Ingresses::Postmark; end - -class ActionMailbox::Ingresses::Postmark::InboundEmailsController < ::ActionMailbox::BaseController - def create; end - - private - - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 - def _layout(lookup_context, formats); end - - class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://actionpack/7.0.6/lib/action_controller/metal.rb#210 - def middleware_stack; end - end -end - -module ActionMailbox::Ingresses::Relay; end - -class ActionMailbox::Ingresses::Relay::InboundEmailsController < ::ActionMailbox::BaseController - def create; end - - private - - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 - 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 - def __callbacks; end - - # source://actionpack/7.0.6/lib/action_controller/metal.rb#210 - def middleware_stack; end - end -end - -module ActionMailbox::Ingresses::Sendgrid; end - -class ActionMailbox::Ingresses::Sendgrid::InboundEmailsController < ::ActionMailbox::BaseController - def create; end - - private - - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 - 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 - def __callbacks; end - - # source://actionpack/7.0.6/lib/action_controller/metal.rb#210 - def middleware_stack; end - end -end - -class ActionMailbox::Record < ::ActiveRecord::Base - include ::ActionMailbox::Record::GeneratedAttributeMethods - include ::ActionMailbox::Record::GeneratedAssociationMethods - - class << self - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 - def _validators; end - - # source://activerecord/7.0.6/lib/active_record/enum.rb#116 - def defined_enums; end - end -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 +403,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. @@ -752,15 +427,6 @@ module ActionMailbox::Routing::ClassMethods def routing(routes); end end -class ActionMailbox::RoutingJob < ::ActiveJob::Base - def perform(inbound_email); end - - class << self - # source://activejob/7.0.6/lib/active_job/queue_name.rb#55 - def queue_name; end - end -end - # source://actionmailbox//lib/action_mailbox/test_case.rb#7 class ActionMailbox::TestCase < ::ActiveSupport::TestCase include ::ActionMailbox::TestHelper @@ -852,6 +518,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), T.untyped) + +# 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 +1213,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 +1239,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 @@ -1611,163 +1298,3 @@ class Mail::Message def from_yaml(str); end end end - -module Rails - class << self - # source://railties/7.0.6/lib/rails.rb#38 - def app_class; end - - # source://railties/7.0.6/lib/rails.rb#38 - def app_class=(_arg0); end - - # source://railties/7.0.6/lib/rails.rb#39 - def application; end - - # source://railties/7.0.6/lib/rails.rb#37 - def application=(_arg0); end - - # source://railties/7.0.6/lib/rails.rb#123 - def autoloaders; end - - # source://railties/7.0.6/lib/rails.rb#50 - def backtrace_cleaner; end - - # source://railties/7.0.6/lib/rails.rb#38 - def cache; end - - # source://railties/7.0.6/lib/rails.rb#38 - def cache=(_arg0); end - - # source://railties/7.0.6/lib/rails.rb#46 - def configuration; end - - # source://railties/7.0.6/lib/rails.rb#72 - def env; end - - # source://railties/7.0.6/lib/rails.rb#79 - def env=(environment); end - - # source://railties/7.0.6/lib/rails.rb#90 - def error; end - - # source://railties/7.0.6/lib/rails/gem_version.rb#5 - def gem_version; end - - # source://railties/7.0.6/lib/rails.rb#103 - def groups(*groups); end - - # source://railties/7.0.6/lib/rails.rb#43 - def initialize!(*_arg0, **_arg1, &_arg2); end - - # source://railties/7.0.6/lib/rails.rb#43 - def initialized?(*_arg0, **_arg1, &_arg2); end - - # source://railties/7.0.6/lib/rails.rb#38 - def logger; end - - # source://railties/7.0.6/lib/rails.rb#38 - def logger=(_arg0); end - - # source://railties/7.0.6/lib/rails.rb#119 - def public_path; end - - # source://railties/7.0.6/lib/rails.rb#63 - def root; end - - # source://railties/7.0.6/lib/rails/version.rb#7 - def version; end - end -end - -module Rails::Conductor; end -module Rails::Conductor::ActionMailbox; end -module Rails::Conductor::ActionMailbox::InboundEmails; end - -class Rails::Conductor::ActionMailbox::InboundEmails::SourcesController < ::Rails::Conductor::BaseController - def create; end - def new; end - - private - - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 - def _layout(lookup_context, formats); end - - class << self - # source://actionpack/7.0.6/lib/action_controller/metal.rb#210 - def middleware_stack; end - end -end - -class Rails::Conductor::ActionMailbox::InboundEmailsController < ::Rails::Conductor::BaseController - def create; end - def index; end - def new; end - def show; end - - private - - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 - def _layout(lookup_context, formats); end - - def create_inbound_email(mail); end - def mail_params; end - def new_mail; end - - class << self - # source://actionpack/7.0.6/lib/action_controller/metal.rb#210 - def middleware_stack; end - end -end - -class Rails::Conductor::ActionMailbox::IncineratesController < ::Rails::Conductor::BaseController - def create; end - - private - - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 - def _layout(lookup_context, formats); end - - class << self - # source://actionpack/7.0.6/lib/action_controller/metal.rb#210 - def middleware_stack; end - end -end - -class Rails::Conductor::ActionMailbox::ReroutesController < ::Rails::Conductor::BaseController - def create; end - - private - - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 - def _layout(lookup_context, formats); end - - def reroute(inbound_email); end - - class << self - # source://actionpack/7.0.6/lib/action_controller/metal.rb#210 - def middleware_stack; end - end -end - -class Rails::Conductor::BaseController < ::ActionController::Base - private - - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 - def _layout(lookup_context, formats); end - - def ensure_development_env; end - - class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://actionview/7.0.6/lib/action_view/layouts.rb#209 - def _layout; end - - # source://actionview/7.0.6/lib/action_view/layouts.rb#210 - def _layout_conditions; end - - # source://actionpack/7.0.6/lib/action_controller/metal.rb#210 - def middleware_stack; end - end -end diff --git a/sorbet/rbi/gems/actionmailer@7.0.6.rbi b/sorbet/rbi/gems/actionmailer@7.1.1.rbi similarity index 71% rename from sorbet/rbi/gems/actionmailer@7.0.6.rbi rename to sorbet/rbi/gems/actionmailer@7.1.1.rbi index 1e7a2eac7..df5159f56 100644 --- a/sorbet/rbi/gems/actionmailer@7.0.6.rbi +++ b/sorbet/rbi/gems/actionmailer@7.1.1.rbi @@ -4,27 +4,34 @@ # 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 @@ -34,7 +41,7 @@ end # $ 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 @@ -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 @@ -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 @@ -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. @@ -382,7 +395,7 @@ end # = 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. @@ -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.1/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.1/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://actionpack/7.0.6/lib/abstract_controller/helpers.rb#11 + # source://activesupport/7.1.1/lib/active_support/callbacks.rb#963 + def _deliver_callbacks; end + + # source://actionpack/7.1.1/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.1/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.1/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.1/lib/action_view/layouts.rb#216 + def _layout_conditions(&block); end + + # source://activesupport/7.1.1/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.1/lib/active_support/callbacks.rb#951 + def _run_deliver_callbacks(&block); end + + # source://activesupport/7.1.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/lib/active_support/configurable.rb#115 def logger; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.1/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.1/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.1/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.1/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.1/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.1/lib/abstract_controller/callbacks.rb#36 + def raise_on_missing_callback_actions; end + + # source://actionpack/7.1.1/lib/abstract_controller/callbacks.rb#36 + def raise_on_missing_callback_actions=(val); end + + # source://activesupport/7.1.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.1/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.1/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.1/lib/active_support/callbacks.rb#955 + def _deliver_callbacks; end + + # source://activesupport/7.1.1/lib/active_support/callbacks.rb#959 + def _deliver_callbacks=(value); end + + # source://actionpack/7.1.1/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.1/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.1/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.1/lib/abstract_controller/helpers.rb#16 def _helpers; end - # source://actionview/7.0.6/lib/action_view/layouts.rb#209 + # source://actionview/7.1.1/lib/action_view/layouts.rb#211 def _layout; end - # source://actionview/7.0.6/lib/action_view/layouts.rb#209 + # source://actionview/7.1.1/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.1/lib/action_view/layouts.rb#211 def _layout?; end - # source://actionview/7.0.6/lib/action_view/layouts.rb#210 + # source://actionview/7.1.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/lib/active_support/configurable.rb#115 def logger; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.1/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.1/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.1/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.1/lib/abstract_controller/callbacks.rb#36 + def raise_on_missing_callback_actions; end + + # source://actionpack/7.1.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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 diff --git a/sorbet/rbi/gems/actionpack@7.0.6.rbi b/sorbet/rbi/gems/actionpack@7.1.1.rbi similarity index 87% rename from sorbet/rbi/gems/actionpack@7.0.6.rbi rename to sorbet/rbi/gems/actionpack@7.1.1.rbi index d2eb2e75f..7e052a488 100644 --- a/sorbet/rbi/gems/actionpack@7.0.6.rbi +++ b/sorbet/rbi/gems/actionpack@7.1.1.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.1/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.1/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.1/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.1/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.1/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.1/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#29 def l(object, **options); end # Delegates to I18n.localize. # - # source://actionpack//lib/abstract_controller/translation.rb#33 + # source://actionpack//lib/abstract_controller/translation.rb#29 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.1/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.1/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.1/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.1/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.1/lib/active_support/configurable.rb#115 def logger; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.1/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.1/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.1/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.1/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.1/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.1/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.1/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.1/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.1/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.1/lib/active_support/configurable.rb#115 def logger; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.1/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.1/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.1/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.1/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.1/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.1/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.1/lib/action_view/layouts.rb#216 + def _layout_conditions(&block); end + + # source://activesupport/7.1.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/lib/active_support/configurable.rb#115 + def csrf_token_storage_strategy; end + + # source://activesupport/7.1.1/lib/active_support/configurable.rb#116 + def csrf_token_storage_strategy=(value); end + + # source://activesupport/7.1.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/lib/active_support/configurable.rb#115 def logger; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.1/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.1/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.1/lib/action_view/layouts.rb#211 def _layout; end - # source://actionview/7.0.6/lib/action_view/layouts.rb#209 + # source://actionview/7.1.1/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.1/lib/action_view/layouts.rb#211 def _layout?; end - # source://actionview/7.0.6/lib/action_view/layouts.rb#210 + # source://actionview/7.1.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/lib/active_support/configurable.rb#115 + def csrf_token_storage_strategy; end + + # source://activesupport/7.1.1/lib/active_support/configurable.rb#116 + def csrf_token_storage_strategy=(value); end + + # source://activesupport/7.1.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/lib/active_support/configurable.rb#115 def logger; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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 @@ -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/2.2.8/lib/rack/response.rb#141 def error?; end # Was the URL not found? # - # source://rack/2.2.7/lib/rack/response.rb#151 + # source://rack/2.2.8/lib/rack/response.rb#151 def missing?; end # Was the response successful? # - # source://rack/2.2.7/lib/rack/response.rb#138 + # source://rack/2.2.8/lib/rack/response.rb#138 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.1/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.1/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.1/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.1/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,73 @@ 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 + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#970 + 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 +5283,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 +5457,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 +5473,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 +5485,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 +5550,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 +5604,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 +5638,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 +5667,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 +5683,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 +5713,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 +5743,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 +5759,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 +5772,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#983 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#979 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#975 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#977 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#1125 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#1012 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#996 + 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#1018 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#1038 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#1137 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#1198 def initialize_copy(source); end - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#919 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#990 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#1131 def non_scalar?(value); end - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1109 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1181 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#1164 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#1096 def permitted_scalar?(value); end # Adds existing keys to the params if their values are scalar. @@ -5717,53 +5920,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#1110 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#1032 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#1064 def unpermitted_keys(params); end - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#979 + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1051 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#1135 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#1136 ActionController::Parameters::EMPTY_HASH = T.let(T.unsafe(nil), Hash) # This is a list of permitted scalar types that includes the ones @@ -5775,9 +5984,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#1080 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,7 +6051,7 @@ 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. # @@ -5850,7 +6061,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 +6071,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 +6118,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,27 +6158,27 @@ 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 @@ -5980,14 +6191,14 @@ class ActionController::ParamsWrapper::Options < ::Struct # # @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 @@ -6009,11 +6220,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 +6328,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 +6372,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: # @@ -6241,111 +6452,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. -# -# You get a concrete renderer class by invoking ActionController::Base#renderer. -# For example: -# -# ApplicationController.renderer +# = Action Controller \Renderer # -# It allows you to call method #render directly. +# ActionController::Renderer allows you to render arbitrary templates without +# being inside a controller action. # -# ApplicationController.renderer.render template: '...' +# You can get a renderer instance by calling +renderer+ on a controller class: # -# 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: -# -# FooController.render :action, locals: { ... }, assigns: { ... } -# -# 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 +6624,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 +6699,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 +6736,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 +6907,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 +6962,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 +6987,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 +7008,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 +7023,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 +7085,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 +7138,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 +7162,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 +7176,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 +7207,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 +7244,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 +7259,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 +7301,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 +7458,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 +7525,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 +7554,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 +7578,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 +7631,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 +7641,7 @@ ActionController::SessionOverflowError::DEFAULT_MESSAGE = T.let(T.unsafe(nil), S # Hello # <%= content_for :title, " page" %> # -# Giving: +# Resulting in: # # # Main @@ -7353,6 +7651,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 +7664,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 +7677,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,34 +7704,77 @@ 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 -# -# It provides an interface for protecting attributes from end-user -# assignment. This makes Action Controller parameters forbidden +# 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 # to be used in Active Model mass assignment until they have been explicitly # enumerated. # @@ -7497,19 +7840,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#1272 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#1275 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#1290 def params=(value); end end @@ -7521,15 +7864,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 +7975,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.1/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 +8077,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 +8129,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 +8192,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 +8210,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 +8240,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 +8262,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 +8332,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 +8354,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 +8387,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 +8397,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 +8444,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 +8558,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 +8588,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 +8617,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 +8645,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 +8667,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 +8701,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 +8726,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 +8750,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 its 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 +8821,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.1/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.1/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.1/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.1/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.1/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.1/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.1/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.1/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.1/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#10 +ActionDispatch::Constants::CONTENT_ENCODING = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/constants.rb#11 +ActionDispatch::Constants::CONTENT_SECURITY_POLICY = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/constants.rb#12 +ActionDispatch::Constants::CONTENT_SECURITY_POLICY_REPORT_ONLY = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/constants.rb#14 +ActionDispatch::Constants::FEATURE_POLICY = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/constants.rb#13 +ActionDispatch::Constants::LOCATION = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/constants.rb#17 +ActionDispatch::Constants::SERVER_TIMING = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/constants.rb#18 +ActionDispatch::Constants::STRICT_TRANSPORT_SECURITY = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/constants.rb#9 +ActionDispatch::Constants::VARY = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/constants.rb#16 +ActionDispatch::Constants::X_CASCADE = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/constants.rb#15 +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 +8916,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 +8937,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 +8989,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 +9000,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 +9012,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 +9031,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 +9063,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 +9175,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 +9243,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 +9266,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 +9349,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 +9364,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 +9380,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 +9463,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 + def reserialize?(dumped); end - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#575 - def serialize(value); 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 +9695,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 +9734,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 +9762,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.rb#50 +class ActionDispatch::DeprecatedIllegalStateError < ::StandardError; end -# source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#7 +# 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#283 def causes_for(exception); end - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#163 + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#293 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#346 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#301 + def extract_source(trace); end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#330 + def extract_source_fragment_lines(source_lines, line); end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#336 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#289 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 +10037,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 +10053,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 +10100,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 +10156,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 +10203,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 +10222,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 +10265,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 +10389,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 +10613,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 +10625,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 +10705,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 +10715,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 +10786,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 +10808,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 +10846,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 +10877,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 +10906,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 +10916,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. @@ -10482,7 +11023,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 +11335,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 +11346,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 +11460,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 +11502,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 +11576,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 +11624,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 +11641,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 +11698,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 +11713,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 +11724,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 +11752,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 +11765,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 +11802,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 +11852,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 +12025,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 +12037,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 +12059,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 +12075,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 +12242,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 +12255,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 +13007,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 +13036,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 +13055,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 +13068,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 +13083,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 +13104,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 +13117,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 +13304,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 +13322,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 +13463,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 +13747,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.1/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 +13772,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 +13786,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 +13794,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 +13864,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,92 +13937,116 @@ 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 @@ -13470,14 +14059,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 @@ -13498,18 +14087,6 @@ class ActionDispatch::PermissionsPolicy::Middleware 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) - # 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 +14099,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 +14112,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 +# +# ActionDispatch::Reloader wraps the request with callbacks provided by +# ActiveSupport::Reloader, intended to assist with code reloading during +# development. # -# By default, ActionDispatch::Reloader is included in the middleware stack -# only in the development environment; specifically, when +config.cache_classes+ -# is false. +# 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#10 +# 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 +14182,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 +14204,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 +14212,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 +14230,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 +14248,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 +14256,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 +14267,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 +14282,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 +14307,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 +14333,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 +14354,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 +14371,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 +14394,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 +14408,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 +14418,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 +14430,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 +14451,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 +14462,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 + # fallback 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 +14494,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 +14505,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 +14516,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/2.2.8/lib/rack/request.rb#157 def raw_request_method; end # source://actionpack//lib/action_dispatch/http/request.rb#50 @@ -13952,10 +14540,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 +14556,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 +14572,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 +14629,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 +14640,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 +14656,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 +14680,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 +14689,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 +14715,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 +14799,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 +14859,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 +14940,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 +15056,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 +15080,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 +15146,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 +15207,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 +15265,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#167 + 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/2.2.8/lib/rack/response.rb#229 def _cache_control; end - # source://rack/2.2.7/lib/rack/response.rb#233 + # source://rack/2.2.8/lib/rack/response.rb#233 def _cache_control=(v); end - # source://actionpack//lib/action_dispatch/http/response.rb#370 + # source://actionpack//lib/action_dispatch/http/response.rb#380 def abort; end - # source://actionpack//lib/action_dispatch/http/response.rb#183 + # source://actionpack//lib/action_dispatch/http/response.rb#193 def await_commit; end - # source://actionpack//lib/action_dispatch/http/response.rb#189 + # source://actionpack//lib/action_dispatch/http/response.rb#199 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#314 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#323 def body=(body); end - # source://actionpack//lib/action_dispatch/http/response.rb#357 + # source://actionpack//lib/action_dispatch/http/response.rb#367 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#284 def charset; end # Sets the HTTP character set. In case of +nil+ parameter @@ -14707,28 +15317,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#273 def charset=(charset); end - # source://actionpack//lib/action_dispatch/http/response.rb#366 + # source://actionpack//lib/action_dispatch/http/response.rb#376 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#295 def code; end - # source://actionpack//lib/action_dispatch/http/response.rb#193 + # source://actionpack//lib/action_dispatch/http/response.rb#203 def commit!; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/http/response.rb#217 + # source://actionpack//lib/action_dispatch/http/response.rb#227 def committed?; end # Content type of response. # - # source://actionpack//lib/action_dispatch/http/response.rb#243 + # source://actionpack//lib/action_dispatch/http/response.rb#253 def content_type; end # Sets the HTTP response's content MIME type. For example, in the controller @@ -14740,55 +15350,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#243 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#404 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#191 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#189 def get_header(key); end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/http/response.rb#178 + # source://actionpack//lib/action_dispatch/http/response.rb#188 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" + # + # Also aliased as +headers+. + # + # headers["Content-Type"] # => "text/plain" + # headers["Content-Type"] = "application/json" + # headers["Content-Type"] # => "application/json" # - # source://actionpack//lib/action_dispatch/http/response.rb#67 + # 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" + # + # Also aliased as +headers+. + # + # headers["Content-Type"] # => "text/plain" + # headers["Content-Type"] = "application/json" + # headers["Content-Type"] # => "application/json" # - # source://actionpack//lib/action_dispatch/http/response.rb#67 + # 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#258 def media_type; end # Returns the corresponding message for the current HTTP status code: @@ -14799,7 +15433,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#307 def message; end # Turns the Response into a Rack-compatible array of the status, headers, @@ -14807,67 +15441,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#395 def prepare!; end # The location header we'll be responding with. # - # source://rack/2.2.7/lib/rack/response.rb#204 + # source://rack/2.2.8/lib/rack/response.rb#204 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#363 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#290 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#358 def send_file(path); end - # source://actionpack//lib/action_dispatch/http/response.rb#201 + # source://actionpack//lib/action_dispatch/http/response.rb#211 def sending!; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/http/response.rb#216 + # source://actionpack//lib/action_dispatch/http/response.rb#226 def sending?; end - # source://actionpack//lib/action_dispatch/http/response.rb#252 + # source://actionpack//lib/action_dispatch/http/response.rb#262 def sending_file=(v); end - # source://actionpack//lib/action_dispatch/http/response.rb#209 + # source://actionpack//lib/action_dispatch/http/response.rb#219 def sent!; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/http/response.rb#218 + # source://actionpack//lib/action_dispatch/http/response.rb#228 def sent?; end - # source://actionpack//lib/action_dispatch/http/response.rb#180 + # source://actionpack//lib/action_dispatch/http/response.rb#190 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#231 def status=(status); end # Returns the corresponding message for the current HTTP status code: @@ -14878,12 +15512,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#307 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#165 def stream; end # Turns the Response into a Rack-compatible array of the status, headers, @@ -14891,110 +15525,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#395 def to_a; end - # source://actionpack//lib/action_dispatch/http/response.rb#308 + # source://actionpack//lib/action_dispatch/http/response.rb#318 def write(string); end private - # source://actionpack//lib/action_dispatch/http/response.rb#466 + # source://actionpack//lib/action_dispatch/http/response.rb#475 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#448 def before_committed; end - # source://actionpack//lib/action_dispatch/http/response.rb#446 + # source://actionpack//lib/action_dispatch/http/response.rb#456 def before_sending; end - # source://actionpack//lib/action_dispatch/http/response.rb#458 + # source://actionpack//lib/action_dispatch/http/response.rb#467 def build_buffer(response, body); end - # source://actionpack//lib/action_dispatch/http/response.rb#506 + # source://actionpack//lib/action_dispatch/http/response.rb#525 def handle_no_content!; end - # source://actionpack//lib/action_dispatch/http/response.rb#462 + # source://actionpack//lib/action_dispatch/http/response.rb#471 def munge_body_object(body); end - # source://actionpack//lib/action_dispatch/http/response.rb#418 + # source://actionpack//lib/action_dispatch/http/response.rb#428 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#438 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#532 + def rack_response(status, headers); end - # source://actionpack//lib/action_dispatch/http/response.rb#432 + # source://actionpack//lib/action_dispatch/http/response.rb#442 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#155 + 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#160 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#118 + def <<(string); end + + # source://actionpack//lib/action_dispatch/http/response.rb#137 def abort; end - # source://actionpack//lib/action_dispatch/http/response.rb#105 + # source://actionpack//lib/action_dispatch/http/response.rb#110 def body; end - # source://actionpack//lib/action_dispatch/http/response.rb#134 + # source://actionpack//lib/action_dispatch/http/response.rb#140 def close; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/http/response.rb#139 + # source://actionpack//lib/action_dispatch/http/response.rb#145 def closed?; end - # source://actionpack//lib/action_dispatch/http/response.rb#121 + # source://actionpack//lib/action_dispatch/http/response.rb#127 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#118 def write(string); end private - # source://actionpack//lib/action_dispatch/http/response.rb#144 + # source://actionpack//lib/action_dispatch/http/response.rb#150 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#422 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#419 class ActionDispatch::Response::ContentTypeHeader < ::Struct # Returns the value of attribute charset # @@ -15031,77 +15673,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#336 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#339 def initialize(path); end - # source://actionpack//lib/action_dispatch/http/response.rb#333 + # source://actionpack//lib/action_dispatch/http/response.rb#343 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#348 def each; end - # source://actionpack//lib/action_dispatch/http/response.rb#327 + # source://actionpack//lib/action_dispatch/http/response.rb#337 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::Utils::HeaderHash -# 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#44 +ActionDispatch::Response::Headers = Rack::Utils::HeaderHash -# 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#420 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#483 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#484 def initialize(response); end - # source://actionpack//lib/action_dispatch/http/response.rb#489 + # source://actionpack//lib/action_dispatch/http/response.rb#494 def body; end - # source://actionpack//lib/action_dispatch/http/response.rb#483 + # source://actionpack//lib/action_dispatch/http/response.rb#516 + def call(*arguments, &block); end + + # source://actionpack//lib/action_dispatch/http/response.rb#488 def close; end - # source://actionpack//lib/action_dispatch/http/response.rb#479 + # source://actionpack//lib/action_dispatch/http/response.rb#512 def each(*args, &block); end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/http/response.rb#493 + # source://actionpack//lib/action_dispatch/http/response.rb#500 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#508 + def to_ary; end + + # source://actionpack//lib/action_dispatch/http/response.rb#520 def to_path; end end -# source://actionpack//lib/action_dispatch/http/response.rb#81 +# source://actionpack//lib/action_dispatch/http/response.rb#498 +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 @@ -15341,88 +15980,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 +16103,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 +16140,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#2314 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#393 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#376 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#397 module ActionDispatch::Routing::Mapper::Base - # source://actionpack//lib/action_dispatch/routing/mapper.rb#618 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#630 def default_url_options(options); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#618 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#630 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#642 def has_named_route?(name); end # Matches a URL pattern to one or more routes. @@ -15704,7 +16364,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#578 def match(path, options = T.unsafe(nil)); end # Mount a Rack-based application to be used within the application. @@ -15729,23 +16389,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#600 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#635 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#651 def app_name(app, rails_app); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#648 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#660 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#647 def rails_app?(app); end end @@ -15770,7 +16430,7 @@ end # concerns :commentable # end # -# source://actionpack//lib/action_dispatch/routing/mapper.rb#2014 +# source://actionpack//lib/action_dispatch/routing/mapper.rb#2026 module ActionDispatch::Routing::Mapper::Concerns # Define a routing concern using a name. # @@ -15829,7 +16489,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#2083 def concern(name, callable = T.unsafe(nil), &block); end # Use the named concerns @@ -15844,53 +16504,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#2099 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#2111 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 +16600,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#2159 def direct(name, options = T.unsafe(nil), &block); end # Define custom polymorphic mappings of models to URLs. This alters the @@ -15988,18 +16648,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#2211 def resolve(*args, &block); end end -# source://actionpack//lib/action_dispatch/routing/mapper.rb#682 +# source://actionpack//lib/action_dispatch/routing/mapper.rb#694 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#731 def delete(*args, &block); end # Define a route that only recognizes HTTP GET. @@ -16007,7 +16667,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#699 def get(*args, &block); end # Define a route that only recognizes HTTP OPTIONS. @@ -16015,7 +16675,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#739 def options(*args, &block); end # Define a route that only recognizes HTTP PATCH. @@ -16023,7 +16683,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#715 def patch(*args, &block); end # Define a route that only recognizes HTTP POST. @@ -16031,7 +16691,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#707 def post(*args, &block); end # Define a route that only recognizes HTTP PUT. @@ -16039,153 +16699,156 @@ 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#723 def put(*args, &block); end private - # source://actionpack//lib/action_dispatch/routing/mapper.rb#732 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#744 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#319 def add_controller_module(controller, modyoule); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#269 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#272 def app(blocks); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#335 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#338 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#284 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#299 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#345 def constraints(options, path_params); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#356 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#359 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#268 def normalize_defaults(options); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#233 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#236 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 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#363 + def route_source_location; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#230 def split_constraints(path_params, constraints); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#308 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#311 def split_to(to); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#328 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#331 def translate_controller(controller); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#249 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#252 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 +16890,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#1134 module ActionDispatch::Routing::Mapper::Resources # To add a route to the collection: # @@ -16237,12 +16900,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#1512 def collection(&block); end # Loads another routes file with the given +name+ located inside the @@ -16269,7 +16932,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#1622 def draw(name); end # Matches a URL pattern to one or more routes. @@ -16279,7 +16942,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#1644 def match(path, *rest, &block); end # To add a member route, add a member block into the resource block: @@ -16294,18 +16957,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#1533 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#1580 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#1559 def nested(&block); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1537 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1549 def new(&block); end # Sometimes, you have a resource that clients always look up without @@ -16340,10 +17003,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#1304 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 +17138,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#1470 def resources(*resources, &block); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1257 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1269 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 +17162,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#1691 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#1588 def shallow; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1583 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1595 def shallow?; end private # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1743 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1755 def action_options?(options); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1825 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1837 def action_path(name); end # @raise [ArgumentError] # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1961 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1973 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#1891 def api_only?; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1738 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1750 def apply_action_options(options); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1704 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1716 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#1813 def canonical_action?(action); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1946 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1958 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#1943 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#1902 def map_match(paths, options); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1988 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2000 def match_root_route(options); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1841 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1853 def name_for_action(as, action); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1778 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1790 def nested_options; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1759 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1771 def nested_scope?; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1797 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1809 def param_constraint; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1793 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1805 def param_constraint?; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1700 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1712 def parent_resource; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1815 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1827 def path_for_action(action, path); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1883 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1895 def path_scope(path); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1829 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1841 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#1767 def resource_method_scope?; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1770 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1782 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#1763 def resource_scope?; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1747 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1759 def scope_action_options; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1867 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1879 def set_member_mappings_for_resource; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1787 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1799 def shallow_nesting_depth; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1805 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1817 def shallow_scope; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1942 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1954 def using_match_shorthand?(path); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1763 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1775 def with_scope_level(kind); end end -# source://actionpack//lib/action_dispatch/routing/mapper.rb#1127 +# source://actionpack//lib/action_dispatch/routing/mapper.rb#1139 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#1138 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#1141 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#1144 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#1169 def actions; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1165 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1177 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#1201 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#1142 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#1142 def controller; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1149 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1161 def default_actions; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1181 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1193 def member_name; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1199 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1211 def member_scope; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1173 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1185 def name; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1209 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1221 def nested_param; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1213 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1225 def nested_scope; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1205 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1217 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#1142 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#1142 def path; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1177 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1189 def plural; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1193 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1205 def resource_scope; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1217 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1229 def shallow?; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1199 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1211 def shallow_scope; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1221 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1233 def singleton?; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1181 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1193 def singular; end end -# source://actionpack//lib/action_dispatch/routing/mapper.rb#1224 +# source://actionpack//lib/action_dispatch/routing/mapper.rb#1236 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#1237 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#1256 def collection_name; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1232 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1244 def default_actions; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1244 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1256 def member_name; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1130 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1142 def member_scope; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1130 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1142 def nested_scope; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1240 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1252 def plural; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1254 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1266 def singleton?; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1244 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1256 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#1137 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#2225 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#2235 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#2294 def [](key); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2249 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2261 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#2301 def each; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2297 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2309 def frame; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2229 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2241 def nested?; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2274 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2286 def new(hash); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2278 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2290 def new_level(level); end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2233 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2245 def null?; end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2270 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2282 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#2233 def parent; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2245 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2257 def resource_method_scope?; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2266 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2278 def resource_scope?; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2241 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2253 def resources?; end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2237 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2249 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#2233 def scope_level; end end -# source://actionpack//lib/action_dispatch/routing/mapper.rb#2299 +# source://actionpack//lib/action_dispatch/routing/mapper.rb#2311 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#2226 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#2231 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#2230 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 +17506,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 +17517,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 +17550,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#806 module ActionDispatch::Routing::Mapper::Scoping # === Parameter Restriction # Allows you to constrain the nested routes based on a set of rules. @@ -16945,7 +17608,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#1011 def constraints(constraints = T.unsafe(nil), &block); end # Scopes routes to a specific controller @@ -16954,7 +17617,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#896 def controller(controller); end # Allows you to set default parameters for a route, such as this: @@ -16963,7 +17626,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#1020 def defaults(defaults = T.unsafe(nil)); end # Scopes routes to a specific namespace. For example: @@ -16995,7 +17658,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 +17668,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#941 def namespace(path, options = T.unsafe(nil), &block); end # Scopes a set of routes to the given default options. @@ -17024,7 +17687,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 +17702,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#837 def scope(*args); end private - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1040 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1052 def merge_action_scope(parent, child); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1024 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1036 def merge_as_scope(parent, child); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1064 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1076 def merge_blocks_scope(parent, child); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1056 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1068 def merge_constraints_scope(parent, child); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1036 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1048 def merge_controller_scope(parent, child); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1060 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1072 def merge_defaults_scope(parent, child); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1048 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1060 def merge_format_scope(parent, child); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1032 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1044 def merge_module_scope(parent, child); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1070 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1082 def merge_options_scope(parent, child); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1052 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1064 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#1028 def merge_path_scope(parent, child); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1020 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1032 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#1040 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#1086 def merge_shallow_scope(parent, child); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1078 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1090 def merge_to_scope(parent, child); end - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1044 + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1056 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#889 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 +17847,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 +17909,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 +18012,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 +18029,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 +18036,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 +18107,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 +18120,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 +18172,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 +18187,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 +18202,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 +18218,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 +18239,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 +18256,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 +18273,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 +18284,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 +18342,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 +18401,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 +18462,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 +18502,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 +18725,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 +18746,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 +18790,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 +18830,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. @@ -18215,13 +18885,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 +18899,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 +18936,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 +18983,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 +18991,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 +19015,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 +19037,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 +19072,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 +19110,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 +19158,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 +19253,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 +19287,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 +19302,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 +19352,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 +19366,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 +19395,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 +19482,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 +19536,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 @@ -18893,7 +19586,7 @@ end # driven_by :selenium, using: :chrome, screen_size: [1400, 1400] # end # -# By default, ActionDispatch::SystemTestCase is driven by the +# By default, +ActionDispatch::SystemTestCase+ is driven by the # Selenium driver, with the Chrome browser, and a browser size of 1400x1400. # # Changing the driver configuration options is easy. Let's say you want to use @@ -18948,8 +19641,8 @@ end # end # end # -# Because ActionDispatch::SystemTestCase is a shim between Capybara -# and Rails, any driver that is supported by Capybara is supported by system +# Because +ActionDispatch::SystemTestCase+ is a shim between Capybara +# and \Rails, any driver that is supported by Capybara is supported by system # tests as long as you include the required gems and files. # # source://actionpack//lib/action_dispatch/system_test_case.rb#112 @@ -19043,12 +19736,11 @@ class ActionDispatch::SystemTesting::Browser # source://actionpack//lib/action_dispatch/system_testing/browser.rb#6 def options; end - # driver_path can be configured as a proc. The webdrivers gem uses this - # proc to update web drivers. Running this proc early allows us to only - # update the webdriver once and avoid race conditions when using - # parallel tests. + # driver_path can be configured as a proc. Running this proc early allows + # us to only update the webdriver once and avoid race conditions when + # using parallel tests. # - # source://actionpack//lib/action_dispatch/system_testing/browser.rb#33 + # source://actionpack//lib/action_dispatch/system_testing/browser.rb#32 def preload; end # source://actionpack//lib/action_dispatch/system_testing/browser.rb#13 @@ -19056,16 +19748,16 @@ class ActionDispatch::SystemTesting::Browser private - # source://actionpack//lib/action_dispatch/system_testing/browser.rb#43 + # source://actionpack//lib/action_dispatch/system_testing/browser.rb#42 def initialize_options; end - # source://actionpack//lib/action_dispatch/system_testing/browser.rb#53 + # source://actionpack//lib/action_dispatch/system_testing/browser.rb#52 def set_default_options; end - # source://actionpack//lib/action_dispatch/system_testing/browser.rb#62 + # source://actionpack//lib/action_dispatch/system_testing/browser.rb#61 def set_headless_chrome_browser_options; end - # source://actionpack//lib/action_dispatch/system_testing/browser.rb#69 + # source://actionpack//lib/action_dispatch/system_testing/browser.rb#68 def set_headless_firefox_browser_options; end end @@ -19081,38 +19773,35 @@ class ActionDispatch::SystemTesting::Driver # source://actionpack//lib/action_dispatch/system_testing/driver.rb#6 def name; end - # source://actionpack//lib/action_dispatch/system_testing/driver.rb#33 + # source://actionpack//lib/action_dispatch/system_testing/driver.rb#25 def use; end private - # source://actionpack//lib/action_dispatch/system_testing/driver.rb#58 + # source://actionpack//lib/action_dispatch/system_testing/driver.rb#49 def browser_options; end - # source://actionpack//lib/action_dispatch/system_testing/driver.rb#44 + # source://actionpack//lib/action_dispatch/system_testing/driver.rb#36 def register; end - # source://actionpack//lib/action_dispatch/system_testing/driver.rb#78 + # source://actionpack//lib/action_dispatch/system_testing/driver.rb#59 def register_cuprite(app); end - # source://actionpack//lib/action_dispatch/system_testing/driver.rb#68 - def register_poltergeist(app); end + # source://actionpack//lib/action_dispatch/system_testing/driver.rb#67 + def register_playwright(app); end - # source://actionpack//lib/action_dispatch/system_testing/driver.rb#82 + # source://actionpack//lib/action_dispatch/system_testing/driver.rb#63 def register_rack_test(app); end - # source://actionpack//lib/action_dispatch/system_testing/driver.rb#62 + # source://actionpack//lib/action_dispatch/system_testing/driver.rb#53 def register_selenium(app); end - # source://actionpack//lib/action_dispatch/system_testing/driver.rb#72 - def register_webkit(app); end - # @return [Boolean] # - # source://actionpack//lib/action_dispatch/system_testing/driver.rb#40 + # source://actionpack//lib/action_dispatch/system_testing/driver.rb#32 def registerable?; end - # source://actionpack//lib/action_dispatch/system_testing/driver.rb#86 + # source://actionpack//lib/action_dispatch/system_testing/driver.rb#78 def setup; end end @@ -19170,17 +19859,15 @@ module ActionDispatch::SystemTesting::TestHelpers::ScreenshotHelper # to investigate changes at different points during your test. These will be # named with a sequential prefix (or 'failed' for failing tests) # - # The screenshot will be displayed in your console, if supported. - # # The default screenshots directory is +tmp/screenshots+ but you can set a different # one with +Capybara.save_path+ # - # You can set the +RAILS_SYSTEM_TESTING_SCREENSHOT_HTML+ environment variable to - # save the HTML from the page that is being screenshotted so you can investigate the - # elements on the page at the time of the screenshot + # You can use the +html+ argument or set the +RAILS_SYSTEM_TESTING_SCREENSHOT_HTML+ + # environment variable to save the HTML from the page that is being screenshotted + # so you can investigate the elements on the page at the time of the screenshot # - # You can set the +RAILS_SYSTEM_TESTING_SCREENSHOT+ environment variable to - # control the output. Possible values are: + # You can use the +screenshot+ argument or set the +RAILS_SYSTEM_TESTING_SCREENSHOT+ + # environment variable to control the output. Possible values are: # * [+simple+ (default)] Only displays the screenshot path. # This is the default value. # * [+inline+] Display the screenshot in the terminal using the @@ -19188,78 +19875,84 @@ module ActionDispatch::SystemTesting::TestHelpers::ScreenshotHelper # * [+artifact+] Display the screenshot in the terminal, using the terminal # artifact format (https://buildkite.github.io/terminal-to-html/inline-images/). # - # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#33 - def take_screenshot; end + # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#31 + def take_screenshot(html: T.unsafe(nil), screenshot: T.unsafe(nil)); end private # Returns the value of attribute _screenshot_counter. # - # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#49 + # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#52 def _screenshot_counter; end # Sets the attribute _screenshot_counter # # @param value the value to set the attribute _screenshot_counter to. # - # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#49 + # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#52 def _screenshot_counter=(_arg0); end - # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#90 + # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#97 def absolute_html_path; end - # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#86 + # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#89 def absolute_image_path; end - # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#78 + # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#81 def absolute_path; end - # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#112 - def display_image; end + # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#123 + def display_image(html:, screenshot_output:); end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#132 + # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#143 def failed?; end - # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#74 + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#54 + def html_from_env?; end + + # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#77 def html_path; end - # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#64 + # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#67 def image_name; end - # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#70 + # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#73 def image_path; end - # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#55 + # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#58 def increment_unique; end - # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#128 + # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#139 def inline_base64(path); end - # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#102 + # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#109 def output_type; end - # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#94 - def save_html; end + # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#93 + def relative_image_path; end - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#51 - def save_html?; end + # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#101 + def save_html; end - # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#98 + # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#105 def save_image; end - # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#82 + # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#85 def screenshots_dir; end + # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#119 + def show(img); end + # @return [Boolean] # - # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#136 + # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#147 def supports_screenshot?; end - # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#60 + # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#63 def unique; end end @@ -19278,19 +19971,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 @@ -19298,14 +19991,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 @@ -19376,24 +20083,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 @@ -19405,12 +20126,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 @@ -19443,11 +20164,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 @@ -19455,27 +20184,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 @@ -19486,10 +20215,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 @@ -19501,45 +20230,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 @@ -19550,7 +20286,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: @@ -19567,124 +20303,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. @@ -19693,78 +20429,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/2.2.8/lib/rack/version.rb#26 def release; end - # source://rack/2.2.7/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/actiontext@7.0.6.rbi b/sorbet/rbi/gems/actiontext@7.1.1.rbi similarity index 57% rename from sorbet/rbi/gems/actiontext@7.0.6.rbi rename to sorbet/rbi/gems/actiontext@7.1.1.rbi index 4b1d51608..97f7da845 100644 --- a/sorbet/rbi/gems/actiontext@7.0.6.rbi +++ b/sorbet/rbi/gems/actiontext@7.1.1.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.1/lib/rails/engine.rb#405 def railtie_helpers_paths; end - # source://railties/7.0.6/lib/rails/engine.rb#394 + # source://railties/7.1.1/lib/rails/engine.rb#394 def railtie_namespace; end - # source://railties/7.0.6/lib/rails/engine.rb#409 + # source://railties/7.1.1/lib/rails/engine.rb#409 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.1/lib/rails/engine.rb#397 def table_name_prefix; end - # source://railties/7.0.6/lib/rails/engine.rb#401 + # source://railties/7.1.1/lib/rails/engine.rb#401 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.1/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.1/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.1/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.1/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.1/lib/active_model/validations.rb#71 def _validators; end - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 + # source://activemodel/7.1.1/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.1/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.1/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.1/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.1/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.1/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.1/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.1/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.1/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.1/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.1/lib/active_model/validations.rb#71 def _validators; end - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 + # source://activemodel/7.1.1/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.1/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.1/lib/active_model/conversion.rb#32 + def param_delimiter; end + + # source://activemodel/7.1.1/lib/active_model/conversion.rb#32 + def param_delimiter=(value); end + + # source://activemodel/7.1.1/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.1/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.1/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.1/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.1/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.1/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + # source://activesupport/7.1.1/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.1/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.1/lib/active_model/validations.rb#71 def _validators; end - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 + # source://activemodel/7.1.1/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.1/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.1/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.1/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.1/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.1/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.1/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.1/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.1/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.1/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.1/lib/active_model/validations.rb#71 def _validators; end - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 + # source://activemodel/7.1.1/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.1/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.1/lib/active_model/conversion.rb#32 + def param_delimiter; end + + # source://activemodel/7.1.1/lib/active_model/conversion.rb#32 + def param_delimiter=(value); end + + # source://activemodel/7.1.1/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.1/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.1/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.1/lib/active_model/validations.rb#71 def _validators; end - # source://activerecord/7.0.6/lib/active_record/attributes.rb#11 + # source://activerecord/7.1.1/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.1/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.1/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.1/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.1/lib/active_model/validations.rb#71 def _validators; end - # source://activerecord/7.0.6/lib/active_record/enum.rb#116 + # source://activerecord/7.1.1/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.1/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.1/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.1/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.1/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.1/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.1/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activerecord/7.0.6/lib/active_record/reflection.rb#11 + # source://activerecord/7.1.1/lib/active_record/reflection.rb#11 def _reflections; end - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 + # source://activemodel/7.1.1/lib/active_model/validations.rb#71 def _validators; end - # source://activestorage/7.0.6/lib/active_storage/reflection.rb#53 + # source://activestorage/7.1.1/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.1/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.1/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.1/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.1/lib/active_storage/attached/model.rb#184 def embeds; end - # source://activestorage/7.0.6/lib/active_storage/attached/model.rb#139 + # source://activestorage/7.1.1/lib/active_storage/attached/model.rb#189 def embeds=(attachables); end - # source://activerecord/7.0.6/lib/active_record/associations/builder/collection_association.rb#62 + # source://activerecord/7.1.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/lib/active_record/associations/builder/singular_association.rb#19 def reload_record; end + + # source://activerecord/7.1.1/lib/active_record/associations/builder/singular_association.rb#23 + def reset_record; end end module ActionText::RichText::GeneratedAttributeMethods; end @@ -1219,6 +1427,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), T.untyped) + +# 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 @@ -1233,216 +1459,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.1/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.1/lib/action_view/helpers/form_helper.rb#1713 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.1/lib/action_view/helpers/form_helper.rb#2640 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.1/lib/action_view/helpers/form_helper.rb#2464 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.1/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.1/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.1/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.1/lib/action_view/helpers/form_helper.rb#2019 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.1/lib/action_view/helpers/form_helper.rb#2019 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.1/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.1/lib/action_view/helpers/form_helper.rb#2019 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.1/lib/action_view/helpers/form_helper.rb#2019 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.1/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.1/lib/action_view/helpers/form_helper.rb#2019 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.1/lib/action_view/helpers/form_helper.rb#2661 def emitted_hidden_id?; end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1665 + # source://actionview/7.1.1/lib/action_view/helpers/form_helper.rb#1678 def field_helpers; end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1665 + # source://actionview/7.1.1/lib/action_view/helpers/form_helper.rb#1678 def field_helpers=(_arg0); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1665 + # source://actionview/7.1.1/lib/action_view/helpers/form_helper.rb#1678 def field_helpers?; end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1757 + # source://actionview/7.1.1/lib/action_view/helpers/form_helper.rb#1770 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.1/lib/action_view/helpers/form_helper.rb#1790 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.1/lib/action_view/helpers/form_helper.rb#2320 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.1/lib/action_view/helpers/form_helper.rb#2282 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.1/lib/action_view/helpers/form_helper.rb#2547 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.1/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.1/lib/action_view/helpers/form_helper.rb#2508 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.1/lib/action_view/helpers/form_helper.rb#1750 def id; end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1677 + # source://actionview/7.1.1/lib/action_view/helpers/form_helper.rb#1690 def index; end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#2369 + # source://actionview/7.1.1/lib/action_view/helpers/form_helper.rb#2395 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.1/lib/action_view/helpers/form_helper.rb#2019 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.1/lib/action_view/helpers/form_helper.rb#1690 def multipart; end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1680 + # source://actionview/7.1.1/lib/action_view/helpers/form_helper.rb#1693 def multipart=(multipart); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1677 + # source://actionview/7.1.1/lib/action_view/helpers/form_helper.rb#1690 def multipart?; end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#2006 + # source://actionview/7.1.1/lib/action_view/helpers/form_helper.rb#2019 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.1/lib/action_view/helpers/form_helper.rb#1688 def object; end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1675 + # source://actionview/7.1.1/lib/action_view/helpers/form_helper.rb#1688 def object=(_arg0); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1675 + # source://actionview/7.1.1/lib/action_view/helpers/form_helper.rb#1688 def object_name; end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1675 + # source://actionview/7.1.1/lib/action_view/helpers/form_helper.rb#1688 def object_name=(_arg0); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1675 + # source://actionview/7.1.1/lib/action_view/helpers/form_helper.rb#1688 def options; end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1675 + # source://actionview/7.1.1/lib/action_view/helpers/form_helper.rb#1688 def options=(_arg0); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#2006 + # source://actionview/7.1.1/lib/action_view/helpers/form_helper.rb#2019 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.1/lib/action_view/helpers/form_helper.rb#2019 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.1/lib/action_view/helpers/form_helper.rb#2486 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.1/lib/action_view/helpers/form_helper.rb#2019 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.1/lib/action_view/helpers/form_helper.rb#2019 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.1/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.1/lib/action_view/helpers/form_helper.rb#2579 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.1/lib/action_view/helpers/form_helper.rb#2019 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.1/lib/action_view/helpers/form_helper.rb#2019 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.1/lib/action_view/helpers/form_helper.rb#2019 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.1/lib/action_view/helpers/form_helper.rb#2019 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.1/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.1/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.1/lib/action_view/helpers/form_helper.rb#1709 def to_model; end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1692 + # source://actionview/7.1.1/lib/action_view/helpers/form_helper.rb#1705 def to_partial_path; end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#2006 + # source://actionview/7.1.1/lib/action_view/helpers/form_helper.rb#2019 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.1/lib/action_view/helpers/form_helper.rb#2019 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.1/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.1/lib/action_view/helpers/form_helper.rb#2746 def convert_to_legacy_options(options); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#2702 + # source://actionview/7.1.1/lib/action_view/helpers/form_helper.rb#2728 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.1/lib/action_view/helpers/form_helper.rb#2699 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.1/lib/action_view/helpers/form_helper.rb#2695 def nested_attributes_association?(association_name); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#2715 + # source://actionview/7.1.1/lib/action_view/helpers/form_helper.rb#2741 def nested_child_index(name); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#2640 + # source://actionview/7.1.1/lib/action_view/helpers/form_helper.rb#2666 def objectify_options(options); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#2646 + # source://actionview/7.1.1/lib/action_view/helpers/form_helper.rb#2672 def submit_default_value; end class << self - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1688 + # source://actionview/7.1.1/lib/action_view/helpers/form_helper.rb#1701 def _to_partial_path; end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1665 + # source://actionview/7.1.1/lib/action_view/helpers/form_helper.rb#1678 def field_helpers; end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1665 + # source://actionview/7.1.1/lib/action_view/helpers/form_helper.rb#1678 def field_helpers=(value); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1665 + # source://actionview/7.1.1/lib/action_view/helpers/form_helper.rb#1678 def field_helpers?; end end end @@ -1456,141 +1682,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.1/lib/action_view/helpers/form_helper.rb#1584 def _object_for_form_builder(object); end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1336 + # source://actionview/7.1.1/lib/action_view/helpers/form_helper.rb#1341 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.1/lib/action_view/helpers/form_helper.rb#1371 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.1/lib/action_view/helpers/form_helper.rb#1435 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.1/lib/action_view/helpers/form_helper.rb#1508 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.1/lib/action_view/helpers/form_helper.rb#1508 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.1/lib/action_view/helpers/form_helper.rb#1562 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.1/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.1/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.1/lib/action_view/helpers/form_helper.rb#1243 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.1/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.1/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.1/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.1/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.1/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.1/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.1/lib/action_view/helpers/form_helper.rb#1210 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.1/lib/action_view/helpers/form_helper.rb#1147 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.1/lib/action_view/helpers/form_helper.rb#1527 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.1/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.1/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.1/lib/action_view/helpers/form_helper.rb#1571 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.1/lib/action_view/helpers/form_helper.rb#1192 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.1/lib/action_view/helpers/form_helper.rb#1403 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.1/lib/action_view/helpers/form_helper.rb#1363 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.1/lib/action_view/helpers/form_helper.rb#1580 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.1/lib/action_view/helpers/form_helper.rb#1394 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.1/lib/action_view/helpers/form_helper.rb#1403 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.1/lib/action_view/helpers/form_helper.rb#1273 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.1/lib/action_view/helpers/form_helper.rb#1171 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.1/lib/action_view/helpers/form_helper.rb#1473 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.1/lib/action_view/helpers/form_helper.rb#1553 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.1/lib/action_view/helpers/form_helper.rb#1544 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.1/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.1/lib/action_view/helpers/form_helper.rb#1618 def default_form_builder_class; end - # source://actionview/7.0.6/lib/action_view/helpers/form_helper.rb#1578 + # source://actionview/7.1.1/lib/action_view/helpers/form_helper.rb#1589 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.1/lib/action_view/helpers/form_helper.rb#1604 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.1/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.1/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.1/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.1/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.1/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.1/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.1.rbi similarity index 88% rename from sorbet/rbi/gems/actionview@7.0.6.rbi rename to sorbet/rbi/gems/actionview@7.1.1.rbi index ada398d9f..12b96541b 100644 --- a/sorbet/rbi/gems/actionview@7.0.6.rbi +++ b/sorbet/rbi/gems/actionview@7.1.1.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.1/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.1/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://actionpack/7.0.6/lib/abstract_controller/helpers.rb#11 + # source://actionpack/7.1.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/lib/active_support/configurable.rb#115 + def csrf_token_storage_strategy; end + + # source://activesupport/7.1.1/lib/active_support/configurable.rb#116 + def csrf_token_storage_strategy=(value); end + + # source://activesupport/7.1.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/lib/active_support/configurable.rb#115 def logger; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.1/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.1/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.1/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.1/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.1/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.1/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.1/lib/abstract_controller/callbacks.rb#36 + def raise_on_missing_callback_actions; end + + # source://actionpack/7.1.1/lib/abstract_controller/callbacks.rb#36 + def raise_on_missing_callback_actions=(val); end + + # source://actionpack/7.1.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/lib/active_support/configurable.rb#115 + def csrf_token_storage_strategy; end + + # source://activesupport/7.1.1/lib/active_support/configurable.rb#116 + def csrf_token_storage_strategy=(value); end + + # source://activesupport/7.1.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/lib/active_support/configurable.rb#115 def logger; end - # source://activesupport/7.0.6/lib/active_support/configurable.rb#114 + # source://activesupport/7.1.1/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.1/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.1/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.1/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.1/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.1/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.1/lib/abstract_controller/callbacks.rb#36 + def raise_on_missing_callback_actions; end + + # source://actionpack/7.1.1/lib/abstract_controller/callbacks.rb#36 + def raise_on_missing_callback_actions=(val); end + + # source://actionpack/7.1.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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#2755 def default_form_builder; end - # source://actionview//lib/action_view/helpers/form_helper.rb#2729 + # source://actionview//lib/action_view/helpers/form_helper.rb#2755 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 @@ -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 # @@ -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#166 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#209 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#188 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#215 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#1273 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 +7111,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#1171 def text_field(object_name, method, options = T.unsafe(nil)); end # Returns a text_field of type "time". @@ -6906,7 +7149,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#1473 def time_field(object_name, method, options = T.unsafe(nil)); end # Returns a text_field of type "url". @@ -6914,7 +7157,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#1553 def url_field(object_name, method, options = T.unsafe(nil)); end # Returns a text_field of type "week". @@ -6930,44 +7173,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#1544 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#1618 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#1589 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#1604 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 +7294,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 +7384,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 +7467,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 +7633,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 +7745,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 +7773,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 +7838,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 +7861,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 +7895,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 +7910,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 +7998,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 +8018,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 +8050,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 +8073,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 +8096,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 +8108,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 +8122,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 +8153,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 @@ -7921,7 +8178,7 @@ module ActionView::Helpers::FormTagHelper # 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 @@ -7936,7 +8193,7 @@ module ActionView::Helpers::FormTagHelper # <%= text_field_tag :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 +8217,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 +8256,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 +8306,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 +8326,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 +8360,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 +8378,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 +8391,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 +8439,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 +8472,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 +8495,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 +8523,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 +8532,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 +8555,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 +8614,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 +8640,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 +8659,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 +8682,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 +8715,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 +8755,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 +8769,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 +8792,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 +8811,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 +8865,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 +8875,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 +8917,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,7 +8933,7 @@ 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. @@ -8727,7 +8993,7 @@ module ActionView::Helpers::NumberHelper # 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#128 def number_to_currency(number, options = T.unsafe(nil)); end # Pretty prints (formats and approximates) a number in a way it @@ -8833,7 +9099,7 @@ module ActionView::Helpers::NumberHelper # 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#405 def number_to_human(number, options = T.unsafe(nil)); end # Formats the bytes in +number+ into a more understandable @@ -8879,7 +9145,7 @@ module ActionView::Helpers::NumberHelper # 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#298 def number_to_human_size(number, options = T.unsafe(nil)); end # Formats a +number+ as a percentage string (e.g., 65%). You can @@ -8919,7 +9185,7 @@ module ActionView::Helpers::NumberHelper # # 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#168 def number_to_percentage(number, options = T.unsafe(nil)); end # Formats a +number+ into a phone number (US by default e.g., (555) @@ -8959,7 +9225,7 @@ module ActionView::Helpers::NumberHelper # 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#63 def number_to_phone(number, options = T.unsafe(nil)); end # Formats a +number+ with grouped thousands using +delimiter+ @@ -8998,7 +9264,7 @@ module ActionView::Helpers::NumberHelper # # number_with_delimiter("112a", raise: true) # => raise InvalidNumberError # - # source://actionview//lib/action_view/helpers/number_helper.rb#206 + # source://actionview//lib/action_view/helpers/number_helper.rb#207 def number_with_delimiter(number, options = T.unsafe(nil)); end # Formats a +number+ with the specified level of @@ -9043,63 +9309,65 @@ module ActionView::Helpers::NumberHelper # number_with_precision(1111.2345, precision: 2, separator: ',', delimiter: '.') # # => 1.111,23 # - # source://actionview//lib/action_view/helpers/number_helper.rb#251 + # source://actionview//lib/action_view/helpers/number_helper.rb#252 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#410 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#429 def escape_units(units); end - # source://actionview//lib/action_view/helpers/number_helper.rb#418 + # source://actionview//lib/action_view/helpers/number_helper.rb#419 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#452 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#448 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#435 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 +9401,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 +9484,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 +9497,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. @@ -9244,7 +9513,7 @@ module ActionView::Helpers::SanitizeHelper # # * :tags - An array of allowed tags. # * :attributes - An array of allowed attributes. - # * :scrubber - A {Rails::Html scrubber}[https://github.com/rails/rails-html-sanitizer] + # * :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. @@ -9259,9 +9528,9 @@ module ActionView::Helpers::SanitizeHelper # # <%= 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 ) @@ -9276,7 +9545,7 @@ module ActionView::Helpers::SanitizeHelper # <%= 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: # @@ -9295,14 +9564,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 use Rails::HTML4::Sanitizer. + # + # source://actionview//lib/action_view/helpers/sanitize_helper.rb#100 def sanitize(html, options = T.unsafe(nil)); end # 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#105 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 +9608,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#139 def strip_links(html); end # Strips all HTML tags from +html+, including comments and special characters. @@ -9334,64 +9625,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#122 def strip_tags(html); end + + 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#124 +# source://actionview//lib/action_view/helpers/sanitize_helper.rb#143 module ActionView::Helpers::SanitizeHelper::ClassMethods - # Gets the Rails::Html::FullSanitizer instance used by +strip_tags+. Replace with + # 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#164 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#144 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#174 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#144 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#184 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#144 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#154 def sanitized_allowed_attributes; end # source://rails-html-sanitizer/1.6.0/lib/rails-html-sanitizer.rb#34 @@ -9415,7 +9714,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#150 def sanitized_allowed_tags; end # source://rails-html-sanitizer/1.6.0/lib/rails-html-sanitizer.rb#24 @@ -9445,7 +9744,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#146 def sanitizer_vendor; end private @@ -9454,10 +9753,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 +9777,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 +9792,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 +9824,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 +9835,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 +9931,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 +9977,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 +9992,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 +10040,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 +10091,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 +10197,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 +10278,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 +10325,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 +10364,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 +10413,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 +10471,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 +10523,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 +10543,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 +10602,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 +10610,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 +10669,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 +10711,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 @@ -10406,7 +10738,7 @@ module ActionView::Helpers::TextHelper # # will either display "Logged in!" or a login link # %> # - # source://actionview//lib/action_view/helpers/text_helper.rb#58 + # source://actionview//lib/action_view/helpers/text_helper.rb#59 def concat(string); end # Returns the current cycle string after a cycle has been started. Useful @@ -10421,7 +10753,7 @@ module ActionView::Helpers::TextHelper #
# <% end %> # - # source://actionview//lib/action_view/helpers/text_helper.rb#382 + # source://actionview//lib/action_view/helpers/text_helper.rb#398 def current_cycle(name = T.unsafe(nil)); end # Creates a Cycle object whose _to_s_ method cycles through elements of an @@ -10462,7 +10794,7 @@ module ActionView::Helpers::TextHelper # # <% end %> # - # source://actionview//lib/action_view/helpers/text_helper.rb#358 + # source://actionview//lib/action_view/helpers/text_helper.rb#374 def cycle(first_value, *values); end # Extracts an excerpt from +text+ that matches the first instance of +phrase+. @@ -10490,7 +10822,7 @@ module ActionView::Helpers::TextHelper # excerpt('This is a very beautiful morning', 'very', separator: ' ', radius: 1) # # => ...a very beautiful... # - # source://actionview//lib/action_view/helpers/text_helper.rb#179 + # source://actionview//lib/action_view/helpers/text_helper.rb#183 def excerpt(text, phrase, options = T.unsafe(nil)); end # Highlights one or more +phrases+ everywhere in +text+ by inserting it into @@ -10521,7 +10853,7 @@ module ActionView::Helpers::TextHelper # highlight('ruby on rails', 'rails', sanitize: false) # # => ruby on rails # - # source://actionview//lib/action_view/helpers/text_helper.rb#136 + # source://actionview//lib/action_view/helpers/text_helper.rb#137 def highlight(text, phrases, options = T.unsafe(nil), &block); end # Attempts to pluralize the +singular+ word unless +count+ is 1. If @@ -10548,7 +10880,7 @@ module ActionView::Helpers::TextHelper # pluralize(2, 'Person', locale: :de) # # => 2 Personen # - # source://actionview//lib/action_view/helpers/text_helper.rb#234 + # source://actionview//lib/action_view/helpers/text_helper.rb#238 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 @@ -10570,10 +10902,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#421 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#63 def safe_concat(string); end # Returns +text+ transformed into HTML using simple formatting rules. @@ -10588,6 +10920,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,7 +10946,10 @@ 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#322 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 @@ -10649,7 +10985,7 @@ module ActionView::Helpers::TextHelper # truncate("Once upon a time in a world far far away") { link_to "Continue", "#" } # # => "Once upon a time in a wo...Continue" # - # source://actionview//lib/action_view/helpers/text_helper.rb#98 + # source://actionview//lib/action_view/helpers/text_helper.rb#99 def truncate(text, options = T.unsafe(nil), &block); end # Wraps the +text+ into lines no longer than +line_width+ width. This method @@ -10673,61 +11009,63 @@ module ActionView::Helpers::TextHelper # word_wrap('Once upon a time', line_width: 1, break_sequence: "\r\n") # # => 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#268 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#484 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#466 def get_cycle(name); end - # source://actionview//lib/action_view/helpers/text_helper.rb#455 + # source://actionview//lib/action_view/helpers/text_helper.rb#471 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#476 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#426 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#429 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#438 def current_value; end - # source://actionview//lib/action_view/helpers/text_helper.rb#418 + # source://actionview//lib/action_view/helpers/text_helper.rb#434 def reset; end - # source://actionview//lib/action_view/helpers/text_helper.rb#426 + # source://actionview//lib/action_view/helpers/text_helper.rb#442 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#427 def values; end private - # source://actionview//lib/action_view/helpers/text_helper.rb#433 + # source://actionview//lib/action_view/helpers/text_helper.rb#449 def next_index; end - # source://actionview//lib/action_view/helpers/text_helper.rb#437 + # source://actionview//lib/action_view/helpers/text_helper.rb#453 def previous_index; end - # source://actionview//lib/action_view/helpers/text_helper.rb#441 + # source://actionview//lib/action_view/helpers/text_helper.rb#457 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 +11222,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 +11242,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 +11255,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 +11324,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 +11342,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 +11350,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 +11397,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 +11474,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. + # + # {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, + # 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 +11524,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 +11532,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 +11555,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 +11579,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 +11621,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 +11639,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 +11663,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 +11702,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 +11746,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 +11804,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 +11828,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 +11850,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 +11863,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. @@ -11696,7 +12062,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 +12074,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 +12091,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 +12112,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 +12130,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 +12148,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 +12183,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 +12194,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 +12214,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.1/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 +12304,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 +12334,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 +12400,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 +12436,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 +12445,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 +12507,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 +12538,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 +12665,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 +13044,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 +13062,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 +13105,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 +13113,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 +13158,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.1/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 +13220,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 +13245,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 +13261,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 +13291,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 +14064,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 +14076,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 +14109,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 +14148,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 +14175,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 +14237,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 +14273,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 +14334,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.1/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 +14436,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.1/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 +14554,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 +14577,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 +14590,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#290 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#269 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#209 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#356 def marshal_dump; end - # source://actionview//lib/action_view/template.rb#233 + # source://actionview//lib/action_view/template.rb#360 def marshal_load(array); end + # source://actionview//lib/action_view/template.rb#365 + def method_name; end + # Render a template. If the template was not compiled yet, it is done # exactly before rendering. # @@ -14132,39 +14637,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 + # source://actionview//lib/action_view/template.rb#247 def render(view, locals, buffer = 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#265 def short_identifier; end - # source://actionview//lib/action_view/template.rb#175 + # source://actionview//lib/action_view/template.rb#273 def source; end + # source://actionview//lib/action_view/template.rb#217 + 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#335 + def strict_locals!; end + + # Returns whether a template is using strict locals. + # + # @return [Boolean] + # + # source://actionview//lib/action_view/template.rb#349 + 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#237 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#227 + def translate_location(backtrace_location, spot); end + + # source://actionview//lib/action_view/template.rb#261 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 +14715,57 @@ 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 + # @raise [ArgumentError] + # + # source://actionview//lib/action_view/template.rb#465 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#387 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#412 + def compiled_source; end + + # source://actionview//lib/action_view/template.rb#374 + def find_node_by_id(node, node_id); end + + # source://actionview//lib/action_view/template.rb#504 def handle_render_error(view, e); end - # source://actionview//lib/action_view/template.rb#352 + # source://actionview//lib/action_view/template.rb#526 def identifier_method_name; end - # source://actionview//lib/action_view/template.rb#356 + # source://actionview//lib/action_view/template.rb#530 def instrument(action, &block); end - # source://actionview//lib/action_view/template.rb#364 + # source://actionview//lib/action_view/template.rb#538 def instrument_payload; end - # source://actionview//lib/action_view/template.rb#360 + # source://actionview//lib/action_view/template.rb#534 def instrument_render_template(&block); end - # source://actionview//lib/action_view/template.rb#325 + # source://actionview//lib/action_view/template.rb#513 def locals_code; end - # source://actionview//lib/action_view/template.rb#344 - def method_name; end + # source://actionview//lib/action_view/template.rb#496 + 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 +14773,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 +14854,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 +14927,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 +15046,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 +15094,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#277 +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 +15128,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 +15147,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 +15214,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 +15245,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 +15346,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 +15451,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 +15460,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 +15490,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 +15503,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 +15519,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.1/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.1/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.1/lib/abstract_controller/helpers.rb#12 def _helper_methods?; end # source://actionview//lib/action_view/helpers/translation_helper.rb#18 @@ -14958,21 +15543,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.1/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://actionpack/7.0.6/lib/abstract_controller/helpers.rb#11 + # source://actionpack/7.1.1/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.1/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.1/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.1/lib/abstract_controller/helpers.rb#16 def _helpers; end + # source://actionview//lib/action_view/test_case.rb#199 + def content_class; end + + # source://actionview//lib/action_view/test_case.rb#199 + def content_class=(value); end + + # source://actionview//lib/action_view/test_case.rb#199 + def content_class?; end + # source://actionview//lib/action_view/helpers/translation_helper.rb#18 def debug_missing_translation; end @@ -14981,17 +15575,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 +15591,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 +15604,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#296 def _routes; end - # source://actionview//lib/action_view/test_case.rb#122 + # source://actionview//lib/action_view/test_case.rb#231 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#235 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 } # - # @param value the value to set the attribute rendered to. + # 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") + # + # render formats: :json, partial: "articles/article", locals: { article: article } + # + # assert_pattern { rendered.json => { title: "Hello, world" } } + # end # - # source://actionview//lib/action_view/test_case.rb#60 - def rendered=(_arg0); end + # source://actionview//lib/action_view/test_case.rb#292 + def rendered; end - # source://actionview//lib/action_view/test_case.rb#132 + # source://actionview//lib/action_view/test_case.rb#241 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#219 def setup_with_controller; end private - # source://actionview//lib/action_view/test_case.rb#251 + # source://actionview//lib/action_view/test_case.rb#403 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#355 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#331 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#417 + 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#434 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#355 def view; end # Returns a Hash of instance variables and their values, as defined by @@ -15117,13 +15749,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#411 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 +15768,243 @@ 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#162 def determine_default_helper_class(name); end - # source://actionview//lib/action_view/test_case.rb#92 + # source://actionview//lib/action_view/test_case.rb#182 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#180 def helper_class=(_arg0); end - # source://actionview//lib/action_view/test_case.rb#78 + # source://actionview//lib/action_view/test_case.rb#168 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#186 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. + # + # === Arguments + # + # format - Symbol the name of the format used to render view's content + # callable - Callable to parse the String. Accepts the String. + # value as its only argument. + # block - Block serves as the parser when the + # callable is omitted. + # + # By default, ActionView::TestCase defines a parser for: + # + # * :html - returns an instance of Nokogiri::XML::Node + # * :json - returns an instance of ActiveSupport::HashWithIndifferentAccess + # + # Each pre-registered parser also defines a corresponding helper: + # + # * :html - defines `rendered.html` + # * :json - defines `rendered.json` + # + # === 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#146 + def register_parser(format, callable = T.unsafe(nil), &block); end + + # source://actionview//lib/action_view/test_case.rb#153 def tests(helper_class); end private - # source://actionview//lib/action_view/test_case.rb#102 + # source://actionview//lib/action_view/test_case.rb#192 def include_helper_modules!; end end -# source://actionview//lib/action_view/test_case.rb#220 +# source://actionview//lib/action_view/test_case.rb#300 +class ActionView::TestCase::Behavior::Content < ::SimpleDelegator + # source://actionview//lib/action_view/test_case.rb#148 + def html; end + + # source://actionview//lib/action_view/test_case.rb#148 + def json; end +end + +# source://actionview//lib/action_view/test_case.rb#368 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#335 module ActionView::TestCase::Behavior::Locals - # source://actionview//lib/action_view/test_case.rb#190 + # source://actionview//lib/action_view/test_case.rb#338 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#336 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#336 def rendered_views=(_arg0); 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#304 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#305 def initialize; end - # source://actionview//lib/action_view/test_case.rb#146 + # source://actionview//lib/action_view/test_case.rb#309 def add(view, locals); end - # source://actionview//lib/action_view/test_case.rb#151 + # source://actionview//lib/action_view/test_case.rb#314 def locals_for(view); end - # source://actionview//lib/action_view/test_case.rb#155 + # source://actionview//lib/action_view/test_case.rb#318 def rendered_views; end # @return [Boolean] # - # source://actionview//lib/action_view/test_case.rb#159 + # source://actionview//lib/action_view/test_case.rb#322 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#213 def _test_case; end - # source://actionview//lib/action_view/test_case.rb#171 + # source://actionview//lib/action_view/test_case.rb#209 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.1/lib/action_controller/metal.rb#262 def middleware_stack; end end end @@ -15300,6 +16019,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 +16046,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 @@ -15357,7 +16079,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 +16092,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 +16114,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 +16124,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 +16132,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 +16155,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 +16165,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 +16179,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 +16187,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.1.rbi similarity index 81% rename from sorbet/rbi/gems/activejob@7.0.6.rbi rename to sorbet/rbi/gems/activejob@7.1.1.rbi index 7907c67a9..95925037c 100644 --- a/sorbet/rbi/gems/activejob@7.0.6.rbi +++ b/sorbet/rbi/gems/activejob@7.1.1.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,41 +76,41 @@ module ActiveJob::Arguments private - # source://activejob//lib/active_job/arguments.rb#204 + # source://activejob//lib/active_job/arguments.rb#193 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#140 def custom_serialized?(hash); end - # source://activejob//lib/active_job/arguments.rb#122 + # source://activejob//lib/active_job/arguments.rb#111 def deserialize_argument(argument); end - # source://activejob//lib/active_job/arguments.rb#147 + # source://activejob//lib/active_job/arguments.rb#136 def deserialize_global_id(hash); end - # source://activejob//lib/active_job/arguments.rb#161 + # source://activejob//lib/active_job/arguments.rb#150 def deserialize_hash(serialized_hash); end - # source://activejob//lib/active_job/arguments.rb#95 + # source://activejob//lib/active_job/arguments.rb#73 def serialize_argument(argument); end - # source://activejob//lib/active_job/arguments.rb#155 + # source://activejob//lib/active_job/arguments.rb#144 def serialize_hash(argument); end - # source://activejob//lib/active_job/arguments.rb#174 + # source://activejob//lib/active_job/arguments.rb#163 def serialize_hash_key(key); end - # source://activejob//lib/active_job/arguments.rb#185 + # source://activejob//lib/active_job/arguments.rb#174 def serialize_indifferent_hash(indifferent_hash); end # @return [Boolean] # - # source://activejob//lib/active_job/arguments.rb#143 + # source://activejob//lib/active_job/arguments.rb#132 def serialized_global_id?(hash); end - # source://activejob//lib/active_job/arguments.rb#191 + # source://activejob//lib/active_job/arguments.rb#180 def transform_symbol_keys(hash, symbol_keys); end end @@ -102,7 +135,7 @@ ActiveJob::Arguments::SYMBOL_KEYS_KEY = T.let(T.unsafe(nil), String) # source://activejob//lib/active_job/arguments.rb#58 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: @@ -178,32 +211,41 @@ class ActiveJob::Base extend ::ActiveJob::Exceptions::ClassMethods extend ::ActiveJob::TestHelper::TestQueueAdapter::ClassMethods - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.1/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.1/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.1/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.1/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.1/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.1/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 @@ -214,47 +256,47 @@ 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.1/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.1/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.1/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.1/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.1/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.1/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.1/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.1/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.1/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.1/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 @@ -263,6 +305,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 @@ -278,13 +329,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 @@ -314,13 +365,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.1/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.1/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.1/lib/active_support/rescuable.rb#15 def rescue_handlers?; end # source://activejob//lib/active_job/exceptions.rb#11 @@ -328,16 +379,10 @@ class ActiveJob::Base # source://activejob//lib/active_job/exceptions.rb#11 def retry_jitter=(value); 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 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: @@ -364,16 +409,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.1/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.1/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.1/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.1/lib/active_support/callbacks.rb#951 def _run_execute_callbacks(&block); end end @@ -392,7 +437,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. @@ -409,7 +454,7 @@ module ActiveJob::Callbacks::ClassMethods # end # end # - # source://activejob//lib/active_job/callbacks.rb#146 + # source://activejob//lib/active_job/callbacks.rb#143 def after_enqueue(*filters, &blk); end # Defines a callback that will get called right after the @@ -427,7 +472,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 @@ -447,7 +492,7 @@ module ActiveJob::Callbacks::ClassMethods # end # end # - # source://activejob//lib/active_job/callbacks.rb#167 + # source://activejob//lib/active_job/callbacks.rb#164 def around_enqueue(*filters, &blk); end # Defines a callback that will get called around the job's perform method. @@ -479,7 +524,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 @@ -497,7 +542,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 @@ -515,7 +560,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 @@ -526,6 +571,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 @@ -533,10 +581,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 @@ -545,17 +595,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 @@ -585,27 +638,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. @@ -613,7 +666,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. @@ -621,135 +674,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 @@ -771,7 +822,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 @@ -793,7 +844,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 @@ -815,13 +866,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, @@ -837,12 +888,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 @@ -879,35 +930,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 @@ -922,7 +1002,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. @@ -933,10 +1013,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 @@ -952,11 +1035,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) @@ -969,11 +1052,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 @@ -993,7 +1076,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 @@ -1013,7 +1096,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 @@ -1044,64 +1127,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.1/lib/active_support/log_subscriber.rb#87 + def log_levels; end + end end # source://activejob//lib/active_job/logging.rb#7 @@ -1133,10 +1257,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 @@ -1156,42 +1282,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: # @@ -1203,10 +1329,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 | @@ -1221,6 +1351,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 # @@ -1296,12 +1427,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 @@ -1311,15 +1437,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. # @@ -1422,7 +1548,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. @@ -1442,11 +1568,11 @@ class ActiveJob::QueueAdapters::InlineAdapter def enqueue_at(*_arg0); 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+. # @@ -1684,7 +1810,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 @@ -1716,9 +1842,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 + # + # def perform(post) + # post.to_feed! + # end + # end # - # source://activejob//lib/active_job/queue_priority.rb#22 + # source://activejob//lib/active_job/queue_priority.rb#39 def queue_with_priority(priority = T.unsafe(nil), &block); end class << self @@ -1748,29 +1891,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. @@ -1779,25 +1924,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 @@ -1825,7 +1984,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 @@ -1833,7 +1992,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 @@ -2053,7 +2212,7 @@ module ActiveJob::TestHelper # end # end # - # source://activejob//lib/active_job/test_helper.rb#123 + # source://activejob//lib/active_job/test_helper.rb#118 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. @@ -2066,6 +2225,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. # @@ -2102,7 +2268,7 @@ module ActiveJob::TestHelper # end # end # - # source://activejob//lib/active_job/test_helper.rb#392 + # source://activejob//lib/active_job/test_helper.rb#394 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. @@ -2152,7 +2318,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#180 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. @@ -2208,7 +2374,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#338 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. @@ -2298,7 +2464,7 @@ module ActiveJob::TestHelper # end # end # - # source://activejob//lib/active_job/test_helper.rb#275 + # source://activejob//lib/active_job/test_helper.rb#270 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. @@ -2358,7 +2524,7 @@ module ActiveJob::TestHelper # end # end # - # source://activejob//lib/active_job/test_helper.rb#494 + # source://activejob//lib/active_job/test_helper.rb#496 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 @@ -2425,10 +2591,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#604 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 @@ -2443,60 +2613,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#642 def queue_adapter; end - # Specifies the queue adapter to use with all Active Job test helpers. + # 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. # - # Returns an instance of the queue adapter and defaults to - # 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#61 def queue_adapter_for_test; end private - # source://activejob//lib/active_job/test_helper.rb#639 + # source://activejob//lib/active_job/test_helper.rb#651 def clear_enqueued_jobs; end - # source://activejob//lib/active_job/test_helper.rb#643 + # source://activejob//lib/active_job/test_helper.rb#655 def clear_performed_jobs; end - # source://activejob//lib/active_job/test_helper.rb#704 + # source://activejob//lib/active_job/test_helper.rb#720 def deserialize_args_for_assertion(job); end - # source://activejob//lib/active_job/test_helper.rb#679 + # source://activejob//lib/active_job/test_helper.rb#691 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#685 def filter_as_proc(filter); end - # source://activejob//lib/active_job/test_helper.rb#687 + # source://activejob//lib/active_job/test_helper.rb#699 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#727 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#659 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#695 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#707 def prepare_args_for_assertion(args); end - # source://activejob//lib/active_job/test_helper.rb#718 + # source://activejob//lib/active_job/test_helper.rb#734 def queue_adapter_changed_jobs; end + # @return [Boolean] + # + # source://activejob//lib/active_job/test_helper.rb#647 + def using_test_adapter?; end + # @raise [ArgumentError] # - # source://activejob//lib/active_job/test_helper.rb#725 + # source://activejob//lib/active_job/test_helper.rb#741 def validate_option(only: T.unsafe(nil), except: T.unsafe(nil)); end end diff --git a/sorbet/rbi/gems/activemodel@7.0.6.rbi b/sorbet/rbi/gems/activemodel@7.1.1.rbi similarity index 79% rename from sorbet/rbi/gems/activemodel@7.0.6.rbi rename to sorbet/rbi/gems/activemodel@7.1.1.rbi index 3740ffcd3..8e7e09c12 100644 --- a/sorbet/rbi/gems/activemodel@7.0.6.rbi +++ b/sorbet/rbi/gems/activemodel@7.1.1.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#91 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#203 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#316 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#346 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#221 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#211 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#112 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#189 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#250 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#81 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#425 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#389 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#404 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#453 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#263 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#176 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#128 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#176 def include?(attribute); end - # source://activemodel//lib/active_model/errors.rb#458 + # source://activemodel//lib/active_model/errors.rb#457 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#176 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#148 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#242 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#418 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#81 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#369 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#389 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#230 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#163 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#96 def initialize_dup(other); end - # source://activemodel//lib/active_model/errors.rb#465 + # source://activemodel//lib/active_model/errors.rb#464 def normalize_arguments(attribute, type, **options); end end -# source://activemodel//lib/active_model/errors.rb#240 +# source://activemodel//lib/active_model/errors.rb#239 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#497 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#491 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#48 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#55 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#512 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#515 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#513 def attribute; end # Returns the value of attribute record. # - # source://activemodel//lib/active_model/errors.rb#508 + # source://activemodel//lib/active_model/errors.rb#513 def record; end end @@ -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,11 +5538,11 @@ 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. # @@ -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@7.0.6.rbi b/sorbet/rbi/gems/activerecord@7.1.1.rbi similarity index 78% rename from sorbet/rbi/gems/activerecord@7.0.6.rbi rename to sorbet/rbi/gems/activerecord@7.1.1.rbi index e4545df33..182caaa77 100644 --- a/sorbet/rbi/gems/activerecord@7.0.6.rbi +++ b/sorbet/rbi/gems/activerecord@7.1.1.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#549 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 # @@ -643,31 +748,31 @@ class ActiveRecord::Associations::Association # source://activerecord//lib/active_record/associations/association.rb#40 def initialize(owner, reflection); end - # source://activerecord//lib/active_record/associations/association.rb#203 + # source://activerecord//lib/active_record/associations/association.rb#205 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#209 def create!(attributes = T.unsafe(nil), &block); end # source://activerecord//lib/active_record/associations/association.rb#36 def disable_joins; end - # source://activerecord//lib/active_record/associations/association.rb#152 + # source://activerecord//lib/active_record/associations/association.rb#154 def extensions; end - # source://activerecord//lib/active_record/associations/association.rb#193 + # source://activerecord//lib/active_record/associations/association.rb#195 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#138 def inversed_from(record); end - # source://activerecord//lib/active_record/associations/association.rb#140 + # source://activerecord//lib/active_record/associations/association.rb#142 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#150 def klass; end # Loads the \target if needed and returns it. @@ -681,27 +786,27 @@ 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#174 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#79 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#74 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#184 def marshal_dump; end - # source://activerecord//lib/active_record/associations/association.rb#187 + # source://activerecord//lib/active_record/associations/association.rb#189 def marshal_load(data); end # source://activerecord//lib/active_record/associations/association.rb#38 @@ -716,34 +821,34 @@ class ActiveRecord::Associations::Association # 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#65 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#132 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#53 def reset; end - # source://activerecord//lib/active_record/associations/association.rb#57 + # source://activerecord//lib/active_record/associations/association.rb#59 def reset_negative_cache; end - # source://activerecord//lib/active_record/associations/association.rb#110 + # source://activerecord//lib/active_record/associations/association.rb#112 def reset_scope; end - # source://activerecord//lib/active_record/associations/association.rb#98 + # source://activerecord//lib/active_record/associations/association.rb#100 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#117 def set_inverse_instance(record); end - # source://activerecord//lib/active_record/associations/association.rb#122 + # source://activerecord//lib/active_record/associations/association.rb#124 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,7 +860,7 @@ class ActiveRecord::Associations::Association # # @return [Boolean] # - # source://activerecord//lib/active_record/associations/association.rb#88 + # source://activerecord//lib/active_record/associations/association.rb#90 def stale_target?; end # source://activerecord//lib/active_record/associations/association.rb#36 @@ -763,7 +868,7 @@ class ActiveRecord::Associations::Association # 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#95 def target=(target); end private @@ -775,34 +880,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#268 def association_scope; end - # source://activerecord//lib/active_record/associations/association.rb#336 + # source://activerecord//lib/active_record/associations/association.rb#351 def build_record(attributes); end - # source://activerecord//lib/active_record/associations/association.rb#351 + # source://activerecord//lib/active_record/associations/association.rb#366 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#216 def ensure_klass_exists!; end - # source://activerecord//lib/active_record/associations/association.rb#218 + # source://activerecord//lib/active_record/associations/association.rb#220 def find_target; end # @return [Boolean] # - # source://activerecord//lib/active_record/associations/association.rb#274 + # source://activerecord//lib/active_record/associations/association.rb#288 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#338 def foreign_key_for?(record); end # Returns true if there is a foreign key present on the owner which @@ -816,22 +921,22 @@ class ActiveRecord::Associations::Association # # @return [Boolean] # - # source://activerecord//lib/active_record/associations/association.rb#286 + # source://activerecord//lib/active_record/associations/association.rb#300 def foreign_key_present?; end # @return [Boolean] # - # source://activerecord//lib/active_record/associations/association.rb#359 + # source://activerecord//lib/active_record/associations/association.rb#374 def inversable?(record); end - # source://activerecord//lib/active_record/associations/association.rb#304 + # source://activerecord//lib/active_record/associations/association.rb#318 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#327 def inverse_reflection_for(record); end # Returns true if inverse association on the given record needs to be set. @@ -839,49 +944,52 @@ class ActiveRecord::Associations::Association # # @return [Boolean] # - # source://activerecord//lib/active_record/associations/association.rb#319 + # source://activerecord//lib/active_record/associations/association.rb#333 def invertible_for?(record); end # @return [Boolean] # - # source://activerecord//lib/active_record/associations/association.rb#364 + # source://activerecord//lib/active_record/associations/association.rb#379 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#307 def raise_on_type_mismatch!(record); end - # source://activerecord//lib/active_record/associations/association.rb#270 + # source://activerecord//lib/active_record/associations/association.rb#284 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#359 def skip_statement_cache?(scope); end + # source://activerecord//lib/active_record/associations/association.rb#244 + 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#348 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#280 def target_scope; end # @return [Boolean] # - # source://activerecord//lib/active_record/associations/association.rb#242 + # source://activerecord//lib/active_record/associations/association.rb#252 def violates_strict_loading?; end end @@ -897,16 +1005,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 +1023,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 +1049,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 +1069,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 +1188,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 +1281,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 +1300,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 +1364,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 +1377,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 +1444,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 +1452,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 +1470,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 +1751,7 @@ end # def log_after_remove(record) # # ... # end +# end # # It's possible to stack callbacks by passing them as an array. Example: # @@ -2036,45 +2166,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 +2285,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 +2308,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 +2373,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,40 +2386,50 @@ 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. + # class Post < ActiveRecord::Base + # belongs_to :author + # end + # + # Declaring belongs_to :author adds the following methods (and more): + # + # 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 # @@ -2303,35 +2444,37 @@ module ActiveRecord::Associations::ClassMethods # # === 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 +2486,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 +2501,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 +2547,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 +2569,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,68 +2584,77 @@ 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 + # 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 @@ -2528,31 +2686,31 @@ module ActiveRecord::Associations::ClassMethods # # === 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 +2718,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 +2729,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 +2738,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,72 +2754,81 @@ 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 + # 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 @@ -2690,30 +2857,30 @@ module ActiveRecord::Associations::ClassMethods # end # # === 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_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 +2892,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 +2904,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 +2924,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 +2950,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 +2980,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,35 +2995,46 @@ 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 # - # 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 # @@ -2869,11 +3052,11 @@ module ActiveRecord::Associations::ClassMethods # 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 +3068,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 +3104,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 +3165,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 +3183,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 +3197,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 +3217,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 +3234,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 +3243,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 +3264,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 +3287,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 +3306,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 +3326,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 +3339,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 +3362,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 +3392,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 +3438,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 +3467,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 +3490,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 +3544,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 +3575,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 +3590,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 +3615,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 +3648,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 +3664,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 +3795,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 +3878,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 +3950,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 +3977,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 +4025,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 +4082,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 +4137,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 +4212,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 +4256,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 +4267,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 +4313,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 +4418,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 +4472,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 +4508,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 +4541,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 +4572,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 +4632,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 +4691,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 +4803,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 +4841,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 +4890,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 +4905,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 +4978,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 +5072,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 +5328,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 +5348,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 +5359,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 +5392,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 +5416,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#101 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#215 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#158 def association_key_name; end - # source://activerecord//lib/active_record/associations/preloader/association.rb#102 + # source://activerecord//lib/active_record/associations/preloader/association.rb#116 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#99 def klass; end - # source://activerecord//lib/active_record/associations/preloader/association.rb#180 + # source://activerecord//lib/active_record/associations/preloader/association.rb#194 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#173 def loaded?(owner); end - # source://activerecord//lib/active_record/associations/preloader/association.rb#148 + # source://activerecord//lib/active_record/associations/preloader/association.rb#162 def loader_query; end - # source://activerecord//lib/active_record/associations/preloader/association.rb#152 + # source://activerecord//lib/active_record/associations/preloader/association.rb#166 def owners_by_key; end - # source://activerecord//lib/active_record/associations/preloader/association.rb#137 + # source://activerecord//lib/active_record/associations/preloader/association.rb#151 def preloaded_records; end - # source://activerecord//lib/active_record/associations/preloader/association.rb#131 + # source://activerecord//lib/active_record/associations/preloader/association.rb#145 def records_by_owner; end - # source://activerecord//lib/active_record/associations/preloader/association.rb#118 + # source://activerecord//lib/active_record/associations/preloader/association.rb#132 def run; end # @return [Boolean] # - # source://activerecord//lib/active_record/associations/preloader/association.rb#114 + # source://activerecord//lib/active_record/associations/preloader/association.rb#128 def run?; end - # source://activerecord//lib/active_record/associations/preloader/association.rb#110 + # source://activerecord//lib/active_record/associations/preloader/association.rb#124 def runnable_loaders; end - # source://activerecord//lib/active_record/associations/preloader/association.rb#167 + # source://activerecord//lib/active_record/associations/preloader/association.rb#181 def scope; end - # source://activerecord//lib/active_record/associations/preloader/association.rb#171 + # source://activerecord//lib/active_record/associations/preloader/association.rb#185 def set_inverse(record); end - # source://activerecord//lib/active_record/associations/preloader/association.rb#98 + # source://activerecord//lib/active_record/associations/preloader/association.rb#112 def table_name; end - # source://activerecord//lib/active_record/associations/preloader/association.rb#163 + # source://activerecord//lib/active_record/associations/preloader/association.rb#177 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#242 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#278 def association_key_type; end - # source://activerecord//lib/active_record/associations/preloader/association.rb#269 + # source://activerecord//lib/active_record/associations/preloader/association.rb#290 def build_scope; end - # source://activerecord//lib/active_record/associations/preloader/association.rb#285 + # source://activerecord//lib/active_record/associations/preloader/association.rb#306 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#270 def convert_key(key); end + # source://activerecord//lib/active_record/associations/preloader/association.rb#262 + 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#254 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#235 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#238 def owner_key_name; end - # source://activerecord//lib/active_record/associations/preloader/association.rb#261 + # source://activerecord//lib/active_record/associations/preloader/association.rb#282 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#235 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#235 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#235 def reflection; end - # source://activerecord//lib/active_record/associations/preloader/association.rb#265 + # source://activerecord//lib/active_record/associations/preloader/association.rb#286 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#23 def hash; end - # source://activerecord//lib/active_record/associations/preloader/association.rb#38 + # source://activerecord//lib/active_record/associations/preloader/association.rb#40 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#31 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#27 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#57 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#58 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#67 def records; end private - # source://activerecord//lib/active_record/associations/preloader/association.rb#80 + # source://activerecord//lib/active_record/associations/preloader/association.rb#94 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#72 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#72 def keys_to_load; end - # source://activerecord//lib/active_record/associations/preloader/association.rb#74 + # source://activerecord//lib/active_record/associations/preloader/association.rb#88 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#72 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#72 def loaders; end - # source://activerecord//lib/active_record/associations/preloader/association.rb#60 + # source://activerecord//lib/active_record/associations/preloader/association.rb#74 def populate_keys_to_load_and_already_loaded_records; end end @@ -5623,6 +5844,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 +5873,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 +5889,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 +5914,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 +5989,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#508 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 +6009,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 +6034,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#421 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#424 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#422 def attribute; end # Returns the value of attribute exception. # - # source://activerecord//lib/active_record/errors.rb#353 + # source://activerecord//lib/active_record/errors.rb#422 def exception; end end @@ -5851,46 +6077,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 +6151,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 +6170,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 +6182,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 +6203,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 +6215,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 +6232,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 +6254,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 +6295,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 +6321,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 +6375,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 +6399,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 +6454,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 +6466,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 +6474,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 +6482,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 +6510,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 +6533,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: "Alisson") +# 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 +6592,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 +6600,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#106 def attribute_before_last_save(attr_name); end # Returns the change to an attribute that will be persisted during the @@ -6322,7 +6614,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#148 def attribute_change_to_be_saved(attr_name); end # Returns the value of an attribute in the database, as opposed to the @@ -6334,7 +6626,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#160 def attribute_in_database(attr_name); end # Returns a hash of the attributes that will change when the record is @@ -6344,31 +6636,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#187 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#177 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#171 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#165 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 +6672,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#96 def saved_change_to_attribute(attr_name); end # Did this attribute change when we last saved? @@ -6400,19 +6692,19 @@ module ActiveRecord::AttributeMethods::Dirty # # @return [Boolean] # - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#78 + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#84 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#116 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#111 def saved_changes?; end # Will this attribute change the next time we save? @@ -6432,33 +6724,36 @@ module ActiveRecord::AttributeMethods::Dirty # # @return [Boolean] # - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#128 + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#134 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#235 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#200 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#229 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#245 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#241 def attribute_names_for_partial_updates; end + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#192 + 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 +6765,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,20 +6774,6 @@ 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 @@ -6513,81 +6794,99 @@ class ActiveRecord::AttributeMethods::GeneratedAttributeMethods < ::Module 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 +6905,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 +6967,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 +6983,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 +7036,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 +7056,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 +7172,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 +7265,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 +7279,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 +7294,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 +7321,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 +7507,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 +7581,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 +7743,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 +7777,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 +7824,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 +7836,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 +8160,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 +8183,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 +8202,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 +8214,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 ::ActiveStorage::Attached::Model include ::ActiveStorage::Reflection::ActiveRecordExtensions include ::ActionText::Attribute @@ -7830,19 +8255,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 @@ -7850,35 +8276,36 @@ 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 ::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.1/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.1/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.1/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.1/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.1/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.1/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.1/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.1/lib/active_support/callbacks.rb#963 def _initialize_callbacks; end # source://activerecord//lib/active_record/reflection.rb#11 @@ -7887,64 +8314,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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/lib/active_model/validations.rb#71 def _validators; end - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 + # source://activemodel/7.1.1/lib/active_model/validations.rb#71 def _validators?; end # source://activerecord//lib/active_record/reflection.rb#12 @@ -7953,23 +8380,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.1/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.1/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.1/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.1/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.1/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.1/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 @@ -7995,19 +8422,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#96 def default_connection_handler; end - # source://activerecord//lib/active_record/core.rb#74 + # source://activerecord//lib/active_record/core.rb#96 def default_connection_handler?; end - # source://activerecord//lib/active_record/core.rb#76 + # source://activerecord//lib/active_record/core.rb#98 def default_role; end - # source://activerecord//lib/active_record/core.rb#76 + # source://activerecord//lib/active_record/core.rb#98 def default_role?; end # source://activerecord//lib/active_record/scoping/default.rb#20 @@ -8016,20 +8443,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#100 def default_shard; end - # source://activerecord//lib/active_record/core.rb#78 + # source://activerecord//lib/active_record/core.rb#100 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#46 + def destroy_association_async_batch_size; end + + # source://activerecord//lib/active_record/core.rb#36 + def destroy_association_async_job(&block); end # source://activerecord//lib/active_record/encryption/encryptable_record.rb#11 def encrypted_attributes; end @@ -8040,10 +8470,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.1/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.1/lib/active_model/serializers/json.rb#15 def include_root_in_json?; end # source://activerecord//lib/active_record/locking/optimistic.rb#56 @@ -8052,14 +8482,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#21 def logger; end - # source://activerecord//lib/active_record/core.rb#20 + # source://activerecord//lib/active_record/core.rb#21 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.1/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 @@ -8067,28 +8497,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.1/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 @@ -8112,28 +8554,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 @@ -8148,70 +8590,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.1/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.1/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.1/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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#23 + def _destroy_association_async_job; end + + # source://activerecord//lib/active_record/core.rb#23 + def _destroy_association_async_job=(value); end + + # source://activerecord//lib/active_record/core.rb#23 + def _destroy_association_async_job?; end + + # source://activesupport/7.1.1/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.1/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.1/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.1/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.1/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.1/lib/active_support/callbacks.rb#959 def _initialize_callbacks=(value); end # source://activerecord//lib/active_record/reflection.rb#11 @@ -8223,70 +8683,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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/lib/active_model/validations.rb#71 def _validators; end - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 + # source://activemodel/7.1.1/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.1/lib/active_model/validations.rb#71 def _validators?; end - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#144 + # source://activemodel/7.1.1/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.1/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.1/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.1/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.1/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.1/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.1/lib/active_model/callbacks.rb#144 def after_update(*args, **options, &block); end # source://activerecord//lib/active_record/reflection.rb#12 @@ -8298,53 +8758,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#104 def application_record_class?; end - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#137 + # source://activemodel/7.1.1/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.1/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.1/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.1/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#124 def asynchronous_queries_session; end - # source://activerecord//lib/active_record/core.rb#133 + # source://activerecord//lib/active_record/core.rb#128 def asynchronous_queries_tracker; end - # source://activestorage/7.0.6/lib/active_storage/reflection.rb#53 + # source://activestorage/7.1.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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 @@ -8364,25 +8824,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.1/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.1/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.1/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.1/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#88 def belongs_to_required_by_default; end - # source://activerecord//lib/active_record/core.rb#68 + # source://activerecord//lib/active_record/core.rb#88 def belongs_to_required_by_default=(value); end - # source://activerecord//lib/active_record/core.rb#68 + # source://activerecord//lib/active_record/core.rb#88 def belongs_to_required_by_default?; end # source://activerecord//lib/active_record/integration.rb#16 @@ -8412,64 +8872,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#76 def configurations; end - # source://activerecord//lib/active_record/core.rb#50 + # source://activerecord//lib/active_record/core.rb#70 def configurations=(config); end - # source://activerecord//lib/active_record/core.rb#201 + # source://activerecord//lib/active_record/core.rb#188 def connected_to_stack; end - # source://activerecord//lib/active_record/core.rb#215 + # source://activerecord//lib/active_record/core.rb#202 def connection_class; end - # source://activerecord//lib/active_record/core.rb#211 + # source://activerecord//lib/active_record/core.rb#198 def connection_class=(b); end - # source://activerecord//lib/active_record/core.rb#219 + # source://activerecord//lib/active_record/core.rb#206 def connection_class?; end - # source://activerecord//lib/active_record/core.rb#223 + # source://activerecord//lib/active_record/core.rb#210 def connection_class_for_self; end - # source://activerecord//lib/active_record/core.rb#94 + # source://activerecord//lib/active_record/core.rb#116 def connection_handler; end - # source://activerecord//lib/active_record/core.rb#98 + # source://activerecord//lib/active_record/core.rb#120 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#179 def current_preventing_writes; end - # source://activerecord//lib/active_record/core.rb#147 + # source://activerecord//lib/active_record/core.rb#142 def current_role; end - # source://activerecord//lib/active_record/core.rb#169 + # source://activerecord//lib/active_record/core.rb#160 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#96 def default_connection_handler; end - # source://activerecord//lib/active_record/core.rb#74 + # source://activerecord//lib/active_record/core.rb#96 def default_connection_handler=(value); end - # source://activerecord//lib/active_record/core.rb#74 + # source://activerecord//lib/active_record/core.rb#96 def default_connection_handler?; end - # source://activerecord//lib/active_record/core.rb#76 + # source://activerecord//lib/active_record/core.rb#98 def default_role; end - # source://activerecord//lib/active_record/core.rb#76 + # source://activerecord//lib/active_record/core.rb#98 def default_role=(value); end - # source://activerecord//lib/active_record/core.rb#76 + # source://activerecord//lib/active_record/core.rb#98 def default_role?; end # source://activerecord//lib/active_record/scoping/default.rb#20 @@ -8484,28 +8947,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#100 def default_shard; end - # source://activerecord//lib/active_record/core.rb#78 + # source://activerecord//lib/active_record/core.rb#100 def default_shard=(value); end - # source://activerecord//lib/active_record/core.rb#78 + # source://activerecord//lib/active_record/core.rb#100 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#46 + def destroy_association_async_batch_size; end + + # source://activerecord//lib/active_record/core.rb#46 + def destroy_association_async_batch_size=(value); end + # source://activerecord//lib/active_record/core.rb#26 def destroy_association_async_job; end - # source://activerecord//lib/active_record/core.rb#26 + # source://activerecord//lib/active_record/core.rb#23 def destroy_association_async_job=(value); end # source://activerecord//lib/active_record/encryption/encryptable_record.rb#11 @@ -8517,73 +8986,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#86 def enumerate_columns_in_select_statements; end - # source://activerecord//lib/active_record/core.rb#66 + # source://activerecord//lib/active_record/core.rb#86 def enumerate_columns_in_select_statements=(value); end - # source://activerecord//lib/active_record/core.rb#66 + # source://activerecord//lib/active_record/core.rb#86 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#92 def has_many_inversing; end - # source://activerecord//lib/active_record/core.rb#72 + # source://activerecord//lib/active_record/core.rb#92 def has_many_inversing=(value); end - # source://activerecord//lib/active_record/core.rb#72 + # source://activerecord//lib/active_record/core.rb#92 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.1/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.1/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.1/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#319 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 @@ -8595,13 +9070,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#21 def logger; end - # source://activerecord//lib/active_record/core.rb#20 + # source://activerecord//lib/active_record/core.rb#21 def logger=(value); end - # source://activerecord//lib/active_record/core.rb#20 + # source://activerecord//lib/active_record/core.rb#21 def logger?; end # source://activerecord//lib/active_record/nested_attributes.rb#15 @@ -8613,40 +9088,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.1/lib/active_model/conversion.rb#32 + def param_delimiter; end + + # source://activemodel/7.1.1/lib/active_model/conversion.rb#32 + def param_delimiter=(value); end + + # source://activemodel/7.1.1/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 @@ -8658,22 +9151,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#94 + def run_commit_callbacks_on_first_saved_instances_in_transaction; end + + # source://activerecord//lib/active_record/core.rb#94 + def run_commit_callbacks_on_first_saved_instances_in_transaction=(value); end + + # source://activerecord//lib/active_record/core.rb#94 + 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#102 def shard_selector; end - # source://activerecord//lib/active_record/core.rb#80 + # source://activerecord//lib/active_record/core.rb#102 def shard_selector=(value); end - # source://activerecord//lib/active_record/core.rb#80 + # source://activerecord//lib/active_record/core.rb#102 def shard_selector?; end # source://activerecord//lib/active_record/signed_id.rb#13 @@ -8694,52 +9196,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#90 def strict_loading_by_default; end - # source://activerecord//lib/active_record/core.rb#70 + # source://activerecord//lib/active_record/core.rb#90 def strict_loading_by_default=(value); end - # source://activerecord//lib/active_record/core.rb#70 + # source://activerecord//lib/active_record/core.rb#90 def strict_loading_by_default?; end - # source://activerecord//lib/active_record/core.rb#238 + # source://activerecord//lib/active_record/core.rb#225 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 @@ -8760,9 +9262,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 @@ -8773,6 +9281,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 @@ -8806,7 +9316,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. @@ -8835,7 +9354,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 @@ -8862,7 +9381,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. @@ -8886,7 +9414,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. @@ -8917,7 +9445,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. @@ -8952,25 +9495,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#339 + def batch_on_loaded_relation(relation:, start:, finish:, order:, batch_limit:); 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#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#274 - def apply_start_limit(relation, start, 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#282 - def batch_order(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 @@ -8980,11 +9535,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. @@ -8993,7 +9548,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. @@ -9002,7 +9557,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. @@ -9011,7 +9566,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 @@ -9036,22 +9591,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. @@ -9060,21 +9615,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#112 + 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#98 + 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#370 + 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#142 + 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#127 + 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#326 + 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#297 + 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#161 + 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#106 def average(column_name); end # This calculates aggregate values in the given column. Methods for #count, #sum, #average, @@ -9109,7 +9717,7 @@ module ActiveRecord::Calculations # ... # end # - # source://activerecord//lib/active_record/relation/calculations.rb#179 + # source://activerecord//lib/active_record/relation/calculations.rb#196 def calculate(operation, column_name); end # Count the records. @@ -9138,8 +9746,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,12 +9759,12 @@ module ActiveRecord::Calculations # source://activerecord//lib/active_record/relation/calculations.rb#84 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#334 def ids; end # Calculates the maximum value on a given column. The value is returned @@ -9166,7 +9773,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#136 def maximum(column_name); end # Calculates the minimum value on a given column. The value is returned @@ -9175,7 +9782,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#121 def minimum(column_name); end # Pick the value(s) from the named column(s) in the current relation. @@ -9193,7 +9800,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#315 def pick(*column_names); end # Use #pluck as a shortcut to select one or more attributes without @@ -9231,7 +9838,7 @@ module ActiveRecord::Calculations # # See also #ids. # - # source://activerecord//lib/active_record/relation/calculations.rb#233 + # source://activerecord//lib/active_record/relation/calculations.rb#262 def pluck(*column_names); end # Calculates the sum of values on a given column. The value is returned @@ -9240,68 +9847,68 @@ 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 + # source://activerecord//lib/active_record/relation/calculations.rb#151 + 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#414 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#375 def all_attributes?(column_names); end - # source://activerecord//lib/active_record/relation/calculations.rb#502 + # source://activerecord//lib/active_record/relation/calculations.rb#599 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#410 def distinct_select?(column_name); end - # source://activerecord//lib/active_record/relation/calculations.rb#369 + # source://activerecord//lib/active_record/relation/calculations.rb#465 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#426 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#379 def has_include?(column_name); end - # source://activerecord//lib/active_record/relation/calculations.rb#450 + # source://activerecord//lib/active_record/relation/calculations.rb#547 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#422 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#383 def perform_calculation(operation, column_name); end - # source://activerecord//lib/active_record/relation/calculations.rb#493 + # source://activerecord//lib/active_record/relation/calculations.rb#590 def select_for_count; end - # source://activerecord//lib/active_record/relation/calculations.rb#475 + # source://activerecord//lib/active_record/relation/calculations.rb#572 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#555 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#542 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 @@ -9314,10 +9921,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 @@ -9404,7 +10011,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: @@ -9493,7 +10100,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 @@ -9554,30 +10161,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+. +# If +true+ (the default from \Rails 7.1), callbacks are executed in the order they +# are defined, just like the example above. If +false+, the order is reversed, so +# +do_something_else+ is executed before +log_children+. # # == \Transactions # @@ -9609,7 +10202,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 @@ -9622,24 +10215,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 @@ -9654,19 +10247,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 @@ -9677,54 +10307,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/coders/yaml_column.rb#49 - def yaml_load(payload); 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 + + # 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#174 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#178 def initialize(message = T.unsafe(nil)); end end -# source://activerecord//lib/active_record/migration.rb#169 +# source://activerecord//lib/active_record/migration.rb#175 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#176 ActiveRecord::ConcurrentMigrationError::RELEASE_LOCK_FAILED_MESSAGE = T.let(T.unsafe(nil), String) # Raised when association is being configured improperly or user tries to use @@ -9733,7 +10372,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#368 class ActiveRecord::ConfigurationError < ::ActiveRecord::ActiveRecordError; end # source://activerecord//lib/active_record/connection_adapters.rb#4 @@ -9741,6 +10380,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 @@ -9755,7 +10396,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 @@ -9770,25 +10411,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.1/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.1/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.1/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.1/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.1/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.1/lib/active_support/callbacks.rb#951 def _run_checkout_callbacks(&block); end # Checks whether the connection to the database is still active. This includes @@ -9797,30 +10438,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.1/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, @@ -9829,64 +10475,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!, @@ -9896,97 +10566,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 @@ -9994,35 +10674,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 @@ -10036,65 +10711,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 @@ -10102,73 +10805,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 @@ -10176,56 +10879,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 @@ -10233,316 +10950,437 @@ 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#1090 + def any_raw_connection; end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1195 def arel_visitor; end + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1079 + 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#1206 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#1199 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#1181 def collector; end - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#796 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1170 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#1176 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#1217 + def configure_connection; end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1220 + def default_prepared_statements; end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1107 + def extended_type_map_key; end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1065 + def invalidate_transaction(exception); end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1133 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#1083 + 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#1061 + def retryable_connection_error?(exception); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1072 + def retryable_query_error?(exception); end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1149 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#1156 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#1123 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#1113 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#1099 + def valid_raw_connection; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1224 + 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. + # + # 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#995 + 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#792 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1166 def without_prepared_statement?(binds); end class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.1/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.1/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.1/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.1/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.1/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.1/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.1/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#95 + def find_cmd_and_exec(commands, *args); 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#886 + def register_class_with_precision(mapping, key, klass, **kwargs); end - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#57 + # 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 # @@ -10564,58 +11402,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 # @@ -10648,11 +11581,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 @@ -10666,7 +11604,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 @@ -10693,12 +11631,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 @@ -10729,9 +11667,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 @@ -10760,7 +11710,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] @@ -10768,7 +11718,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. @@ -10814,12 +11764,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 @@ -10828,33 +11778,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 @@ -10868,10 +11830,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 @@ -10885,21 +11847,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 @@ -10933,7 +11895,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 @@ -10942,7 +11907,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 @@ -10950,10 +11915,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. # @@ -11002,11 +11969,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 @@ -11014,27 +11981,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 @@ -11042,78 +12009,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. @@ -11127,34 +12100,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. # @@ -11169,7 +12149,7 @@ 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 # @@ -11180,7 +12160,7 @@ end # 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!]. +# {ActiveRecord::Base.connection_handler.clear_active_connections!}[rdoc-ref:ConnectionAdapters::ConnectionHandler#clear_active_connections!]. # This will be 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 @@ -11194,6 +12174,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 @@ -11231,7 +12217,7 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool # # @return [ConnectionPool] a new instance of ConnectionPool # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#120 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#122 def initialize(pool_config); end # Returns true if there is an open connection being used for the current thread. @@ -11242,24 +12228,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#198 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#112 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#111 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#111 def automatic_reconnect=(_arg0); end # Check-in a database connection back into the pool, indicating that you @@ -11268,7 +12254,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#365 def checkin(conn); end # Check-out a database connection from the pool, indicating that you want @@ -11286,19 +12272,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#354 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#111 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#111 def checkout_timeout=(_arg0); end # Clears the cache which maps classes and re-connects connections that @@ -11309,7 +12295,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#312 def clear_reloadable_connections(raise_on_acquisition_timeout = T.unsafe(nil)); end # Clears the cache which maps classes and re-connects connections that @@ -11321,14 +12307,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#336 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#235 def connected?; end # Retrieve the connection associated with the current thread, or call @@ -11337,17 +12323,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#183 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#187 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.1/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. @@ -11362,12 +12344,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#250 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#112 def db_config; end # Discards all connections in the pool (even if they're currently @@ -11376,12 +12358,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#291 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#301 def discarded?; end # Disconnects all connections in the pool, and clears the pool. @@ -11391,7 +12373,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#260 def disconnect(raise_on_acquisition_timeout = T.unsafe(nil)); end # Disconnects all connections in the pool, and clears the pool. @@ -11401,43 +12383,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#282 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#437 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#459 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#166 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#464 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#112 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#414 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#112 def reaper; end # Signal that the thread is finished with the current connection. @@ -11448,37 +12430,37 @@ 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#209 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#382 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#112 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#486 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 + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#114 + def schema_reflection(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#112 - def schema_cache=(arg); end + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#114 + 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#112 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#112 def size; end # Return connection pool's usage statistic @@ -11486,15 +12468,20 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool # # 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#472 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#224 def with_connection; end private @@ -11511,36 +12498,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#650 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#713 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#544 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#492 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#510 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#723 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#590 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#718 def checkout_new_connection; end # -- @@ -11549,25 +12536,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#525 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#529 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#672 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#667 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#667 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 @@ -11576,7 +12563,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#686 def try_to_checkout_new_connection; end # Take control of all existing connections so a "group" action such as @@ -11584,42 +12571,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#537 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#610 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 @@ -11629,52 +12616,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. @@ -11692,7 +12681,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 @@ -11701,7 +12690,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 @@ -11711,73 +12700,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 # @@ -11825,7 +12816,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 @@ -11833,12 +12824,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 @@ -11850,12 +12846,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#388 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#393 def begin_db_transaction; end # Begins the transaction with the isolation level set. Raises an error by @@ -11864,24 +12860,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#407 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#350 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#412 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#350 def commit_transaction(*_arg0, **_arg1, &_arg2); end # Executes an INSERT query and returns the new record's ID @@ -11892,81 +12888,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#350 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#434 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#204 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#350 + def dirty_current_transaction(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#350 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#466 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#350 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#428 + def exec_restart_db_transaction; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#422 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. @@ -11974,7 +12991,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#504 def high_precision_current_timestamp; end # Executes an INSERT query and returns the new record's ID @@ -11985,58 +13002,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#448 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#452 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#508 + 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#355 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#350 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#350 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#439 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#366 + def reset_transaction(restore: T.unsafe(nil)); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#424 + 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#416 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#430 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#350 def rollback_transaction(*_arg0, **_arg1, &_arg2); end # Sanitizes the given LIMIT parameter in order to prevent SQL injection. @@ -12046,35 +13074,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#476 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 @@ -12187,44 +13215,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#335 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#395 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#348 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#362 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#210 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#214 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#198 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#487 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#350 def within_new_transaction(*_arg0, **_arg1, &_arg2); end # Determines whether the SQL statement is a write query. @@ -12232,62 +13261,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#666 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#539 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#581 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#588 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#592 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#602 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#535 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#522 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#674 + def extract_table_ref_from_insert_sql(sql); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#513 + 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#653 def last_inserted_id(result); end + # @raise [NotImplementedError] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#528 + 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#657 + 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#607 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#661 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#636 + 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#598 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#532 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#496 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 @@ -12317,27 +13360,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 @@ -12351,13 +13394,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 @@ -12371,7 +13414,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 @@ -12387,17 +13430,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 @@ -12413,141 +13456,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#45 - def concise_options(options); end -end + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#10 + def valid; 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 @@ -12557,27 +13620,34 @@ 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 def lock; end @@ -12585,7 +13655,7 @@ class ActiveRecord::ConnectionAdapters::PoolConfig # source://mutex_m/0.1.2/mutex_m.rb#83 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. @@ -12593,17 +13663,15 @@ 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. # @@ -12620,12 +13688,15 @@ class ActiveRecord::ConnectionAdapters::PoolConfig 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 @@ -12635,102 +13706,149 @@ 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/postgresql/column.rb#7 +# source://activerecord//lib/active_record/connection_adapters/postgresql/column.rb#5 module ActiveRecord::ConnectionAdapters::PostgreSQL; end -# source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#229 +# = Active Record PostgreSQL Adapter Alter \Table +# +# source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#338 class ActiveRecord::ConnectionAdapters::PostgreSQL::AlterTable < ::ActiveRecord::ConnectionAdapters::AlterTable # @return [AlterTable] a new instance of AlterTable # - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#232 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#341 def initialize(td); end + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#354 + def add_exclusion_constraint(expression, options); end + + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#362 + def add_unique_constraint(column_name, options); end + # Returns the value of attribute constraint_validations. # - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#230 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#339 def constraint_validations; end - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#237 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#358 + def drop_exclusion_constraint(constraint_name); end + + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#366 + def drop_unique_constraint(unique_constraint_name); end + + # Returns the value of attribute exclusion_constraint_adds. + # + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#339 + def exclusion_constraint_adds; end + + # Returns the value of attribute exclusion_constraint_drops. + # + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#339 + def exclusion_constraint_drops; end + + # Returns the value of attribute unique_constraint_adds. + # + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#339 + def unique_constraint_adds; end + + # Returns the value of attribute unique_constraint_drops. + # + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#339 + def unique_constraint_drops; end + + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#350 def validate_constraint(name); end end -# source://activerecord//lib/active_record/connection_adapters/postgresql/column.rb#8 +# source://activerecord//lib/active_record/connection_adapters/postgresql/column.rb#6 class ActiveRecord::ConnectionAdapters::PostgreSQL::Column < ::ActiveRecord::ConnectionAdapters::Column # @return [Column] a new instance of Column # - # source://activerecord//lib/active_record/connection_adapters/postgresql/column.rb#11 - def initialize(*_arg0, serial: T.unsafe(nil), generated: T.unsafe(nil), **_arg3); end + # source://activerecord//lib/active_record/connection_adapters/postgresql/column.rb#9 + def initialize(*_arg0, serial: T.unsafe(nil), identity: T.unsafe(nil), generated: T.unsafe(nil), **_arg4); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/column.rb#55 + # source://activerecord//lib/active_record/connection_adapters/postgresql/column.rb#64 def ==(other); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/column.rb#30 + # source://activerecord//lib/active_record/connection_adapters/postgresql/column.rb#37 def array; end - # source://activerecord//lib/active_record/connection_adapters/postgresql/column.rb#30 + # source://activerecord//lib/active_record/connection_adapters/postgresql/column.rb#37 def array?; end - # source://activerecord//lib/active_record/connection_adapters/postgresql/column.rb#49 + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/postgresql/column.rb#24 + def auto_incremented_by_db?; end + + # source://activerecord//lib/active_record/connection_adapters/postgresql/column.rb#57 def encode_with(coder); end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql/column.rb#35 + # source://activerecord//lib/active_record/connection_adapters/postgresql/column.rb#42 def enum?; end - # source://activerecord//lib/active_record/connection_adapters/postgresql/column.rb#55 + # source://activerecord//lib/active_record/connection_adapters/postgresql/column.rb#64 def eql?(other); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/column.rb#9 + # source://activerecord//lib/active_record/connection_adapters/postgresql/column.rb#7 def fmod(*_arg0, **_arg1, &_arg2); end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql/column.rb#26 + # source://activerecord//lib/active_record/connection_adapters/postgresql/column.rb#33 def has_default?; end - # source://activerecord//lib/active_record/connection_adapters/postgresql/column.rb#62 + # source://activerecord//lib/active_record/connection_adapters/postgresql/column.rb#72 def hash; end - # source://activerecord//lib/active_record/connection_adapters/postgresql/column.rb#43 + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/postgresql/column.rb#16 + def identity?; end + + # source://activerecord//lib/active_record/connection_adapters/postgresql/column.rb#50 def init_with(coder); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/column.rb#9 + # source://activerecord//lib/active_record/connection_adapters/postgresql/column.rb#7 def oid(*_arg0, **_arg1, &_arg2); end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql/column.rb#17 + # source://activerecord//lib/active_record/connection_adapters/postgresql/column.rb#20 def serial?; end - # source://activerecord//lib/active_record/connection_adapters/postgresql/column.rb#39 + # source://activerecord//lib/active_record/connection_adapters/postgresql/column.rb#46 def sql_type; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql/column.rb#21 + # source://activerecord//lib/active_record/connection_adapters/postgresql/column.rb#28 def virtual?; end end @@ -12786,53 +13904,67 @@ end module ActiveRecord::ConnectionAdapters::PostgreSQL::DatabaseStatements # Begins a transaction. # - # source://activerecord//lib/active_record/connection_adapters/postgresql/database_statements.rb#105 + # source://activerecord//lib/active_record/connection_adapters/postgresql/database_statements.rb#97 def begin_db_transaction; end - # source://activerecord//lib/active_record/connection_adapters/postgresql/database_statements.rb#109 + # source://activerecord//lib/active_record/connection_adapters/postgresql/database_statements.rb#101 def begin_isolated_db_transaction(isolation); end + # source://activerecord//lib/active_record/connection_adapters/postgresql/database_statements.rb#129 + def build_explain_clause(options = T.unsafe(nil)); end + # Commits a transaction. # - # source://activerecord//lib/active_record/connection_adapters/postgresql/database_statements.rb#115 + # source://activerecord//lib/active_record/connection_adapters/postgresql/database_statements.rb#106 def commit_db_transaction; end - # source://activerecord//lib/active_record/connection_adapters/postgresql/database_statements.rb#66 + # source://activerecord//lib/active_record/connection_adapters/postgresql/database_statements.rb#73 def exec_delete(sql, name = T.unsafe(nil), binds = T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/database_statements.rb#86 - 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/postgresql/database_statements.rb#78 + 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/postgresql/database_statements.rb#53 - def 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/postgresql/database_statements.rb#116 + def exec_restart_db_transaction; end # Aborts a transaction. # - # source://activerecord//lib/active_record/connection_adapters/postgresql/database_statements.rb#120 + # source://activerecord//lib/active_record/connection_adapters/postgresql/database_statements.rb#111 def exec_rollback_db_transaction; end - # source://activerecord//lib/active_record/connection_adapters/postgresql/database_statements.rb#66 + # source://activerecord//lib/active_record/connection_adapters/postgresql/database_statements.rb#73 def exec_update(sql, name = T.unsafe(nil), binds = T.unsafe(nil)); end # Executes an SQL statement, returning a PG::Result object on success # or raising a PG::Error exception otherwise. + # + # 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 PG::Result object is manually memory managed; if you don't # need it specifically, you may want consider the exec_query wrapper. # - # source://activerecord//lib/active_record/connection_adapters/postgresql/database_statements.rb#39 - def execute(sql, name = T.unsafe(nil)); end + # source://activerecord//lib/active_record/connection_adapters/postgresql/database_statements.rb#44 + def execute(*_arg0, **_arg1, &_arg2); end # source://activerecord//lib/active_record/connection_adapters/postgresql/database_statements.rb#7 - def explain(arel, binds = T.unsafe(nil)); end + def explain(arel, binds = T.unsafe(nil), options = T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/database_statements.rb#128 + # source://activerecord//lib/active_record/connection_adapters/postgresql/database_statements.rb#125 def high_precision_current_timestamp; end + # source://activerecord//lib/active_record/connection_adapters/postgresql/database_statements.rb#60 + def internal_exec_query(sql, name = T.unsafe(nil), binds = T.unsafe(nil), prepare: T.unsafe(nil), async: T.unsafe(nil), allow_retry: T.unsafe(nil), materialize_transactions: T.unsafe(nil)); end + # Queries the database and returns the results in an Array-like object # - # source://activerecord//lib/active_record/connection_adapters/postgresql/database_statements.rb#13 + # source://activerecord//lib/active_record/connection_adapters/postgresql/database_statements.rb#14 def query(sql, name = T.unsafe(nil)); end + # source://activerecord//lib/active_record/connection_adapters/postgresql/database_statements.rb#50 + def raw_execute(sql, name, async: T.unsafe(nil), allow_retry: T.unsafe(nil), materialize_transactions: T.unsafe(nil)); end + # @return [Boolean] # # source://activerecord//lib/active_record/connection_adapters/postgresql/database_statements.rb#29 @@ -12840,32 +13972,107 @@ module ActiveRecord::ConnectionAdapters::PostgreSQL::DatabaseStatements private - # source://activerecord//lib/active_record/connection_adapters/postgresql/database_statements.rb#137 + # source://activerecord//lib/active_record/connection_adapters/postgresql/database_statements.rb#151 def build_truncate_statements(table_names); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/database_statements.rb#133 + # source://activerecord//lib/active_record/connection_adapters/postgresql/database_statements.rb#139 + def cancel_any_running_query; end + + # source://activerecord//lib/active_record/connection_adapters/postgresql/database_statements.rb#147 def execute_batch(statements, name = T.unsafe(nil)); end + # source://activerecord//lib/active_record/connection_adapters/postgresql/database_statements.rb#168 + def handle_warnings(sql); end + # Returns the current ID of a table's sequence. # - # source://activerecord//lib/active_record/connection_adapters/postgresql/database_statements.rb#142 + # source://activerecord//lib/active_record/connection_adapters/postgresql/database_statements.rb#156 def last_insert_id_result(sequence_name); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/database_statements.rb#71 - def sql_for_insert(sql, pk, binds); end + # source://activerecord//lib/active_record/connection_adapters/postgresql/database_statements.rb#160 + def returning_column_values(result); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/database_statements.rb#146 + # source://activerecord//lib/active_record/connection_adapters/postgresql/database_statements.rb#164 def suppress_composite_primary_key(pk); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/postgresql/database_statements.rb#177 + def warning_ignored?(warning); end end # From https://www.postgresql.org/docs/current/functions-datetime.html#FUNCTIONS-DATETIME-CURRENT # -# source://activerecord//lib/active_record/connection_adapters/postgresql/database_statements.rb#125 +# source://activerecord//lib/active_record/connection_adapters/postgresql/database_statements.rb#122 ActiveRecord::ConnectionAdapters::PostgreSQL::DatabaseStatements::HIGH_PRECISION_CURRENT_TIMESTAMP = T.let(T.unsafe(nil), Arel::Nodes::SqlLiteral) +# source://activerecord//lib/active_record/connection_adapters/postgresql/database_statements.rb#136 +ActiveRecord::ConnectionAdapters::PostgreSQL::DatabaseStatements::IDLE_TRANSACTION_STATUSES = T.let(T.unsafe(nil), Array) + # source://activerecord//lib/active_record/connection_adapters/postgresql/database_statements.rb#24 ActiveRecord::ConnectionAdapters::PostgreSQL::DatabaseStatements::READ_QUERY = T.let(T.unsafe(nil), Regexp) +# source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#192 +class ActiveRecord::ConnectionAdapters::PostgreSQL::ExclusionConstraintDefinition < ::Struct + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#205 + def deferrable; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#209 + def export_name_on_schema_dump?; end + + # Returns the value of attribute expression + # + # @return [Object] the current value of expression + def expression; end + + # Sets the attribute expression + # + # @param value [Object] the value to set the attribute expression to. + # @return [Object] the newly set value + def expression=(_); end + + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#193 + def name; end + + # Returns the value of attribute options + # + # @return [Object] the current value of options + def options; end + + # Sets the attribute options + # + # @param value [Object] the value to set the attribute options to. + # @return [Object] the newly set value + def options=(_); end + + # Returns the value of attribute table_name + # + # @return [Object] the current value of table_name + def table_name; end + + # Sets the attribute table_name + # + # @param value [Object] the value to set the attribute table_name to. + # @return [Object] the newly set value + def table_name=(_); end + + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#197 + def using; end + + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#201 + def where; 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/postgresql/explain_pretty_printer.rb#6 class ActiveRecord::ConnectionAdapters::PostgreSQL::ExplainPrettyPrinter # Pretty prints the result of an EXPLAIN in a way that resembles the output of the @@ -13327,14 +14534,17 @@ class ActiveRecord::ConnectionAdapters::PostgreSQL::OID::Range < ::ActiveModel:: # source://activerecord//lib/active_record/connection_adapters/postgresql/oid/range.rb#69 def extract_bounds(value); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/oid/range.rb#98 + # source://activerecord//lib/active_record/connection_adapters/postgresql/oid/range.rb#107 def infinity(negative: T.unsafe(nil)); end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql/oid/range.rb#108 + # source://activerecord//lib/active_record/connection_adapters/postgresql/oid/range.rb#117 def infinity?(value); end + # source://activerecord//lib/active_record/connection_adapters/postgresql/oid/range.rb#81 + def sanitize_bounds(from, to); end + # source://activerecord//lib/active_record/connection_adapters/postgresql/oid/range.rb#61 def type_cast_single(value); end @@ -13350,10 +14560,13 @@ class ActiveRecord::ConnectionAdapters::PostgreSQL::OID::Range < ::ActiveModel:: # * https://www.postgresql.org/docs/current/rangetypes.html#RANGETYPES-IO # * https://www.postgresql.org/docs/current/rowtypes.html#ROWTYPES-IO-SYNTAX # - # source://activerecord//lib/active_record/connection_adapters/postgresql/oid/range.rb#87 + # source://activerecord//lib/active_record/connection_adapters/postgresql/oid/range.rb#96 def unquote(value); end end +# source://activerecord//lib/active_record/connection_adapters/postgresql/oid/range.rb#79 +ActiveRecord::ConnectionAdapters::PostgreSQL::OID::Range::INFINITE_FLOAT_RANGE = T.let(T.unsafe(nil), Range) + # source://activerecord//lib/active_record/connection_adapters/postgresql/oid/specialized_string.rb#7 class ActiveRecord::ConnectionAdapters::PostgreSQL::OID::SpecializedString < ::ActiveModel::Type::String # @return [SpecializedString] a new instance of SpecializedString @@ -13454,7 +14667,7 @@ class ActiveRecord::ConnectionAdapters::PostgreSQL::OID::Uuid < ::ActiveModel::T # source://activerecord//lib/active_record/connection_adapters/postgresql/oid/uuid.rb#21 def changed_in_place?(raw_old_value, new_value); end - # source://activemodel/7.0.6/lib/active_model/type/value.rb#31 + # source://activemodel/7.1.1/lib/active_model/type/value.rb#43 def serialize(value); end # source://activerecord//lib/active_record/connection_adapters/postgresql/oid/uuid.rb#12 @@ -13520,42 +14733,42 @@ end # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#6 module ActiveRecord::ConnectionAdapters::PostgreSQL::Quoting - # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#25 + # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#28 def check_int_in_range(value); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#150 + # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#156 def column_name_matcher; end - # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#154 + # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#160 def column_name_with_order_matcher; end # Escapes binary strings for bytea input to the database. # - # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#14 + # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#17 def escape_bytea(value); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#146 + # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#151 def lookup_cast_type_from_column(column); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#41 + # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#44 def quote(value); end # Quotes column names for use in SQL queries. # - # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#97 + # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#102 def quote_column_name(name); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#115 + # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#120 def quote_default_expression(value, column); end # Quotes schema names for use in SQL queries. # - # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#88 + # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#93 def quote_schema_name(name); end # Quotes strings for use in SQL input. # - # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#71 + # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#74 def quote_string(s); end # Checks the following cases: @@ -13567,76 +14780,80 @@ module ActiveRecord::ConnectionAdapters::PostgreSQL::Quoting # - "schema.name".table_name # - "schema.name"."table.name" # - # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#83 + # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#88 def quote_table_name(name); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#92 + # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#97 def quote_table_name_for_assignment(table, attr); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#111 + # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#116 def quoted_binary(value); end # Quote date/time values for use in SQL input. # - # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#102 + # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#107 def quoted_date(value); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#128 + # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#133 def type_cast(value); end # Unescapes bytea output from a database to the binary string it represents. # NOTE: This is NOT an inverse of escape_bytea! This is only to be used # on escaped binary output from database drive. # - # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#21 + # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#24 def unescape_bytea(value); end private - # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#207 + # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#214 def determine_encoding_of_strings_in_array(value); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#192 + # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#199 def encode_array(array_data); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#203 + # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#210 def encode_range(range); end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#225 + # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#232 def infinity?(value); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#188 + # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#195 def lookup_cast_type(sql_type); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#214 + # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#221 def type_cast_array(values); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#221 + # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#228 def type_cast_range_value(value); end end -# source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#158 +# source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#164 ActiveRecord::ConnectionAdapters::PostgreSQL::Quoting::COLUMN_NAME = T.let(T.unsafe(nil), Regexp) -# source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#171 +# source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#177 ActiveRecord::ConnectionAdapters::PostgreSQL::Quoting::COLUMN_NAME_WITH_ORDER = T.let(T.unsafe(nil), Regexp) -# source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#7 +# source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#10 class ActiveRecord::ConnectionAdapters::PostgreSQL::Quoting::IntegerOutOf64BitRange < ::StandardError # @return [IntegerOutOf64BitRange] a new instance of IntegerOutOf64BitRange # - # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#8 + # source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#11 def initialize(msg); end end +# source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#7 +ActiveRecord::ConnectionAdapters::PostgreSQL::Quoting::QUOTED_COLUMN_NAMES = T.let(T.unsafe(nil), Concurrent::Map) + +# source://activerecord//lib/active_record/connection_adapters/postgresql/quoting.rb#8 +ActiveRecord::ConnectionAdapters::PostgreSQL::Quoting::QUOTED_TABLE_NAMES = T.let(T.unsafe(nil), Concurrent::Map) + # source://activerecord//lib/active_record/connection_adapters/postgresql/referential_integrity.rb#6 module ActiveRecord::ConnectionAdapters::PostgreSQL::ReferentialIntegrity - # @return [Boolean] - # # source://activerecord//lib/active_record/connection_adapters/postgresql/referential_integrity.rb#41 - def all_foreign_keys_valid?; end + def check_all_foreign_keys_valid!; end # source://activerecord//lib/active_record/connection_adapters/postgresql/referential_integrity.rb#7 def disable_referential_integrity; end @@ -13644,29 +14861,59 @@ end # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_creation.rb#6 class ActiveRecord::ConnectionAdapters::PostgreSQL::SchemaCreation < ::ActiveRecord::ConnectionAdapters::SchemaCreation + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_creation.rb#8 + def quoted_include_columns_for_index(*_arg0, **_arg1, &_arg2); end + private - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_creation.rb#67 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_creation.rb#133 def add_column_options!(sql, options); end + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_creation.rb#153 + def quoted_include_columns(o); end + # Returns any SQL string to go between CREATE and TABLE. May be nil. # - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_creation.rb#88 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_creation.rb#158 def table_modifier_in_create(o); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_creation.rb#12 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_creation.rb#72 + def visit_AddExclusionConstraint(o); end + + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_creation.rb#19 def visit_AddForeignKey(o); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_creation.rb#8 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_creation.rb#80 + def visit_AddUniqueConstraint(o); end + + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_creation.rb#10 def visit_AlterTable(o); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_creation.rb#31 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_creation.rb#124 + def visit_ChangeColumnDefaultDefinition(o); end + + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_creation.rb#88 def visit_ChangeColumnDefinition(o); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_creation.rb#23 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_creation.rb#32 def visit_CheckConstraintDefinition(o); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_creation.rb#27 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_creation.rb#76 + def visit_DropExclusionConstraint(name); end + + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_creation.rb#84 + def visit_DropUniqueConstraint(name); end + + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_creation.rb#40 + def visit_ExclusionConstraintDefinition(o); end + + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_creation.rb#26 + def visit_ForeignKeyDefinition(o); end + + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_creation.rb#52 + def visit_UniqueConstraintDefinition(o); end + + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_creation.rb#36 def visit_ValidateConstraint(name); end end @@ -13676,84 +14923,155 @@ class ActiveRecord::ConnectionAdapters::PostgreSQL::SchemaDumper < ::ActiveRecor # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_dumper.rb#46 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_dumper.rb#99 def default_primary_key?(column); end + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_dumper.rb#42 + def exclusion_constraints_in_create(table, stream); end + # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_dumper.rb#50 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_dumper.rb#103 def explicit_primary_key_default?(column); end # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_dumper.rb#8 def extensions(stream); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_dumper.rb#68 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_dumper.rb#121 def extract_expression_for_virtual_column(column); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_dumper.rb#31 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_dumper.rb#84 def prepare_column_options(column); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_dumper.rb#64 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_dumper.rb#117 def schema_expression(column); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_dumper.rb#54 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_dumper.rb#107 def schema_type(column); end + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_dumper.rb#31 + def schemas(stream); end + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_dumper.rb#19 def types(stream); end + + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_dumper.rb#64 + def unique_constraints_in_create(table, stream); end end # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#6 module ActiveRecord::ConnectionAdapters::PostgreSQL::SchemaStatements - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#396 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#399 def add_column(table_name, column_name, type, **options); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#444 + # Adds a new exclusion constraint to the table. +expression+ is a String + # representation of a list of exclusion elements and operators. + # + # add_exclusion_constraint :products, "price WITH =, availability_range WITH &&", using: :gist, name: "price_check" + # + # generates: + # + # ALTER TABLE "products" ADD CONSTRAINT price_check EXCLUDE USING gist (price WITH =, availability_range WITH &&) + # + # The +options+ hash can include the following keys: + # [:name] + # The constraint name. Defaults to excl_rails_. + # [:deferrable] + # Specify whether or not the exclusion constraint should be deferrable. Valid values are +false+ or +:immediate+ or +:deferred+ to specify the default behavior. Defaults to +false+. + # + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#686 + def add_exclusion_constraint(table_name, expression, **options); end + + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#517 + def add_foreign_key(from_table, to_table, **options); end + + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#468 def add_index(table_name, column_name, **options); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#402 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#881 + def add_index_options(table_name, column_name, **options); end + + # Adds a new unique constraint to the table. + # + # add_unique_constraint :sections, [:position], deferrable: :deferred, name: "unique_position" + # + # generates: + # + # ALTER TABLE "sections" ADD CONSTRAINT unique_position UNIQUE (position) DEFERRABLE INITIALLY DEFERRED + # + # If you want to change an existing unique index to deferrable, you can use :using_index to create deferrable unique constraints. + # + # add_unique_constraint :sections, deferrable: :deferred, name: "unique_position", using_index: "index_sections_on_position" + # + # The +options+ hash can include the following keys: + # [:name] + # The constraint name. Defaults to uniq_rails_. + # [:deferrable] + # Specify whether or not the unique constraint should be deferrable. Valid values are +false+ or +:immediate+ or +:deferred+ to specify the default behavior. Defaults to +false+. + # [:using_index] + # To specify an existing unique index name. Defaults to +nil+. + # + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#737 + def add_unique_constraint(table_name, column_name = T.unsafe(nil), **options); end + + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#428 + def build_change_column_default_definition(table_name, column_name, default_or_changes); end + + # Builds a ChangeColumnDefinition object. + # + # This definition object contains information about the column change that would occur + # if the same arguments were passed to #change_column. See #change_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/postgresql/schema_statements.rb#417 + def build_change_column_definition(table_name, column_name, type, **options); end + + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#477 + def build_create_index_definition(table_name, column_name, **options); end + + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#405 def change_column(table_name, column_name, type, **options); end # Adds comment for given table column or drops it if +comment+ is a +nil+ # - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#424 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#448 def change_column_comment(table_name, column_name, comment_or_changes); end # Changes the default value of a table column. # - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#410 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#424 def change_column_default(table_name, column_name, default_or_changes); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#414 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#436 def change_column_null(table_name, column_name, null, default = T.unsafe(nil)); end # Adds comment for given table or drops it if +comment+ is a +nil+ # - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#431 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#455 def change_table_comment(table_name, comment_or_changes); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#525 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#584 def check_constraints(table_name); end # Returns the current client message level. # - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#237 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#239 def client_min_messages; end # Set the client message level. # - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#242 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#244 def client_min_messages=(level); end # Returns the current database collation. # - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#189 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#191 def collation; end # PostgreSQL requires the ORDER BY columns in the select list for distinct queries, and # requires that the ORDER BY include the distinct column. # - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#588 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#812 def columns_for_distinct(columns, orders); end # Create a new PostgreSQL database. Options include :owner, :template, @@ -13769,30 +15087,30 @@ module ActiveRecord::ConnectionAdapters::PostgreSQL::SchemaStatements # Creates a schema for the given schema name. # - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#210 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#212 def create_schema(schema_name); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#604 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#828 def create_schema_dumper(options); end # Returns the current database ctype. # - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#194 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#196 def ctype; end # Returns the current database name. # - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#174 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#176 def current_database; end # Returns the current schema name. # - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#179 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#181 def current_schema; end # Returns the sequence name for a table's primary key or some other specified key. # - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#247 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#249 def default_sequence_name(table_name, pk = T.unsafe(nil)); end # Drops a PostgreSQL database. @@ -13805,7 +15123,7 @@ module ActiveRecord::ConnectionAdapters::PostgreSQL::SchemaStatements # Drops the schema for the given schema name. # - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#215 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#217 def drop_schema(schema_name, **options); end # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#57 @@ -13813,20 +15131,35 @@ module ActiveRecord::ConnectionAdapters::PostgreSQL::SchemaStatements # Returns the current database encoding format. # - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#184 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#186 def encoding; end - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#483 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#694 + def exclusion_constraint_options(table_name, expression, options); end + + # Returns an array of exclusion constraints for the given table. + # The exclusion constraints are represented as ExclusionConstraintDefinition objects. + # + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#610 + def exclusion_constraints(table_name); end + + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#876 + def foreign_key_column_for(table_name, column_name); end + + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#531 def foreign_keys(table_name); end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#521 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#580 def foreign_table_exists?(table_name); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#517 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#576 def foreign_tables; end + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#512 + def index_name(table_name, options); end + # Verifies existence of an index with a given name. # # @return [Boolean] @@ -13841,30 +15174,55 @@ module ActiveRecord::ConnectionAdapters::PostgreSQL::SchemaStatements # Returns a table's primary key and belonging sequence. # - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#303 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#305 def pk_and_sequence_for(table); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#356 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#358 def primary_keys(table_name); end + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#888 + def quoted_include_columns_for_index(column_names); end + # Drops the database specified on the +name+ attribute # and creates it again using the provided +options+. # # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#9 def recreate_database(name, options = T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#454 + # Removes the given exclusion constraint from the table. + # + # remove_exclusion_constraint :products, name: "price_check" + # + # 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_exclusion_constraint. + # + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#709 + def remove_exclusion_constraint(table_name, expression = T.unsafe(nil), **options); end + + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#482 def remove_index(table_name, column_name = T.unsafe(nil), **options); end + # Removes the given unique constraint from the table. + # + # remove_unique_constraint :sections, name: "unique_position" + # + # The +column_name+ 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, +column_name+ will be used by #add_unique_constraint. + # + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#764 + def remove_unique_constraint(table_name, column_name = T.unsafe(nil), **options); end + # Renames a column in a table. # - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#438 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#462 def rename_column(table_name, column_name, new_column_name); end # Renames an index of a table. Raises error if length of new # index name is greater than allowed limit. # - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#477 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#505 def rename_index(table_name, old_name, new_name); end # Renames a table. @@ -13874,14 +15232,17 @@ module ActiveRecord::ConnectionAdapters::PostgreSQL::SchemaStatements # Example: # rename_table('octopuses', 'octopi') # - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#378 - def rename_table(table_name, new_name); end + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#380 + def rename_table(table_name, new_name, **options); end # Resets the sequence of a table's primary key to the maximum value. # - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#275 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#277 def reset_pk_sequence!(table, pk = T.unsafe(nil), sequence = T.unsafe(nil)); end + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#897 + def schema_creation; end + # Returns true if schema exists. # # @return [Boolean] @@ -13891,12 +15252,12 @@ module ActiveRecord::ConnectionAdapters::PostgreSQL::SchemaStatements # Returns an array of schema names. # - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#199 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#201 def schema_names; end # Returns the active schema search path. # - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#232 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#234 def schema_search_path; end # Sets the schema search path to a string of comma-separated schema names. @@ -13905,31 +15266,40 @@ module ActiveRecord::ConnectionAdapters::PostgreSQL::SchemaStatements # # This should be not be called manually but set in database.yml. # - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#224 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#226 def schema_search_path=(schema_csv); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#255 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#257 def serial_sequence(table, column); end # Sets the sequence of a table's primary key to the specified value. # - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#260 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#262 def set_pk_sequence!(table, value); end # Returns a comment stored in database for given table # - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#159 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#161 def table_comment(table_name); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#152 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#154 def table_options(table_name); end # Maps logical Rails types to PostgreSQL-specific data types. # - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#550 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#774 def type_to_sql(type, limit: T.unsafe(nil), precision: T.unsafe(nil), scale: T.unsafe(nil), array: T.unsafe(nil), enum_type: T.unsafe(nil), **_arg6); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#600 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#745 + def unique_constraint_options(table_name, column_name, options); end + + # Returns an array of unique constraints for the given table. + # The unique constraints are represented as UniqueConstraintDefinition objects. + # + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#644 + def unique_constraints(table_name); end + + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#824 def update_table_definition(table_name, base); end # Validates the given check constraint. @@ -13938,7 +15308,7 @@ module ActiveRecord::ConnectionAdapters::PostgreSQL::SchemaStatements # # The +options+ hash accepts the same keys as add_check_constraint[rdoc-ref:ConnectionAdapters::SchemaStatements#add_check_constraint]. # - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#646 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#870 def validate_check_constraint(table_name, **options); end # Validates the given constraint. @@ -13947,7 +15317,7 @@ module ActiveRecord::ConnectionAdapters::PostgreSQL::SchemaStatements # # validate_constraint :accounts, :constraint_name # - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#613 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#837 def validate_constraint(table_name, constraint_name); end # Validates the given foreign key. @@ -13966,284 +15336,372 @@ module ActiveRecord::ConnectionAdapters::PostgreSQL::SchemaStatements # # The +options+ hash accepts the same keys as SchemaStatements#add_foreign_key. # - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#635 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#859 def validate_foreign_key(from_table, to_table = T.unsafe(nil), **options); end private - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#733 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#990 def add_column_for_alter(table_name, column_name, type, **options); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#765 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#1010 def add_index_opclass(quoted_columns, **options); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#772 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#1017 def add_options_for_index_columns(quoted_columns, **options); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#746 - def change_column_default_for_alter(table_name, column_name, default_or_changes); end + # @raise [ArgumentError] + # + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#975 + def assert_valid_deferrable(deferrable); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#738 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#995 def change_column_for_alter(table_name, column_name, type, **options); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#761 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#1002 def change_column_null_for_alter(table_name, column_name, null, default = T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#661 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#1096 + def column_names_from_column_numbers(table_oid, column_numbers); end + + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#906 def create_alter_table(name); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#657 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#902 def create_table_definition(name, **options); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#777 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#1062 def data_source_sql(name = T.unsafe(nil), type: T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#721 - def extract_foreign_key_action(specifier); end + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#1032 + def exclusion_constraint_for(table_name, **options); end + + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#1037 + def exclusion_constraint_for!(table_name, expression: T.unsafe(nil), **options); end + + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#1022 + def exclusion_constraint_name(table_name, **options); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#729 - def extract_foreign_key_deferrable(deferrable, deferred); end + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#981 + def extract_constraint_deferrable(deferrable, deferred); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#806 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#967 + def extract_foreign_key_action(specifier); end + + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#1091 def extract_schema_qualified_name(string); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#693 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#939 def fetch_type_metadata(column_name, sql_type, oid, fmod); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#665 - def new_column_from_field(table_name, field); end + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#910 + def new_column_from_field(table_name, field, _definitions); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#788 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#1073 def quoted_scope(name = T.unsafe(nil), type: T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#653 - def schema_creation; end + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#985 + def reference_name_for_table(table_name); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#705 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#951 def sequence_name_from_parts(table_name, column_name, suffix); end + + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#1052 + def unique_constraint_for(table_name, **options); end + + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#1057 + def unique_constraint_for!(table_name, column: T.unsafe(nil), **options); end + + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_statements.rb#1042 + def unique_constraint_name(table_name, **options); end end -# source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#225 +# = Active Record PostgreSQL Adapter \Table +# +# source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#297 class ActiveRecord::ConnectionAdapters::PostgreSQL::Table < ::ActiveRecord::ConnectionAdapters::Table include ::ActiveRecord::ConnectionAdapters::PostgreSQL::ColumnMethods - # 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 bigserial(*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 bit(*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 bit_varying(*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 box(*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 cidr(*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 circle(*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 citext(*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 daterange(*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 enum(*names, **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 + # Adds an exclusion constraint. + # + # t.exclusion_constraint("price WITH =, availability_range WITH &&", using: :gist, name: "price_check") + # + # See {connection.add_exclusion_constraint}[rdoc-ref:SchemaStatements#add_exclusion_constraint] + # + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#305 + def exclusion_constraint(*args); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 def hstore(*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 inet(*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 int4range(*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 int8range(*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 interval(*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 jsonb(*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 line(*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 lseg(*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 ltree(*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 macaddr(*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 money(*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 numrange(*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 oid(*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 path(*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 point(*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 polygon(*names, **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 + # Removes the given exclusion constraint from the table. + # + # t.remove_exclusion_constraint(name: "price_check") + # + # See {connection.remove_exclusion_constraint}[rdoc-ref:SchemaStatements#remove_exclusion_constraint] + # + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#314 + def remove_exclusion_constraint(*args); end + + # Removes the given unique constraint from the table. + # + # t.remove_unique_constraint(name: "unique_position") + # + # See {connection.remove_unique_constraint}[rdoc-ref:SchemaStatements#remove_unique_constraint] + # + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#332 + def remove_unique_constraint(*args); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 def serial(*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 timestamptz(*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 tsrange(*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 tstzrange(*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 tsvector(*names, **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 + # Adds a unique constraint. + # + # t.unique_constraint(:position, name: 'unique_position', deferrable: :deferred) + # + # See {connection.add_unique_constraint}[rdoc-ref:SchemaStatements#add_unique_constraint] + # + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#323 + def unique_constraint(*args); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 def uuid(*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 xml(*names, **options); end end -# source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#192 +# = Active Record PostgreSQL Adapter \Table Definition +# +# source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#239 class ActiveRecord::ConnectionAdapters::PostgreSQL::TableDefinition < ::ActiveRecord::ConnectionAdapters::TableDefinition include ::ActiveRecord::ConnectionAdapters::PostgreSQL::ColumnMethods # @return [TableDefinition] a new instance of TableDefinition # - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#197 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#244 def initialize(*_arg0, **_arg1); 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 bigserial(*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 bit(*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 bit_varying(*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 box(*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 cidr(*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 circle(*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 citext(*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 daterange(*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 enum(*names, **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#251 + def exclusion_constraint(expression, **options); end + + # Returns the value of attribute exclusion_constraints. + # + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#242 + def exclusion_constraints; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 def hstore(*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 inet(*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 int4range(*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 int8range(*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 interval(*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 jsonb(*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 line(*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 lseg(*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 ltree(*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 macaddr(*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 money(*names, **options); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#202 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#269 def new_column_definition(name, type, **options); end - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#259 + def new_exclusion_constraint_definition(expression, options); end + + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#264 + def new_unique_constraint_definition(column_name, options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 def numrange(*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 oid(*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 path(*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 point(*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 polygon(*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 serial(*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 timestamptz(*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 tsrange(*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 tstzrange(*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 tsvector(*names, **options); end + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#255 + def unique_constraint(column_name, **options); end + + # Returns the value of attribute unique_constraints. + # + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#242 + def unique_constraints; end + # Returns the value of attribute unlogged. # - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#195 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#242 def unlogged; 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 uuid(*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 xml(*names, **options); end private - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#212 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#283 def aliased_types(name, fallback); end - # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#216 + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#287 def integer_like_primary_key_type(type, options); end + + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#279 + def valid_column_definition_options; end end # source://activerecord//lib/active_record/connection_adapters/postgresql/type_metadata.rb#7 @@ -14281,6 +15739,69 @@ class ActiveRecord::ConnectionAdapters::PostgreSQL::TypeMetadata def deduplicated; end end +# source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#214 +class ActiveRecord::ConnectionAdapters::PostgreSQL::UniqueConstraintDefinition < ::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 + + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#219 + def deferrable; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#231 + def defined_for?(name: T.unsafe(nil), column: T.unsafe(nil), **options); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#227 + def export_name_on_schema_dump?; end + + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#215 + def name; end + + # Returns the value of attribute options + # + # @return [Object] the current value of options + def options; end + + # Sets the attribute options + # + # @param value [Object] the value to set the attribute options to. + # @return [Object] the newly set value + def options=(_); end + + # Returns the value of attribute table_name + # + # @return [Object] the current value of table_name + def table_name; end + + # Sets the attribute table_name + # + # @param value [Object] the value to set the attribute table_name to. + # @return [Object] the newly set value + def table_name=(_); end + + # source://activerecord//lib/active_record/connection_adapters/postgresql/schema_definitions.rb#223 + def using_index; 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/postgresql/utils.rb#45 module ActiveRecord::ConnectionAdapters::PostgreSQL::Utils extend ::ActiveRecord::ConnectionAdapters::PostgreSQL::Utils @@ -14305,6 +15826,8 @@ module ActiveRecord::ConnectionAdapters::PostgreSQL::Utils def unquote_identifier(identifier); end end +# = Active Record PostgreSQL Adapter +# # The PostgreSQL adapter works with the native C (https://github.com/ged/ruby-pg) driver. # # Options: @@ -14333,7 +15856,7 @@ end # In addition, default connection parameters of libpq can be set per environment variables. # See https://www.postgresql.org/docs/current/static/libpq-envars.html . # -# source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#73 +# source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#64 class ActiveRecord::ConnectionAdapters::PostgreSQLAdapter < ::ActiveRecord::ConnectionAdapters::AbstractAdapter include ::ActiveRecord::ConnectionAdapters::PostgreSQL::Quoting include ::ActiveRecord::ConnectionAdapters::PostgreSQL::ReferentialIntegrity @@ -14344,26 +15867,31 @@ class ActiveRecord::ConnectionAdapters::PostgreSQLAdapter < ::ActiveRecord::Conn # # @return [PostgreSQLAdapter] a new instance of PostgreSQLAdapter # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#281 - def initialize(connection, logger, connection_parameters, config); end + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#317 + def initialize(*_arg0, **_arg1, &_arg2); end # Is this connection alive and ready for queries? # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#307 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#341 def active?; end - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#514 + # Add enum value to an existing enum type. + # + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#565 + def add_enum_value(type_name, value, options = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#627 def build_insert_sql(insert); end - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#533 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#646 def check_version; end # Given a name and an array of values, creates an enum type. # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#472 - def create_enum(name, values); end + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#520 + def create_enum(name, values, **options); end # :singleton-method: # PostgreSQL allows the creation of "unlogged" tables, which do not record @@ -14376,18 +15904,18 @@ class ActiveRecord::ConnectionAdapters::PostgreSQLAdapter < ::ActiveRecord::Conn # # ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.create_unlogged_tables = true # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#103 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#115 def create_unlogged_tables; end - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#103 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#115 def create_unlogged_tables=(_arg0); end - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#103 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#115 def create_unlogged_tables?; end # :singleton-method: # PostgreSQL supports multiple types for DateTimes. By default, if you use +datetime+ - # in migrations, Rails will translate this to a PostgreSQL "timestamp without time zone". + # in migrations, \Rails will translate this to a PostgreSQL "timestamp without time zone". # Change this in an initializer to use another NATIVE_DATABASE_TYPES. For example, to # store DateTimes as "timestamp with time zone": # @@ -14401,274 +15929,333 @@ class ActiveRecord::ConnectionAdapters::PostgreSQLAdapter < ::ActiveRecord::Conn # If you're using +:ruby+ as your +config.active_record.schema_format+ and you change this # setting, you should immediately run bin/rails db:migrate to update the types in your schema.rb. # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#121 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#133 def datetime_type; end - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#121 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#133 def datetime_type=(_arg0); end - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#121 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#133 def datetime_type?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#510 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#623 def default_index_type?(index); end - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#439 - def disable_extension(name); end + # Removes an extension from the database. + # + # [:force] + # Set to +:cascade+ to drop dependent objects as well. + # Defaults to false. + # + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#478 + def disable_extension(name, force: T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#354 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#386 def discard!; end # Disconnects from the database if already connected. Otherwise, this # method does nothing. # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#347 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#378 def disconnect!; end - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#433 - def enable_extension(name); end + # Drops an enum type. + # + # If the if_exists: true option is provided, the enum is dropped + # only if it exists. Otherwise, if the enum doesn't exist, an error is + # raised. + # + # The +values+ 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, +values+ will be used by #create_enum. + # + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#550 + def drop_enum(name, values = T.unsafe(nil), **options); end + + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#465 + def enable_extension(name, **_arg1); end # Returns a list of defined enum types, and their values. # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#458 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#497 def enum_types; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#445 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#484 def extension_available?(name); end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#449 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#488 def extension_enabled?(name); end - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#453 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#492 def extensions; end - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#419 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#451 def get_advisory_lock(lock_id); end # Returns the version of the connected PostgreSQL server. # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#505 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#618 def get_database_version; end - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#252 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#284 def index_algorithms; end # Returns the configured supported identifier length supported by PostgreSQL # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#490 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#595 def max_identifier_length; end - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#360 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#392 def native_database_types; end - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#653 + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#870 def postgresql_version; end - # Close then reopen the connection. - # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#322 - def reconnect!; end - - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#426 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#458 def release_advisory_lock(lock_id); end - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#316 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#351 def reload_type_map; end - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#333 + # Rename an existing enum type to something else. + # + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#558 + def rename_enum(name, options = T.unsafe(nil)); end + + # Rename enum value on an existing enum type. + # + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#581 + def rename_enum_value(type_name, options = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#363 def reset!; end + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#288 + def return_value_after_insert?(column); end + # Set the authorized user for this session # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#495 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#608 def session_auth=(user); end - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#372 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#404 def set_standard_conforming_strings; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#380 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#412 def supports_advisory_locks?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#177 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#189 def supports_bulk_alter?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#205 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#221 def supports_check_constraints?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#229 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#253 def supports_comments?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#411 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#443 def supports_common_table_expressions?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#221 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#245 def supports_datetime_with_precision?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#376 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#408 def supports_ddl_transactions?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#213 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#237 def supports_deferrable_constraints?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#384 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#225 + def supports_exclusion_constraints?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#416 def supports_explain?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#193 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#209 def supports_expression_index?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#388 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#420 def supports_extensions?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#201 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#217 def supports_foreign_keys?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#396 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#428 def supports_foreign_tables?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#181 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#205 + def supports_index_include?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#193 def supports_index_sort_order?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#241 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#269 def supports_insert_conflict_target?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#241 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#269 def supports_insert_on_conflict?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#241 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#269 def supports_insert_on_duplicate_skip?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#241 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#269 def supports_insert_on_duplicate_update?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#237 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#265 def supports_insert_returning?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#225 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#249 def supports_json?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#415 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#447 def supports_lazy_transactions?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#392 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#424 def supports_materialized_views?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#404 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#280 + def supports_nulls_not_distinct?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#436 def supports_optimizer_hints?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#189 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#201 def supports_partial_index?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#185 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#197 def supports_partitioned_indexes?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#400 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#432 def supports_pgcrypto_uuid?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#233 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#261 + def supports_restart_db_transaction?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#257 def supports_savepoints?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#197 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#213 def supports_transaction_isolation?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#209 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#229 + def supports_unique_constraints?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#233 def supports_validate_constraints?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#217 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#241 def supports_views?; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#248 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#276 def supports_virtual_columns?; end + # Returns the maximum length of a table name. + # + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#600 + def table_name_length; end + # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#500 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#613 def use_insert_returning?; end private - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#991 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#1153 def add_pg_decoders; end - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#966 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#1126 def add_pg_encoders; end - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#936 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#1091 def arel_visitor; end - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#940 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#1095 def build_statement_pool; end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#944 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#1099 def can_perform_case_insensitive_comparison_for?(column); end # Returns the list of a table's column names, data types, and default values. @@ -14690,58 +16277,55 @@ class ActiveRecord::ConnectionAdapters::PostgreSQLAdapter < ::ActiveRecord::Conn # - format_type includes the column size constraint, e.g. varchar(50) # - ::regclass is a function that gives the id for a table name # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#915 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#1074 def column_definitions(table_name); end # Configures the encoding, verbosity, schema search path, and time zone of the connection. # This is called by #connect and should not be called manually. # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#860 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#998 def configure_connection; end # Connects to a PostgreSQL server and sets up the adapter depending on the # connected server's characteristics. # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#851 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#980 def connect; end - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#1032 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#1194 def construct_coder(row, coder_class); end - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#773 - def exec_cache(sql, name, binds, async: T.unsafe(nil)); end + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#902 + def exec_cache(sql, name, binds, async:, allow_retry:, materialize_transactions:); end - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#757 - def exec_no_cache(sql, name, binds, async: T.unsafe(nil)); end + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#887 + def exec_no_cache(sql, name, binds, async:, allow_retry:, materialize_transactions:); end - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#740 - def execute_and_clear(sql, name, binds, prepare: T.unsafe(nil), async: T.unsafe(nil)); end + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#870 + def execute_and_clear(sql, name, binds, prepare: T.unsafe(nil), async: T.unsafe(nil), allow_retry: T.unsafe(nil), materialize_transactions: T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#646 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#758 def extract_default_function(default_value, default); end - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#931 - def extract_table_ref_from_insert_sql(sql); end - # Extracts the value from a PostgreSQL column default definition. # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#620 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#732 def extract_value_from_default(default); end - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#701 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#831 def get_oid_type(oid, fmod, column_name, sql_type = T.unsafe(nil)); end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#650 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#762 def has_default_function?(default_value, default); end # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#819 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#948 def in_transaction?; end - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#614 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#721 def initialize_type_map(m = T.unsafe(nil)); end # Annoyingly, the code for prepared statements whose return value may @@ -14756,152 +16340,158 @@ class ActiveRecord::ConnectionAdapters::PostgreSQLAdapter < ::ActiveRecord::Conn # # @return [Boolean] # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#811 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#940 def is_cached_plan_failure?(e); end - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#714 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#844 def load_additional_types(oids = T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#723 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#853 def load_types_queries(initializer, oids); end # Prepare the statement if it hasn't been prepared, return # the statement key. # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#831 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#960 def prepare_statement(sql, binds); end + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#1039 + def reconfigure_connection_timezone; end + + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#986 + def reconnect; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#824 + def retryable_query_error?(exception); end + # Returns the statement identifier for the client side cache # of statements # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#825 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#954 def sql_key(sql); end - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#666 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#778 def translate_exception(exception, message:, sql:, binds:); end - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#610 + # Returns the value of attribute type_map. + # + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#719 def type_map; end - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#974 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#1134 def update_typemap_for_default_timezone; end class << self - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#103 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#115 def create_unlogged_tables; end - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#103 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#115 def create_unlogged_tables=(value); end - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#103 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#115 def create_unlogged_tables?; end - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#300 - def database_exists?(config); end - - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#121 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#133 def datetime_type; end - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#121 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#133 def datetime_type=(value); end - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#121 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#133 def datetime_type?; end - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#540 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#84 + def dbconsole(config, options = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#653 def initialize_type_map(m); end - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#364 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#396 def native_database_types; end - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#77 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#68 def new_client(conn_params); end end end -# source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#74 +# source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#65 ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::ADAPTER_NAME = T.let(T.unsafe(nil), String) -# source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#661 +# source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#773 ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::DEADLOCK_DETECTED = T.let(T.unsafe(nil), String) -# source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#662 +# source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#774 ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::DUPLICATE_DATABASE = T.let(T.unsafe(nil), String) -# source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#738 +# source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#868 ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::FEATURE_NOT_SUPPORTED = T.let(T.unsafe(nil), String) -# source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#658 +# source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#770 ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::FOREIGN_KEY_VIOLATION = T.let(T.unsafe(nil), String) -# source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#663 +# source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#775 ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::LOCK_NOT_AVAILABLE = T.let(T.unsafe(nil), String) -# source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#1037 +# source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#1199 class ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::MoneyDecoder < ::PG::SimpleDecoder - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#1040 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#1202 def decode(value, tuple = T.unsafe(nil), field = T.unsafe(nil)); end end -# source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#1038 +# source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#1200 ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::MoneyDecoder::TYPE = T.let(T.unsafe(nil), ActiveRecord::ConnectionAdapters::PostgreSQL::OID::Money) -# source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#123 +# source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#135 ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::NATIVE_DATABASE_TYPES = T.let(T.unsafe(nil), Hash) -# source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#657 +# source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#769 ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::NOT_NULL_VIOLATION = T.let(T.unsafe(nil), String) -# source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#656 +# source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#768 ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::NUMERIC_VALUE_OUT_OF_RANGE = T.let(T.unsafe(nil), String) -# source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#170 +# source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#182 ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID = ActiveRecord::ConnectionAdapters::PostgreSQL::OID -# source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#664 +# source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#776 ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::QUERY_CANCELED = T.let(T.unsafe(nil), String) -# source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#660 +# source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#772 ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::SERIALIZATION_FAILURE = T.let(T.unsafe(nil), String) -# source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#256 +# source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#292 class ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::StatementPool < ::ActiveRecord::ConnectionAdapters::StatementPool # @return [StatementPool] a new instance of StatementPool # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#257 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#293 def initialize(connection, max); end - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#263 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#299 def next_key; end private - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#273 - def connection_active?; end - - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#268 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#304 def dealloc(key); end end -# source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#659 +# source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#771 ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::UNIQUE_VIOLATION = T.let(T.unsafe(nil), String) # See https://www.postgresql.org/docs/current/static/errcodes-appendix.html # -# source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#655 +# source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#767 ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::VALUE_LIMIT_VIOLATION = T.let(T.unsafe(nil), String) -# source://activerecord//lib/active_record/connection_adapters/postgresql/column.rb#69 +# source://activerecord//lib/active_record/connection_adapters/postgresql/column.rb#80 ActiveRecord::ConnectionAdapters::PostgreSQLColumn = ActiveRecord::ConnectionAdapters::PostgreSQL::Column # source://activerecord//lib/active_record/connection_adapters/postgresql/type_metadata.rb#42 ActiveRecord::ConnectionAdapters::PostgreSQLTypeMetadata = ActiveRecord::ConnectionAdapters::PostgreSQL::TypeMetadata -# 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 # @@ -14925,12 +16515,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. @@ -14940,31 +16530,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 @@ -14972,48 +16562,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#170 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#141 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#181 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#119 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 @@ -15026,94 +16628,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). @@ -15122,7 +16730,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, @@ -15137,257 +16745,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 + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#398 + def add_all(connection); end - # Clears out internal caches + # @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.1/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#210 - def reset_version!; 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#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.1/lib/active_support/deprecation/method_wrappers.rb#46 + def load_from(*args, **_arg1, &block); end + + # source://activesupport/7.1.1/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 @@ -15404,16 +17057,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 @@ -15428,7 +17081,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 @@ -15438,64 +17091,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 @@ -15555,6 +17220,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 @@ -15562,7 +17334,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] @@ -15607,7 +17378,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 @@ -15622,11 +17393,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+. # @@ -15662,11 +17435,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. @@ -15682,7 +17450,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. @@ -15723,10 +17491,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, @@ -15756,6 +17524,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 @@ -15766,9 +17544,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] @@ -15784,7 +17564,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 @@ -15865,6 +17645,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') @@ -15910,16 +17700,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] @@ -15964,7 +17753,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+. @@ -15972,12 +17761,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. # @@ -15986,7 +17825,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+. @@ -15998,7 +17837,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: @@ -16017,7 +17856,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 @@ -16039,7 +17878,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+. @@ -16121,8 +17960,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+. # @@ -16133,10 +17972,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. @@ -16144,7 +17992,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. @@ -16166,12 +18014,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. @@ -16180,7 +18028,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 @@ -16221,10 +18069,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 @@ -16370,10 +18218,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. # @@ -16390,17 +18236,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. @@ -16416,14 +18262,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. # @@ -16438,10 +18284,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. @@ -16449,10 +18295,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. @@ -16469,19 +18315,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. @@ -16491,9 +18340,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. @@ -16503,19 +18357,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 # @@ -16529,19 +18382,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. # @@ -16559,7 +18418,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. @@ -16570,7 +18429,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 @@ -16604,7 +18463,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. @@ -16644,11 +18503,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 # @@ -16662,14 +18520,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. @@ -16678,7 +18536,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. @@ -16687,7 +18545,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. @@ -16696,8 +18554,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. # @@ -16726,12 +18590,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) @@ -16748,131 +18626,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 @@ -16943,7 +18835,7 @@ class ActiveRecord::ConnectionAdapters::StatementPool # source://activerecord//lib/active_record/connection_adapters/statement_pool.rb#38 def clear; end - # source://activerecord//lib/active_record/connection_adapters/statement_pool.rb#45 + # source://activerecord//lib/active_record/connection_adapters/statement_pool.rb#52 def delete(key); end # source://activerecord//lib/active_record/connection_adapters/statement_pool.rb#15 @@ -16957,20 +18849,29 @@ class ActiveRecord::ConnectionAdapters::StatementPool # source://activerecord//lib/active_record/connection_adapters/statement_pool.rb#27 def length; end + # Clear the pool without deallocating; this is only safe when we + # know the server has independently deallocated all statements + # (e.g. due to a reconnect, or a DISCARD ALL) + # + # source://activerecord//lib/active_record/connection_adapters/statement_pool.rb#48 + def reset; end + private - # source://activerecord//lib/active_record/connection_adapters/statement_pool.rb#51 + # source://activerecord//lib/active_record/connection_adapters/statement_pool.rb#58 def cache; end # @raise [NotImplementedError] # - # source://activerecord//lib/active_record/connection_adapters/statement_pool.rb#55 + # source://activerecord//lib/active_record/connection_adapters/statement_pool.rb#62 def dealloc(stmt); end end # source://activerecord//lib/active_record/connection_adapters/statement_pool.rb#8 ActiveRecord::ConnectionAdapters::StatementPool::DEFAULT_STATEMENT_LIMIT = T.let(T.unsafe(nil), Integer) +# = 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] # @@ -17015,14 +18916,14 @@ ActiveRecord::ConnectionAdapters::StatementPool::DEFAULT_STATEMENT_LIMIT = T.let # 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. @@ -17032,19 +18933,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. @@ -17054,7 +18955,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. @@ -17065,7 +18966,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. @@ -17075,7 +18976,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. @@ -17084,16 +18985,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. @@ -17104,19 +19018,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. @@ -17126,7 +19040,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. @@ -17137,7 +19051,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 @@ -17149,7 +19063,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. @@ -17162,21 +19076,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. @@ -17186,7 +19100,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. @@ -17196,7 +19110,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. @@ -17206,7 +19120,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. @@ -17215,7 +19129,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. @@ -17225,7 +19139,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. @@ -17237,7 +19151,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. @@ -17247,7 +19161,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. @@ -17256,7 +19170,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. @@ -17265,7 +19179,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. @@ -17274,19 +19188,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. @@ -17295,20 +19209,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" @@ -17320,24 +19241,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. @@ -17348,27 +19269,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. @@ -17439,42 +19360,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 @@ -17482,43 +19403,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. @@ -17529,30 +19450,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 @@ -17560,258 +19484,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#554 +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 @@ -17841,19 +19852,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+ @@ -17870,7 +19889,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. @@ -17881,48 +19900,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. # - # 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 @@ -17931,7 +19949,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 @@ -17982,7 +20000,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: # @@ -17991,23 +20009,23 @@ 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#334 + def flush_idle_connections!(role = T.unsafe(nil)); end - # source://activerecord//lib/active_record/connection_handling.rb#256 - def lookup_connection_handler(handler_key); end + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#24 + def postgresql_adapter_class; end # Establishes a connection to the database that's used by all Active Record objects # - # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#25 + # source://activerecord//lib/active_record/connection_adapters/postgresql_adapter.rb#29 def postgresql_connection(config); 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. @@ -18017,20 +20035,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. @@ -18045,52 +20063,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 @@ -18102,19 +20125,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#424 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#603 def <=>(other_object); end # Returns true if +comparison_object+ is the same exact object, or +comparison_object+ @@ -18127,15 +20150,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#569 def ==(comparison_object); end # @return [Boolean] # - # source://activerecord//lib/active_record/core.rb#626 + # source://activerecord//lib/active_record/core.rb#615 def blank?; end - # source://activerecord//lib/active_record/core.rb#682 + # source://activerecord//lib/active_record/core.rb#679 def connection_handler; end # Populate +coder+ with attributes about this record that should be @@ -18151,7 +20174,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#533 def encode_with(coder); end # Returns true if +comparison_object+ is the same exact object, or +comparison_object+ @@ -18164,27 +20187,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#569 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#592 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#598 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#579 def hash; end # Initialize an empty model object from +coder+. +coder+ should be @@ -18202,7 +20225,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#451 def init_with(coder, &block); end # Initialize an empty model object from +attributes+. @@ -18212,108 +20235,106 @@ 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#461 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#684 def inspect; end # @return [Boolean] # - # source://activerecord//lib/active_record/core.rb#622 + # source://activerecord//lib/active_record/core.rb#611 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#702 def pretty_print(pp); end # Marks this record as read only. # - # source://activerecord//lib/active_record/core.rb#678 + # source://activerecord//lib/active_record/core.rb#675 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#620 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#661 + # source://activerecord//lib/active_record/core.rb#658 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#625 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#667 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#670 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#759 def custom_inspect_method_defined?; end - # source://activerecord//lib/active_record/core.rb#751 + # source://activerecord//lib/active_record/core.rb#738 def init_internals; end - # source://activerecord//lib/active_record/core.rb#539 + # source://activerecord//lib/active_record/core.rb#503 def initialize_dup(other); end - # source://activerecord//lib/active_record/core.rb#768 + # source://activerecord//lib/active_record/core.rb#756 def initialize_internals_callback; end - # source://activerecord//lib/active_record/core.rb#782 + # source://activerecord//lib/active_record/core.rb#770 def inspection_filter; end # +Array#flatten+ will call +#to_ary+ (recursively) on each of the elements of @@ -18325,10 +20346,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#734 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 @@ -18341,8 +20365,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 @@ -18352,6 +20376,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 @@ -18367,186 +20394,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#237 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 def arel_table; end - # source://activerecord//lib/active_record/core.rb#432 + # source://activerecord//lib/active_record/core.rb#360 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#306 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#315 def filter_attributes=(filter_attributes); end - # source://activerecord//lib/active_record/core.rb#268 + # source://activerecord//lib/active_record/core.rb#242 def find(*ids); end - # source://activerecord//lib/active_record/core.rb#287 + # source://activerecord//lib/active_record/core.rb#255 def find_by(*args); end - # source://activerecord//lib/active_record/core.rb#329 + # source://activerecord//lib/active_record/core.rb#287 def find_by!(*args); end - # source://activerecord//lib/active_record/core.rb#362 + # source://activerecord//lib/active_record/core.rb#295 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#238 def initialize_find_by_cache; end - # source://activerecord//lib/active_record/core.rb#358 + # source://activerecord//lib/active_record/core.rb#291 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#332 def inspect; end - # source://activerecord//lib/active_record/core.rb#387 + # source://activerecord//lib/active_record/core.rb#320 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#352 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#356 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 - - # source://activerecord//lib/active_record/core.rb#340 - def writing_role; end + private - # source://activerecord//lib/active_record/core.rb#348 - def writing_role=(value); end + # source://activerecord//lib/active_record/core.rb#402 + def cached_find_by(keys, values); end - private + # source://activerecord//lib/active_record/core.rb#366 + def inherited(subclass); end - # source://activerecord//lib/active_record/core.rb#438 + # source://activerecord//lib/active_record/core.rb#388 def relation; end - # source://activerecord//lib/active_record/core.rb#448 + # source://activerecord//lib/active_record/core.rb#398 def table_metadata; end end -# source://activerecord//lib/active_record/core.rb#775 +# source://activerecord//lib/active_record/core.rb#763 class ActiveRecord::Core::InspectionMask - # source://activerecord//lib/active_record/core.rb#776 + # source://activerecord//lib/active_record/core.rb#764 def pretty_print(pp); end end @@ -18555,23 +20478,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 @@ -18581,6 +20519,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. @@ -18591,11 +20530,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. # @@ -18608,6 +20551,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. @@ -18618,11 +20562,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 @@ -18645,7 +20593,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 @@ -18665,74 +20613,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#412 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#335 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 @@ -18742,38 +20698,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 @@ -18785,7 +20738,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. @@ -18808,46 +20761,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. @@ -18912,37 +20906,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 @@ -18950,77 +20947,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: @@ -19032,86 +21024,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 @@ -19120,14 +21119,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 @@ -19136,25 +21135,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. # @@ -19169,28 +21170,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 @@ -19198,25 +21203,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 @@ -19224,10 +21229,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#524 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, @@ -19418,6 +21426,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+. @@ -19430,12 +21443,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 @@ -19445,107 +21458,118 @@ 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#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 @@ -19553,46 +21577,46 @@ 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 @@ -19615,36 +21639,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.1/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.1/lib/active_support/rescuable.rb#15 def rescue_handlers; end end end @@ -19808,11 +21837,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 @@ -19827,15 +21856,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.1/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.1/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 @@ -19846,16 +21878,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.1/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.1/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 @@ -19866,6 +21901,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) @@ -19912,40 +21990,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 @@ -19953,170 +22034,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 @@ -20135,9 +22240,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 @@ -20146,9 +22251,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 @@ -20158,13 +22260,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: @@ -20179,51 +22276,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 @@ -20257,6 +22357,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 @@ -20271,7 +22374,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. @@ -20298,51 +22406,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#151 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#165 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#160 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#172 + def _create_record(attribute_names = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#208 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#202 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#217 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#187 def decrypt_attributes; end - # source://activerecord//lib/active_record/encryption/encryptable_record.rb#163 + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#181 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#198 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#194 def validate_encryption_allowed; end module GeneratedClassMethods @@ -20360,43 +22471,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#170 ActiveRecord::Encryption::EncryptableRecord::ORIGINAL_ATTRIBUTE_PREFIX = T.let(T.unsafe(nil), String) # An ActiveModel::Type::Value that encrypts/decrypts strings of text. @@ -20418,11 +22529,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 @@ -20430,10 +22544,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#47 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 @@ -20451,7 +22565,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#52 def previous_types; end # Returns the value of attribute scheme. @@ -20459,66 +22573,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#57 + 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#70 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#146 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#80 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#142 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#128 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#138 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#134 def encryptor; end - # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#91 + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#106 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#62 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#76 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#66 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#122 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#118 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#114 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#98 def try_to_deserialize_with_previous_encrypted_types(value); end end @@ -20730,47 +22844,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). +# This module is included if `config.active_record.encryption.extend_queries` is `true`. # -# When modifying this file run performance tests in +test/performance/extended_deterministic_queries_performance_test.rb+ to -# make sure performance overhead is acceptable. -# -# 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#133 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#136 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#134 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#134 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#142 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#123 module ActiveRecord::Encryption::ExtendedDeterministicQueries::CoreQueries extend ::ActiveSupport::Concern @@ -20779,65 +22886,57 @@ 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#127 def find_by(*args); end end -# source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#41 -module ActiveRecord::Encryption::ExtendedDeterministicQueries::EncryptedQueryArgumentProcessor - extend ::ActiveSupport::Concern - - private +# 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#42 +module ActiveRecord::Encryption::ExtendedDeterministicQueries::EncryptedQuery + class << self + # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#44 + 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#88 + 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#70 + 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#147 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#148 def serialize(data); end end -# source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#145 +# source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#157 module ActiveRecord::Encryption::ExtendedDeterministicQueries::InWithAdditionalValues - # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#150 + # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#162 def encryption_aware_type_caster; end - # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#146 + # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#158 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#96 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#101 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#105 + 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#97 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 @@ -20890,12 +22989,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 @@ -20909,17 +23013,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 @@ -21023,37 +23135,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 @@ -21096,6 +23208,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 @@ -21120,6 +23235,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 @@ -21144,7 +23262,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.1/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 @@ -21160,7 +23281,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.1/lib/active_support/core_ext/module/delegation.rb#323 def respond_to_missing?(name, include_private = T.unsafe(nil)); end end @@ -21205,32 +23326,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. @@ -21245,27 +23371,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, @@ -21376,130 +23504,184 @@ 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#225 def enum(name = T.unsafe(nil), values = T.unsafe(nil), **options); end - # source://activerecord//lib/active_record/enum.rb#119 - def inherited(base); end + # source://activerecord//lib/active_record/enum.rb#170 + def load_schema!; 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#243 + 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#332 def _enum_methods_module; end - # source://activerecord//lib/active_record/enum.rb#269 + # source://activerecord//lib/active_record/enum.rb#340 def assert_valid_enum_definition_values(values); end - # source://activerecord//lib/active_record/enum.rb#288 + # source://activerecord//lib/active_record/enum.rb#373 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#397 def detect_negative_enum_conditions!(method_names); end + # source://activerecord//lib/active_record/enum.rb#238 + def inherited(base); end + # @raise [ArgumentError] # - # source://activerecord//lib/active_record/enum.rb#300 + # source://activerecord//lib/active_record/enum.rb#387 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#367 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#300 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#301 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#308 + 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#306 def klass; end end -# source://activerecord//lib/active_record/enum.rb#124 +# source://activerecord//lib/active_record/enum.rb#179 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#182 + 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#211 def assert_valid_value(value); end - # source://activerecord//lib/active_record/enum.rb#133 + # source://activerecord//lib/active_record/enum.rb#189 def cast(value); end - # source://activerecord//lib/active_record/enum.rb#143 + # source://activerecord//lib/active_record/enum.rb#199 def deserialize(value); end # @return [Boolean] # - # source://activerecord//lib/active_record/enum.rb#151 + # source://activerecord//lib/active_record/enum.rb#207 def serializable?(value, &block); end - # source://activerecord//lib/active_record/enum.rb#147 + # source://activerecord//lib/active_record/enum.rb#203 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#219 def subtype; end - # source://activerecord//lib/active_record/enum.rb#125 + # source://activerecord//lib/active_record/enum.rb#180 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#222 def mapping; end # Returns the value of attribute name. # - # source://activerecord//lib/active_record/enum.rb#164 + # source://activerecord//lib/active_record/enum.rb#222 def name; end end -# source://activerecord//lib/active_record/migration.rb#197 +# source://activerecord//lib/active_record/migration.rb#203 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#204 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#217 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#218 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 @@ -21514,10 +23696,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 @@ -21642,7 +23830,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. @@ -21652,16 +23840,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+. # @@ -21669,10 +23859,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. @@ -21720,7 +23931,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 @@ -21732,13 +23943,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 @@ -21747,7 +23958,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). @@ -21759,13 +23970,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". @@ -21775,13 +23986,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. @@ -21791,13 +24002,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. @@ -21808,7 +24019,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). @@ -21827,13 +24038,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. @@ -21844,7 +24055,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 @@ -21856,7 +24067,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. @@ -21866,13 +24077,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. @@ -21882,13 +24093,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 @@ -21897,7 +24108,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 @@ -21908,13 +24119,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. @@ -21924,13 +24135,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. @@ -21940,997 +24151,230 @@ 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#786 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#797 def initialize(fixture, model_class); end - # source://activerecord//lib/active_record/fixtures.rb#763 + # source://activerecord//lib/active_record/fixtures.rb#810 def [](key); end - # source://activerecord//lib/active_record/fixtures.rb#755 + # source://activerecord//lib/active_record/fixtures.rb#802 def class_name; end - # source://activerecord//lib/active_record/fixtures.rb#759 + # source://activerecord//lib/active_record/fixtures.rb#806 def each(&block); end # @raise [FixtureClassNotFound] # - # source://activerecord//lib/active_record/fixtures.rb#769 + # source://activerecord//lib/active_record/fixtures.rb#816 def find; end # Returns the value of attribute fixture. # - # source://activerecord//lib/active_record/fixtures.rb#748 + # source://activerecord//lib/active_record/fixtures.rb#795 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#795 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#795 def to_hash; end end -# source://activerecord//lib/active_record/fixtures.rb#742 +# source://activerecord//lib/active_record/fixtures.rb#789 class ActiveRecord::Fixture::FixtureError < ::StandardError; end -# source://activerecord//lib/active_record/fixtures.rb#745 +# source://activerecord//lib/active_record/fixtures.rb#792 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/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/fixture_set/file.rb#7 -class ActiveRecord::FixtureSet::File - include ::Enumerable - - # @return [File] a new instance of File - # - # 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/fixture_set/file.rb#40 - def config_row; end - - # source://activerecord//lib/active_record/fixture_set/file.rb#51 - def raw_rows; end - - # source://activerecord//lib/active_record/fixture_set/file.rb#36 - def rows; end - - # Validate our unmarshalled data. - # - # 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/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 - - # @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/fixture_set/model_metadata.rb#23 - def timestamp_column_names; end -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/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/fixture_set/table_row.rb#73 - def to_hash; 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/fixture_set/table_row.rb#11 - def join_table; end - - # source://activerecord//lib/active_record/fixture_set/table_row.rb#15 - def name; end - - # source://activerecord//lib/active_record/fixture_set/table_row.rb#19 - def primary_key_type; 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 - - # Returns the value of attribute tables. - # - # 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 - - 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 # - # source://activerecord//lib/active_record/future_result.rb#33 + # source://activerecord//lib/active_record/future_result.rb#54 def initialize(pool, *args, **kwargs); end - # source://activerecord//lib/active_record/future_result.rb#57 + # source://activerecord//lib/active_record/future_result.rb#82 def cancel; end - # source://activerecord//lib/active_record/future_result.rb#29 + # @return [Boolean] + # + # source://activerecord//lib/active_record/future_result.rb#123 + def canceled?; end + + # source://activerecord//lib/active_record/future_result.rb#50 def empty?(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/future_result.rb#53 + # source://activerecord//lib/active_record/future_result.rb#78 def execute!(connection); end - # source://activerecord//lib/active_record/future_result.rb#63 + # source://activerecord//lib/active_record/future_result.rb#88 def execute_or_skip; end # Returns the value of attribute lock_wait. # - # source://activerecord//lib/active_record/future_result.rb#31 + # source://activerecord//lib/active_record/future_result.rb#52 def lock_wait; end # @return [Boolean] # - # source://activerecord//lib/active_record/future_result.rb#94 + # source://activerecord//lib/active_record/future_result.rb#119 def pending?; end - # source://activerecord//lib/active_record/future_result.rb#81 + # source://activerecord//lib/active_record/future_result.rb#106 def result; end - # source://activerecord//lib/active_record/future_result.rb#48 + # source://activerecord//lib/active_record/future_result.rb#73 def schedule!(session); end - # source://activerecord//lib/active_record/future_result.rb#29 + # source://activerecord//lib/active_record/future_result.rb#69 + def then(&block); end + + # source://activerecord//lib/active_record/future_result.rb#50 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 + # source://activerecord//lib/active_record/future_result.rb#151 def exec_query(connection, *args, **kwargs); end - # source://activerecord//lib/active_record/future_result.rb#103 + # source://activerecord//lib/active_record/future_result.rb#128 def execute_or_wait; end - # source://activerecord//lib/active_record/future_result.rb#118 + # source://activerecord//lib/active_record/future_result.rb#143 def execute_query(connection, async: T.unsafe(nil)); end end -# source://activerecord//lib/active_record/future_result.rb#27 +# source://activerecord//lib/active_record/future_result.rb#48 class ActiveRecord::FutureResult::Canceled < ::ActiveRecord::ActiveRecordError; end # 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/future_result.rb#9 + def initialize(result); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/future_result.rb#17 + def canceled?; end + + # source://activerecord//lib/active_record/future_result.rb#7 + def empty?(*_arg0, **_arg1, &_arg2); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/future_result.rb#13 + def pending?; end + + # 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#21 + def then(&block); end + + # source://activerecord//lib/active_record/future_result.rb#7 + def to_a(*_arg0, **_arg1, &_arg2); end +end + +# 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#155 class ActiveRecord::FutureResult::SelectAll < ::ActiveRecord::FutureResult private - # source://activerecord//lib/active_record/future_result.rb#132 + # source://activerecord//lib/active_record/future_result.rb#157 def exec_query(*_arg0, **_arg1); end end @@ -23033,10 +24477,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 @@ -23071,10 +24515,10 @@ 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 @@ -23097,10 +24541,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#470 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). @@ -23128,10 +24572,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 @@ -23146,13 +24591,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 @@ -23172,7 +24617,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?). @@ -23181,7 +24626,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) @@ -23216,7 +24661,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 @@ -23226,7 +24671,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) @@ -23261,26 +24706,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. + # + # Consider the following behaviour: # - # 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. + # 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) # - # 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. + # ApplicationRecord.base_class # => ApplicationRecord + # Shape.base_class # => Shape + # Polygon.base_class # => Polygon + # Square.base_class # => Polygon # - # source://activerecord//lib/active_record/inheritance.rb#104 + # source://activerecord//lib/active_record/inheritance.rb#115 def base_class; end # Returns whether the class is a base class. @@ -23288,7 +24743,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 @@ -23296,37 +24751,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 @@ -23336,19 +24788,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 @@ -23356,10 +24808,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 @@ -23368,33 +24820,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 @@ -23405,7 +24859,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#43 def execute; end # Returns the value of attribute inserts. @@ -23418,12 +24872,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#88 def keys_including_timestamps; end - # source://activerecord//lib/active_record/insert_all.rb#61 + # source://activerecord//lib/active_record/insert_all.rb#69 def map_key_with_value; end # Returns the value of attribute model. @@ -23436,12 +24890,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#56 def primary_keys; end # @return [Boolean] # - # source://activerecord//lib/active_record/insert_all.rb#75 + # source://activerecord//lib/active_record/insert_all.rb#83 def record_timestamps?; end # Returns the value of attribute returning. @@ -23451,7 +24905,7 @@ class ActiveRecord::InsertAll # @return [Boolean] # - # source://activerecord//lib/active_record/insert_all.rb#53 + # source://activerecord//lib/active_record/insert_all.rb#61 def skip_duplicates?; end # Returns the value of attribute unique_by. @@ -23459,12 +24913,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#52 def updatable_columns; end # @return [Boolean] # - # source://activerecord//lib/active_record/insert_all.rb#57 + # source://activerecord//lib/active_record/insert_all.rb#65 def update_duplicates?; end # Returns the value of attribute update_only. @@ -23479,129 +24933,146 @@ class ActiveRecord::InsertAll private - # source://activerecord//lib/active_record/insert_all.rb#91 + # source://activerecord//lib/active_record/insert_all.rb#127 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#99 + 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#123 + def resolve_attribute_alias(attribute); end + + # source://activerecord//lib/active_record/insert_all.rb#112 + def resolve_attribute_aliases; end + + # source://activerecord//lib/active_record/insert_all.rb#103 + 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#97 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 @@ -23618,7 +25089,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 @@ -23764,88 +25235,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 -# source://activerecord//lib/active_record/internal_metadata.rb#0 -module ActiveRecord::InternalMetadata::GeneratedAssociationMethods; end + private -# source://activerecord//lib/active_record/internal_metadata.rb#0 -module ActiveRecord::InternalMetadata::GeneratedAttributeMethods; end + # 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::GeneratedRelationMethods; end + # source://activerecord//lib/active_record/internal_metadata.rb#112 + def current_time; end + + # source://activerecord//lib/active_record/internal_metadata.rb#140 + def select_entry(key); 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 @@ -23888,7 +25360,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 @@ -23906,7 +25378,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 @@ -23931,7 +25403,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 @@ -23962,7 +25434,7 @@ 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#529 class ActiveRecord::IrreversibleOrderError < ::ActiveRecord::ActiveRecordError; end # source://activerecord//lib/active_record/legacy_yaml_adapter.rb#4 @@ -23975,10 +25447,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#537 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 @@ -24152,6 +25624,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. # @@ -24210,25 +25684,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 @@ -24243,39 +25717,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 @@ -24288,10 +25762,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.1/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 @@ -24302,13 +25779,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. @@ -24318,7 +25819,7 @@ 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. # @@ -24354,38 +25855,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 @@ -24425,6 +25921,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 @@ -24433,26 +25934,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 @@ -24508,8 +26009,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. # @@ -24533,32 +26036,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 @@ -24574,7 +26077,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 @@ -24594,7 +26097,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 @@ -24702,12 +26205,12 @@ 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 @@ -24722,7 +26225,7 @@ end # 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 @@ -24741,14 +26244,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 @@ -24761,7 +26264,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 @@ -24775,7 +26278,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 @@ -24792,7 +26295,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 @@ -24828,7 +26331,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 # @@ -24850,7 +26353,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 @@ -24867,11 +26370,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 # @@ -24880,7 +26383,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 @@ -24891,61 +26394,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#553 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#792 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#996 def announce(message); end - # source://activerecord//lib/active_record/migration.rb#914 + # source://activerecord//lib/active_record/migration.rb#1027 def connection; end - # source://activerecord//lib/active_record/migration.rb#937 + # source://activerecord//lib/active_record/migration.rb#1048 def copy(destination, sources, options = T.unsafe(nil)); end - # source://activerecord//lib/active_record/migration.rb#677 + # source://activerecord//lib/active_record/migration.rb#785 def disable_ddl_transaction; end - # source://activerecord//lib/active_record/migration.rb#836 + # source://activerecord//lib/active_record/migration.rb#948 def down; end - # source://activerecord//lib/active_record/migration.rb#864 + # source://activerecord//lib/active_record/migration.rb#976 def exec_migration(conn, direction); end - # source://activerecord//lib/active_record/migration.rb#918 + # source://activerecord//lib/active_record/migration.rb#798 + def execution_strategy; end + + # source://activerecord//lib/active_record/migration.rb#1031 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#955 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#790 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#790 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#1115 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#1106 def proper_table_name(name, options = T.unsafe(nil)); end # Used to specify an operation that can be run in one direction or another. @@ -24957,7 +26463,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 @@ -24975,7 +26481,7 @@ class ActiveRecord::Migration # end # end # - # source://activerecord//lib/active_record/migration.rb#788 + # source://activerecord//lib/active_record/migration.rb#900 def reversible; end # Reverses the migration commands for the given block and @@ -24985,7 +26491,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| @@ -25004,7 +26510,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 # @@ -25016,12 +26522,12 @@ class ActiveRecord::Migration # # This command can be nested. # - # source://activerecord//lib/active_record/migration.rb#731 + # source://activerecord//lib/active_record/migration.rb#843 def revert(*migration_classes, &block); end # @return [Boolean] # - # source://activerecord//lib/active_record/migration.rb#748 + # source://activerecord//lib/active_record/migration.rb#860 def reverting?; end # Runs the given migration classes. @@ -25030,33 +26536,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#928 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#1004 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#1010 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#1020 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#1125 def table_name_options(config = T.unsafe(nil)); end - # source://activerecord//lib/active_record/migration.rb#830 + # source://activerecord//lib/active_record/migration.rb#942 def up; end # Used to specify an operation that is only run when migrating up @@ -25065,7 +26571,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 @@ -25074,59 +26580,76 @@ class ActiveRecord::Migration # end # end # - # source://activerecord//lib/active_record/migration.rb#807 + # source://activerecord//lib/active_record/migration.rb#919 def up_only(&block); end - # source://activerecord//lib/active_record/migration.rb#681 + # source://activerecord//lib/active_record/migration.rb#789 def verbose; end - # source://activerecord//lib/active_record/migration.rb#681 + # source://activerecord//lib/active_record/migration.rb#789 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#790 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#790 def version=(_arg0); end - # source://activerecord//lib/active_record/migration.rb#879 + # source://activerecord//lib/active_record/migration.rb#992 def write(text = T.unsafe(nil)); end private - # source://activerecord//lib/active_record/migration.rb#1029 + # source://activerecord//lib/active_record/migration.rb#1157 def command_recorder; end - # source://activerecord//lib/active_record/migration.rb#1021 + # source://activerecord//lib/active_record/migration.rb#1133 def execute_block; end + # source://activerecord//lib/active_record/migration.rb#1141 + def format_arguments(arguments); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/migration.rb#1153 + def internal_option?(option_name); end + class << self - # source://activerecord//lib/active_record/migration.rb#568 + # source://activerecord//lib/active_record/migration.rb#611 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. + # + # source://activerecord//lib/active_record/migration.rb#696 + def check_all_pending!; end + + # Raises ActiveRecord::PendingMigrationError error if any migrations are pending. # - # @raise [ActiveRecord::PendingMigrationError] + # This is deprecated in favor of +check_all_pending!+ # - # source://activerecord//lib/active_record/migration.rb#626 + # source://activerecord//lib/active_record/migration.rb#680 def check_pending!(connection = T.unsafe(nil)); end - # source://activerecord//lib/active_record/migration.rb#572 + # source://activerecord//lib/active_record/migration.rb#749 + def check_pending_migrations; end + + # source://activerecord//lib/active_record/migration.rb#615 def current_version; end - # source://activerecord//lib/active_record/migration.rb#618 + # source://activerecord//lib/active_record/migration.rb#670 def delegate; end - # source://activerecord//lib/active_record/migration.rb#618 + # source://activerecord//lib/active_record/migration.rb#670 def delegate=(_arg0); end - # source://activerecord//lib/active_record/migration.rb#619 + # source://activerecord//lib/active_record/migration.rb#671 def disable_ddl_transaction; end # Disable the transaction wrapping this migration. @@ -25134,67 +26657,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#745 def disable_ddl_transaction!; end - # source://activerecord//lib/active_record/migration.rb#619 + # source://activerecord//lib/active_record/migration.rb#671 def disable_ddl_transaction=(_arg0); end - # source://activerecord//lib/active_record/migration.rb#556 + # source://activerecord//lib/active_record/migration.rb#599 def inherited(subclass); end - # source://activerecord//lib/active_record/migration.rb#630 + # source://activerecord//lib/active_record/migration.rb#712 def load_schema_if_pending!; end - # source://activerecord//lib/active_record/migration.rb#653 + # source://activerecord//lib/active_record/migration.rb#726 def maintain_test_schema!; end - # source://activerecord//lib/active_record/migration.rb#659 + # source://activerecord//lib/active_record/migration.rb#732 def method_missing(name, *args, **_arg2, &block); end - # source://activerecord//lib/active_record/migration.rb#664 + # source://activerecord//lib/active_record/migration.rb#737 def migrate(direction); end - # source://activerecord//lib/active_record/migration.rb#621 + # source://activerecord//lib/active_record/migration.rb#673 def nearest_delegate; end - # source://activerecord//lib/active_record/migration.rb#681 + # @return [Boolean] + # + # source://activerecord//lib/active_record/migration.rb#621 + def valid_version_format?(version_string); end + + # source://activerecord//lib/active_record/migration.rb#789 def verbose; end - # source://activerecord//lib/active_record/migration.rb#681 + # source://activerecord//lib/active_record/migration.rb#789 def verbose=(val); end + + private + + # @return [Boolean] + # + # source://activerecord//lib/active_record/migration.rb#758 + def any_schema_needs_update?; end + + # source://activerecord//lib/active_record/migration.rb#764 + def db_configs_in_current_env; end + + # source://activerecord//lib/active_record/migration.rb#780 + def env; end + + # source://activerecord//lib/active_record/migration.rb#768 + 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#630 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#631 def initialize(app, file_watcher: T.unsafe(nil)); end - # source://activerecord//lib/active_record/migration.rb#588 + # source://activerecord//lib/active_record/migration.rb#638 def call(env); end private - # source://activerecord//lib/active_record/migration.rb#607 + # source://activerecord//lib/active_record/migration.rb#657 def build_watcher(&block); end - # source://activerecord//lib/active_record/migration.rb#612 + # source://activerecord//lib/active_record/migration.rb#664 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 @@ -25202,9 +26750,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 @@ -25212,110 +26762,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: @@ -25333,13 +26900,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. @@ -25347,43 +26914,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. @@ -25394,146 +26973,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 @@ -25544,212 +27176,286 @@ module ActiveRecord::Migration::Compatibility end end -# source://activerecord//lib/active_record/migration/compatibility.rb#317 +# source://activerecord//lib/active_record/migration/compatibility.rb#397 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#415 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#415 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#421 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#426 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#437 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#443 def compatible_table_definition(t); end - # source://activerecord//lib/active_record/migration/compatibility.rb#366 + # source://activerecord//lib/active_record/migration/compatibility.rb#450 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#398 module ActiveRecord::Migration::Compatibility::V4_2::TableDefinition - # source://activerecord//lib/active_record/migration/compatibility.rb#319 + # source://activerecord//lib/active_record/migration/compatibility.rb#399 def belongs_to(*_arg0, **options); end - # source://activerecord//lib/active_record/migration/compatibility.rb#319 + # source://activerecord//lib/active_record/migration/compatibility.rb#399 def references(*_arg0, **options); end - # source://activerecord//lib/active_record/migration/compatibility.rb#325 + # source://activerecord//lib/active_record/migration/compatibility.rb#405 def timestamps(**options); end + + private + + # source://activerecord//lib/active_record/migration/compatibility.rb#411 + 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#328 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#383 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#373 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#383 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#368 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#345 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#389 def compatible_table_definition(t); end end -# source://activerecord//lib/active_record/migration/compatibility.rb#253 +# source://activerecord//lib/active_record/migration/compatibility.rb#329 module ActiveRecord::Migration::Compatibility::V5_0::TableDefinition - # source://activerecord//lib/active_record/migration/compatibility.rb#259 + # source://activerecord//lib/active_record/migration/compatibility.rb#335 def belongs_to(*args, **options); end - # source://activerecord//lib/active_record/migration/compatibility.rb#254 + # source://activerecord//lib/active_record/migration/compatibility.rb#330 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#335 def references(*args, **options); end + + private + + # source://activerecord//lib/active_record/migration/compatibility.rb#341 + 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#307 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#308 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#319 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#251 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#285 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#298 def command_recorder; end - # source://activerecord//lib/active_record/migration/compatibility.rb#215 + # source://activerecord//lib/active_record/migration/compatibility.rb#291 def compatible_table_definition(t); end end -# source://activerecord//lib/active_record/migration/compatibility.rb#171 +# source://activerecord//lib/active_record/migration/compatibility.rb#271 module ActiveRecord::Migration::Compatibility::V5_2::CommandRecorder - # source://activerecord//lib/active_record/migration/compatibility.rb#176 + # source://activerecord//lib/active_record/migration/compatibility.rb#276 def invert_change_column_comment(args); end - # source://activerecord//lib/active_record/migration/compatibility.rb#180 + # source://activerecord//lib/active_record/migration/compatibility.rb#280 def invert_change_table_comment(args); end - # source://activerecord//lib/active_record/migration/compatibility.rb#172 + # source://activerecord//lib/active_record/migration/compatibility.rb#272 def invert_transaction(args, &block); end end -# source://activerecord//lib/active_record/migration/compatibility.rb#152 +# source://activerecord//lib/active_record/migration/compatibility.rb#252 module ActiveRecord::Migration::Compatibility::V5_2::TableDefinition - # source://activerecord//lib/active_record/migration/compatibility.rb#158 + # source://activerecord//lib/active_record/migration/compatibility.rb#258 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#253 def timestamps(**options); end private - # source://activerecord//lib/active_record/migration/compatibility.rb#167 + # source://activerecord//lib/active_record/migration/compatibility.rb#267 def raise_on_duplicate_column(name); end - # source://activerecord//lib/active_record/migration/compatibility.rb#164 + # source://activerecord//lib/active_record/migration/compatibility.rb#264 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#208 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#232 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#232 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#243 def compatible_table_definition(t); end end -# source://activerecord//lib/active_record/migration/compatibility.rb#89 +# source://activerecord//lib/active_record/migration/compatibility.rb#209 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#210 def index_options(table_name); end end -# source://activerecord//lib/active_record/migration/compatibility.rb#95 +# source://activerecord//lib/active_record/migration/compatibility.rb#215 module ActiveRecord::Migration::Compatibility::V6_0::TableDefinition - # source://activerecord//lib/active_record/migration/compatibility.rb#96 + # source://activerecord//lib/active_record/migration/compatibility.rb#216 def belongs_to(*args, **options); end - # source://activerecord//lib/active_record/migration/compatibility.rb#102 + # source://activerecord//lib/active_record/migration/compatibility.rb#222 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#216 def references(*args, **options); end + + private + + # source://activerecord//lib/active_record/migration/compatibility.rb#228 + 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#145 +class ActiveRecord::Migration::Compatibility::V6_1 < ::ActiveRecord::Migration::Compatibility::V7_0 + # source://activerecord//lib/active_record/migration/compatibility.rb#160 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#169 + 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#200 def compatible_table_definition(t); end end -# source://activerecord//lib/active_record/migration/compatibility.rb#36 +# source://activerecord//lib/active_record/migration/compatibility.rb#146 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#147 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#178 module ActiveRecord::Migration::Compatibility::V6_1::TableDefinition - # source://activerecord//lib/active_record/migration/compatibility.rb#73 + # source://activerecord//lib/active_record/migration/compatibility.rb#184 + def change(name, type, index: T.unsafe(nil), **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#189 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#179 def new_column_definition(name, type, **options); end + + private + + # source://activerecord//lib/active_record/migration/compatibility.rb#195 + 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#88 + def add_column(table_name, column_name, type, **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#129 + def add_foreign_key(from_table, to_table, **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#93 + def add_index(table_name, column_name, **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#110 + def change_column(table_name, column_name, type, **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#118 + def change_column_null(table_name, column_name, null, default = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#98 + def create_table(table_name, **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#122 + def disable_extension(name, **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#105 + def rename_table(table_name, new_name, **options); end + + private + + # source://activerecord//lib/active_record/migration/compatibility.rb#137 + 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#64 +module ActiveRecord::Migration::Compatibility::V7_0::TableDefinition + include ::ActiveRecord::Migration::Compatibility::V7_0::LegacyIndexName + + # source://activerecord//lib/active_record/migration/compatibility.rb#71 + def change(name, type, **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#66 + def column(name, type, **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#76 + def index(column_name, **options); end + + private + + # source://activerecord//lib/active_record/migration/compatibility.rb#82 + 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. @@ -25760,8 +27466,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. @@ -25771,12 +27477,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#561 +class ActiveRecord::Migration::Current < ::ActiveRecord::Migration + # source://activerecord//lib/active_record/migration.rb#570 + def change_table(table_name, **options); end + + # source://activerecord//lib/active_record/migration.rb#594 + def compatible_table_definition(t); end + + # source://activerecord//lib/active_record/migration.rb#578 + def create_join_table(table_1, table_2, **options); end + + # source://activerecord//lib/active_record/migration.rb#562 + def create_table(table_name, **options); end + + # source://activerecord//lib/active_record/migration.rb#586 + 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 @@ -25789,12 +27550,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#619 ActiveRecord::Migration::MigrationFilenameRegexp = T.let(T.unsafe(nil), Regexp) -# source://activerecord//lib/active_record/migration.rb#752 +# source://activerecord//lib/active_record/migration.rb#864 class ActiveRecord::Migration::ReversibleBlockHelper < ::Struct - # source://activerecord//lib/active_record/migration.rb#757 + # source://activerecord//lib/active_record/migration.rb#869 def down; end # Returns the value of attribute reverting @@ -25808,7 +27569,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#865 def up; end class << self @@ -25820,39 +27581,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#1198 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#1201 + 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#1343 def current_environment; end - # source://activerecord//lib/active_record/migration.rb#1146 + # source://activerecord//lib/active_record/migration.rb#1299 def current_version; end - # source://activerecord//lib/active_record/migration.rb#1120 + # source://activerecord//lib/active_record/migration.rb#1273 def down(target_version = T.unsafe(nil), &block); end - # source://activerecord//lib/active_record/migration.rb#1106 + # source://activerecord//lib/active_record/migration.rb#1259 def forward(steps = T.unsafe(nil)); end - # source://activerecord//lib/active_record/migration.rb#1138 + # source://activerecord//lib/active_record/migration.rb#1291 def get_all_versions; end + # Returns the value of attribute internal_metadata. + # + # source://activerecord//lib/active_record/migration.rb#1199 + def internal_metadata; end + # @raise [NoEnvironmentInSchemaError] # - # source://activerecord//lib/active_record/migration.rb#1198 + # source://activerecord//lib/active_record/migration.rb#1351 def last_stored_environment; end # Runs the migrations in the +migrations_path+. @@ -25869,59 +27637,62 @@ 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#1242 def migrate(target_version = T.unsafe(nil), &block); end - # source://activerecord//lib/active_record/migration.rb#1159 + # source://activerecord//lib/active_record/migration.rb#1312 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#1199 def migrations_paths; end - # source://activerecord//lib/active_record/migration.rb#1172 + # source://activerecord//lib/active_record/migration.rb#1325 def migrations_status; end # @return [Boolean] # - # source://activerecord//lib/active_record/migration.rb#1151 + # source://activerecord//lib/active_record/migration.rb#1304 def needs_migration?; end - # source://activerecord//lib/active_record/migration.rb#1134 + # source://activerecord//lib/active_record/migration.rb#1287 def open; end - # source://activerecord//lib/active_record/migration.rb#1155 + # source://activerecord//lib/active_record/migration.rb#1308 def pending_migration_versions; end # @return [Boolean] # - # source://activerecord//lib/active_record/migration.rb#1194 + # source://activerecord//lib/active_record/migration.rb#1347 def protected_environment?; end - # source://activerecord//lib/active_record/migration.rb#1102 + # source://activerecord//lib/active_record/migration.rb#1255 def rollback(steps = T.unsafe(nil)); end - # source://activerecord//lib/active_record/migration.rb#1130 + # source://activerecord//lib/active_record/migration.rb#1283 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#1199 def schema_migration; end - # source://activerecord//lib/active_record/migration.rb#1110 + # source://activerecord//lib/active_record/migration.rb#1263 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#1362 + def connection; end + + # source://activerecord//lib/active_record/migration.rb#1366 def migration_files; end - # source://activerecord//lib/active_record/migration.rb#1218 + # source://activerecord//lib/active_record/migration.rb#1375 def move(direction, steps); end - # source://activerecord//lib/active_record/migration.rb#1214 + # source://activerecord//lib/active_record/migration.rb#1371 def parse_migration_filename(filename); end end @@ -25936,20 +27707,20 @@ 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#1164 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#1165 def initialize(name, version, filename, scope); end - # source://activerecord//lib/active_record/migration.rb#1046 + # source://activerecord//lib/active_record/migration.rb#1174 def announce(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/migration.rb#1042 + # source://activerecord//lib/active_record/migration.rb#1170 def basename; end - # source://activerecord//lib/active_record/migration.rb#1046 + # source://activerecord//lib/active_record/migration.rb#1174 def disable_ddl_transaction(*_arg0, **_arg1, &_arg2); end # Returns the value of attribute filename @@ -25963,7 +27734,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#1174 def migrate(*_arg0, **_arg1, &_arg2); end # Returns the value of attribute name @@ -25999,15 +27770,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#1174 def write(*_arg0, **_arg1, &_arg2); end private - # source://activerecord//lib/active_record/migration.rb#1053 + # source://activerecord//lib/active_record/migration.rb#1181 def load_migration; end - # source://activerecord//lib/active_record/migration.rb#1049 + # source://activerecord//lib/active_record/migration.rb#1177 def migration; end class << self @@ -26019,159 +27790,162 @@ class ActiveRecord::MigrationProxy < ::Struct end end -# source://activerecord//lib/active_record/migration.rb#1238 +# source://activerecord//lib/active_record/migration.rb#1395 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#1411 + 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#1429 def current; end - # source://activerecord//lib/active_record/migration.rb#1267 + # source://activerecord//lib/active_record/migration.rb#1429 def current_migration; end - # source://activerecord//lib/active_record/migration.rb#1263 + # source://activerecord//lib/active_record/migration.rb#1425 def current_version; end - # source://activerecord//lib/active_record/migration.rb#1312 + # source://activerecord//lib/active_record/migration.rb#1474 def load_migrated; end - # source://activerecord//lib/active_record/migration.rb#1280 + # source://activerecord//lib/active_record/migration.rb#1442 def migrate; end - # source://activerecord//lib/active_record/migration.rb#1308 + # source://activerecord//lib/active_record/migration.rb#1470 def migrated; end - # source://activerecord//lib/active_record/migration.rb#1299 + # source://activerecord//lib/active_record/migration.rb#1461 def migrations; end - # source://activerecord//lib/active_record/migration.rb#1303 + # source://activerecord//lib/active_record/migration.rb#1465 def pending_migrations; end - # source://activerecord//lib/active_record/migration.rb#1272 + # source://activerecord//lib/active_record/migration.rb#1434 def run; end - # source://activerecord//lib/active_record/migration.rb#1288 + # source://activerecord//lib/active_record/migration.rb#1450 def runnable; end private + # source://activerecord//lib/active_record/migration.rb#1479 + 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#1574 def ddl_transaction(migration, &block); end # @return [Boolean] # - # source://activerecord//lib/active_record/migration.rb#1404 + # source://activerecord//lib/active_record/migration.rb#1569 def down?; end - # source://activerecord//lib/active_record/migration.rb#1353 + # source://activerecord//lib/active_record/migration.rb#1518 def execute_migration_in_transaction(migration); end - # source://activerecord//lib/active_record/migration.rb#1374 + # source://activerecord//lib/active_record/migration.rb#1539 def finish; end - # source://activerecord//lib/active_record/migration.rb#1453 + # source://activerecord//lib/active_record/migration.rb#1606 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#1514 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#1493 def migrate_without_lock; end # @return [Boolean] # - # source://activerecord//lib/active_record/migration.rb#1344 + # source://activerecord//lib/active_record/migration.rb#1509 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#1503 def record_environment; end - # source://activerecord//lib/active_record/migration.rb#1390 + # source://activerecord//lib/active_record/migration.rb#1555 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#1484 def run_without_lock; end - # source://activerecord//lib/active_record/migration.rb#1378 + # source://activerecord//lib/active_record/migration.rb#1543 def start; end - # source://activerecord//lib/active_record/migration.rb#1370 + # source://activerecord//lib/active_record/migration.rb#1535 def target; end # @return [Boolean] # - # source://activerecord//lib/active_record/migration.rb#1400 + # source://activerecord//lib/active_record/migration.rb#1565 def up?; end # @return [Boolean] # - # source://activerecord//lib/active_record/migration.rb#1421 + # source://activerecord//lib/active_record/migration.rb#1586 def use_advisory_lock?; end # @return [Boolean] # - # source://activerecord//lib/active_record/migration.rb#1417 + # source://activerecord//lib/active_record/migration.rb#1582 def use_transaction?(migration); end # @raise [DuplicateMigrationNameError] # - # source://activerecord//lib/active_record/migration.rb#1382 + # source://activerecord//lib/active_record/migration.rb#1547 def validate(migrations); end - # source://activerecord//lib/active_record/migration.rb#1425 + # source://activerecord//lib/active_record/migration.rb#1590 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#1400 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#1397 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#1397 def migrations_paths=(_arg0); end end end -# source://activerecord//lib/active_record/migration.rb#1452 +# source://activerecord//lib/active_record/migration.rb#1605 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 @@ -26190,8 +27964,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 @@ -26237,21 +28012,24 @@ 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#496 def _default_attributes; end - # source://activerecord//lib/active_record/model_schema.rb#428 + # source://activerecord//lib/active_record/model_schema.rb#432 + def _returning_columns_for_insert; end + + # source://activerecord//lib/active_record/model_schema.rb#438 def attribute_types; end - # source://activerecord//lib/active_record/model_schema.rb#410 + # source://activerecord//lib/active_record/model_schema.rb#414 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#491 def column_defaults; end # Returns the column object for the named attribute. @@ -26268,36 +28046,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#482 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#502 def column_names; end - # source://activerecord//lib/active_record/model_schema.rb#423 + # source://activerecord//lib/active_record/model_schema.rb#427 def columns; end - # source://activerecord//lib/active_record/model_schema.rb#418 + # source://activerecord//lib/active_record/model_schema.rb#422 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#513 def content_columns; end - # source://activerecord//lib/active_record/model_schema.rb#288 + # source://activerecord//lib/active_record/model_schema.rb#296 def full_table_name_prefix; end - # source://activerecord//lib/active_record/model_schema.rb#292 + # source://activerecord//lib/active_record/model_schema.rb#300 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#325 def ignored_columns; end # Sets the columns names the model should ignore. Ignored columns won't have attribute @@ -26318,7 +28096,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 @@ -26332,13 +28110,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#360 def ignored_columns=(columns); end + # source://activerecord//lib/active_record/model_schema.rb#556 + 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#405 def next_sequence_value; end # Determines if the primary key values should be selected from their @@ -26346,26 +28127,26 @@ module ActiveRecord::ModelSchema::ClassMethods # # @return [Boolean] # - # source://activerecord//lib/active_record/model_schema.rb#395 + # source://activerecord//lib/active_record/model_schema.rb#399 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#306 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#315 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#319 def real_inheritance_column=(value); end # Resets all the cached information about columns, which will cause them @@ -26375,7 +28156,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 @@ -26395,18 +28176,18 @@ module ActiveRecord::ModelSchema::ClassMethods # end # end # - # source://activerecord//lib/active_record/model_schema.rb#537 + # source://activerecord//lib/active_record/model_schema.rb#547 def reset_column_information; end - # source://activerecord//lib/active_record/model_schema.rb#369 + # source://activerecord//lib/active_record/model_schema.rb#373 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#365 def sequence_name; end # Sets the name of the sequence to use when generating ids to the given @@ -26424,17 +28205,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#392 def sequence_name=(value); end - # source://activerecord//lib/active_record/model_schema.rb#496 + # source://activerecord//lib/active_record/model_schema.rb#506 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#410 def table_exists?; end # Guesses the table name (in forced lower-case) based on the name of the class in the @@ -26497,7 +28278,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: @@ -26506,7 +28287,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 @@ -26521,47 +28302,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#458 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#443 def yaml_encoder; end protected - # source://activerecord//lib/active_record/model_schema.rb#547 + # source://activerecord//lib/active_record/model_schema.rb#571 def initialize_load_schema_monitor; end + # source://activerecord//lib/active_record/model_schema.rb#575 + 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#598 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#611 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#607 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 @@ -26570,16 +28348,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#435 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#438 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#436 def errors; end end @@ -26591,20 +28369,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. @@ -26635,7 +28413,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. @@ -26652,13 +28430,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 @@ -26667,7 +28445,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 @@ -26677,19 +28455,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 @@ -26698,14 +28476,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 @@ -26720,7 +28498,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 @@ -26986,7 +28764,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). # @@ -27036,7 +28832,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 @@ -27053,11 +28849,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 @@ -27066,50 +28862,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.1/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.1/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.1/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.1/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.1/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.1/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#183 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#184 def initialize; end end @@ -27175,67 +28971,180 @@ 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#106 + 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#100 + 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. + # + # ==== 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 # - # source://activerecord//lib/active_record/null_relation.rb#50 - def exists?(_conditions = T.unsafe(nil)); 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#80 + def normalizes(*names, with:, apply_to_nil: T.unsafe(nil)); end +end - # @return [Boolean] +# source://activerecord//lib/active_record/normalization.rb#112 +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#118 + def initialize(cast_type:, normalizer:, normalize_nil:); end - # @return [Boolean] + # source://activerecord//lib/active_record/normalization.rb#137 + def ==(other); end + + # source://activerecord//lib/active_record/normalization.rb#125 + 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#115 + def cast_type; end - # @return [Boolean] + # source://activerecord//lib/active_record/normalization.rb#137 + def eql?(other); end + + # source://activerecord//lib/active_record/normalization.rb#145 + def hash; end + + # source://activerecord//lib/active_record/normalization.rb#149 + 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#115 + 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#115 + 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#115 + def normalizer; end + + # source://activerecord//lib/active_record/normalization.rb#129 + 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#133 + 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#154 + def normalize(value); 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#272 +class ActiveRecord::NotNullViolation < ::ActiveRecord::StatementInvalid; end + # source://activerecord//lib/active_record/migration.rb#133 class ActiveRecord::PendingMigrationError < ::ActiveRecord::MigrationError include ::ActiveSupport::ActionableError @@ -27243,31 +29152,34 @@ 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 + # source://activerecord//lib/active_record/migration.rb#145 + 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.1/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.1/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.1/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#169 + def connection; end + + # source://activerecord//lib/active_record/migration.rb#155 + 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.1/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.1/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.1/lib/active_support/actionable_error.rb#17 def _actions?; end end end @@ -27291,9 +29203,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. @@ -27303,14 +29217,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. @@ -27320,7 +29234,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 @@ -27336,7 +29250,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 @@ -27347,7 +29261,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 @@ -27358,21 +29272,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. @@ -27382,7 +29296,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 @@ -27390,7 +29304,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 @@ -27398,23 +29312,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. @@ -27465,7 +29379,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: @@ -27493,7 +29407,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: @@ -27523,7 +29437,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 @@ -27538,7 +29452,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 @@ -27546,7 +29460,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 @@ -27583,20 +29497,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#1119 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. @@ -27607,17 +29521,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 @@ -27639,7 +29571,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 @@ -27650,32 +29582,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#1246 def _create_record(attribute_names = T.unsafe(nil)); end - # source://activerecord//lib/active_record/persistence.rb#1043 + # source://activerecord//lib/active_record/persistence.rb#1196 def _delete_row; end - # source://activerecord//lib/active_record/persistence.rb#1018 + # source://activerecord//lib/active_record/persistence.rb#1152 def _find_record(options); end - # source://activerecord//lib/active_record/persistence.rb#1031 + # source://activerecord//lib/active_record/persistence.rb#1163 + def _in_memory_query_constraints_hash; end + + # source://activerecord//lib/active_record/persistence.rb#1178 def _query_constraints_hash; end # @raise [ReadOnlyRecord] # - # source://activerecord//lib/active_record/persistence.rb#1122 + # source://activerecord//lib/active_record/persistence.rb#1280 def _raise_readonly_record_error; end - # source://activerecord//lib/active_record/persistence.rb#1114 + # source://activerecord//lib/active_record/persistence.rb#1272 def _raise_record_not_destroyed; end # @raise [ActiveRecordError] # - # source://activerecord//lib/active_record/persistence.rb#1126 + # source://activerecord//lib/active_record/persistence.rb#1284 def _raise_record_not_touched_error; end - # source://activerecord//lib/active_record/persistence.rb#1047 + # source://activerecord//lib/active_record/persistence.rb#1200 def _touch_row(attribute_names, time); end # Updates the associated record with values matching those of the instance attributes. @@ -27684,54 +29619,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#1226 def _update_record(attribute_names = T.unsafe(nil)); end - # source://activerecord//lib/active_record/persistence.rb#1057 + # source://activerecord//lib/active_record/persistence.rb#1210 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#1173 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#1217 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#1189 def destroy_associations; end - # source://activerecord//lib/active_record/persistence.rb#1039 + # source://activerecord//lib/active_record/persistence.rb#1192 def destroy_row; end - # source://activerecord//lib/active_record/persistence.rb#1012 + # source://activerecord//lib/active_record/persistence.rb#1140 + def init_internals; end + + # source://activerecord//lib/active_record/persistence.rb#1146 def strict_loaded_associations; end # @raise [ActiveRecordError] # - # source://activerecord//lib/active_record/persistence.rb#1110 + # source://activerecord//lib/active_record/persistence.rb#1268 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. # @@ -27788,7 +29753,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, @@ -27811,9 +29776,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 @@ -27821,7 +29791,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 @@ -27831,7 +29801,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 @@ -27859,7 +29829,7 @@ module ActiveRecord::Persistence::ClassMethods # 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 @@ -27869,7 +29839,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: # @@ -27910,7 +29880,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 @@ -27921,7 +29891,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. @@ -27939,7 +29909,7 @@ module ActiveRecord::Persistence::ClassMethods # 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 @@ -27967,7 +29937,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 @@ -27981,9 +29951,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. # @@ -28012,13 +30021,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 @@ -28028,8 +30037,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 @@ -28056,7 +30065,7 @@ module ActiveRecord::Persistence::ClassMethods # 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 @@ -28066,7 +30075,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: # @@ -28138,7 +30147,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 @@ -28147,7 +30156,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 @@ -28156,13 +30165,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 @@ -28233,28 +30245,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 @@ -28303,37 +30315,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 @@ -28372,7 +30384,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 @@ -28455,7 +30467,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#340 class ActiveRecord::PreparedStatementCacheExpired < ::ActiveRecord::StatementInvalid; end # Raised when the number of placeholders in an SQL fragment passed to @@ -28466,20 +30478,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_pluck(: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#194 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#195 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#533 class ActiveRecord::QueryAborted < ::ActiveRecord::StatementInvalid; end # = Active Record Query Cache @@ -28487,10 +30573,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 @@ -28515,14 +30601,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#545 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 +# +# 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: # -# Default tags available for use: +# config.active_record.query_log_tags = [ :application, :controller, :action, :job ] +# +# Active Record defines default tags available for use: # # * +application+ # * +pid+ @@ -28530,48 +30627,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: # @@ -28580,13 +30669,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 @@ -28595,16 +30680,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.1/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.1/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 @@ -28625,30 +30710,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#149 + def tag_content(connection); end - # source://activerecord//lib/active_record/query_logs.rb#106 - def uncached_comment; 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 @@ -28661,10 +30799,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: @@ -28679,26 +30817,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 @@ -28715,16 +30853,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: @@ -28738,37 +30876,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: # - # 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" + # 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: # - # source://activerecord//lib/active_record/relation/query_methods.rb#215 + # 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" + # # ... + # + # 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 @@ -28795,10 +30953,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 @@ -28806,7 +30964,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) @@ -28821,7 +30979,7 @@ module ActiveRecord::QueryMethods # # scope = Model.all.extending(Pagination, SomethingElse) # - # === Using a block + # === Using a Block # # scope = Model.all.extending do # def page(number) @@ -28838,19 +30996,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, @@ -28863,7 +31021,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: @@ -28897,16 +31055,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: @@ -28930,16 +31088,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 @@ -28947,79 +31105,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. + # + # For example: # - # users = User.includes(:address) + # 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: # - # Loading nested relationships is possible using a Hash: + # 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 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. @@ -29051,10 +31236,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 @@ -29086,41 +31271,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. @@ -29129,31 +31314,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. @@ -29184,12 +31369,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" @@ -29198,16 +31388,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. @@ -29222,16 +31412,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 @@ -29244,10 +31434,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. @@ -29298,63 +31488,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. + # + # 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. + # + # Loading multiple and nested associations is possible using Hashes and Arrays, + # similar to #includes: # - # User.preload(:posts) - # # SELECT "posts".* FROM "posts" WHERE "posts"."user_id" IN (1, 2, 3) + # 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#229 + # 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. # @@ -29364,18 +31578,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' @@ -29384,20 +31617,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. @@ -29411,28 +31644,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. @@ -29449,7 +31682,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. @@ -29477,6 +31710,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') @@ -29491,27 +31732,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 @@ -29521,16 +31762,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 @@ -29546,12 +31787,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. @@ -29587,16 +31828,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 @@ -29606,7 +31847,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. @@ -29618,7 +31859,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. @@ -29658,7 +31899,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. @@ -29692,6 +31933,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 @@ -29704,7 +31951,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. @@ -29728,23 +31975,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: # @@ -29769,57 +32080,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. @@ -29837,76 +32166,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 @@ -29928,7 +32279,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 @@ -29950,7 +32301,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 @@ -29975,7 +32326,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. @@ -29984,39 +32335,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. @@ -30032,64 +32417,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 @@ -30118,214 +32503,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 @@ -30337,25 +32728,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#372 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 @@ -30372,12 +32766,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 # @@ -30386,22 +32781,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 @@ -30437,41 +32842,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 @@ -30479,22 +32884,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 @@ -30520,7 +32925,7 @@ module ActiveRecord::Reflection private - # source://activestorage/7.0.6/lib/active_storage/reflection.rb#37 + # source://activestorage/7.1.1/lib/active_storage/reflection.rb#37 def reflection_class_for(macro); end end @@ -30560,24 +32965,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. @@ -30585,18 +32995,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. @@ -30606,10 +33016,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: @@ -30623,12 +33033,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: @@ -30642,127 +33052,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#440 class ActiveRecord::Reflection::AggregateReflection < ::ActiveRecord::Reflection::MacroReflection - # source://activerecord//lib/active_record/reflection.rb#412 + # source://activerecord//lib/active_record/reflection.rb#441 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#449 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#477 def initialize(name, scope, options, active_record); end - # source://activerecord//lib/active_record/reflection.rb#480 + # source://activerecord//lib/active_record/reflection.rb#525 def active_record_primary_key; end - # source://activerecord//lib/active_record/reflection.rb#603 + # source://activerecord//lib/active_record/reflection.rb#671 def add_as_polymorphic_through(reflection, seed); end - # source://activerecord//lib/active_record/reflection.rb#599 + # source://activerecord//lib/active_record/reflection.rb#667 def add_as_source(seed); end - # source://activerecord//lib/active_record/reflection.rb#607 + # source://activerecord//lib/active_record/reflection.rb#675 def add_as_through(seed); end # @raise [NotImplementedError] # - # source://activerecord//lib/active_record/reflection.rb#589 + # source://activerecord//lib/active_record/reflection.rb#657 def association_class; end - # source://activerecord//lib/active_record/reflection.rb#472 + # source://activerecord//lib/active_record/reflection.rb#517 def association_foreign_key; end - # source://activerecord//lib/active_record/reflection.rb#476 + # source://activerecord//lib/active_record/reflection.rb#521 def association_primary_key(klass = T.unsafe(nil)); end - # source://activerecord//lib/active_record/reflection.rb#456 + # source://activerecord//lib/active_record/reflection.rb#489 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#652 def belongs_to?; end - # source://activerecord//lib/active_record/reflection.rb#500 + # source://activerecord//lib/active_record/reflection.rb#568 def check_eager_loadable!; end - # source://activerecord//lib/active_record/reflection.rb#496 + # source://activerecord//lib/active_record/reflection.rb#556 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#600 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#594 def collect_join_chain; end # Returns whether or not this association reflection is for a collection @@ -30771,53 +33181,53 @@ class ActiveRecord::Reflection::AssociationReflection < ::ActiveRecord::Reflecti # # @return [Boolean] # - # source://activerecord//lib/active_record/reflection.rb#566 + # source://activerecord//lib/active_record/reflection.rb#634 def collection?; end - # source://activerecord//lib/active_record/reflection.rb#421 + # source://activerecord//lib/active_record/reflection.rb#450 def compute_class(name); end - # source://activerecord//lib/active_record/reflection.rb#611 + # source://activerecord//lib/active_record/reflection.rb#679 def extensions; end - # source://activerecord//lib/active_record/reflection.rb#468 - def foreign_key; end + # source://activerecord//lib/active_record/reflection.rb#501 + 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#474 def foreign_type; end # @return [Boolean] # - # source://activerecord//lib/active_record/reflection.rb#544 + # source://activerecord//lib/active_record/reflection.rb#612 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#655 def has_one?; end # @return [Boolean] # - # source://activerecord//lib/active_record/reflection.rb#540 + # source://activerecord//lib/active_record/reflection.rb#608 def has_scope?; end - # source://activerecord//lib/active_record/reflection.rb#492 + # source://activerecord//lib/active_record/reflection.rb#552 def join_foreign_key; end - # source://activerecord//lib/active_record/reflection.rb#512 + # source://activerecord//lib/active_record/reflection.rb#580 def join_id_for(owner); end - # source://activerecord//lib/active_record/reflection.rb#484 + # source://activerecord//lib/active_record/reflection.rb#544 def join_primary_key(klass = T.unsafe(nil)); end - # source://activerecord//lib/active_record/reflection.rb#488 + # source://activerecord//lib/active_record/reflection.rb#548 def join_primary_type; end - # source://activerecord//lib/active_record/reflection.rb#464 + # source://activerecord//lib/active_record/reflection.rb#497 def join_table; end # Returns the macro type. @@ -30826,44 +33236,44 @@ class ActiveRecord::Reflection::AssociationReflection < ::ActiveRecord::Reflecti # # @raise [NotImplementedError] # - # source://activerecord//lib/active_record/reflection.rb#561 + # source://activerecord//lib/active_record/reflection.rb#629 def macro; end # @return [Boolean] # - # source://activerecord//lib/active_record/reflection.rb#536 + # source://activerecord//lib/active_record/reflection.rb#604 def nested?; end # Reflection # - # source://activerecord//lib/active_record/reflection.rb#446 + # source://activerecord//lib/active_record/reflection.rb#475 def parent_reflection; end # Reflection # - # source://activerecord//lib/active_record/reflection.rb#446 + # source://activerecord//lib/active_record/reflection.rb#475 def parent_reflection=(_arg0); end # @return [Boolean] # - # source://activerecord//lib/active_record/reflection.rb#591 + # source://activerecord//lib/active_record/reflection.rb#659 def polymorphic?; end - # source://activerecord//lib/active_record/reflection.rb#548 + # source://activerecord//lib/active_record/reflection.rb#616 def polymorphic_inverse_of(associated_class); end - # source://activerecord//lib/active_record/reflection.rb#595 + # source://activerecord//lib/active_record/reflection.rb#663 def polymorphic_name; end - # source://activerecord//lib/active_record/reflection.rb#520 + # source://activerecord//lib/active_record/reflection.rb#588 def source_reflection; end - # source://activerecord//lib/active_record/reflection.rb#516 + # source://activerecord//lib/active_record/reflection.rb#584 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#474 def type; end # Returns whether or not the association should be validated as part of @@ -30878,14 +33288,14 @@ class ActiveRecord::Reflection::AssociationReflection < ::ActiveRecord::Reflecti # # @return [Boolean] # - # source://activerecord//lib/active_record/reflection.rb#579 + # source://activerecord//lib/active_record/reflection.rb#647 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#696 def automatic_inverse_of; end # Checks to see if the reflection doesn't have any options that prevent @@ -30897,23 +33307,26 @@ class ActiveRecord::Reflection::AssociationReflection < ::ActiveRecord::Reflecti # # @return [Boolean] # - # source://activerecord//lib/active_record/reflection.rb#664 + # source://activerecord//lib/active_record/reflection.rb#734 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#755 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#773 + def derive_fk_query_constraints(foreign_key); end + + # source://activerecord//lib/active_record/reflection.rb#761 + 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#811 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#687 def inverse_name; end # Scopes on the potential inverse reflection prevent automatic @@ -30925,7 +33338,7 @@ class ActiveRecord::Reflection::AssociationReflection < ::ActiveRecord::Reflecti # # @return [Boolean] # - # source://activerecord//lib/active_record/reflection.rb#677 + # source://activerecord//lib/active_record/reflection.rb#747 def scope_allows_automatic_inverse_of?(reflection, inverse_reflection); end # Checks if the inverse reflection that is returned from the @@ -30935,45 +33348,47 @@ class ActiveRecord::Reflection::AssociationReflection < ::ActiveRecord::Reflecti # # @return [Boolean] # - # source://activerecord//lib/active_record/reflection.rb#650 + # source://activerecord//lib/active_record/reflection.rb#720 def valid_inverse_reflection?(reflection); end end -# source://activerecord//lib/active_record/reflection.rb#734 +# source://activerecord//lib/active_record/reflection.rb#844 class ActiveRecord::Reflection::BelongsToReflection < ::ActiveRecord::Reflection::AssociationReflection - # source://activerecord//lib/active_record/reflection.rb#739 + # source://activerecord//lib/active_record/reflection.rb#849 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#858 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#847 def belongs_to?; end - # source://activerecord//lib/active_record/reflection.rb#760 + # source://activerecord//lib/active_record/reflection.rb#876 def join_foreign_key; end - # source://activerecord//lib/active_record/reflection.rb#764 + # source://activerecord//lib/active_record/reflection.rb#880 def join_foreign_type; end - # source://activerecord//lib/active_record/reflection.rb#756 + # source://activerecord//lib/active_record/reflection.rb#872 def join_primary_key(klass = T.unsafe(nil)); end - # source://activerecord//lib/active_record/reflection.rb#735 + # source://activerecord//lib/active_record/reflection.rb#845 def macro; end private # @return [Boolean] # - # source://activerecord//lib/active_record/reflection.rb#769 + # source://activerecord//lib/active_record/reflection.rb#885 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 @@ -30983,24 +33398,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 @@ -31013,12 +33428,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). @@ -31026,81 +33441,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#890 class ActiveRecord::Reflection::HasAndBelongsToManyReflection < ::ActiveRecord::Reflection::AssociationReflection # @return [Boolean] # - # source://activerecord//lib/active_record/reflection.rb#777 + # source://activerecord//lib/active_record/reflection.rb#893 def collection?; end - # source://activerecord//lib/active_record/reflection.rb#775 + # source://activerecord//lib/active_record/reflection.rb#891 def macro; end end -# source://activerecord//lib/active_record/reflection.rb#706 +# source://activerecord//lib/active_record/reflection.rb#816 class ActiveRecord::Reflection::HasManyReflection < ::ActiveRecord::Reflection::AssociationReflection - # source://activerecord//lib/active_record/reflection.rb#711 + # source://activerecord//lib/active_record/reflection.rb#821 def association_class; end # @return [Boolean] # - # source://activerecord//lib/active_record/reflection.rb#709 + # source://activerecord//lib/active_record/reflection.rb#819 def collection?; end - # source://activerecord//lib/active_record/reflection.rb#707 + # source://activerecord//lib/active_record/reflection.rb#817 def macro; end end -# source://activerecord//lib/active_record/reflection.rb#720 +# source://activerecord//lib/active_record/reflection.rb#830 class ActiveRecord::Reflection::HasOneReflection < ::ActiveRecord::Reflection::AssociationReflection - # source://activerecord//lib/active_record/reflection.rb#725 + # source://activerecord//lib/active_record/reflection.rb#835 def association_class; end # @return [Boolean] # - # source://activerecord//lib/active_record/reflection.rb#723 + # source://activerecord//lib/active_record/reflection.rb#833 def has_one?; end - # source://activerecord//lib/active_record/reflection.rb#721 + # source://activerecord//lib/active_record/reflection.rb#831 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#420 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#387 def autosave=(autosave); end - # source://activerecord//lib/active_record/reflection.rb#385 + # source://activerecord//lib/active_record/reflection.rb#414 def compute_class(name); end # Returns the class for the macro. @@ -31119,7 +33539,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#410 def klass; end # Returns the name of the macro. @@ -31127,7 +33547,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. @@ -31135,158 +33555,158 @@ 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#428 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#433 def derive_class_name; end end -# source://activerecord//lib/active_record/reflection.rb#1038 +# source://activerecord//lib/active_record/reflection.rb#1154 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#1158 def initialize(reflection, previous_reflection); end - # source://activerecord//lib/active_record/reflection.rb#1052 + # source://activerecord//lib/active_record/reflection.rb#1169 def constraints; end - # source://activerecord//lib/active_record/reflection.rb#1039 + # source://activerecord//lib/active_record/reflection.rb#1155 def join_foreign_key(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1039 + # source://activerecord//lib/active_record/reflection.rb#1155 def join_primary_key(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1047 + # source://activerecord//lib/active_record/reflection.rb#1164 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#1155 def klass(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1039 + # source://activerecord//lib/active_record/reflection.rb#1155 def name(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1039 + # source://activerecord//lib/active_record/reflection.rb#1155 def plural_name(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1039 + # source://activerecord//lib/active_record/reflection.rb#1155 def scope(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1039 + # source://activerecord//lib/active_record/reflection.rb#1155 def scope_for(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1039 + # source://activerecord//lib/active_record/reflection.rb#1155 def type(*_arg0, **_arg1, &_arg2); end private - # source://activerecord//lib/active_record/reflection.rb#1057 + # source://activerecord//lib/active_record/reflection.rb#1174 def source_type_scope; end end -# source://activerecord//lib/active_record/reflection.rb#1064 +# source://activerecord//lib/active_record/reflection.rb#1181 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#1184 def initialize(reflection, association); end - # source://activerecord//lib/active_record/reflection.rb#1076 + # source://activerecord//lib/active_record/reflection.rb#1194 def aliased_table; end - # source://activerecord//lib/active_record/reflection.rb#1084 + # source://activerecord//lib/active_record/reflection.rb#1202 def all_includes; end - # source://activerecord//lib/active_record/reflection.rb#1065 + # source://activerecord//lib/active_record/reflection.rb#1182 def constraints(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1065 + # source://activerecord//lib/active_record/reflection.rb#1182 def join_foreign_key(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1080 + # source://activerecord//lib/active_record/reflection.rb#1198 def join_primary_key(klass = T.unsafe(nil)); end - # source://activerecord//lib/active_record/reflection.rb#1072 + # source://activerecord//lib/active_record/reflection.rb#1190 def klass; end - # source://activerecord//lib/active_record/reflection.rb#1065 + # source://activerecord//lib/active_record/reflection.rb#1182 def scope(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1065 + # source://activerecord//lib/active_record/reflection.rb#1182 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#900 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#904 def initialize(delegate_reflection); end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1151 def active_record(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#785 + # source://activerecord//lib/active_record/reflection.rb#901 def active_record_primary_key(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1000 + # source://activerecord//lib/active_record/reflection.rb#1116 def add_as_polymorphic_through(reflection, seed); end - # source://activerecord//lib/active_record/reflection.rb#996 + # source://activerecord//lib/active_record/reflection.rb#1112 def add_as_source(seed); end - # source://activerecord//lib/active_record/reflection.rb#1004 + # source://activerecord//lib/active_record/reflection.rb#1120 def add_as_through(seed); end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1151 def association_class(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#785 + # source://activerecord//lib/active_record/reflection.rb#901 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#1009 def association_primary_key(klass = T.unsafe(nil)); end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1151 def association_scope_cache(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1151 def autosave=(arg); end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1151 def belongs_to?(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1151 def check_eager_loadable!(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#950 + # source://activerecord//lib/active_record/reflection.rb#1066 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#981 def clear_association_scope_cache; end # Returns an array of reflections which are involved in this association. Each item in the @@ -31306,103 +33726,103 @@ class ActiveRecord::Reflection::ThroughReflection < ::ActiveRecord::Reflection:: # # => [, # ] # - # source://activerecord//lib/active_record/reflection.rb#858 + # source://activerecord//lib/active_record/reflection.rb#975 def collect_join_chain; end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1151 def collection?(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1151 def compute_class(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#990 + # source://activerecord//lib/active_record/reflection.rb#1106 def constraints; end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1151 def extensions(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#785 + # source://activerecord//lib/active_record/reflection.rb#901 def foreign_key(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#785 + # source://activerecord//lib/active_record/reflection.rb#901 def foreign_type(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1151 def has_inverse?(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1151 def has_one?(*_arg0, **_arg1, &_arg2); end # @return [Boolean] # - # source://activerecord//lib/active_record/reflection.rb#878 + # source://activerecord//lib/active_record/reflection.rb#995 def has_scope?; end - # source://activerecord//lib/active_record/reflection.rb#785 + # source://activerecord//lib/active_record/reflection.rb#901 def join_foreign_key(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#785 + # source://activerecord//lib/active_record/reflection.rb#901 def join_id_for(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#902 + # source://activerecord//lib/active_record/reflection.rb#1019 def join_primary_key(klass = T.unsafe(nil)); end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1151 def join_primary_type(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#874 + # source://activerecord//lib/active_record/reflection.rb#991 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#1151 def join_table(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#800 + # source://activerecord//lib/active_record/reflection.rb#917 def klass; end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1151 def macro(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1151 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#1002 def nested?; end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1151 def options(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1151 def parent_reflection(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1151 def parent_reflection=(arg); end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1151 def plural_name(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1151 def polymorphic?(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1151 def polymorphic_inverse_of(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1151 def polymorphic_name(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1151 def scope(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1151 def scope_for(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#870 + # source://activerecord//lib/active_record/reflection.rb#987 def scopes; end - # source://activerecord//lib/active_record/reflection.rb#942 + # source://activerecord//lib/active_record/reflection.rb#1058 def source_options; end # Returns the source of the through reflection. It checks both a singularized @@ -31422,10 +33842,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#938 def source_reflection; end - # source://activerecord//lib/active_record/reflection.rb#921 + # source://activerecord//lib/active_record/reflection.rb#1038 def source_reflection_name; end # Gets an array of possible :through source reflection names in both singular and plural form. @@ -31439,10 +33859,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#1034 def source_reflection_names; end - # source://activerecord//lib/active_record/reflection.rb#946 + # source://activerecord//lib/active_record/reflection.rb#1062 def through_options; end # Returns the AssociationReflection object specified in the :through option @@ -31457,41 +33877,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#954 def through_reflection; end # @return [Boolean] # - # source://activerecord//lib/active_record/reflection.rb#796 + # source://activerecord//lib/active_record/reflection.rb#913 def through_reflection?; end - # source://activerecord//lib/active_record/reflection.rb#785 + # source://activerecord//lib/active_record/reflection.rb#901 def type(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/reflection.rb#1035 + # source://activerecord//lib/active_record/reflection.rb#1151 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#1125 def actual_source_reflection; end private - # source://activerecord//lib/active_record/reflection.rb#1016 + # source://activerecord//lib/active_record/reflection.rb#1132 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#1130 def delegate_reflection; end - # source://activerecord//lib/active_record/reflection.rb#1027 + # source://activerecord//lib/active_record/reflection.rb#1143 def derive_class_name; end - # source://activerecord//lib/active_record/reflection.rb#1025 + # source://activerecord//lib/active_record/reflection.rb#1141 def inverse_name; end end @@ -31512,37 +33932,37 @@ 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#798 def ==(other); end - # source://activerecord//lib/active_record/relation.rb#432 + # source://activerecord//lib/active_record/relation.rb#456 def _exec_scope(*_arg0, **_arg1, &_arg2); end - # source://activerecord//lib/active_record/relation.rb#811 + # source://activerecord//lib/active_record/relation.rb#848 def alias_tracker(joins = T.unsafe(nil), aliases = T.unsafe(nil)); end # Returns true if there are any records. # # @return [Boolean] # - # source://activerecord//lib/active_record/relation.rb#284 - def any?; end + # source://activerecord//lib/active_record/relation.rb#302 + 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#819 def blank?; end # Initializes new record from relation while maintaining the current @@ -31558,7 +33978,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. @@ -31568,7 +33988,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 @@ -31579,12 +33999,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#344 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#423 def cache_key_with_version; end # Returns a cache version that can be used together with the cache key to form @@ -31598,7 +34018,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#371 def cache_version(timestamp_column = T.unsafe(nil)); end # Tries to create a new record with the same scoped attributes @@ -31621,7 +34041,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 @@ -31631,7 +34051,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 @@ -31639,16 +34059,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 @@ -31657,7 +34076,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 @@ -31665,14 +34084,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 @@ -31694,7 +34113,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#631 def delete_all; end # Finds and deletes all records matching the specified conditions. @@ -31707,7 +34126,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#674 def delete_by(*args); end # Destroys the records by instantiating each @@ -31727,7 +34146,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#609 def destroy_all; end # Finds and destroys all records matching the specified conditions. @@ -31740,31 +34159,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#661 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#783 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#840 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 @@ -31811,44 +34230,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 find no 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#844 def has_limit_or_offset?; end - # source://activerecord//lib/active_record/relation.rb#794 + # source://activerecord//lib/active_record/relation.rb#831 def inspect; end # Joins that are also marked for preloading. In which case we should just eager load them. @@ -31856,12 +34279,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#793 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 @@ -31871,7 +34294,7 @@ class ActiveRecord::Relation # # Post.where(published: true).load # => # # - # source://activerecord//lib/active_record/relation.rb#693 + # source://activerecord//lib/active_record/relation.rb#725 def load(&block); end # Schedule the query to be performed from a background thread pool. @@ -31893,32 +34316,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#696 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#319 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 @@ -31934,43 +34357,43 @@ 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. # # @return [Boolean] # - # source://activerecord//lib/active_record/relation.rb#278 - def none?; end + # source://activerecord//lib/active_record/relation.rb#294 + def none?(*args); end # Returns true if there is exactly one record. # # @return [Boolean] # - # source://activerecord//lib/active_record/relation.rb#290 - def one?; end + # source://activerecord//lib/active_record/relation.rb#310 + 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#862 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#809 + 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#735 def reload; end - # source://activerecord//lib/active_record/relation.rb#708 + # source://activerecord//lib/active_record/relation.rb#740 def reset; end # Returns true if the relation was scheduled on the background @@ -31978,10 +34401,10 @@ class ActiveRecord::Relation # # @return [Boolean] # - # source://activerecord//lib/active_record/relation.rb#683 + # source://activerecord//lib/active_record/relation.rb#715 def scheduled?; end - # source://activerecord//lib/active_record/relation.rb#744 + # source://activerecord//lib/active_record/relation.rb#776 def scope_for_create; end # Scope all queries to the current scope. @@ -31989,7 +34412,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. @@ -31999,47 +34422,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#445 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#756 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. @@ -32066,13 +34489,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#589 def touch_all(*names, time: T.unsafe(nil)); end - # source://activerecord//lib/active_record/relation.rb#488 + # source://activerecord//lib/active_record/relation.rb#518 def update(id = T.unsafe(nil), attributes); end - # source://activerecord//lib/active_record/relation.rb#496 + # source://activerecord//lib/active_record/relation.rb#526 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 @@ -32084,7 +34507,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 # @@ -32100,9 +34524,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#492 def update_all(updates); end # Updates the counters of the records in the current relation. @@ -32118,13 +34545,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#546 def update_counters(counters); end - # source://activerecord//lib/active_record/relation.rb#786 + # source://activerecord//lib/active_record/relation.rb#823 def values; end - # source://activerecord//lib/active_record/relation.rb#790 + # source://activerecord//lib/active_record/relation.rb#827 def values_for_queries; end # Returns a hash of where conditions. @@ -32132,86 +34559,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#772 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#872 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#898 def _create(attributes, &block); end - # source://activerecord//lib/active_record/relation.rb#869 + # source://activerecord//lib/active_record/relation.rb#902 def _create!(attributes, &block); end - # source://activerecord//lib/active_record/relation.rb#900 + # source://activerecord//lib/active_record/relation.rb#933 def _increment_attribute(attribute, value = T.unsafe(nil)); end - # source://activerecord//lib/active_record/relation.rb#861 + # source://activerecord//lib/active_record/relation.rb#894 def _new(attributes, &block); end - # source://activerecord//lib/active_record/relation.rb#873 + # source://activerecord//lib/active_record/relation.rb#906 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#922 def _substitute_values(values); end # @return [Boolean] # - # source://activerecord//lib/active_record/relation.rb#845 + # source://activerecord//lib/active_record/relation.rb#878 def already_in_scope?(registry); end - # source://activerecord//lib/active_record/relation.rb#325 + # source://activerecord//lib/active_record/relation.rb#349 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#378 def compute_cache_version(timestamp_column); end - # source://activerecord//lib/active_record/relation.rb#853 + # source://activerecord//lib/active_record/relation.rb#886 def current_scope_restoring_block(&block); end - # source://activerecord//lib/active_record/relation.rb#927 + # source://activerecord//lib/active_record/relation.rb#960 def exec_main_query(async: T.unsafe(nil)); end - # source://activerecord//lib/active_record/relation.rb#907 + # source://activerecord//lib/active_record/relation.rb#940 def exec_queries(&block); end # @return [Boolean] # - # source://activerecord//lib/active_record/relation.rb#849 + # source://activerecord//lib/active_record/relation.rb#882 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#988 def instantiate_records(rows, &block); end - # source://activerecord//lib/active_record/relation.rb#990 + # source://activerecord//lib/active_record/relation.rb#1031 def limited_count; end # @return [Boolean] # - # source://activerecord//lib/active_record/relation.rb#966 + # source://activerecord//lib/active_record/relation.rb#1007 def references_eager_loaded_tables?; end - # source://activerecord//lib/active_record/relation.rb#958 + # source://activerecord//lib/active_record/relation.rb#999 def skip_query_cache_if_necessary(&block); end - # source://activerecord//lib/active_record/relation.rb#983 + # source://activerecord//lib/active_record/relation.rb#1024 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 @@ -32277,7 +34699,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 @@ -32310,30 +34732,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 @@ -32342,55 +34764,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#852 class ActiveRecord::Relation::StrictLoadingScope class << self # @return [Boolean] # - # source://activerecord//lib/active_record/relation.rb#816 + # source://activerecord//lib/active_record/relation.rb#853 def empty_scope?; end - # source://activerecord//lib/active_record/relation.rb#820 + # source://activerecord//lib/active_record/relation.rb#857 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 @@ -32506,6 +34942,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: @@ -32536,32 +34974,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 @@ -32569,71 +35007,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 @@ -32663,7 +35107,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#407 class ActiveRecord::Rollback < ::ActiveRecord::ActiveRecordError; end # This is a thread locals registry for Active Record. For example: @@ -32676,6 +35120,9 @@ class ActiveRecord::Rollback < ::ActiveRecord::ActiveRecordError; end module ActiveRecord::RuntimeRegistry extend ::ActiveRecord::RuntimeRegistry + # source://activerecord//lib/active_record/runtime_registry.rb#20 + def reset; end + # source://activerecord//lib/active_record/runtime_registry.rb#12 def sql_runtime; end @@ -32683,6 +35130,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 @@ -32692,11 +35171,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" @@ -32707,14 +35186,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" @@ -32722,14 +35214,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" @@ -32740,14 +35243,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" @@ -32758,10 +35272,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 @@ -32773,7 +35298,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. @@ -32781,7 +35306,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 @@ -32800,24 +35325,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 @@ -32856,7 +35381,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 @@ -32899,146 +35424,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 @@ -33047,88 +35608,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 # @@ -33224,27 +35767,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. @@ -33253,12 +35804,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 @@ -33268,7 +35819,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. @@ -33289,7 +35841,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 @@ -33303,7 +35855,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 @@ -33318,33 +35871,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 @@ -33389,7 +35942,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 @@ -33556,7 +36109,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+. @@ -33588,6 +36141,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 @@ -33597,7 +36199,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 @@ -33615,14 +36217,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 @@ -33665,12 +36281,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#516 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 @@ -33698,8 +36317,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 @@ -33766,7 +36387,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 @@ -33782,16 +36403,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 @@ -33802,7 +36423,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. @@ -33823,10 +36444,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+. @@ -33834,17 +36458,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 @@ -33855,21 +36477,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#349 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#352 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#350 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#350 def record; end end @@ -34025,29 +36647,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#541 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. @@ -34137,7 +36764,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 @@ -34145,41 +36772,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 @@ -34229,7 +36856,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#376 class ActiveRecord::StrictLoadingViolationError < ::ActiveRecord::ActiveRecordError; end # Raised when the single-table inheritance mechanism fails to locate the subclass @@ -34237,9 +36864,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. # @@ -34267,27 +36896,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 @@ -34298,15 +36927,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] @@ -34333,24 +36962,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 @@ -34360,21 +36989,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 @@ -34382,14 +37011,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). # @@ -34403,7 +37034,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') @@ -34412,302 +37043,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 @@ -34720,10 +37360,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. @@ -34731,19 +37374,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 @@ -34755,73 +37401,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 @@ -34839,30 +37482,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 @@ -34870,26 +37507,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 @@ -34910,11 +37553,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 @@ -34947,7 +37590,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] # @@ -34968,41 +37611,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 @@ -35035,18 +37684,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 @@ -35054,7 +37869,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 @@ -35062,18 +37877,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 @@ -35083,20 +37898,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#480 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#503 class ActiveRecord::TransactionRollbackError < ::ActiveRecord::StatementInvalid; end # See ActiveRecord::Transactions::ClassMethods for documentation. @@ -35107,7 +37935,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. @@ -35115,102 +37949,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 @@ -35295,7 +38132,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 @@ -35401,7 +38239,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. # @@ -35415,50 +38253,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 @@ -35520,33 +38361,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 @@ -35581,39 +38422,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 @@ -35669,12 +38510,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 @@ -35700,72 +38544,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 @@ -35808,6 +38652,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 @@ -35817,10 +38666,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 @@ -35840,9 +38689,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 @@ -35938,12 +38790,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#416 ActiveRecord::UnknownAttributeError = ActiveModel::UnknownAttributeError # UnknownAttributeReference is raised when an unknown and potentially unsafe @@ -35967,7 +38819,7 @@ 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#577 class ActiveRecord::UnknownAttributeReference < ::ActiveRecord::ActiveRecordError; end # source://activerecord//lib/active_record/migration.rb#113 @@ -35980,16 +38832,16 @@ 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#444 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#447 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#445 def model; end end @@ -36013,13 +38865,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 @@ -36041,13 +38895,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 @@ -36057,13 +38911,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 @@ -36073,26 +38929,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 @@ -36135,7 +38993,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. # @@ -36190,20 +39048,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 @@ -36213,43 +39071,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. @@ -36378,7 +39214,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 @@ -36393,10 +39229,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 @@ -36438,34 +39275,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 @@ -36473,10 +39323,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. @@ -36487,10 +39337,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 @@ -36535,6 +39395,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 @@ -36750,6 +39618,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 @@ -36876,7 +39747,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. @@ -36886,10 +39757,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 @@ -36899,8 +39773,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 @@ -36921,13 +39798,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 @@ -37077,6 +39954,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 @@ -37247,6 +40168,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 @@ -37453,7 +40412,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 @@ -37527,6 +40486,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 @@ -37593,19 +40588,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 @@ -37641,12 +40636,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 @@ -37657,7 +40649,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 @@ -37669,15 +40661,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 @@ -37690,7 +40679,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 @@ -37797,26 +40786,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 @@ -37839,22 +40828,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 @@ -37974,38 +40963,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 @@ -38014,7 +41113,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 @@ -38030,19 +41129,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 @@ -38070,9 +41169,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 @@ -38420,6 +41519,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 @@ -38468,6 +41572,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 @@ -38542,10 +41649,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 @@ -38809,22 +41916,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 @@ -38836,31 +41943,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 @@ -38869,37 +41976,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 @@ -38911,48 +42018,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 @@ -39103,43 +42210,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. @@ -39154,53 +42261,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 @@ -39533,47 +42627,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 # :'( @@ -39581,10 +42678,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 @@ -39683,133 +42780,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 @@ -39818,16 +42918,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 @@ -39838,13 +42941,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 @@ -39853,7 +42956,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 @@ -39865,16 +42968,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 @@ -39883,13 +42989,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 @@ -39898,19 +43004,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 @@ -39919,56 +43025,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 @@ -39985,10 +43091,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 @@ -40006,22 +43112,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 @@ -40030,7 +43136,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 @@ -40039,7 +43145,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 @@ -40051,83 +43157,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/activestorage@7.0.6.rbi b/sorbet/rbi/gems/activestorage@7.0.6.rbi deleted file mode 100644 index f096077d3..000000000 --- a/sorbet/rbi/gems/activestorage@7.0.6.rbi +++ /dev/null @@ -1,3106 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `activestorage` gem. -# Please instead update this file by running `bin/tapioca gem activestorage`. - -class ActiveRecord::Base - include ::ActiveModel::ForbiddenAttributesProtection - include ::ActiveModel::AttributeAssignment - include ::ActiveModel::Serialization - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 - def _before_commit_callbacks; end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 - def _commit_callbacks; end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 - def _create_callbacks; end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 - def _destroy_callbacks; end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 - def _find_callbacks; end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 - def _initialize_callbacks; end - - # source://activerecord/7.0.6/lib/active_record/reflection.rb#11 - def _reflections; end - - # source://activerecord/7.0.6/lib/active_record/reflection.rb#11 - def _reflections?; end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 - def _rollback_callbacks; end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 - def _run_before_commit_callbacks(&block); end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 - def _run_commit_callbacks(&block); end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 - def _run_create_callbacks(&block); end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 - def _run_destroy_callbacks(&block); end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 - def _run_find_callbacks(&block); end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 - def _run_initialize_callbacks(&block); end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 - def _run_rollback_callbacks(&block); end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 - def _run_save_callbacks(&block); end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 - def _run_touch_callbacks(&block); end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 - def _run_update_callbacks(&block); end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 - def _run_validate_callbacks(&block); end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 - def _run_validation_callbacks(&block); end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 - def _save_callbacks; end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 - def _touch_callbacks; end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 - def _update_callbacks; end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 - def _validate_callbacks; end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 - def _validation_callbacks; end - - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 - def _validators; end - - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 - def _validators?; end - - # source://activerecord/7.0.6/lib/active_record/reflection.rb#12 - def aggregate_reflections; end - - # source://activerecord/7.0.6/lib/active_record/reflection.rb#12 - def aggregate_reflections?; end - - # source://activestorage//lib/active_storage/reflection.rb#53 - def attachment_reflections; end - - # source://activestorage//lib/active_storage/reflection.rb#53 - def attachment_reflections?; end - - # source://activemodel/7.0.6/lib/active_model/attribute_methods.rb#72 - def attribute_aliases; end - - # source://activemodel/7.0.6/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.0.6/lib/active_model/attribute_methods.rb#73 - def attribute_method_matchers?; end - - # source://activerecord/7.0.6/lib/active_record/reflection.rb#13 - def automatic_scope_inversing; end - - # source://activerecord/7.0.6/lib/active_record/reflection.rb#13 - def automatic_scope_inversing?; end - - # source://activerecord/7.0.6/lib/active_record/integration.rb#16 - def cache_timestamp_format; end - - # source://activerecord/7.0.6/lib/active_record/integration.rb#16 - def cache_timestamp_format?; end - - # source://activerecord/7.0.6/lib/active_record/integration.rb#24 - def cache_versioning; end - - # source://activerecord/7.0.6/lib/active_record/integration.rb#24 - def cache_versioning?; end - - # source://activerecord/7.0.6/lib/active_record/integration.rb#32 - def collection_cache_versioning; end - - # source://activerecord/7.0.6/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.0.6/lib/active_record/core.rb#74 - def default_connection_handler; end - - # source://activerecord/7.0.6/lib/active_record/core.rb#74 - def default_connection_handler?; end - - # source://activerecord/7.0.6/lib/active_record/core.rb#76 - def default_role; end - - # source://activerecord/7.0.6/lib/active_record/core.rb#76 - def default_role?; end - - # source://activerecord/7.0.6/lib/active_record/scoping/default.rb#20 - def default_scope_override; end - - # source://activerecord/7.0.6/lib/active_record/scoping/default.rb#19 - def default_scopes; end - - # source://activerecord/7.0.6/lib/active_record/core.rb#78 - def default_shard; end - - # source://activerecord/7.0.6/lib/active_record/core.rb#78 - def default_shard?; end - - # source://activerecord/7.0.6/lib/active_record/enum.rb#116 - def defined_enums; end - - # source://activerecord/7.0.6/lib/active_record/enum.rb#116 - def defined_enums?; end - - # source://activerecord/7.0.6/lib/active_record/core.rb#26 - def destroy_association_async_job; end - - # source://activerecord/7.0.6/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 - def encrypted_attributes=(_arg0); end - - # source://activerecord/7.0.6/lib/active_record/encryption/encryptable_record.rb#11 - def encrypted_attributes?; end - - # source://activemodel/7.0.6/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 - def include_root_in_json?; end - - # source://activerecord/7.0.6/lib/active_record/locking/optimistic.rb#56 - def lock_optimistically; end - - # source://activerecord/7.0.6/lib/active_record/locking/optimistic.rb#56 - def lock_optimistically?; end - - # source://activerecord/7.0.6/lib/active_record/core.rb#20 - def logger; end - - # source://activerecord/7.0.6/lib/active_record/core.rb#20 - def logger?; end - - # source://activemodel/7.0.6/lib/active_model/naming.rb#244 - def model_name(*_arg0, **_arg1, &_arg2); end - - # source://activerecord/7.0.6/lib/active_record/nested_attributes.rb#15 - def nested_attributes_options; end - - # source://activerecord/7.0.6/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 - def partial_inserts; end - - # source://activerecord/7.0.6/lib/active_record/attribute_methods/dirty.rb#18 - def partial_inserts?; end - - # source://activerecord/7.0.6/lib/active_record/attribute_methods/dirty.rb#17 - def partial_updates; end - - # source://activerecord/7.0.6/lib/active_record/attribute_methods/dirty.rb#17 - def partial_updates?; end - - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#156 - def pluralize_table_names; end - - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#156 - def pluralize_table_names?; end - - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#151 - def primary_key_prefix_type; end - - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#151 - def primary_key_prefix_type?; end - - # source://activerecord/7.0.6/lib/active_record/timestamp.rb#47 - def record_timestamps; end - - # source://activerecord/7.0.6/lib/active_record/timestamp.rb#47 - def record_timestamps=(_arg0); end - - # source://activerecord/7.0.6/lib/active_record/timestamp.rb#47 - def record_timestamps?; end - - # source://activerecord/7.0.6/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 - def signed_id_verifier_secret?; end - - # source://activerecord/7.0.6/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 - def skip_time_zone_conversion_for_attributes?; end - - # source://activerecord/7.0.6/lib/active_record/inheritance.rb#42 - def store_full_class_name; end - - # source://activerecord/7.0.6/lib/active_record/inheritance.rb#42 - def store_full_class_name?; end - - # source://activerecord/7.0.6/lib/active_record/inheritance.rb#46 - def store_full_sti_class; end - - # source://activerecord/7.0.6/lib/active_record/inheritance.rb#46 - def store_full_sti_class?; end - - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#152 - def table_name_prefix; end - - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#152 - def table_name_prefix?; end - - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#153 - def table_name_suffix; end - - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#153 - def table_name_suffix?; end - - # source://activerecord/7.0.6/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 - def time_zone_aware_attributes?; end - - # source://activerecord/7.0.6/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 - 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://activemodel/7.0.6/lib/active_model/validations.rb#48 - def validation_context; end - - private - - # source://activemodel/7.0.6/lib/active_model/validations.rb#48 - def validation_context=(_arg0); end - - class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 - def __callbacks=(value); end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://activerecord/7.0.6/lib/active_record/readonly_attributes.rb#8 - def _attr_readonly; end - - # source://activerecord/7.0.6/lib/active_record/readonly_attributes.rb#8 - def _attr_readonly=(value); end - - # source://activerecord/7.0.6/lib/active_record/readonly_attributes.rb#8 - def _attr_readonly?; end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 - def _before_commit_callbacks; end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 - def _before_commit_callbacks=(value); end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 - def _commit_callbacks; end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 - def _commit_callbacks=(value); end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 - def _create_callbacks; end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 - def _create_callbacks=(value); end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 - def _destroy_callbacks; end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 - def _destroy_callbacks=(value); end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 - def _find_callbacks; end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 - def _find_callbacks=(value); end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 - def _initialize_callbacks; end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 - def _initialize_callbacks=(value); end - - # source://activerecord/7.0.6/lib/active_record/reflection.rb#11 - def _reflections; end - - # source://activerecord/7.0.6/lib/active_record/reflection.rb#11 - def _reflections=(value); end - - # source://activerecord/7.0.6/lib/active_record/reflection.rb#11 - def _reflections?; end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 - def _rollback_callbacks; end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 - def _rollback_callbacks=(value); end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 - def _save_callbacks; end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 - def _save_callbacks=(value); end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 - def _touch_callbacks; end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 - def _touch_callbacks=(value); end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 - def _update_callbacks; end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 - def _update_callbacks=(value); end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 - def _validate_callbacks; end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 - def _validate_callbacks=(value); end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 - def _validation_callbacks; end - - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 - def _validation_callbacks=(value); end - - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 - def _validators; end - - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 - def _validators=(value); end - - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 - def _validators?; end - - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#144 - def after_create(*args, **options, &block); end - - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#144 - def after_destroy(*args, **options, &block); end - - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#144 - def after_find(*args, **options, &block); end - - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#144 - def after_initialize(*args, **options, &block); end - - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#144 - def after_save(*args, **options, &block); end - - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#144 - def after_touch(*args, **options, &block); end - - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#144 - def after_update(*args, **options, &block); end - - # source://activerecord/7.0.6/lib/active_record/reflection.rb#12 - def aggregate_reflections; end - - # source://activerecord/7.0.6/lib/active_record/reflection.rb#12 - def aggregate_reflections=(value); end - - # source://activerecord/7.0.6/lib/active_record/reflection.rb#12 - def aggregate_reflections?; end - - # source://activerecord/7.0.6/lib/active_record/core.rb#82 - def application_record_class?; end - - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#137 - def around_create(*args, **options, &block); end - - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#137 - def around_destroy(*args, **options, &block); end - - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#137 - def around_save(*args, **options, &block); end - - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#137 - def around_update(*args, **options, &block); end - - # source://activerecord/7.0.6/lib/active_record/core.rb#129 - def asynchronous_queries_session; end - - # source://activerecord/7.0.6/lib/active_record/core.rb#133 - def asynchronous_queries_tracker; end - - # source://activestorage//lib/active_storage/reflection.rb#53 - def attachment_reflections; end - - # source://activestorage//lib/active_storage/reflection.rb#53 - def attachment_reflections=(value); end - - # source://activestorage//lib/active_storage/reflection.rb#53 - def attachment_reflections?; end - - # source://activemodel/7.0.6/lib/active_model/attribute_methods.rb#72 - def attribute_aliases; end - - # source://activemodel/7.0.6/lib/active_model/attribute_methods.rb#72 - def attribute_aliases=(value); end - - # source://activemodel/7.0.6/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.0.6/lib/active_model/attribute_methods.rb#73 - def attribute_method_matchers=(value); end - - # source://activemodel/7.0.6/lib/active_model/attribute_methods.rb#73 - def attribute_method_matchers?; end - - # source://activerecord/7.0.6/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 - def attributes_to_define_after_schema_loads=(value); end - - # source://activerecord/7.0.6/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 - def automatic_scope_inversing; end - - # source://activerecord/7.0.6/lib/active_record/reflection.rb#13 - def automatic_scope_inversing=(value); end - - # source://activerecord/7.0.6/lib/active_record/reflection.rb#13 - def automatic_scope_inversing?; end - - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#130 - def before_create(*args, **options, &block); end - - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#130 - def before_destroy(*args, **options, &block); end - - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#130 - def before_save(*args, **options, &block); end - - # source://activemodel/7.0.6/lib/active_model/callbacks.rb#130 - def before_update(*args, **options, &block); end - - # source://activerecord/7.0.6/lib/active_record/core.rb#68 - def belongs_to_required_by_default; end - - # source://activerecord/7.0.6/lib/active_record/core.rb#68 - def belongs_to_required_by_default=(value); end - - # source://activerecord/7.0.6/lib/active_record/core.rb#68 - def belongs_to_required_by_default?; end - - # source://activerecord/7.0.6/lib/active_record/integration.rb#16 - def cache_timestamp_format; end - - # source://activerecord/7.0.6/lib/active_record/integration.rb#16 - def cache_timestamp_format=(value); end - - # source://activerecord/7.0.6/lib/active_record/integration.rb#16 - def cache_timestamp_format?; end - - # source://activerecord/7.0.6/lib/active_record/integration.rb#24 - def cache_versioning; end - - # source://activerecord/7.0.6/lib/active_record/integration.rb#24 - def cache_versioning=(value); end - - # source://activerecord/7.0.6/lib/active_record/integration.rb#24 - def cache_versioning?; end - - # source://activerecord/7.0.6/lib/active_record/integration.rb#32 - def collection_cache_versioning; end - - # source://activerecord/7.0.6/lib/active_record/integration.rb#32 - def collection_cache_versioning=(value); end - - # source://activerecord/7.0.6/lib/active_record/integration.rb#32 - def collection_cache_versioning?; end - - # source://activerecord/7.0.6/lib/active_record/core.rb#56 - def configurations; end - - # source://activerecord/7.0.6/lib/active_record/core.rb#50 - def configurations=(config); end - - # source://activerecord/7.0.6/lib/active_record/core.rb#201 - def connected_to_stack; end - - # source://activerecord/7.0.6/lib/active_record/core.rb#215 - def connection_class; end - - # source://activerecord/7.0.6/lib/active_record/core.rb#211 - def connection_class=(b); end - - # source://activerecord/7.0.6/lib/active_record/core.rb#219 - def connection_class?; end - - # source://activerecord/7.0.6/lib/active_record/core.rb#223 - def connection_class_for_self; end - - # source://activerecord/7.0.6/lib/active_record/core.rb#94 - def connection_handler; end - - # source://activerecord/7.0.6/lib/active_record/core.rb#98 - 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 - def current_preventing_writes; end - - # source://activerecord/7.0.6/lib/active_record/core.rb#147 - def current_role; end - - # source://activerecord/7.0.6/lib/active_record/core.rb#169 - def current_shard; end - - # source://activerecord/7.0.6/lib/active_record/core.rb#74 - def default_connection_handler; end - - # source://activerecord/7.0.6/lib/active_record/core.rb#74 - def default_connection_handler=(value); end - - # source://activerecord/7.0.6/lib/active_record/core.rb#74 - def default_connection_handler?; end - - # source://activerecord/7.0.6/lib/active_record/core.rb#76 - def default_role; end - - # source://activerecord/7.0.6/lib/active_record/core.rb#76 - def default_role=(value); end - - # source://activerecord/7.0.6/lib/active_record/core.rb#76 - def default_role?; end - - # source://activerecord/7.0.6/lib/active_record/scoping/default.rb#20 - def default_scope_override; end - - # source://activerecord/7.0.6/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 - def default_scopes; end - - # source://activerecord/7.0.6/lib/active_record/scoping/default.rb#19 - def default_scopes=(value); end - - # source://activerecord/7.0.6/lib/active_record/core.rb#78 - def default_shard; end - - # source://activerecord/7.0.6/lib/active_record/core.rb#78 - def default_shard=(value); end - - # source://activerecord/7.0.6/lib/active_record/core.rb#78 - def default_shard?; end - - # source://activerecord/7.0.6/lib/active_record/enum.rb#116 - def defined_enums; end - - # source://activerecord/7.0.6/lib/active_record/enum.rb#116 - def defined_enums=(value); end - - # source://activerecord/7.0.6/lib/active_record/enum.rb#116 - def defined_enums?; end - - # source://activerecord/7.0.6/lib/active_record/core.rb#26 - def destroy_association_async_job; end - - # source://activerecord/7.0.6/lib/active_record/core.rb#26 - def destroy_association_async_job=(value); end - - # source://activerecord/7.0.6/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 - def encrypted_attributes=(value); end - - # source://activerecord/7.0.6/lib/active_record/encryption/encryptable_record.rb#11 - def encrypted_attributes?; end - - # source://activerecord/7.0.6/lib/active_record/core.rb#66 - def enumerate_columns_in_select_statements; end - - # source://activerecord/7.0.6/lib/active_record/core.rb#66 - def enumerate_columns_in_select_statements=(value); end - - # source://activerecord/7.0.6/lib/active_record/core.rb#66 - def enumerate_columns_in_select_statements?; end - - # source://activerecord/7.0.6/lib/active_record/core.rb#72 - def has_many_inversing; end - - # source://activerecord/7.0.6/lib/active_record/core.rb#72 - def has_many_inversing=(value); end - - # source://activerecord/7.0.6/lib/active_record/core.rb#72 - def has_many_inversing?; end - - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#158 - def immutable_strings_by_default; end - - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#158 - def immutable_strings_by_default=(value); end - - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#158 - def immutable_strings_by_default?; end - - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#157 - def implicit_order_column; end - - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#157 - def implicit_order_column=(value); end - - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#157 - def implicit_order_column?; end - - # source://activemodel/7.0.6/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 - def include_root_in_json=(value); end - - # source://activemodel/7.0.6/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 - def inheritance_column; end - - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#311 - def inheritance_column=(value); end - - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#160 - def inheritance_column?; end - - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#155 - def internal_metadata_table_name; end - - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#155 - def internal_metadata_table_name=(value); end - - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#155 - def internal_metadata_table_name?; end - - # source://activerecord/7.0.6/lib/active_record/store.rb#99 - def local_stored_attributes; end - - # source://activerecord/7.0.6/lib/active_record/store.rb#99 - def local_stored_attributes=(_arg0); end - - # source://activerecord/7.0.6/lib/active_record/locking/optimistic.rb#56 - def lock_optimistically; end - - # source://activerecord/7.0.6/lib/active_record/locking/optimistic.rb#56 - def lock_optimistically=(value); end - - # source://activerecord/7.0.6/lib/active_record/locking/optimistic.rb#56 - def lock_optimistically?; end - - # source://activerecord/7.0.6/lib/active_record/core.rb#20 - def logger; end - - # source://activerecord/7.0.6/lib/active_record/core.rb#20 - def logger=(value); end - - # source://activerecord/7.0.6/lib/active_record/core.rb#20 - def logger?; end - - # source://activerecord/7.0.6/lib/active_record/nested_attributes.rb#15 - def nested_attributes_options; end - - # source://activerecord/7.0.6/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 - def nested_attributes_options?; end - - # source://activerecord/7.0.6/lib/active_record/attribute_methods/dirty.rb#18 - def partial_inserts; end - - # source://activerecord/7.0.6/lib/active_record/attribute_methods/dirty.rb#18 - def partial_inserts=(value); end - - # source://activerecord/7.0.6/lib/active_record/attribute_methods/dirty.rb#18 - def partial_inserts?; end - - # source://activerecord/7.0.6/lib/active_record/attribute_methods/dirty.rb#17 - def partial_updates; end - - # source://activerecord/7.0.6/lib/active_record/attribute_methods/dirty.rb#17 - def partial_updates=(value); end - - # source://activerecord/7.0.6/lib/active_record/attribute_methods/dirty.rb#17 - def partial_updates?; end - - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#156 - def pluralize_table_names; end - - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#156 - def pluralize_table_names=(value); end - - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#156 - def pluralize_table_names?; end - - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#151 - def primary_key_prefix_type; end - - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#151 - def primary_key_prefix_type=(value); end - - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#151 - def primary_key_prefix_type?; end - - # source://activerecord/7.0.6/lib/active_record/timestamp.rb#47 - def record_timestamps; end - - # source://activerecord/7.0.6/lib/active_record/timestamp.rb#47 - def record_timestamps=(value); end - - # source://activerecord/7.0.6/lib/active_record/timestamp.rb#47 - def record_timestamps?; end - - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#154 - def schema_migrations_table_name; end - - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#154 - def schema_migrations_table_name=(value); end - - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#154 - def schema_migrations_table_name?; end - - # source://activerecord/7.0.6/lib/active_record/core.rb#80 - def shard_selector; end - - # source://activerecord/7.0.6/lib/active_record/core.rb#80 - def shard_selector=(value); end - - # source://activerecord/7.0.6/lib/active_record/core.rb#80 - def shard_selector?; end - - # source://activerecord/7.0.6/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 - def signed_id_verifier_secret=(value); end - - # source://activerecord/7.0.6/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 - def skip_time_zone_conversion_for_attributes; end - - # source://activerecord/7.0.6/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 - def skip_time_zone_conversion_for_attributes?; end - - # source://activerecord/7.0.6/lib/active_record/inheritance.rb#42 - def store_full_class_name; end - - # source://activerecord/7.0.6/lib/active_record/inheritance.rb#42 - def store_full_class_name=(value); end - - # source://activerecord/7.0.6/lib/active_record/inheritance.rb#42 - def store_full_class_name?; end - - # source://activerecord/7.0.6/lib/active_record/inheritance.rb#46 - def store_full_sti_class; end - - # source://activerecord/7.0.6/lib/active_record/inheritance.rb#46 - def store_full_sti_class=(value); end - - # source://activerecord/7.0.6/lib/active_record/inheritance.rb#46 - def store_full_sti_class?; end - - # source://activerecord/7.0.6/lib/active_record/core.rb#70 - def strict_loading_by_default; end - - # source://activerecord/7.0.6/lib/active_record/core.rb#70 - def strict_loading_by_default=(value); end - - # source://activerecord/7.0.6/lib/active_record/core.rb#70 - def strict_loading_by_default?; end - - # source://activerecord/7.0.6/lib/active_record/core.rb#238 - def strict_loading_violation!(owner:, reflection:); end - - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#152 - def table_name_prefix; end - - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#152 - def table_name_prefix=(value); end - - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#152 - def table_name_prefix?; end - - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#153 - def table_name_suffix; end - - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#153 - def table_name_suffix=(value); end - - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#153 - def table_name_suffix?; end - - # source://activerecord/7.0.6/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 - def time_zone_aware_attributes=(value); end - - # source://activerecord/7.0.6/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 - def time_zone_aware_types; end - - # source://activerecord/7.0.6/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 - def time_zone_aware_types?; end - - private - - # source://activerecord/7.0.6/lib/active_record/model_schema.rb#160 - def _inheritance_column=(value); end - end -end - -# source://activestorage//lib/active_storage/gem_version.rb#3 -module ActiveStorage - extend ::ActiveSupport::Autoload - - # source://activestorage//lib/active_storage.rb#52 - def analyzers; end - - # source://activestorage//lib/active_storage.rb#52 - def analyzers=(val); end - - # source://activestorage//lib/active_storage.rb#58 - def binary_content_type; end - - # source://activestorage//lib/active_storage.rb#58 - def binary_content_type=(val); end - - # source://activestorage//lib/active_storage.rb#60 - def content_types_allowed_inline; end - - # source://activestorage//lib/active_storage.rb#60 - def content_types_allowed_inline=(val); end - - # source://activestorage//lib/active_storage.rb#59 - def content_types_to_serve_as_binary; end - - # source://activestorage//lib/active_storage.rb#59 - def content_types_to_serve_as_binary=(val); end - - # source://activestorage//lib/active_storage.rb#357 - def draw_routes; end - - # source://activestorage//lib/active_storage.rb#357 - def draw_routes=(val); end - - # source://activestorage//lib/active_storage.rb#45 - def logger; end - - # source://activestorage//lib/active_storage.rb#45 - def logger=(val); end - - # source://activestorage//lib/active_storage.rb#54 - def paths; end - - # source://activestorage//lib/active_storage.rb#54 - def paths=(val); end - - # source://activestorage//lib/active_storage.rb#51 - def previewers; end - - # source://activestorage//lib/active_storage.rb#51 - def previewers=(val); end - - # source://activestorage//lib/active_storage.rb#49 - def queues; end - - # source://activestorage//lib/active_storage.rb#49 - 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 - def resolve_model_to_route; end - - # source://activestorage//lib/active_storage.rb#358 - def resolve_model_to_route=(val); end - - # source://activestorage//lib/active_storage.rb#356 - def routes_prefix; end - - # source://activestorage//lib/active_storage.rb#356 - def routes_prefix=(val); end - - # source://activestorage//lib/active_storage.rb#353 - def service_urls_expire_in; end - - # source://activestorage//lib/active_storage.rb#353 - 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 - def supported_image_processing_methods; end - - # source://activestorage//lib/active_storage.rb#62 - def supported_image_processing_methods=(val); end - - # source://activestorage//lib/active_storage.rb#361 - def track_variants; end - - # source://activestorage//lib/active_storage.rb#361 - def track_variants=(val); end - - # source://activestorage//lib/active_storage.rb#351 - def unsupported_image_processing_arguments; end - - # source://activestorage//lib/active_storage.rb#351 - def unsupported_image_processing_arguments=(val); end - - # source://activestorage//lib/active_storage.rb#354 - def urls_expire_in; end - - # source://activestorage//lib/active_storage.rb#354 - def urls_expire_in=(val); end - - # source://activestorage//lib/active_storage.rb#56 - def variable_content_types; end - - # source://activestorage//lib/active_storage.rb#56 - def variable_content_types=(val); end - - # source://activestorage//lib/active_storage.rb#47 - def variant_processor; end - - # source://activestorage//lib/active_storage.rb#47 - def variant_processor=(val); end - - # source://activestorage//lib/active_storage.rb#46 - def verifier; end - - # source://activestorage//lib/active_storage.rb#46 - def verifier=(val); end - - # source://activestorage//lib/active_storage.rb#363 - def video_preview_arguments; end - - # source://activestorage//lib/active_storage.rb#363 - def video_preview_arguments=(val); end - - # source://activestorage//lib/active_storage.rb#57 - def web_image_content_types; end - - # source://activestorage//lib/active_storage.rb#57 - def web_image_content_types=(val); end - - class << self - # source://activestorage//lib/active_storage.rb#52 - def analyzers; end - - # source://activestorage//lib/active_storage.rb#52 - def analyzers=(val); end - - # source://activestorage//lib/active_storage.rb#58 - def binary_content_type; end - - # source://activestorage//lib/active_storage.rb#58 - def binary_content_type=(val); end - - # source://activestorage//lib/active_storage.rb#60 - def content_types_allowed_inline; end - - # source://activestorage//lib/active_storage.rb#60 - def content_types_allowed_inline=(val); end - - # source://activestorage//lib/active_storage.rb#59 - def content_types_to_serve_as_binary; end - - # source://activestorage//lib/active_storage.rb#59 - def content_types_to_serve_as_binary=(val); end - - # source://activestorage//lib/active_storage.rb#357 - def draw_routes; end - - # source://activestorage//lib/active_storage.rb#357 - def draw_routes=(val); end - - # 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 - def logger; end - - # source://activestorage//lib/active_storage.rb#45 - def logger=(val); end - - # source://activestorage//lib/active_storage.rb#54 - def paths; end - - # source://activestorage//lib/active_storage.rb#54 - def paths=(val); end - - # source://activestorage//lib/active_storage.rb#51 - def previewers; end - - # source://activestorage//lib/active_storage.rb#51 - def previewers=(val); end - - # source://activestorage//lib/active_storage.rb#49 - def queues; end - - # source://activestorage//lib/active_storage.rb#49 - def queues=(val); end - - # source://railties/7.0.6/lib/rails/engine.rb#405 - def railtie_helpers_paths; end - - # source://railties/7.0.6/lib/rails/engine.rb#394 - def railtie_namespace; end - - # source://railties/7.0.6/lib/rails/engine.rb#409 - def railtie_routes_url_helpers(include_path_helpers = T.unsafe(nil)); 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 - def resolve_model_to_route; end - - # source://activestorage//lib/active_storage.rb#358 - def resolve_model_to_route=(val); end - - # source://activestorage//lib/active_storage.rb#356 - def routes_prefix; end - - # source://activestorage//lib/active_storage.rb#356 - def routes_prefix=(val); end - - # source://activestorage//lib/active_storage.rb#353 - def service_urls_expire_in; end - - # source://activestorage//lib/active_storage.rb#353 - 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 - def supported_image_processing_methods; end - - # source://activestorage//lib/active_storage.rb#62 - def supported_image_processing_methods=(val); end - - # source://railties/7.0.6/lib/rails/engine.rb#397 - def table_name_prefix; end - - # source://activestorage//lib/active_storage.rb#361 - def track_variants; end - - # source://activestorage//lib/active_storage.rb#361 - def track_variants=(val); end - - # source://activestorage//lib/active_storage.rb#351 - def unsupported_image_processing_arguments; end - - # source://activestorage//lib/active_storage.rb#351 - def unsupported_image_processing_arguments=(val); end - - # source://activestorage//lib/active_storage.rb#354 - def urls_expire_in; end - - # source://activestorage//lib/active_storage.rb#354 - def urls_expire_in=(val); end - - # source://railties/7.0.6/lib/rails/engine.rb#401 - def use_relative_model_naming?; end - - # source://activestorage//lib/active_storage.rb#56 - def variable_content_types; end - - # source://activestorage//lib/active_storage.rb#56 - def variable_content_types=(val); end - - # source://activestorage//lib/active_storage.rb#47 - def variant_processor; end - - # source://activestorage//lib/active_storage.rb#47 - def variant_processor=(val); end - - # source://activestorage//lib/active_storage.rb#46 - def verifier; end - - # source://activestorage//lib/active_storage.rb#46 - def verifier=(val); end - - # 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 - def video_preview_arguments; end - - # source://activestorage//lib/active_storage.rb#363 - def video_preview_arguments=(val); end - - # source://activestorage//lib/active_storage.rb#57 - def web_image_content_types; end - - # source://activestorage//lib/active_storage.rb#57 - def web_image_content_types=(val); end - end -end - -class ActiveStorage::AnalyzeJob < ::ActiveStorage::BaseJob - def perform(blob); end - - class << self - # source://activejob/7.0.6/lib/active_job/queue_name.rb#55 - def queue_name; end - - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 - def rescue_handlers; end - end -end - -# 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 -class ActiveStorage::Analyzer - # @return [Analyzer] a new instance of Analyzer - # - # source://activestorage//lib/active_storage/analyzer.rb#21 - def initialize(blob); end - - # Returns the value of attribute blob. - # - # source://activestorage//lib/active_storage/analyzer.rb#7 - 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 - def metadata; end - - private - - # Downloads the blob to a tempfile on disk. Yields the tempfile. - # - # source://activestorage//lib/active_storage/analyzer.rb#32 - def download_blob_to_tempfile(&block); end - - # source://activestorage//lib/active_storage/analyzer.rb#44 - def instrument(analyzer, &block); end - - # source://activestorage//lib/active_storage/analyzer.rb#36 - def logger; end - - # source://activestorage//lib/active_storage/analyzer.rb#40 - def tmpdir; end - - class << self - # Implement this method in a concrete subclass. Have it return true when given a blob from which - # the analyzer can extract metadata. - # - # @return [Boolean] - # - # source://activestorage//lib/active_storage/analyzer.rb#11 - def accept?(blob); end - - # Implement this method in concrete subclasses. It will determine if blob analysis - # should be done in a job or performed inline. By default, analysis is enqueued in a job. - # - # @return [Boolean] - # - # source://activestorage//lib/active_storage/analyzer.rb#17 - def analyze_later?; end - end -end - -# source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#12 -class ActiveStorage::Analyzer::AudioAnalyzer < ::ActiveStorage::Analyzer - # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#17 - def metadata; end - - private - - # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#32 - def audio_stream; end - - # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#27 - def bit_rate; end - - # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#22 - def duration; end - - # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#61 - def ffprobe_path; end - - # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#40 - def probe; end - - # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#44 - def probe_from(file); end - - # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#36 - def streams; end - - class << self - # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#13 - def accept?(blob); end - end -end - -# source://activestorage//lib/active_storage/analyzer/image_analyzer.rb#12 -class ActiveStorage::Analyzer::ImageAnalyzer < ::ActiveStorage::Analyzer - # source://activestorage//lib/active_storage/analyzer/image_analyzer.rb#17 - def metadata; end - - class << self - # source://activestorage//lib/active_storage/analyzer/image_analyzer.rb#13 - def accept?(blob); end - end -end - -# source://activestorage//lib/active_storage/analyzer/image_analyzer/image_magick.rb#6 -class ActiveStorage::Analyzer::ImageAnalyzer::ImageMagick < ::ActiveStorage::Analyzer::ImageAnalyzer - private - - # source://activestorage//lib/active_storage/analyzer/image_analyzer/image_magick.rb#12 - def read_image; end - - # source://activestorage//lib/active_storage/analyzer/image_analyzer/image_magick.rb#37 - def rotated_image?(image); end - - class << self - # source://activestorage//lib/active_storage/analyzer/image_analyzer/image_magick.rb#7 - def accept?(blob); end - end -end - -# source://activestorage//lib/active_storage/analyzer/image_analyzer/vips.rb#6 -class ActiveStorage::Analyzer::ImageAnalyzer::Vips < ::ActiveStorage::Analyzer::ImageAnalyzer - private - - # source://activestorage//lib/active_storage/analyzer/image_analyzer/vips.rb#12 - def read_image; end - - # source://activestorage//lib/active_storage/analyzer/image_analyzer/vips.rb#38 - def rotated_image?(image); end - - # source://activestorage//lib/active_storage/analyzer/image_analyzer/vips.rb#44 - def valid_image?(image); end - - class << self - # source://activestorage//lib/active_storage/analyzer/image_analyzer/vips.rb#7 - def accept?(blob); end - end -end - -# source://activestorage//lib/active_storage/analyzer/image_analyzer/vips.rb#37 -ActiveStorage::Analyzer::ImageAnalyzer::Vips::ROTATIONS = T.let(T.unsafe(nil), Regexp) - -# source://activestorage//lib/active_storage/analyzer/null_analyzer.rb#4 -class ActiveStorage::Analyzer::NullAnalyzer < ::ActiveStorage::Analyzer - # source://activestorage//lib/active_storage/analyzer/null_analyzer.rb#13 - def metadata; end - - class << self - # source://activestorage//lib/active_storage/analyzer/null_analyzer.rb#5 - def accept?(blob); end - - # source://activestorage//lib/active_storage/analyzer/null_analyzer.rb#9 - def analyze_later?; end - end -end - -# source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#22 -class ActiveStorage::Analyzer::VideoAnalyzer < ::ActiveStorage::Analyzer - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#27 - def metadata; end - - private - - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#53 - def angle; end - - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#76 - def audio?; end - - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#114 - def audio_stream; end - - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#84 - def computed_height; end - - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#122 - def container; end - - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#61 - def display_aspect_ratio; end - - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#98 - def display_height_scale; end - - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#48 - def duration; end - - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#94 - def encoded_height; end - - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#90 - def encoded_width; end - - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#147 - def ffprobe_path; end - - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#40 - def height; end - - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#126 - def probe; end - - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#130 - def probe_from(file); end - - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#72 - def rotated?; end - - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#106 - def side_data; end - - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#118 - def streams; end - - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#102 - def tags; end - - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#80 - def video?; end - - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#110 - def video_stream; end - - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#32 - def width; end - - class << self - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#23 - def accept?(blob); end - end -end - -# 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 -class ActiveStorage::Attached - # @return [Attached] a new instance of Attached - # - # source://activestorage//lib/active_storage/attached.rb#11 - def initialize(name, record); end - - # Returns the value of attribute name. - # - # source://activestorage//lib/active_storage/attached.rb#9 - def name; end - - # Returns the value of attribute record. - # - # source://activestorage//lib/active_storage/attached.rb#9 - def record; end - - private - - # source://activestorage//lib/active_storage/attached.rb#16 - def change; end -end - -# source://activestorage//lib/active_storage/attached/changes.rb#4 -module ActiveStorage::Attached::Changes - extend ::ActiveSupport::Autoload -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 - - # 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 - def attachments; end - - # source://activestorage//lib/active_storage/attached/changes/create_many.rb#17 - 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 record; end - - # source://activestorage//lib/active_storage/attached/changes/create_many.rb#25 - def save; end - - # source://activestorage//lib/active_storage/attached/changes/create_many.rb#21 - def upload; end - - private - - # source://activestorage//lib/active_storage/attached/changes/create_many.rb#39 - def assign_associated_attachments; end - - # source://activestorage//lib/active_storage/attached/changes/create_many.rb#35 - def build_subchange_from(attachable); end - - # source://activestorage//lib/active_storage/attached/changes/create_many.rb#47 - def persisted_or_new_attachments; end - - # source://activestorage//lib/active_storage/attached/changes/create_many.rb#43 - def reset_associated_blobs; end - - # source://activestorage//lib/active_storage/attached/changes/create_many.rb#31 - def subchanges; end -end - -# source://activestorage//lib/active_storage/attached/changes/create_one.rb#7 -class ActiveStorage::Attached::Changes::CreateOne - # source://activestorage//lib/active_storage/attached/changes/create_one.rb#10 - def initialize(name, record, attachable); end - - # source://activestorage//lib/active_storage/attached/changes/create_one.rb#8 - def attachable; end - - # source://activestorage//lib/active_storage/attached/changes/create_one.rb#15 - def attachment; end - - # source://activestorage//lib/active_storage/attached/changes/create_one.rb#19 - def blob; end - - # source://activestorage//lib/active_storage/attached/changes/create_one.rb#8 - def name; end - - # 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 - def save; end - - # source://activestorage//lib/active_storage/attached/changes/create_one.rb#23 - def upload; end - - private - - # source://activestorage//lib/active_storage/attached/changes/create_one.rb#78 - def attachment_service_name; end - - # source://activestorage//lib/active_storage/attached/changes/create_one.rb#48 - def build_attachment; end - - # source://activestorage//lib/active_storage/attached/changes/create_one.rb#42 - def find_attachment; end - - # source://activestorage//lib/active_storage/attached/changes/create_one.rb#38 - def find_or_build_attachment; end - - # source://activestorage//lib/active_storage/attached/changes/create_one.rb#52 - def find_or_build_blob; end -end - -# source://activestorage//lib/active_storage/attached/changes/create_one_of_many.rb#4 -class ActiveStorage::Attached::Changes::CreateOneOfMany < ::ActiveStorage::Attached::Changes::CreateOne - private - - # source://activestorage//lib/active_storage/attached/changes/create_one_of_many.rb#6 - def find_attachment; end -end - -# source://activestorage//lib/active_storage/attached/changes/delete_many.rb#4 -class ActiveStorage::Attached::Changes::DeleteMany - # source://activestorage//lib/active_storage/attached/changes/delete_many.rb#7 - def initialize(name, record); end - - # source://activestorage//lib/active_storage/attached/changes/delete_many.rb#11 - def attachables; end - - # source://activestorage//lib/active_storage/attached/changes/delete_many.rb#15 - def attachments; end - - # source://activestorage//lib/active_storage/attached/changes/delete_many.rb#19 - def blobs; end - - # source://activestorage//lib/active_storage/attached/changes/delete_many.rb#5 - def name; end - - # source://activestorage//lib/active_storage/attached/changes/delete_many.rb#5 - def record; end - - # source://activestorage//lib/active_storage/attached/changes/delete_many.rb#23 - def save; end -end - -# source://activestorage//lib/active_storage/attached/changes/delete_one.rb#4 -class ActiveStorage::Attached::Changes::DeleteOne - # source://activestorage//lib/active_storage/attached/changes/delete_one.rb#7 - def initialize(name, record); end - - # source://activestorage//lib/active_storage/attached/changes/delete_one.rb#11 - def attachment; end - - # source://activestorage//lib/active_storage/attached/changes/delete_one.rb#5 - def name; end - - # source://activestorage//lib/active_storage/attached/changes/delete_one.rb#5 - def record; end - - # source://activestorage//lib/active_storage/attached/changes/delete_one.rb#15 - def save; end -end - -# source://activestorage//lib/active_storage/attached/changes/detach_many.rb#4 -class ActiveStorage::Attached::Changes::DetachMany - # source://activestorage//lib/active_storage/attached/changes/detach_many.rb#7 - def initialize(name, record, attachments); end - - # source://activestorage//lib/active_storage/attached/changes/detach_many.rb#5 - def attachments; end - - # source://activestorage//lib/active_storage/attached/changes/detach_many.rb#11 - def detach; end - - # source://activestorage//lib/active_storage/attached/changes/detach_many.rb#5 - def name; end - - # source://activestorage//lib/active_storage/attached/changes/detach_many.rb#5 - def record; end -end - -# source://activestorage//lib/active_storage/attached/changes/detach_one.rb#4 -class ActiveStorage::Attached::Changes::DetachOne - # source://activestorage//lib/active_storage/attached/changes/detach_one.rb#7 - def initialize(name, record, attachment); end - - # source://activestorage//lib/active_storage/attached/changes/detach_one.rb#5 - def attachment; end - - # source://activestorage//lib/active_storage/attached/changes/detach_one.rb#11 - def detach; end - - # source://activestorage//lib/active_storage/attached/changes/detach_one.rb#5 - def name; end - - # source://activestorage//lib/active_storage/attached/changes/detach_one.rb#5 - def record; end - - private - - # source://activestorage//lib/active_storage/attached/changes/detach_one.rb#19 - def reset; end -end - -# source://activestorage//lib/active_storage/attached/changes/purge_many.rb#4 -class ActiveStorage::Attached::Changes::PurgeMany - # source://activestorage//lib/active_storage/attached/changes/purge_many.rb#7 - def initialize(name, record, attachments); end - - # source://activestorage//lib/active_storage/attached/changes/purge_many.rb#5 - def attachments; end - - # source://activestorage//lib/active_storage/attached/changes/purge_many.rb#5 - def name; end - - # source://activestorage//lib/active_storage/attached/changes/purge_many.rb#11 - def purge; end - - # source://activestorage//lib/active_storage/attached/changes/purge_many.rb#16 - def purge_later; end - - # source://activestorage//lib/active_storage/attached/changes/purge_many.rb#5 - def record; end - - private - - # source://activestorage//lib/active_storage/attached/changes/purge_many.rb#22 - def reset; end -end - -# source://activestorage//lib/active_storage/attached/changes/purge_one.rb#4 -class ActiveStorage::Attached::Changes::PurgeOne - # source://activestorage//lib/active_storage/attached/changes/purge_one.rb#7 - def initialize(name, record, attachment); end - - # source://activestorage//lib/active_storage/attached/changes/purge_one.rb#5 - def attachment; end - - # source://activestorage//lib/active_storage/attached/changes/purge_one.rb#5 - def name; end - - # source://activestorage//lib/active_storage/attached/changes/purge_one.rb#11 - def purge; end - - # source://activestorage//lib/active_storage/attached/changes/purge_one.rb#16 - def purge_later; end - - # source://activestorage//lib/active_storage/attached/changes/purge_one.rb#5 - def record; end - - private - - # source://activestorage//lib/active_storage/attached/changes/purge_one.rb#22 - def reset; end -end - -# source://activestorage//lib/active_storage/attached/many.rb#5 -class ActiveStorage::Attached::Many < ::ActiveStorage::Attached - # source://activestorage//lib/active_storage/attached/many.rb#49 - def attach(*attachables); end - - # source://activestorage//lib/active_storage/attached/many.rb#65 - def attached?; end - - # source://activestorage//lib/active_storage/attached/many.rb#30 - def attachments; end - - # source://activestorage//lib/active_storage/attached/many.rb#35 - def blobs; end - - # source://activestorage//lib/active_storage/attached/many.rb#23 - def detach(*_arg0, **_arg1, &_arg2); end - - # source://activesupport/7.0.6/lib/active_support/core_ext/module/delegation.rb#302 - def method_missing(method, *args, **_arg2, &block); end - - # source://activestorage//lib/active_storage/attached/many.rb#11 - def purge(*_arg0, **_arg1, &_arg2); end - - # source://activestorage//lib/active_storage/attached/many.rb#17 - def purge_later(*_arg0, **_arg1, &_arg2); end - - private - - # source://activestorage//lib/active_storage/attached/many.rb#74 - def detach_many; end - - # source://activestorage//lib/active_storage/attached/many.rb#70 - def purge_many; end - - # source://activesupport/7.0.6/lib/active_support/core_ext/module/delegation.rb#294 - def respond_to_missing?(name, include_private = T.unsafe(nil)); end -end - -# source://activestorage//lib/active_storage/attached/model.rb#7 -module ActiveStorage::Attached::Model - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActiveStorage::Attached::Model::ClassMethods - - # source://activestorage//lib/active_storage/attached/model.rb#222 - def attachment_changes; end - - # source://activestorage//lib/active_storage/attached/model.rb#226 - def changed_for_autosave?; end - - # source://activestorage//lib/active_storage/attached/model.rb#236 - def reload(*_arg0); end - - private - - # source://activestorage//lib/active_storage/attached/model.rb#230 - 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 - 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 - 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 - def validate_service_configuration(association_name, service); end -end - -# source://activestorage//lib/active_storage/attached/one.rb#5 -class ActiveStorage::Attached::One < ::ActiveStorage::Attached - # source://activestorage//lib/active_storage/attached/one.rb#56 - def attach(attachable); end - - # source://activestorage//lib/active_storage/attached/one.rb#72 - def attached?; end - - # source://activestorage//lib/active_storage/attached/one.rb#31 - def attachment; end - - # source://activestorage//lib/active_storage/attached/one.rb#42 - def blank?; end - - # source://activestorage//lib/active_storage/attached/one.rb#23 - def detach(*_arg0, **_arg1, &_arg2); end - - # source://activesupport/7.0.6/lib/active_support/core_ext/module/delegation.rb#302 - def method_missing(method, *args, **_arg2, &block); end - - # source://activestorage//lib/active_storage/attached/one.rb#11 - def purge(*_arg0, **_arg1, &_arg2); end - - # source://activestorage//lib/active_storage/attached/one.rb#17 - def purge_later(*_arg0, **_arg1, &_arg2); end - - private - - # source://activestorage//lib/active_storage/attached/one.rb#81 - def detach_one; end - - # source://activestorage//lib/active_storage/attached/one.rb#77 - def purge_one; end - - # source://activesupport/7.0.6/lib/active_support/core_ext/module/delegation.rb#294 - def respond_to_missing?(name, include_private = T.unsafe(nil)); end -end - -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 - def autosave_associated_records_for_blob(*args); end - - # source://activerecord/7.0.6/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 - def method_missing(method, *args, **_arg2, &block); end - - def purge; end - def purge_later; end - def signed_id(*_arg0, **_arg1, &_arg2); end - - # source://activerecord/7.0.6/lib/active_record/autosave_association.rb#160 - def validate_associated_records_for_blob(*args); end - - def variant(transformations); end - - private - - def analyze_blob_later; end - def dependent; end - def mirror_blob_later; end - def purge_dependent_blob_later; end - - # source://activesupport/7.0.6/lib/active_support/core_ext/module/delegation.rb#294 - def respond_to_missing?(name, include_private = T.unsafe(nil)); end - - def variants; end - - class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activerecord/7.0.6/lib/active_record/reflection.rb#11 - def _reflections; end - - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 - def _validators; end - - # source://activerecord/7.0.6/lib/active_record/enum.rb#116 - def defined_enums; end - - # source://activerecord/7.0.6/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 - def blob; end - - # source://activerecord/7.0.6/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 - def blob_changed?; end - - # source://activerecord/7.0.6/lib/active_record/associations/builder/belongs_to.rb#136 - def blob_previously_changed?; end - - # source://activerecord/7.0.6/lib/active_record/associations/builder/singular_association.rb#28 - def build_blob(*args, &block); end - - # source://activerecord/7.0.6/lib/active_record/associations/builder/singular_association.rb#32 - def create_blob(*args, &block); end - - # source://activerecord/7.0.6/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/association.rb#103 - def record; end - - # source://activerecord/7.0.6/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 - def record_changed?; end - - # source://activerecord/7.0.6/lib/active_record/associations/builder/belongs_to.rb#136 - def record_previously_changed?; end - - # source://activerecord/7.0.6/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 - def reload_record; end -end - -module ActiveStorage::Attachment::GeneratedAttributeMethods; end - -class ActiveStorage::BaseController < ::ActionController::Base - include ::ActiveStorage::SetCurrent - - private - - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 - def _layout(lookup_context, formats); end - - class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://actionpack/7.0.6/lib/action_controller/metal/etag_with_template_digest.rb#27 - def etag_with_template_digest; end - - # source://actionpack/7.0.6/lib/action_controller/metal.rb#210 - def middleware_stack; end - end -end - -class ActiveStorage::BaseJob < ::ActiveJob::Base; end -module ActiveStorage::Blobs; end - -class ActiveStorage::Blobs::ProxyController < ::ActiveStorage::BaseController - include ::ActiveStorage::SetBlob - include ::ActionController::Live - include ::ActiveStorage::Streaming - extend ::ActionController::Live::ClassMethods - - def show; end - - private - - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 - def _layout(lookup_context, formats); end - - class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://actionpack/7.0.6/lib/action_controller/metal.rb#210 - def middleware_stack; end - end -end - -class ActiveStorage::Blobs::RedirectController < ::ActiveStorage::BaseController - include ::ActiveStorage::SetBlob - - def show; end - - private - - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 - def _layout(lookup_context, formats); end - - class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://actionpack/7.0.6/lib/action_controller/metal.rb#210 - 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 - def url_options; end - - # source://activesupport/7.0.6/lib/active_support/current_attributes.rb#118 - def url_options=(value); end - end -end - -class ActiveStorage::DirectUploadsController < ::ActiveStorage::BaseController - def create; end - - private - - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 - 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 - def middleware_stack; end - end -end - -class ActiveStorage::DiskController < ::ActiveStorage::BaseController - include ::ActiveStorage::FileServer - - def show; end - def update; end - - private - - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 - def _layout(lookup_context, formats); end - - def acceptable_content?(token); end - def decode_verified_key; end - def decode_verified_token; end - def named_disk_service(name); end - - class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://actionpack/7.0.6/lib/action_controller/metal.rb#210 - def middleware_stack; end - end -end - -# source://activestorage//lib/active_storage/downloader.rb#4 -class ActiveStorage::Downloader - # @return [Downloader] a new instance of Downloader - # - # source://activestorage//lib/active_storage/downloader.rb#7 - def initialize(service); end - - # source://activestorage//lib/active_storage/downloader.rb#11 - def open(key, checksum: T.unsafe(nil), verify: T.unsafe(nil), name: T.unsafe(nil), tmpdir: T.unsafe(nil)); end - - # Returns the value of attribute service. - # - # source://activestorage//lib/active_storage/downloader.rb#5 - def service; end - - private - - # source://activestorage//lib/active_storage/downloader.rb#30 - def download(key, file); end - - # source://activestorage//lib/active_storage/downloader.rb#20 - def open_tempfile(name, tmpdir = T.unsafe(nil)); end - - # source://activestorage//lib/active_storage/downloader.rb#37 - def verify_integrity_of(file, checksum:); end -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 - def __callbacks; end - end -end - -# Generic base class for all Active Storage exceptions. -# -# source://activestorage//lib/active_storage/errors.rb#5 -class ActiveStorage::Error < ::StandardError; end - -# Raised when ActiveStorage::Blob#download is called on a blob where the -# backing file is no longer present in its service. -# -# source://activestorage//lib/active_storage/errors.rb#25 -class ActiveStorage::FileNotFoundError < ::ActiveStorage::Error; end - -module ActiveStorage::FileServer - private - - def serve_file(path, content_type:, disposition:); end -end - -class ActiveStorage::Filename - include ::Comparable - - def initialize(filename); end - - def <=>(other); end - def as_json(*_arg0); end - def base; end - def extension; end - def extension_with_delimiter; end - def extension_without_delimiter; end - def sanitized; end - def to_json; end - def to_s; end - - class << self - def wrap(filename); end - end -end - -# Fixtures are a way of organizing data that you want to test against; in -# short, sample data. -# -# To learn more about fixtures, read the ActiveRecord::FixtureSet documentation. -# -# === YAML -# -# Like other Active Record-backed models, ActiveStorage::Attachment and -# ActiveStorage::Blob records inherit from ActiveRecord::Base instances and -# therefore can be populated by fixtures. -# -# Consider a hypothetical Article model class, its related -# fixture data, as well as fixture data for related ActiveStorage::Attachment -# and ActiveStorage::Blob records: -# -# # app/models/article.rb -# class Article < ApplicationRecord -# 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 -# record: first (Article) -# blob: first_thumbnail_blob -# -# 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 -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 - def file_fixture_path; end - - # source://activesupport/7.0.6/lib/active_support/testing/file_fixtures.rb#20 - def file_fixture_path?; end - - # source://activestorage//lib/active_storage/fixture_set.rb#64 - def prepare(instance, **attributes); end - - class << self - # Generate a YAML-encoded representation of an ActiveStorage::Blob - # instance's attributes, resolve the file relative to the directory mentioned - # by ActiveSupport::Testing::FileFixtures.file_fixture, and upload - # the file to the Service - # - # === Examples - # - # # tests/fixtures/action_text/blobs.yml - # second_thumbnail_blob: <%= ActiveStorage::FixtureSet.blob( - # filename: "second.svg", - # ) %> - # - # third_thumbnail_blob: <%= ActiveStorage::FixtureSet.blob( - # filename: "third.svg", - # content_type: "image/svg+xml", - # service_name: "public" - # ) %> - # - # source://activestorage//lib/active_storage/fixture_set.rb#60 - def blob(filename:, **attributes); end - - # source://activesupport/7.0.6/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 - def file_fixture_path=(value); end - - # source://activesupport/7.0.6/lib/active_support/testing/file_fixtures.rb#20 - def file_fixture_path?; end - end -end - -# Raised when uploaded or downloaded data does not match a precomputed checksum. -# Indicates that a network error or a software bug caused data corruption. -# -# source://activestorage//lib/active_storage/errors.rb#21 -class ActiveStorage::IntegrityError < ::ActiveStorage::Error; end - -# Raised when ActiveStorage::Blob#variant is called on a blob that isn't variable. -# Use ActiveStorage::Blob#variable? to determine whether a blob is variable. -# -# source://activestorage//lib/active_storage/errors.rb#9 -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 - def logger; end - - # source://activestorage//lib/active_storage/log_subscriber.rb#19 - def service_delete(event); end - - # source://activestorage//lib/active_storage/log_subscriber.rb#23 - def service_delete_prefixed(event); end - - # source://activestorage//lib/active_storage/log_subscriber.rb#13 - def service_download(event); end - - # source://activestorage//lib/active_storage/log_subscriber.rb#27 - def service_exist(event); end - - # source://activestorage//lib/active_storage/log_subscriber.rb#35 - def service_mirror(event); end - - # source://activestorage//lib/active_storage/log_subscriber.rb#13 - 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 - def service_url(event); end - - private - - # source://activestorage//lib/active_storage/log_subscriber.rb#50 - def debug(event, colored_message); end - - # source://activestorage//lib/active_storage/log_subscriber.rb#46 - def info(event, colored_message); end - - # source://activestorage//lib/active_storage/log_subscriber.rb#58 - def key_in(event); end - - # source://activestorage//lib/active_storage/log_subscriber.rb#54 - def log_prefix_for_service(event); 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 - def queue_name; end - - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 - 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 - - def previewer; end - def previewer_class; end - def process; end - def processed?; end - def variant; 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 - -# 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 -class ActiveStorage::Previewer - # @return [Previewer] a new instance of Previewer - # - # source://activestorage//lib/active_storage/previewer.rb#16 - def initialize(blob); end - - # Returns the value of attribute blob. - # - # source://activestorage//lib/active_storage/previewer.rb#8 - def blob; end - - # Override this method in a concrete subclass. Have it yield an attachable preview image (i.e. - # anything accepted by ActiveStorage::Attached::One#attach). Pass the additional options to - # the underlying blob that is created. - # - # @raise [NotImplementedError] - # - # source://activestorage//lib/active_storage/previewer.rb#23 - def preview(**options); end - - private - - # source://activestorage//lib/active_storage/previewer.rb#71 - def capture(*argv, to:); end - - # Downloads the blob to a tempfile on disk. Yields the tempfile. - # - # source://activestorage//lib/active_storage/previewer.rb#29 - def download_blob_to_tempfile(&block); end - - # Executes a system command, capturing its binary output in a tempfile. Yields the tempfile. - # - # Use this method to shell out to a system library (e.g. muPDF or FFmpeg) for preview image - # generation. The resulting tempfile can be used as the +:io+ value in an attachable Hash: - # - # def preview - # download_blob_to_tempfile do |input| - # draw "my-drawing-command", input.path, "--format", "png", "-" do |output| - # yield io: output, filename: "#{blob.filename.base}.png", content_type: "image/png" - # end - # end - # end - # - # The output tempfile is opened in the directory returned by #tmpdir. - # - # source://activestorage//lib/active_storage/previewer.rb#47 - def draw(*argv); end - - # source://activestorage//lib/active_storage/previewer.rb#67 - def instrument(operation, payload = T.unsafe(nil), &block); end - - # source://activestorage//lib/active_storage/previewer.rb#86 - def logger; end - - # source://activestorage//lib/active_storage/previewer.rb#57 - def open_tempfile; end - - # source://activestorage//lib/active_storage/previewer.rb#90 - def tmpdir; end - - class << self - # Implement this method in a concrete subclass. Have it return true when given a blob from which - # the previewer can generate an image. - # - # @return [Boolean] - # - # source://activestorage//lib/active_storage/previewer.rb#12 - def accept?(blob); end - end -end - -# source://activestorage//lib/active_storage/previewer/mupdf_previewer.rb#4 -class ActiveStorage::Previewer::MuPDFPreviewer < ::ActiveStorage::Previewer - # source://activestorage//lib/active_storage/previewer/mupdf_previewer.rb#23 - def preview(**options); end - - private - - # source://activestorage//lib/active_storage/previewer/mupdf_previewer.rb#32 - def draw_first_page_from(file, &block); end - - class << self - # source://activestorage//lib/active_storage/previewer/mupdf_previewer.rb#6 - def accept?(blob); end - - # source://activestorage//lib/active_storage/previewer/mupdf_previewer.rb#14 - def mutool_exists?; end - - # source://activestorage//lib/active_storage/previewer/mupdf_previewer.rb#10 - def mutool_path; end - end -end - -# source://activestorage//lib/active_storage/previewer/poppler_pdf_previewer.rb#4 -class ActiveStorage::Previewer::PopplerPDFPreviewer < ::ActiveStorage::Previewer - # source://activestorage//lib/active_storage/previewer/poppler_pdf_previewer.rb#21 - def preview(**options); end - - private - - # source://activestorage//lib/active_storage/previewer/poppler_pdf_previewer.rb#30 - def draw_first_page_from(file, &block); end - - class << self - # source://activestorage//lib/active_storage/previewer/poppler_pdf_previewer.rb#6 - def accept?(blob); end - - # source://activestorage//lib/active_storage/previewer/poppler_pdf_previewer.rb#14 - def pdftoppm_exists?; end - - # source://activestorage//lib/active_storage/previewer/poppler_pdf_previewer.rb#10 - def pdftoppm_path; end - end -end - -# source://activestorage//lib/active_storage/previewer/video_previewer.rb#6 -class ActiveStorage::Previewer::VideoPreviewer < ::ActiveStorage::Previewer - # source://activestorage//lib/active_storage/previewer/video_previewer.rb#23 - def preview(**options); end - - private - - # source://activestorage//lib/active_storage/previewer/video_previewer.rb#32 - def draw_relevant_frame_from(file, &block); end - - class << self - # source://activestorage//lib/active_storage/previewer/video_previewer.rb#8 - def accept?(blob); end - - # source://activestorage//lib/active_storage/previewer/video_previewer.rb#12 - def ffmpeg_exists?; end - - # source://activestorage//lib/active_storage/previewer/video_previewer.rb#18 - def ffmpeg_path; end - end -end - -class ActiveStorage::PurgeJob < ::ActiveStorage::BaseJob - def perform(blob); end - - class << self - # source://activejob/7.0.6/lib/active_job/queue_name.rb#55 - def queue_name; end - - # source://activesupport/7.0.6/lib/active_support/rescuable.rb#13 - def rescue_handlers; end - end -end - -class ActiveStorage::Record < ::ActiveRecord::Base - include ::ActiveStorage::Record::GeneratedAttributeMethods - include ::ActiveStorage::Record::GeneratedAssociationMethods - - class << self - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 - def _validators; end - - # source://activerecord/7.0.6/lib/active_record/enum.rb#116 - def defined_enums; end - end -end - -module ActiveStorage::Record::GeneratedAssociationMethods; end -module ActiveStorage::Record::GeneratedAttributeMethods; end - -# source://activestorage//lib/active_storage/reflection.rb#4 -module ActiveStorage::Reflection; end - -# source://activestorage//lib/active_storage/reflection.rb#49 -module ActiveStorage::Reflection::ActiveRecordExtensions - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveStorage::Reflection::ActiveRecordExtensions::ClassMethods - - module GeneratedClassMethods - def attachment_reflections; end - def attachment_reflections=(value); end - def attachment_reflections?; end - end - - module GeneratedInstanceMethods - def attachment_reflections; end - def attachment_reflections?; end - end -end - -# source://activestorage//lib/active_storage/reflection.rb#56 -module ActiveStorage::Reflection::ActiveRecordExtensions::ClassMethods - # Returns an array of reflection objects for all the attachments in the - # class. - # - # source://activestorage//lib/active_storage/reflection.rb#59 - def reflect_on_all_attachments; end - - # Returns the reflection object for the named +attachment+. - # - # User.reflect_on_attachment(:avatar) - # # => the avatar reflection - # - # source://activestorage//lib/active_storage/reflection.rb#68 - def reflect_on_attachment(attachment); end -end - -# source://activestorage//lib/active_storage/reflection.rb#5 -class ActiveStorage::Reflection::HasAttachedReflection < ::ActiveRecord::Reflection::MacroReflection - # 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 -# specified in the Active Record class. -# -# source://activestorage//lib/active_storage/reflection.rb#25 -class ActiveStorage::Reflection::HasManyAttachedReflection < ::ActiveStorage::Reflection::HasAttachedReflection - # source://activestorage//lib/active_storage/reflection.rb#26 - def macro; end -end - -# Holds all the metadata about a has_one_attached attachment as it was -# specified in the Active Record class. -# -# source://activestorage//lib/active_storage/reflection.rb#17 -class ActiveStorage::Reflection::HasOneAttachedReflection < ::ActiveStorage::Reflection::HasAttachedReflection - # source://activestorage//lib/active_storage/reflection.rb#18 - def macro; end -end - -# source://activestorage//lib/active_storage/reflection.rb#31 -module ActiveStorage::Reflection::ReflectionExtension - # source://activestorage//lib/active_storage/reflection.rb#32 - def add_attachment_reflection(model, name, reflection); end - - private - - # source://activestorage//lib/active_storage/reflection.rb#37 - def reflection_class_for(macro); end -end - -module ActiveStorage::Representations; end - -class ActiveStorage::Representations::BaseController < ::ActiveStorage::BaseController - include ::ActiveStorage::SetBlob - - private - - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 - 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 - def __callbacks; end - - # source://actionpack/7.0.6/lib/action_controller/metal.rb#210 - def middleware_stack; end - end -end - -class ActiveStorage::Representations::ProxyController < ::ActiveStorage::Representations::BaseController - include ::ActionController::Live - include ::ActiveStorage::Streaming - extend ::ActionController::Live::ClassMethods - - def show; end - - private - - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 - def _layout(lookup_context, formats); end - - class << self - # source://actionpack/7.0.6/lib/action_controller/metal.rb#210 - def middleware_stack; end - end -end - -class ActiveStorage::Representations::RedirectController < ::ActiveStorage::Representations::BaseController - def show; end - - private - - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 - def _layout(lookup_context, formats); end - - class << self - # source://actionpack/7.0.6/lib/action_controller/metal.rb#210 - def middleware_stack; end - end -end - -# Abstract class serving as an interface for concrete services. -# -# The available services are: -# -# * +Disk+, to manage attachments saved directly on the hard drive. -# * +GCS+, to manage attachments through Google Cloud Storage. -# * +S3+, to manage attachments through Amazon S3. -# * +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 -# generated config/storage.yml file and reference one -# of the aforementioned constant under the +service+ key. For example: -# -# local: -# service: Disk -# root: <%= Rails.root.join("storage") %> -# -# You can checkout the service's constructor to know which keys are required. -# -# Then, in your application's configuration, you can specify the service to -# use like this: -# -# config.active_storage.service = :local -# -# 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( -# :local, -# { local: {service: "Disk", root: Pathname("/tmp/foo/storage") } } -# ) -# -# source://activestorage//lib/active_storage/service.rb#41 -class ActiveStorage::Service - extend ::ActiveSupport::Autoload - - # Concatenate multiple files into a single "composed" file. - # - # @raise [NotImplementedError] - # - # source://activestorage//lib/active_storage/service.rb#94 - 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 - def delete(key); end - - # Delete files at keys starting with the +prefix+. - # - # @raise [NotImplementedError] - # - # source://activestorage//lib/active_storage/service.rb#104 - def delete_prefixed(prefix); end - - # Return the content of the file at the +key+. - # - # @raise [NotImplementedError] - # - # source://activestorage//lib/active_storage/service.rb#80 - 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 - def download_chunk(key, range); end - - # Return +true+ if a file exists at the +key+. - # - # @raise [NotImplementedError] - # @return [Boolean] - # - # source://activestorage//lib/active_storage/service.rb#109 - def exist?(key); end - - # Returns a Hash of headers for +url_for_direct_upload+ requests. - # - # source://activestorage//lib/active_storage/service.rb#141 - 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 - 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 - def name=(_arg0); end - - # source://activestorage//lib/active_storage/service.rb#89 - def open(*args, **options, &block); end - - # @return [Boolean] - # - # source://activestorage//lib/active_storage/service.rb#145 - 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 - def update_metadata(key, **metadata); end - - # Upload the +io+ to the +key+ specified. If a +checksum+ is provided, the service will - # ensure a match when the upload has completed or raise an ActiveStorage::IntegrityError. - # - # @raise [NotImplementedError] - # - # source://activestorage//lib/active_storage/service.rb#69 - 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 - # short-lived URL for private files. For private files you can provide the +disposition+ (+:inline+ or +:attachment+), - # +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 - def url(key, **options); end - - # Returns a signed, temporary URL that a direct upload file can be PUT to on the +key+. - # The URL will be valid for the amount of seconds specified in +expires_in+. - # You must also provide the +content_type+, +content_length+, and +checksum+ of the file - # that will be uploaded. All these attributes will be validated by the service upon upload. - # - # @raise [NotImplementedError] - # - # source://activestorage//lib/active_storage/service.rb#136 - 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 - def content_disposition_with(filename:, type: T.unsafe(nil)); end - - # @raise [NotImplementedError] - # - # source://activestorage//lib/active_storage/service.rb#158 - def custom_metadata_headers(metadata); end - - # source://activestorage//lib/active_storage/service.rb#162 - def instrument(operation, payload = T.unsafe(nil), &block); end - - # @raise [NotImplementedError] - # - # source://activestorage//lib/active_storage/service.rb#150 - def private_url(key, expires_in:, filename:, disposition:, content_type:, **_arg5); end - - # @raise [NotImplementedError] - # - # source://activestorage//lib/active_storage/service.rb#154 - def public_url(key, **_arg1); end - - # source://activestorage//lib/active_storage/service.rb#168 - def service_name; end - - class << self - # Override in subclasses that stitch together multiple services and hence - # need to build additional services using the configurator. - # - # Passes the configurator and all of the service's config as keyword args. - # - # See MirrorService for an example. - # - # source://activestorage//lib/active_storage/service.rb#60 - 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 - def configure(service_name, configurations); end - end -end - -# source://activestorage//lib/active_storage/service/configurator.rb#4 -class ActiveStorage::Service::Configurator - # source://activestorage//lib/active_storage/service/configurator.rb#11 - def initialize(configurations); end - - # source://activestorage//lib/active_storage/service/configurator.rb#15 - def build(service_name); end - - # source://activestorage//lib/active_storage/service/configurator.rb#5 - def configurations; end - - private - - # source://activestorage//lib/active_storage/service/configurator.rb#23 - def config_for(name); end - - # source://activestorage//lib/active_storage/service/configurator.rb#29 - def resolve(class_name); end - - class << self - # source://activestorage//lib/active_storage/service/configurator.rb#7 - def build(service_name, configurations); end - end -end - -# source://activestorage//lib/active_storage/service/registry.rb#4 -class ActiveStorage::Service::Registry - # source://activestorage//lib/active_storage/service/registry.rb#5 - def initialize(configurations); end - - # source://activestorage//lib/active_storage/service/registry.rb#10 - def fetch(name); end - - private - - # source://activestorage//lib/active_storage/service/registry.rb#26 - def configurations; end - - # source://activestorage//lib/active_storage/service/registry.rb#28 - def configurator; end - - # source://activestorage//lib/active_storage/service/registry.rb#26 - def services; end -end - -module ActiveStorage::SetBlob - extend ::ActiveSupport::Concern - - private - - def blob_scope; end - def set_blob; end -end - -module ActiveStorage::SetCurrent - extend ::ActiveSupport::Concern -end - -module ActiveStorage::Streaming - extend ::ActiveSupport::Concern - include ::ActionController::Rendering - include ::ActionController::DataStreaming - include ::ActionController::Live - - mixes_in_class_methods ::ActionController::Rendering::ClassMethods - mixes_in_class_methods ::ActionController::Live::ClassMethods - - private - - def send_blob_byte_range_data(blob, range_header, disposition: T.unsafe(nil)); end - def send_blob_stream(blob, disposition: T.unsafe(nil)); end -end - -ActiveStorage::Streaming::DEFAULT_BLOB_STREAMING_DISPOSITION = T.let(T.unsafe(nil), String) - -# source://activestorage//lib/active_storage.rb#367 -module ActiveStorage::Transformers - extend ::ActiveSupport::Autoload -end - -# A Transformer applies a set of transformations to an image. -# -# The following concrete subclasses are included in Active Storage: -# -# * ActiveStorage::Transformers::ImageProcessingTransformer: -# backed by ImageProcessing, a common interface for MiniMagick and ruby-vips -# -# source://activestorage//lib/active_storage/transformers/transformer.rb#11 -class ActiveStorage::Transformers::Transformer - # @return [Transformer] a new instance of Transformer - # - # source://activestorage//lib/active_storage/transformers/transformer.rb#14 - 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 - def transform(file, format:); end - - # Returns the value of attribute transformations. - # - # source://activestorage//lib/active_storage/transformers/transformer.rb#12 - def transformations; end - - private - - # Returns an open Tempfile containing a transformed image in the given +format+. - # All subclasses implement this method. - # - # @raise [NotImplementedError] - # - # source://activestorage//lib/active_storage/transformers/transformer.rb#34 - def process(file, format:); end -end - -# Raised when ActiveStorage::Blob#preview is called on a blob that isn't previewable. -# Use ActiveStorage::Blob#previewable? to determine whether a blob is previewable. -# -# source://activestorage//lib/active_storage/errors.rb#13 -class ActiveStorage::UnpreviewableError < ::ActiveStorage::Error; end - -# Raised when ActiveStorage::Blob#representation is called on a blob that isn't representable. -# Use ActiveStorage::Blob#representable? to determine whether a blob is representable. -# -# source://activestorage//lib/active_storage/errors.rb#17 -class ActiveStorage::UnrepresentableError < ::ActiveStorage::Error; end - -# source://activestorage//lib/active_storage/gem_version.rb#9 -module ActiveStorage::VERSION; end - -# source://activestorage//lib/active_storage/gem_version.rb#10 -ActiveStorage::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) - -# source://activestorage//lib/active_storage/gem_version.rb#11 -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) - -# source://activestorage//lib/active_storage/gem_version.rb#15 -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 - def autosave_associated_records_for_blob(*args); end - - # source://activerecord/7.0.6/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 - def autosave_associated_records_for_image_blob(*args); end - - class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activerecord/7.0.6/lib/active_record/reflection.rb#11 - def _reflections; end - - # source://activemodel/7.0.6/lib/active_model/validations.rb#52 - 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 - def defined_enums; end - - # source://activerecord/7.0.6/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 - def blob; end - - # source://activerecord/7.0.6/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 - def blob_changed?; end - - # source://activerecord/7.0.6/lib/active_record/associations/builder/belongs_to.rb#136 - def blob_previously_changed?; end - - # source://activerecord/7.0.6/lib/active_record/associations/builder/singular_association.rb#28 - def build_blob(*args, &block); end - - # source://activerecord/7.0.6/lib/active_record/associations/builder/singular_association.rb#28 - def build_image_attachment(*args, &block); end - - # source://activerecord/7.0.6/lib/active_record/associations/builder/singular_association.rb#28 - def build_image_blob(*args, &block); end - - # source://activerecord/7.0.6/lib/active_record/associations/builder/singular_association.rb#32 - def create_blob(*args, &block); end - - # source://activerecord/7.0.6/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#32 - def create_image_attachment(*args, &block); end - - # source://activerecord/7.0.6/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#32 - def create_image_blob(*args, &block); end - - # source://activerecord/7.0.6/lib/active_record/associations/builder/singular_association.rb#36 - def create_image_blob!(*args, &block); end - - # source://activestorage//lib/active_storage/attached/model.rb#55 - def image; end - - # source://activestorage//lib/active_storage/attached/model.rb#60 - def image=(attachable); end - - # source://activerecord/7.0.6/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 - def image_attachment=(value); end - - # source://activerecord/7.0.6/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 - def image_blob=(value); end - - # source://activerecord/7.0.6/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 - def reload_image_attachment; end - - # source://activerecord/7.0.6/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 - - 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 - - def create_or_find_record(image:); end - def record; end - def transform_blob; end -end - -class ActiveStorage::Variation - def initialize(transformations); end - - def content_type; end - def default_to(defaults); end - def digest; end - def format; end - def key; end - def transform(file, &block); end - def transformations; end - - private - - def transformer; end - - class << self - def decode(key); end - def encode(transformations); end - def wrap(variator); end - end -end diff --git a/sorbet/rbi/gems/activestorage@7.1.1.rbi b/sorbet/rbi/gems/activestorage@7.1.1.rbi new file mode 100644 index 000000000..540fc098d --- /dev/null +++ b/sorbet/rbi/gems/activestorage@7.1.1.rbi @@ -0,0 +1,1690 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `activestorage` gem. +# Please instead update this file by running `bin/tapioca gem activestorage`. + +class ActionText::RichText < ::ActionText::Record + # source://activerecord/7.1.1/lib/active_record/autosave_association.rb#160 + def autosave_associated_records_for_embeds_attachments(*args); end + + # source://activerecord/7.1.1/lib/active_record/autosave_association.rb#160 + def autosave_associated_records_for_embeds_blobs(*args); end + + # source://activerecord/7.1.1/lib/active_record/autosave_association.rb#160 + def autosave_associated_records_for_record(*args); end + + def blank?(*_arg0, **_arg1, &_arg2); end + def empty?(*_arg0, **_arg1, &_arg2); end + def nil?(*_arg0, **_arg1, &_arg2); end + def present?(*_arg0, **_arg1, &_arg2); end + def to_plain_text; end + def to_s(*_arg0, **_arg1, &_arg2); end + def to_trix_html; end + + # source://activerecord/7.1.1/lib/active_record/autosave_association.rb#160 + def validate_associated_records_for_embeds_attachments(*args); end + + # source://activerecord/7.1.1/lib/active_record/autosave_association.rb#160 + def validate_associated_records_for_embeds_blobs(*args); end + + class << self + # source://activesupport/7.1.1/lib/active_support/callbacks.rb#70 + def __callbacks; end + + # source://activerecord/7.1.1/lib/active_record/reflection.rb#11 + def _reflections; end + + # source://activemodel/7.1.1/lib/active_model/validations.rb#71 + def _validators; end + + # source://activestorage//lib/active_storage/reflection.rb#53 + def attachment_reflections; end + + # source://activerecord/7.1.1/lib/active_record/attributes.rb#11 + def attributes_to_define_after_schema_loads; end + + # source://activerecord/7.1.1/lib/active_record/enum.rb#167 + def defined_enums; end + + # source://activerecord/7.1.1/lib/active_record/scoping/named.rb#174 + def with_attached_embeds(*args, **_arg1); 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#55 + def analyzers; end + + # source://activestorage//lib/active_storage.rb#55 + def analyzers=(val); end + + # source://activestorage//lib/active_storage.rb#61 + def binary_content_type; end + + # source://activestorage//lib/active_storage.rb#61 + def binary_content_type=(val); end + + # source://activestorage//lib/active_storage.rb#63 + def content_types_allowed_inline; end + + # source://activestorage//lib/active_storage.rb#63 + def content_types_allowed_inline=(val); end + + # source://activestorage//lib/active_storage.rb#62 + def content_types_to_serve_as_binary; end + + # source://activestorage//lib/active_storage.rb#62 + def content_types_to_serve_as_binary=(val); end + + # source://activestorage//lib/active_storage.rb#360 + def draw_routes; end + + # source://activestorage//lib/active_storage.rb#360 + def draw_routes=(val); end + + # source://activestorage//lib/active_storage.rb#48 + def logger; end + + # source://activestorage//lib/active_storage.rb#48 + def logger=(val); end + + # source://activestorage//lib/active_storage.rb#57 + def paths; end + + # source://activestorage//lib/active_storage.rb#57 + def paths=(val); end + + # source://activestorage//lib/active_storage.rb#54 + def previewers; end + + # source://activestorage//lib/active_storage.rb#54 + def previewers=(val); end + + # source://activestorage//lib/active_storage.rb#52 + def queues; end + + # source://activestorage//lib/active_storage.rb#52 + def queues=(val); end + + # source://activestorage//lib/active_storage.rb#361 + def resolve_model_to_route; end + + # source://activestorage//lib/active_storage.rb#361 + def resolve_model_to_route=(val); end + + # source://activestorage//lib/active_storage.rb#359 + def routes_prefix; end + + # source://activestorage//lib/active_storage.rb#359 + def routes_prefix=(val); end + + # source://activestorage//lib/active_storage.rb#356 + def service_urls_expire_in; end + + # source://activestorage//lib/active_storage.rb#356 + def service_urls_expire_in=(val); end + + # source://activestorage//lib/active_storage.rb#65 + def supported_image_processing_methods; end + + # source://activestorage//lib/active_storage.rb#65 + def supported_image_processing_methods=(val); end + + # source://activestorage//lib/active_storage.rb#363 + def track_variants; end + + # source://activestorage//lib/active_storage.rb#363 + def track_variants=(val); end + + # source://activestorage//lib/active_storage.rb#354 + def unsupported_image_processing_arguments; end + + # source://activestorage//lib/active_storage.rb#354 + def unsupported_image_processing_arguments=(val); end + + # source://activestorage//lib/active_storage.rb#357 + def urls_expire_in; end + + # source://activestorage//lib/active_storage.rb#357 + def urls_expire_in=(val); end + + # source://activestorage//lib/active_storage.rb#59 + def variable_content_types; end + + # source://activestorage//lib/active_storage.rb#59 + def variable_content_types=(val); end + + # source://activestorage//lib/active_storage.rb#50 + def variant_processor; end + + # source://activestorage//lib/active_storage.rb#50 + def variant_processor=(val); end + + # source://activestorage//lib/active_storage.rb#49 + def verifier; end + + # source://activestorage//lib/active_storage.rb#49 + def verifier=(val); end + + # source://activestorage//lib/active_storage.rb#365 + def video_preview_arguments; end + + # source://activestorage//lib/active_storage.rb#365 + def video_preview_arguments=(val); end + + # source://activestorage//lib/active_storage.rb#60 + def web_image_content_types; end + + # source://activestorage//lib/active_storage.rb#60 + def web_image_content_types=(val); end + + class << self + # source://activestorage//lib/active_storage.rb#55 + def analyzers; end + + # source://activestorage//lib/active_storage.rb#55 + def analyzers=(val); end + + # source://activestorage//lib/active_storage.rb#61 + def binary_content_type; end + + # source://activestorage//lib/active_storage.rb#61 + def binary_content_type=(val); end + + # source://activestorage//lib/active_storage.rb#63 + def content_types_allowed_inline; end + + # source://activestorage//lib/active_storage.rb#63 + def content_types_allowed_inline=(val); end + + # source://activestorage//lib/active_storage.rb#62 + def content_types_to_serve_as_binary; end + + # source://activestorage//lib/active_storage.rb#62 + def content_types_to_serve_as_binary=(val); end + + # 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#360 + def draw_routes=(val); end + + # 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#48 + def logger; end + + # source://activestorage//lib/active_storage.rb#48 + def logger=(val); end + + # source://activestorage//lib/active_storage.rb#57 + def paths; end + + # source://activestorage//lib/active_storage.rb#57 + def paths=(val); end + + # source://activestorage//lib/active_storage.rb#54 + def previewers; end + + # source://activestorage//lib/active_storage.rb#54 + def previewers=(val); end + + # source://activestorage//lib/active_storage.rb#52 + def queues; end + + # source://activestorage//lib/active_storage.rb#52 + def queues=(val); end + + # source://railties/7.1.1/lib/rails/engine.rb#405 + def railtie_helpers_paths; end + + # source://railties/7.1.1/lib/rails/engine.rb#394 + def railtie_namespace; end + + # source://railties/7.1.1/lib/rails/engine.rb#409 + def railtie_routes_url_helpers(include_path_helpers = T.unsafe(nil)); end + + # source://activestorage//lib/active_storage.rb#367 + def replace_on_assign_to_many; end + + # source://activestorage//lib/active_storage.rb#371 + def replace_on_assign_to_many=(value); end + + # source://activestorage//lib/active_storage.rb#361 + def resolve_model_to_route; end + + # source://activestorage//lib/active_storage.rb#361 + def resolve_model_to_route=(val); end + + # source://activestorage//lib/active_storage.rb#359 + def routes_prefix; end + + # source://activestorage//lib/active_storage.rb#359 + def routes_prefix=(val); end + + # source://activestorage//lib/active_storage.rb#356 + def service_urls_expire_in; end + + # source://activestorage//lib/active_storage.rb#356 + def service_urls_expire_in=(val); end + + # source://activestorage//lib/active_storage.rb#375 + def silence_invalid_content_types_warning; end + + # source://activestorage//lib/active_storage.rb#379 + def silence_invalid_content_types_warning=(value); end + + # source://activestorage//lib/active_storage.rb#65 + def supported_image_processing_methods; end + + # source://activestorage//lib/active_storage.rb#65 + def supported_image_processing_methods=(val); end + + # source://railties/7.1.1/lib/rails/engine.rb#397 + def table_name_prefix; end + + # source://activestorage//lib/active_storage.rb#363 + def track_variants; end + + # source://activestorage//lib/active_storage.rb#363 + def track_variants=(val); end + + # source://activestorage//lib/active_storage.rb#354 + def unsupported_image_processing_arguments; end + + # source://activestorage//lib/active_storage.rb#354 + def unsupported_image_processing_arguments=(val); end + + # source://activestorage//lib/active_storage.rb#357 + def urls_expire_in; end + + # source://activestorage//lib/active_storage.rb#357 + def urls_expire_in=(val); end + + # source://railties/7.1.1/lib/rails/engine.rb#401 + def use_relative_model_naming?; end + + # source://activestorage//lib/active_storage.rb#59 + def variable_content_types; end + + # source://activestorage//lib/active_storage.rb#59 + def variable_content_types=(val); end + + # source://activestorage//lib/active_storage.rb#50 + def variant_processor; end + + # source://activestorage//lib/active_storage.rb#50 + def variant_processor=(val); end + + # source://activestorage//lib/active_storage.rb#49 + def verifier; end + + # source://activestorage//lib/active_storage.rb#49 + def verifier=(val); end + + # 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#365 + def video_preview_arguments; end + + # source://activestorage//lib/active_storage.rb#365 + def video_preview_arguments=(val); end + + # source://activestorage//lib/active_storage.rb#60 + def web_image_content_types; end + + # source://activestorage//lib/active_storage.rb#60 + def web_image_content_types=(val); 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#8 +class ActiveStorage::Analyzer + # @return [Analyzer] a new instance of Analyzer + # + # 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#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#28 + def metadata; end + + private + + # Downloads the blob to a tempfile on disk. Yields the tempfile. + # + # source://activestorage//lib/active_storage/analyzer.rb#34 + def download_blob_to_tempfile(&block); end + + # source://activestorage//lib/active_storage/analyzer.rb#46 + def instrument(analyzer, &block); end + + # source://activestorage//lib/active_storage/analyzer.rb#38 + def logger; end + + # source://activestorage//lib/active_storage/analyzer.rb#42 + def tmpdir; end + + class << self + # Implement this method in a concrete subclass. Have it return true when given a blob from which + # the analyzer can extract metadata. + # + # @return [Boolean] + # + # source://activestorage//lib/active_storage/analyzer.rb#13 + def accept?(blob); end + + # Implement this method in concrete subclasses. It will determine if blob analysis + # should be done in a job or performed inline. By default, analysis is enqueued in a job. + # + # @return [Boolean] + # + # source://activestorage//lib/active_storage/analyzer.rb#19 + def analyze_later?; end + end +end + +# 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#19 + def metadata; end + + private + + # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#44 + def audio_stream; end + + # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#29 + def bit_rate; end + + # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#24 + def duration; end + + # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#73 + def ffprobe_path; end + + # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#52 + def probe; end + + # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#56 + def probe_from(file); end + + # 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#15 + def accept?(blob); end + end +end + +# 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#19 + def metadata; end + + class << self + # source://activestorage//lib/active_storage/analyzer/image_analyzer.rb#15 + def accept?(blob); end + end +end + +# source://activestorage//lib/active_storage/analyzer/image_analyzer/image_magick.rb#6 +class ActiveStorage::Analyzer::ImageAnalyzer::ImageMagick < ::ActiveStorage::Analyzer::ImageAnalyzer + private + + # source://activestorage//lib/active_storage/analyzer/image_analyzer/image_magick.rb#12 + def read_image; end + + # source://activestorage//lib/active_storage/analyzer/image_analyzer/image_magick.rb#37 + def rotated_image?(image); end + + class << self + # source://activestorage//lib/active_storage/analyzer/image_analyzer/image_magick.rb#7 + def accept?(blob); end + end +end + +# source://activestorage//lib/active_storage/analyzer/image_analyzer/vips.rb#6 +class ActiveStorage::Analyzer::ImageAnalyzer::Vips < ::ActiveStorage::Analyzer::ImageAnalyzer + private + + # source://activestorage//lib/active_storage/analyzer/image_analyzer/vips.rb#12 + def read_image; end + + # source://activestorage//lib/active_storage/analyzer/image_analyzer/vips.rb#38 + def rotated_image?(image); end + + # source://activestorage//lib/active_storage/analyzer/image_analyzer/vips.rb#44 + def valid_image?(image); end + + class << self + # source://activestorage//lib/active_storage/analyzer/image_analyzer/vips.rb#7 + def accept?(blob); end + end +end + +# source://activestorage//lib/active_storage/analyzer/image_analyzer/vips.rb#37 +ActiveStorage::Analyzer::ImageAnalyzer::Vips::ROTATIONS = T.let(T.unsafe(nil), Regexp) + +# 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#29 + def metadata; end + + private + + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#55 + def angle; end + + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#78 + def audio?; end + + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#116 + def audio_stream; end + + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#86 + def computed_height; end + + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#124 + def container; end + + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#63 + def display_aspect_ratio; end + + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#100 + def display_height_scale; end + + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#50 + def duration; end + + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#96 + def encoded_height; end + + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#92 + def encoded_width; end + + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#149 + def ffprobe_path; end + + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#42 + def height; end + + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#128 + def probe; end + + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#132 + def probe_from(file); end + + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#74 + def rotated?; end + + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#108 + def side_data; end + + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#120 + def streams; end + + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#104 + def tags; end + + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#82 + def video?; end + + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#112 + def video_stream; end + + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#34 + def width; end + + class << self + # 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#10 +class ActiveStorage::Attached + # @return [Attached] a new instance of Attached + # + # 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#11 + def name; end + + # Returns the value of attribute record. + # + # source://activestorage//lib/active_storage/attached.rb#11 + def record; end + + private + + # source://activestorage//lib/active_storage/attached.rb#18 + def change; end +end + +# source://activestorage//lib/active_storage/attached/changes.rb#4 +module ActiveStorage::Attached::Changes + extend ::ActiveSupport::Autoload +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, 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#14 + def attachments; end + + # 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#26 + def save; end + + # 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#44 + def assign_associated_attachments; end + + # 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#52 + def persisted_or_new_attachments; end + + # 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#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 +class ActiveStorage::Attached::Changes::CreateOne + # source://activestorage//lib/active_storage/attached/changes/create_one.rb#10 + def initialize(name, record, attachable); end + + # source://activestorage//lib/active_storage/attached/changes/create_one.rb#8 + def attachable; end + + # source://activestorage//lib/active_storage/attached/changes/create_one.rb#15 + def attachment; end + + # source://activestorage//lib/active_storage/attached/changes/create_one.rb#19 + def blob; end + + # source://activestorage//lib/active_storage/attached/changes/create_one.rb#8 + def name; end + + # source://activestorage//lib/active_storage/attached/changes/create_one.rb#8 + def record; end + + # 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 + def upload; end + + private + + # 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#64 + def build_attachment; end + + # 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#54 + def find_or_build_attachment; end + + # source://activestorage//lib/active_storage/attached/changes/create_one.rb#68 + def find_or_build_blob; end +end + +# source://activestorage//lib/active_storage/attached/changes/create_one_of_many.rb#4 +class ActiveStorage::Attached::Changes::CreateOneOfMany < ::ActiveStorage::Attached::Changes::CreateOne + private + + # source://activestorage//lib/active_storage/attached/changes/create_one_of_many.rb#6 + def find_attachment; end +end + +# source://activestorage//lib/active_storage/attached/changes/delete_many.rb#4 +class ActiveStorage::Attached::Changes::DeleteMany + # source://activestorage//lib/active_storage/attached/changes/delete_many.rb#7 + def initialize(name, record); end + + # source://activestorage//lib/active_storage/attached/changes/delete_many.rb#11 + def attachables; end + + # source://activestorage//lib/active_storage/attached/changes/delete_many.rb#15 + def attachments; end + + # source://activestorage//lib/active_storage/attached/changes/delete_many.rb#19 + def blobs; end + + # source://activestorage//lib/active_storage/attached/changes/delete_many.rb#5 + def name; end + + # source://activestorage//lib/active_storage/attached/changes/delete_many.rb#5 + def record; end + + # source://activestorage//lib/active_storage/attached/changes/delete_many.rb#23 + def save; end +end + +# source://activestorage//lib/active_storage/attached/changes/delete_one.rb#4 +class ActiveStorage::Attached::Changes::DeleteOne + # source://activestorage//lib/active_storage/attached/changes/delete_one.rb#7 + def initialize(name, record); end + + # source://activestorage//lib/active_storage/attached/changes/delete_one.rb#11 + def attachment; end + + # source://activestorage//lib/active_storage/attached/changes/delete_one.rb#5 + def name; end + + # source://activestorage//lib/active_storage/attached/changes/delete_one.rb#5 + def record; end + + # source://activestorage//lib/active_storage/attached/changes/delete_one.rb#15 + def save; end +end + +# source://activestorage//lib/active_storage/attached/changes/detach_many.rb#4 +class ActiveStorage::Attached::Changes::DetachMany + # source://activestorage//lib/active_storage/attached/changes/detach_many.rb#7 + def initialize(name, record, attachments); end + + # source://activestorage//lib/active_storage/attached/changes/detach_many.rb#5 + def attachments; end + + # source://activestorage//lib/active_storage/attached/changes/detach_many.rb#11 + def detach; end + + # source://activestorage//lib/active_storage/attached/changes/detach_many.rb#5 + def name; end + + # source://activestorage//lib/active_storage/attached/changes/detach_many.rb#5 + def record; end +end + +# source://activestorage//lib/active_storage/attached/changes/detach_one.rb#4 +class ActiveStorage::Attached::Changes::DetachOne + # source://activestorage//lib/active_storage/attached/changes/detach_one.rb#7 + def initialize(name, record, attachment); end + + # source://activestorage//lib/active_storage/attached/changes/detach_one.rb#5 + def attachment; end + + # source://activestorage//lib/active_storage/attached/changes/detach_one.rb#11 + def detach; end + + # source://activestorage//lib/active_storage/attached/changes/detach_one.rb#5 + def name; end + + # source://activestorage//lib/active_storage/attached/changes/detach_one.rb#5 + def record; end + + private + + # source://activestorage//lib/active_storage/attached/changes/detach_one.rb#19 + def reset; end +end + +# source://activestorage//lib/active_storage/attached/changes/purge_many.rb#4 +class ActiveStorage::Attached::Changes::PurgeMany + # source://activestorage//lib/active_storage/attached/changes/purge_many.rb#7 + def initialize(name, record, attachments); end + + # source://activestorage//lib/active_storage/attached/changes/purge_many.rb#5 + def attachments; end + + # source://activestorage//lib/active_storage/attached/changes/purge_many.rb#5 + def name; end + + # source://activestorage//lib/active_storage/attached/changes/purge_many.rb#11 + def purge; end + + # source://activestorage//lib/active_storage/attached/changes/purge_many.rb#16 + def purge_later; end + + # source://activestorage//lib/active_storage/attached/changes/purge_many.rb#5 + def record; end + + private + + # source://activestorage//lib/active_storage/attached/changes/purge_many.rb#22 + def reset; end +end + +# source://activestorage//lib/active_storage/attached/changes/purge_one.rb#4 +class ActiveStorage::Attached::Changes::PurgeOne + # source://activestorage//lib/active_storage/attached/changes/purge_one.rb#7 + def initialize(name, record, attachment); end + + # source://activestorage//lib/active_storage/attached/changes/purge_one.rb#5 + def attachment; end + + # source://activestorage//lib/active_storage/attached/changes/purge_one.rb#5 + def name; end + + # source://activestorage//lib/active_storage/attached/changes/purge_one.rb#11 + def purge; end + + # source://activestorage//lib/active_storage/attached/changes/purge_one.rb#16 + def purge_later; end + + # source://activestorage//lib/active_storage/attached/changes/purge_one.rb#5 + def record; end + + private + + # source://activestorage//lib/active_storage/attached/changes/purge_one.rb#22 + def reset; end +end + +# source://activestorage//lib/active_storage/attached/many.rb#7 +class ActiveStorage::Attached::Many < ::ActiveStorage::Attached + # source://activestorage//lib/active_storage/attached/many.rb#51 + def attach(*attachables); end + + # source://activestorage//lib/active_storage/attached/many.rb#66 + def attached?; end + + # source://activestorage//lib/active_storage/attached/many.rb#32 + def attachments; end + + # source://activestorage//lib/active_storage/attached/many.rb#37 + def blobs; end + + # source://activestorage//lib/active_storage/attached/many.rb#25 + def detach(*_arg0, **_arg1, &_arg2); end + + # source://activesupport/7.1.1/lib/active_support/core_ext/module/delegation.rb#331 + def method_missing(method, *args, **_arg2, &block); end + + # source://activestorage//lib/active_storage/attached/many.rb#13 + def purge(*_arg0, **_arg1, &_arg2); end + + # 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#75 + def detach_many; end + + # source://activestorage//lib/active_storage/attached/many.rb#71 + def purge_many; end + + # source://activesupport/7.1.1/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#9 +module ActiveStorage::Attached::Model + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActiveStorage::Attached::Model::ClassMethods + + # source://activestorage//lib/active_storage/attached/model.rb#245 + def attachment_changes; end + + # source://activestorage//lib/active_storage/attached/model.rb#249 + def changed_for_autosave?; end + + # source://activestorage//lib/active_storage/attached/model.rb#259 + def reload(*_arg0); end + + private + + # source://activestorage//lib/active_storage/attached/model.rb#253 + 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#179 + 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#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#238 + def validate_global_service_configuration; end + + # source://activestorage//lib/active_storage/attached/model.rb#228 + def validate_service_configuration(association_name, service); end +end + +# source://activestorage//lib/active_storage/attached/one.rb#7 +class ActiveStorage::Attached::One < ::ActiveStorage::Attached + # source://activestorage//lib/active_storage/attached/one.rb#58 + def attach(attachable); end + + # source://activestorage//lib/active_storage/attached/one.rb#73 + def attached?; end + + # source://activestorage//lib/active_storage/attached/one.rb#33 + def attachment; end + + # source://activestorage//lib/active_storage/attached/one.rb#44 + def blank?; end + + # source://activestorage//lib/active_storage/attached/one.rb#25 + def detach(*_arg0, **_arg1, &_arg2); end + + # source://activesupport/7.1.1/lib/active_support/core_ext/module/delegation.rb#331 + def method_missing(method, *args, **_arg2, &block); end + + # source://activestorage//lib/active_storage/attached/one.rb#13 + def purge(*_arg0, **_arg1, &_arg2); end + + # 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#82 + def detach_one; end + + # source://activestorage//lib/active_storage/attached/one.rb#78 + def purge_one; end + + # source://activesupport/7.1.1/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/downloader.rb#4 +class ActiveStorage::Downloader + # @return [Downloader] a new instance of Downloader + # + # source://activestorage//lib/active_storage/downloader.rb#7 + def initialize(service); end + + # source://activestorage//lib/active_storage/downloader.rb#11 + def open(key, checksum: T.unsafe(nil), verify: T.unsafe(nil), name: T.unsafe(nil), tmpdir: T.unsafe(nil)); end + + # Returns the value of attribute service. + # + # source://activestorage//lib/active_storage/downloader.rb#5 + def service; end + + private + + # source://activestorage//lib/active_storage/downloader.rb#30 + def download(key, file); end + + # source://activestorage//lib/active_storage/downloader.rb#20 + def open_tempfile(name, tmpdir = T.unsafe(nil)); end + + # source://activestorage//lib/active_storage/downloader.rb#37 + def verify_integrity_of(file, checksum:); end +end + +# source://activestorage//lib/active_storage/engine.rb#25 +class ActiveStorage::Engine < ::Rails::Engine + class << self + # source://activesupport/7.1.1/lib/active_support/callbacks.rb#70 + def __callbacks; end + end +end + +# Generic base class for all Active Storage exceptions. +# +# source://activestorage//lib/active_storage/errors.rb#5 +class ActiveStorage::Error < ::StandardError; end + +# Raised when ActiveStorage::Blob#download is called on a blob where the +# backing file is no longer present in its service. +# +# source://activestorage//lib/active_storage/errors.rb#25 +class ActiveStorage::FileNotFoundError < ::ActiveStorage::Error; end + +# = Active Storage \FixtureSet +# +# Fixtures are a way of organizing data that you want to test against; in +# short, sample data. +# +# To learn more about fixtures, read the ActiveRecord::FixtureSet documentation. +# +# === YAML +# +# Like other Active Record-backed models, ActiveStorage::Attachment and +# ActiveStorage::Blob records inherit from ActiveRecord::Base instances and +# therefore can be populated by fixtures. +# +# Consider a hypothetical Article model class, its related +# fixture data, as well as fixture data for related ActiveStorage::Attachment +# and ActiveStorage::Blob records: +# +# # app/models/article.rb +# class Article < ApplicationRecord +# 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 +# record: first (Article) +# blob: first_thumbnail_blob +# +# 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#40 +class ActiveStorage::FixtureSet + include ::ActiveSupport::Testing::FileFixtures + include ::ActiveRecord::SecureToken + extend ::ActiveRecord::SecureToken::ClassMethods + + # source://activesupport/7.1.1/lib/active_support/testing/file_fixtures.rb#20 + def file_fixture_path; end + + # source://activesupport/7.1.1/lib/active_support/testing/file_fixtures.rb#20 + def file_fixture_path?; end + + # source://activestorage//lib/active_storage/fixture_set.rb#66 + def prepare(instance, **attributes); end + + class << self + # Generate a YAML-encoded representation of an ActiveStorage::Blob + # instance's attributes, resolve the file relative to the directory mentioned + # by ActiveSupport::Testing::FileFixtures.file_fixture, and upload + # the file to the Service + # + # === Examples + # + # # tests/fixtures/action_text/blobs.yml + # second_thumbnail_blob: <%= ActiveStorage::FixtureSet.blob( + # filename: "second.svg", + # ) %> + # + # third_thumbnail_blob: <%= ActiveStorage::FixtureSet.blob( + # filename: "third.svg", + # content_type: "image/svg+xml", + # service_name: "public" + # ) %> + # + # source://activestorage//lib/active_storage/fixture_set.rb#62 + def blob(filename:, **attributes); end + + # source://activesupport/7.1.1/lib/active_support/testing/file_fixtures.rb#20 + def file_fixture_path; end + + # source://activesupport/7.1.1/lib/active_support/testing/file_fixtures.rb#20 + def file_fixture_path=(value); end + + # source://activesupport/7.1.1/lib/active_support/testing/file_fixtures.rb#20 + def file_fixture_path?; end + end +end + +# Raised when uploaded or downloaded data does not match a precomputed checksum. +# Indicates that a network error or a software bug caused data corruption. +# +# source://activestorage//lib/active_storage/errors.rb#21 +class ActiveStorage::IntegrityError < ::ActiveStorage::Error; end + +# Raised when ActiveStorage::Blob#variant is called on a blob that isn't variable. +# Use ActiveStorage::Blob#variable? to determine whether a blob is variable. +# +# source://activestorage//lib/active_storage/errors.rb#9 +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#53 + def logger; end + + # 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#31 + def service_delete_prefixed(event); end + + # source://activestorage//lib/active_storage/log_subscriber.rb#14 + def service_download(event); end + + # source://activestorage//lib/active_storage/log_subscriber.rb#36 + def service_exist(event); end + + # source://activestorage//lib/active_storage/log_subscriber.rb#46 + def service_mirror(event); end + + # 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#41 + def service_url(event); end + + private + + # source://activestorage//lib/active_storage/log_subscriber.rb#62 + def debug(event, colored_message); end + + # source://activestorage//lib/active_storage/log_subscriber.rb#58 + def info(event, colored_message); end + + # source://activestorage//lib/active_storage/log_subscriber.rb#70 + def key_in(event); end + + # source://activestorage//lib/active_storage/log_subscriber.rb#66 + def log_prefix_for_service(event); end + + class << self + # source://activesupport/7.1.1/lib/active_support/log_subscriber.rb#87 + def log_levels; end + end +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#9 +class ActiveStorage::Previewer + # @return [Previewer] a new instance of Previewer + # + # 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#10 + def blob; end + + # Override this method in a concrete subclass. Have it yield an attachable preview image (i.e. + # anything accepted by ActiveStorage::Attached::One#attach). Pass the additional options to + # the underlying blob that is created. + # + # @raise [NotImplementedError] + # + # source://activestorage//lib/active_storage/previewer.rb#25 + def preview(**options); end + + private + + # 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#31 + def download_blob_to_tempfile(&block); end + + # Executes a system command, capturing its binary output in a tempfile. Yields the tempfile. + # + # Use this method to shell out to a system library (e.g. muPDF or FFmpeg) for preview image + # generation. The resulting tempfile can be used as the +:io+ value in an attachable Hash: + # + # def preview + # download_blob_to_tempfile do |input| + # draw "my-drawing-command", input.path, "--format", "png", "-" do |output| + # yield io: output, filename: "#{blob.filename.base}.png", content_type: "image/png" + # end + # end + # end + # + # The output tempfile is opened in the directory returned by #tmpdir. + # + # source://activestorage//lib/active_storage/previewer.rb#49 + def draw(*argv); end + + # source://activestorage//lib/active_storage/previewer.rb#69 + def instrument(operation, payload = T.unsafe(nil), &block); end + + # source://activestorage//lib/active_storage/previewer.rb#93 + def logger; end + + # source://activestorage//lib/active_storage/previewer.rb#59 + def open_tempfile; end + + # 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 + # Implement this method in a concrete subclass. Have it return true when given a blob from which + # the previewer can generate an image. + # + # @return [Boolean] + # + # source://activestorage//lib/active_storage/previewer.rb#14 + def accept?(blob); end + end +end + +# source://activestorage//lib/active_storage/previewer/mupdf_previewer.rb#4 +class ActiveStorage::Previewer::MuPDFPreviewer < ::ActiveStorage::Previewer + # source://activestorage//lib/active_storage/previewer/mupdf_previewer.rb#23 + def preview(**options); end + + private + + # source://activestorage//lib/active_storage/previewer/mupdf_previewer.rb#32 + def draw_first_page_from(file, &block); end + + class << self + # source://activestorage//lib/active_storage/previewer/mupdf_previewer.rb#6 + def accept?(blob); end + + # source://activestorage//lib/active_storage/previewer/mupdf_previewer.rb#14 + def mutool_exists?; end + + # source://activestorage//lib/active_storage/previewer/mupdf_previewer.rb#10 + def mutool_path; end + end +end + +# source://activestorage//lib/active_storage/previewer/poppler_pdf_previewer.rb#4 +class ActiveStorage::Previewer::PopplerPDFPreviewer < ::ActiveStorage::Previewer + # source://activestorage//lib/active_storage/previewer/poppler_pdf_previewer.rb#21 + def preview(**options); end + + private + + # source://activestorage//lib/active_storage/previewer/poppler_pdf_previewer.rb#30 + def draw_first_page_from(file, &block); end + + class << self + # source://activestorage//lib/active_storage/previewer/poppler_pdf_previewer.rb#6 + def accept?(blob); end + + # source://activestorage//lib/active_storage/previewer/poppler_pdf_previewer.rb#14 + def pdftoppm_exists?; end + + # source://activestorage//lib/active_storage/previewer/poppler_pdf_previewer.rb#10 + def pdftoppm_path; end + end +end + +# source://activestorage//lib/active_storage/previewer/video_previewer.rb#6 +class ActiveStorage::Previewer::VideoPreviewer < ::ActiveStorage::Previewer + # source://activestorage//lib/active_storage/previewer/video_previewer.rb#23 + def preview(**options); end + + private + + # source://activestorage//lib/active_storage/previewer/video_previewer.rb#32 + def draw_relevant_frame_from(file, &block); end + + class << self + # source://activestorage//lib/active_storage/previewer/video_previewer.rb#8 + def accept?(blob); end + + # source://activestorage//lib/active_storage/previewer/video_previewer.rb#12 + def ffmpeg_exists?; end + + # source://activestorage//lib/active_storage/previewer/video_previewer.rb#18 + def ffmpeg_path; end + end +end + +# source://activestorage//lib/active_storage/reflection.rb#4 +module ActiveStorage::Reflection; end + +# source://activestorage//lib/active_storage/reflection.rb#49 +module ActiveStorage::Reflection::ActiveRecordExtensions + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActiveStorage::Reflection::ActiveRecordExtensions::ClassMethods + + module GeneratedClassMethods + def attachment_reflections; end + def attachment_reflections=(value); end + def attachment_reflections?; end + end + + module GeneratedInstanceMethods + def attachment_reflections; end + def attachment_reflections?; end + end +end + +# source://activestorage//lib/active_storage/reflection.rb#56 +module ActiveStorage::Reflection::ActiveRecordExtensions::ClassMethods + # Returns an array of reflection objects for all the attachments in the + # class. + # + # source://activestorage//lib/active_storage/reflection.rb#59 + def reflect_on_all_attachments; end + + # Returns the reflection object for the named +attachment+. + # + # User.reflect_on_attachment(:avatar) + # # => the avatar reflection + # + # source://activestorage//lib/active_storage/reflection.rb#68 + def reflect_on_attachment(attachment); end +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 +end + +# Holds all the metadata about a has_many_attached attachment as it was +# specified in the Active Record class. +# +# source://activestorage//lib/active_storage/reflection.rb#25 +class ActiveStorage::Reflection::HasManyAttachedReflection < ::ActiveStorage::Reflection::HasAttachedReflection + # source://activestorage//lib/active_storage/reflection.rb#26 + def macro; end +end + +# Holds all the metadata about a has_one_attached attachment as it was +# specified in the Active Record class. +# +# source://activestorage//lib/active_storage/reflection.rb#17 +class ActiveStorage::Reflection::HasOneAttachedReflection < ::ActiveStorage::Reflection::HasAttachedReflection + # source://activestorage//lib/active_storage/reflection.rb#18 + def macro; end +end + +# source://activestorage//lib/active_storage/reflection.rb#31 +module ActiveStorage::Reflection::ReflectionExtension + # source://activestorage//lib/active_storage/reflection.rb#32 + def add_attachment_reflection(model, name, reflection); end + + private + + # source://activestorage//lib/active_storage/reflection.rb#37 + def reflection_class_for(macro); end +end + +# = Active Storage \Service +# +# Abstract class serving as an interface for concrete services. +# +# The available services are: +# +# * +Disk+, to manage attachments saved directly on the hard drive. +# * +GCS+, to manage attachments through Google Cloud Storage. +# * +S3+, to manage attachments through Amazon S3. +# * +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 +# generated config/storage.yml file and reference one +# of the aforementioned constant under the +service+ key. For example: +# +# local: +# service: Disk +# root: <%= Rails.root.join("storage") %> +# +# You can checkout the service's constructor to know which keys are required. +# +# Then, in your application's configuration, you can specify the service to +# use like this: +# +# config.active_storage.service = :local +# +# 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( +# :local, +# { local: {service: "Disk", root: Pathname("/tmp/foo/storage") } } +# ) +# +# source://activestorage//lib/active_storage/service.rb#43 +class ActiveStorage::Service + extend ::ActiveSupport::Autoload + + # Concatenate multiple files into a single "composed" file. + # + # @raise [NotImplementedError] + # + # 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#101 + def delete(key); end + + # Delete files at keys starting with the +prefix+. + # + # @raise [NotImplementedError] + # + # 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#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#87 + def download_chunk(key, range); end + + # Return +true+ if a file exists at the +key+. + # + # @raise [NotImplementedError] + # @return [Boolean] + # + # 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#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#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#46 + def name=(_arg0); end + + # source://activestorage//lib/active_storage/service.rb#91 + def open(*args, **options, &block); end + + # @return [Boolean] + # + # 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#78 + def update_metadata(key, **metadata); end + + # Upload the +io+ to the +key+ specified. If a +checksum+ is provided, the service will + # ensure a match when the upload has completed or raise an ActiveStorage::IntegrityError. + # + # @raise [NotImplementedError] + # + # 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 + # short-lived URL for private files. For private files you can provide the +disposition+ (+:inline+ or +:attachment+), + # +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#119 + def url(key, **options); end + + # Returns a signed, temporary URL that a direct upload file can be PUT to on the +key+. + # The URL will be valid for the amount of seconds specified in +expires_in+. + # You must also provide the +content_type+, +content_length+, and +checksum+ of the file + # that will be uploaded. All these attributes will be validated by the service upon upload. + # + # @raise [NotImplementedError] + # + # 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#175 + def content_disposition_with(filename:, type: T.unsafe(nil)); end + + # @raise [NotImplementedError] + # + # source://activestorage//lib/active_storage/service.rb#160 + def custom_metadata_headers(metadata); end + + # 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#152 + def private_url(key, expires_in:, filename:, disposition:, content_type:, **_arg5); end + + # @raise [NotImplementedError] + # + # source://activestorage//lib/active_storage/service.rb#156 + def public_url(key, **_arg1); end + + # source://activestorage//lib/active_storage/service.rb#170 + def service_name; end + + class << self + # Override in subclasses that stitch together multiple services and hence + # need to build additional services using the configurator. + # + # Passes the configurator and all of the service's config as keyword args. + # + # See MirrorService for an example. + # + # 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#52 + def configure(service_name, configurations); end + end +end + +# source://activestorage//lib/active_storage/service/configurator.rb#4 +class ActiveStorage::Service::Configurator + # source://activestorage//lib/active_storage/service/configurator.rb#11 + def initialize(configurations); end + + # source://activestorage//lib/active_storage/service/configurator.rb#15 + def build(service_name); end + + # source://activestorage//lib/active_storage/service/configurator.rb#5 + def configurations; end + + private + + # source://activestorage//lib/active_storage/service/configurator.rb#23 + def config_for(name); end + + # source://activestorage//lib/active_storage/service/configurator.rb#29 + def resolve(class_name); end + + class << self + # source://activestorage//lib/active_storage/service/configurator.rb#7 + def build(service_name, configurations); end + end +end + +# source://activestorage//lib/active_storage/service/registry.rb#4 +class ActiveStorage::Service::Registry + # source://activestorage//lib/active_storage/service/registry.rb#5 + def initialize(configurations); end + + # source://activestorage//lib/active_storage/service/registry.rb#10 + def fetch(name); end + + private + + # source://activestorage//lib/active_storage/service/registry.rb#26 + def configurations; end + + # source://activestorage//lib/active_storage/service/registry.rb#28 + def configurator; end + + # source://activestorage//lib/active_storage/service/registry.rb#26 + def services; 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: +# +# * ActiveStorage::Transformers::ImageProcessingTransformer: +# backed by ImageProcessing, a common interface for MiniMagick and ruby-vips +# +# 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#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#23 + def transform(file, format:); end + + # Returns the value of attribute transformations. + # + # source://activestorage//lib/active_storage/transformers/transformer.rb#14 + def transformations; end + + private + + # Returns an open Tempfile containing a transformed image in the given +format+. + # All subclasses implement this method. + # + # @raise [NotImplementedError] + # + # source://activestorage//lib/active_storage/transformers/transformer.rb#36 + def process(file, format:); end +end + +# Raised when ActiveStorage::Blob#preview is called on a blob that isn't previewable. +# Use ActiveStorage::Blob#previewable? to determine whether a blob is previewable. +# +# source://activestorage//lib/active_storage/errors.rb#13 +class ActiveStorage::UnpreviewableError < ::ActiveStorage::Error; end + +# Raised when ActiveStorage::Blob#representation is called on a blob that isn't representable. +# Use ActiveStorage::Blob#representable? to determine whether a blob is representable. +# +# source://activestorage//lib/active_storage/errors.rb#17 +class ActiveStorage::UnrepresentableError < ::ActiveStorage::Error; end + +# source://activestorage//lib/active_storage/gem_version.rb#9 +module ActiveStorage::VERSION; end + +# source://activestorage//lib/active_storage/gem_version.rb#10 +ActiveStorage::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) + +# source://activestorage//lib/active_storage/gem_version.rb#11 +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) + +# source://activestorage//lib/active_storage/gem_version.rb#15 +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) diff --git a/sorbet/rbi/gems/activesupport@7.0.6.rbi b/sorbet/rbi/gems/activesupport@7.1.1.rbi similarity index 80% rename from sorbet/rbi/gems/activesupport@7.0.6.rbi rename to sorbet/rbi/gems/activesupport@7.1.1.rbi index 7e1a53d30..75eb815be 100644 --- a/sorbet/rbi/gems/activesupport@7.0.6.rbi +++ b/sorbet/rbi/gems/activesupport@7.1.1.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,269 @@ 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#222 + def dispatch(&block); end + + # source://activesupport//lib/active_support/broadcast_logger.rb#226 + def method_missing(name, *args, **kwargs, &block); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/broadcast_logger.rb#238 + 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 +692,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,78 +733,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 +# 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/coder.rb#14 + def dump(entry); end + + # source://activesupport//lib/active_support/cache/coder.rb#20 + def dump_compressed(entry, threshold); end + + # source://activesupport//lib/active_support/cache/coder.rb#48 + def load(dumped); end + + private + + # source://activesupport//lib/active_support/cache/coder.rb#136 + def dump_version(version); end + + # source://activesupport//lib/active_support/cache/coder.rb#144 + def load_version(dumped_version); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache/coder.rb#121 + def signature?(dumped); 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#851 -module ActiveSupport::Cache::Coders::Loader - extend ::ActiveSupport::Cache::Coders::Loader +# 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#854 - def load(payload); 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 + + # @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 -# 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#84 +ActiveSupport::Cache::Coder::MARSHAL_SIGNATURE = T.let(T.unsafe(nil), String) -# source://activesupport//lib/active_support/cache.rb#836 -ActiveSupport::Cache::Coders::MARK_70_COMPRESSED = 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.rb#835 -ActiveSupport::Cache::Coders::MARK_70_UNCOMPRESSED = T.let(T.unsafe(nil), String) +# 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.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#78 +ActiveSupport::Cache::Coder::PACKED_TEMPLATE = T.let(T.unsafe(nil), String) - # source://activesupport//lib/active_support/cache.rb#878 - def dump(entry); end +# 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.rb#882 - def dump_compressed(entry, threshold); end -end +# 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.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#81 +ActiveSupport::Cache::Coder::PACKED_VERSION_LENGTH_TEMPLATE = T.let(T.unsafe(nil), String) - # source://activesupport//lib/active_support/cache.rb#891 - def dump(entry); end +# 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.rb#895 - def dump_compressed(entry, threshold); end +# 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/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 @@ -535,34 +862,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 @@ -570,140 +897,159 @@ 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#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. # - # source://activesupport//lib/active_support/cache/file_store.rb#57 + # If the key is unset, it will be set to +-amount+. + # + # cache.decrement("foo") # => -1 + # + # 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+: # - # source://activesupport//lib/active_support/cache/file_store.rb#51 + # cache.increment("foo") # => 1 + # cache.increment("bar", 100) # => 100 + # + # 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 @@ -711,31 +1057,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. # @@ -752,78 +1100,97 @@ ActiveSupport::Cache::FileStore::GITKEEP_FILES = T.let(T.unsafe(nil), Array) # # 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. # - # source://activesupport//lib/active_support/cache/memory_store.rb#117 + # 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: + # + # 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+: # - # source://activesupport//lib/active_support/cache/memory_store.rb#112 + # cache.increment("foo") # => 1 + # cache.increment("bar", 100) # => 100 + # + # To set a specific value, call #write: + # + # 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 @@ -831,42 +1198,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. @@ -875,40 +1241,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#159 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#150 def write_serialized_entry(key, payload, **_arg2); end class << self @@ -916,16 +1285,155 @@ 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) +# 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. @@ -966,25 +1474,83 @@ ActiveSupport::Cache::OPTION_ALIASES = T.let(T.unsafe(nil), Hash) # 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 + # ==== Options + # + # [+: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. # - # * +: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. + # 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. @@ -995,7 +1561,7 @@ class ActiveSupport::Cache::Store # # @raise [NotImplementedError] # - # source://activesupport//lib/active_support/cache.rb#582 + # source://activesupport//lib/active_support/cache.rb#732 def cleanup(options = T.unsafe(nil)); end # Clears the entire cache. Be careful with this method since it could @@ -1007,7 +1573,7 @@ class ActiveSupport::Cache::Store # # @raise [NotImplementedError] # - # source://activesupport//lib/active_support/cache.rb#592 + # source://activesupport//lib/active_support/cache.rb#742 def clear(options = T.unsafe(nil)); end # Decrements an integer value in the cache. @@ -1018,14 +1584,15 @@ class ActiveSupport::Cache::Store # # @raise [NotImplementedError] # - # source://activesupport//lib/active_support/cache.rb#573 + # source://activesupport//lib/active_support/cache.rb#723 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#661 def delete(name, options = T.unsafe(nil)); end # Deletes all entries with keys matching the pattern. @@ -1036,14 +1603,15 @@ class ActiveSupport::Cache::Store # # @raise [NotImplementedError] # - # source://activesupport//lib/active_support/cache.rb#555 + # source://activesupport//lib/active_support/cache.rb#705 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#673 def delete_multi(names, options = T.unsafe(nil)); end # Returns +true+ if the cache contains an entry for the given key. @@ -1052,7 +1620,7 @@ class ActiveSupport::Cache::Store # # @return [Boolean] # - # source://activesupport//lib/active_support/cache.rb#537 + # source://activesupport//lib/active_support/cache.rb#687 def exist?(name, options = T.unsafe(nil)); end # Fetches data from the cache, using the given key. If there is data in @@ -1142,7 +1710,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 @@ -1162,7 +1742,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" @@ -1176,7 +1757,7 @@ class ActiveSupport::Cache::Store # # @raise [ArgumentError] # - # source://activesupport//lib/active_support/cache.rb#447 + # source://activesupport//lib/active_support/cache.rb#586 def fetch_multi(*names); end # Increments an integer value in the cache. @@ -1187,28 +1768,34 @@ class ActiveSupport::Cache::Store # # @raise [NotImplementedError] # - # source://activesupport//lib/active_support/cache.rb#564 + # source://activesupport//lib/active_support/cache.rb#714 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#696 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. @@ -1219,13 +1806,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#496 def read(name, options = T.unsafe(nil)); end # Reads multiple values at once from the cache. Options can be passed @@ -1235,22 +1823,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#529 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 @@ -1287,66 +1875,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#648 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#543 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#998 + def _instrument(operation, multi: T.unsafe(nil), options: T.unsafe(nil), **payload, &block); end + + # source://activesupport//lib/active_support/cache.rb#747 + 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#841 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#847 def delete_multi_entries(entries, **options); end - # source://activesupport//lib/active_support/cache.rb#641 + # source://activesupport//lib/active_support/cache.rb#806 def deserialize_entry(payload); 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#961 def expanded_key(key); end - # source://activesupport//lib/active_support/cache.rb#768 + # source://activesupport//lib/active_support/cache.rb#982 def expanded_version(key); end - # source://activesupport//lib/active_support/cache.rb#802 + # source://activesupport//lib/active_support/cache.rb#1035 def get_entry_value(entry, name, options); end - # source://activesupport//lib/active_support/cache.rb#786 + # source://activesupport//lib/active_support/cache.rb#1019 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#881 + def handle_invalid_expires_in(message); end + + # source://activesupport//lib/active_support/cache.rb#990 + def instrument(operation, key, options = T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/cache.rb#994 + 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#770 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#852 def merged_options(call_options); end # Prefix the key with a namespace string: @@ -1359,21 +1956,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#939 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. + # + # @raise [ArgumentError] # - # source://activesupport//lib/active_support/cache.rb#712 + # source://activesupport//lib/active_support/cache.rb#923 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#892 def normalize_options(options); end - # source://activesupport//lib/active_support/cache.rb#764 + # source://activesupport//lib/active_support/cache.rb#978 def normalize_version(key, options = T.unsafe(nil)); end # Reads an entry from the cache implementation. Subclasses must implement @@ -1381,156 +1981,166 @@ class ActiveSupport::Cache::Store # # @raise [NotImplementedError] # - # source://activesupport//lib/active_support/cache.rb#622 + # source://activesupport//lib/active_support/cache.rb#787 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#814 def read_multi_entries(names, **options); end - # source://activesupport//lib/active_support/cache.rb#807 + # source://activesupport//lib/active_support/cache.rb#1040 def save_block_result_to_cache(name, options); end - # source://activesupport//lib/active_support/cache.rb#632 + # source://activesupport//lib/active_support/cache.rb#797 def serialize_entry(entry, **options); end + # source://activesupport//lib/active_support/cache.rb#903 + 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#793 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#833 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#182 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#159 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#178 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#174 def local_cache_key; end - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#122 + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#134 def read_multi_entries(keys, **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#186 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#164 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#150 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 @@ -1561,27 +2171,57 @@ 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) +# source://activesupport//lib/active_support/cache.rb#1050 +class ActiveSupport::Cache::WriteOptions + # @return [WriteOptions] a new instance of WriteOptions + # + # source://activesupport//lib/active_support/cache.rb#1051 + def initialize(options); end + + # source://activesupport//lib/active_support/cache.rb#1072 + def expires_at; end + + # source://activesupport//lib/active_support/cache.rb#1076 + def expires_at=(expires_at); end + + # source://activesupport//lib/active_support/cache.rb#1063 + def expires_in; end + + # source://activesupport//lib/active_support/cache.rb#1067 + def expires_in=(expires_in); end + + # source://activesupport//lib/active_support/cache.rb#1055 + def version; end + + # source://activesupport//lib/active_support/cache.rb#1059 + 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 @@ -1633,7 +2273,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 @@ -1665,8 +2305,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 @@ -1674,7 +2314,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 @@ -1689,13 +2329,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: @@ -1707,69 +2347,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 @@ -1786,199 +2426,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 @@ -1986,53 +2626,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. @@ -2112,17 +2752,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. @@ -2139,7 +2779,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 @@ -2170,13 +2810,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 } @@ -2206,74 +2849,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 # @@ -2388,6 +3031,8 @@ module ActiveSupport::CompareWithRange def include?(value); end end +# = Active Support \Concern +# # A typical module looks like this: # # module M @@ -2403,7 +3048,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" @@ -2460,7 +3105,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" @@ -2495,9 +3140,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. @@ -2521,70 +3166,83 @@ 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 -# source://activesupport//lib/active_support/concurrency/load_interlock_aware_monitor.rb#6 +# source://activesupport//lib/active_support/concurrency/null_lock.rb#4 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. # @@ -2681,10 +3339,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 @@ -2706,18 +3387,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 @@ -2791,19 +3472,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 @@ -2841,6 +3525,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. @@ -2923,7 +3655,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 @@ -2931,36 +3663,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. @@ -2974,91 +3706,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 @@ -3190,36 +3970,43 @@ 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 +# +# \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. # -# source://activesupport//lib/active_support/deprecation.rb#8 +# 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 ::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 @@ -3230,82 +4017,82 @@ class ActiveSupport::Deprecation # # @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 @@ -3313,20 +4100,21 @@ end # You can create a custom behavior or set any from the +DEFAULT_BEHAVIORS+ # constant. Available behaviors are: # -# [+raise+] Raise ActiveSupport::DeprecationException. +# [+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. +# [+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. # -# 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, @@ -3334,56 +4122,61 @@ module ActiveSupport::Deprecation::Behavior # # Available behaviors: # - # [+raise+] Raise ActiveSupport::DeprecationException. + # [+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+. + # [+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 + # 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#109 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 + # 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#117 def disallowed_behavior=(behavior); end private - # source://activesupport//lib/active_support/deprecation/behaviors.rb#112 + # source://activesupport//lib/active_support/deprecation/behaviors.rb#122 def arity_coerce(behavior); end + + # source://activesupport//lib/active_support/deprecation/behaviors.rb#141 + def arity_of_callable(callable); end end # Default warning behaviors per Rails.env. @@ -3395,8 +4188,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 @@ -3408,48 +4200,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) @@ -3459,6 +4252,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 @@ -3474,35 +4270,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 # @@ -3536,18 +4335,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 @@ -3555,11 +4353,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 @@ -3590,6 +4388,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 @@ -3622,11 +4511,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 @@ -3634,26 +4523,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 @@ -3669,41 +4567,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 @@ -3714,36 +4595,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 @@ -3756,18 +4644,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) @@ -3776,9 +4665,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 @@ -3786,7 +4675,7 @@ module ActiveSupport::Deprecation::Reporting private - # source://activesupport//lib/active_support/deprecation/reporting.rb#137 + # source://activesupport//lib/active_support/deprecation/reporting.rb#151 def _extract_callstack(callstack); end # Outputs a deprecation warning message @@ -3798,23 +4687,23 @@ 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 + # source://activesupport//lib/active_support/deprecation/reporting.rb#166 def ignored_callstack(path); end end -# source://activesupport//lib/active_support/deprecation/reporting.rb#150 +# source://activesupport//lib/active_support/deprecation/reporting.rb#164 ActiveSupport::Deprecation::Reporting::RAILS_GEM_ROOT = T.let(T.unsafe(nil), String) # Raised when ActiveSupport::Deprecation::Behavior#behavior is set with :raise. @@ -3823,41 +4712,59 @@ 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+. # -# source://activesupport//lib/active_support/descendants_tracker.rb#9 +# 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#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#70 + def disable_clear!; end + + # source://activesupport//lib/active_support/descendants_tracker.rb#90 + def reject!(classes); end + + # 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#50 - def disable_clear!; end + # source://activesupport//lib/active_support/descendants_tracker.rb#60 + def subclasses; end +end - # @return [Boolean] - # - # source://activesupport//lib/active_support/descendants_tracker.rb#77 - def native?; 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 - # source://activesupport//lib/active_support/descendants_tracker.rb#58 - def subclasses(klass); end - end + def to_a; end end # source://activesupport//lib/active_support/digest.rb#6 @@ -3876,92 +4783,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 @@ -3969,44 +4878,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. @@ -4030,59 +4939,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. @@ -4106,7 +5015,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. @@ -4114,45 +5023,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 @@ -4161,19 +5070,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. @@ -4182,21 +5091,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 @@ -4318,21 +5227,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. @@ -4340,108 +5249,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 @@ -4460,6 +5369,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. # @@ -4482,16 +5393,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(...) @@ -4500,38 +5408,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 @@ -4539,7 +5458,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. @@ -4560,6 +5479,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 @@ -4579,40 +5506,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 @@ -4668,24 +5595,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! @@ -4693,92 +5643,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 @@ -4815,22 +5833,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 @@ -4856,25 +5874,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] @@ -4922,7 +5940,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 @@ -4985,7 +6003,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 @@ -5002,7 +6022,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 @@ -5013,7 +6033,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 @@ -5026,18 +6046,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 @@ -5046,18 +6066,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+ @@ -5068,29 +6088,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 @@ -5117,6 +6140,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. # @@ -5126,32 +6151,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. # @@ -5183,7 +6210,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: # @@ -5191,17 +6218,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 @@ -5214,7 +6241,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: @@ -5224,7 +6251,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 @@ -5237,19 +6264,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 @@ -5263,12 +6290,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 @@ -5281,7 +6308,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. @@ -5293,7 +6320,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. @@ -5301,7 +6328,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 @@ -5309,7 +6336,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 @@ -5323,7 +6350,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 @@ -5336,7 +6363,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: @@ -5348,7 +6375,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: @@ -5360,7 +6387,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: @@ -5372,7 +6399,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: @@ -5384,14 +6411,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: @@ -5408,7 +6435,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 @@ -5423,16 +6450,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. @@ -5440,7 +6467,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 @@ -5450,21 +6477,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: @@ -5474,37 +6501,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: # @@ -5520,7 +6547,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 @@ -5535,7 +6562,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: @@ -5545,7 +6572,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 @@ -5555,15 +6582,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. @@ -5571,29 +6598,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 @@ -5620,12 +6650,14 @@ module ActiveSupport::HtmlSafeTranslation 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 @@ -5652,10 +6684,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.) # @@ -5666,7 +6698,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. @@ -5688,14 +6720,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. @@ -5708,7 +6740,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. @@ -5720,9 +6752,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'. @@ -5731,7 +6772,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. @@ -5760,7 +6801,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 @@ -5772,7 +6813,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 @@ -5785,7 +6826,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 @@ -5798,7 +6839,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 @@ -5828,7 +6869,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. @@ -5844,7 +6885,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. @@ -5870,7 +6911,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 @@ -5887,22 +6928,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. @@ -5914,7 +6955,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 @@ -5989,16 +7030,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 @@ -6011,7 +7052,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, @@ -6020,13 +7061,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 @@ -6046,11 +7089,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 @@ -6103,18 +7146,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 @@ -6125,7 +7168,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 @@ -6137,12 +7180,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 @@ -6153,7 +7196,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 @@ -6161,12 +7204,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 @@ -6174,12 +7217,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. @@ -6188,60 +7231,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. # @@ -6251,30 +7296,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. @@ -6287,25 +7341,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 @@ -6321,14 +7374,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 @@ -6341,12 +7400,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 @@ -6359,80 +7418,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. @@ -6445,72 +7504,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. @@ -6544,9 +7586,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. # @@ -6555,7 +7597,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 @@ -6566,24 +7608,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. @@ -6593,29 +7637,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: @@ -6637,125 +7675,161 @@ 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#130 + def initialize; end + + # source://activesupport//lib/active_support/log_subscriber.rb#143 + 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#160 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#160 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#155 + 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#160 + 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#160 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#135 def logger; end - # source://activesupport//lib/active_support/log_subscriber.rb#120 + # source://activesupport//lib/active_support/log_subscriber.rb#149 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#139 + def silenced?(event); end - # source://activesupport//lib/active_support/log_subscriber.rb#129 + # source://activesupport//lib/active_support/log_subscriber.rb#160 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#160 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#169 + 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#191 def log_exception(name, e); end + # source://activesupport//lib/active_support/log_subscriber.rb#177 + def mode_from(options); end + class << self - # source://activesupport//lib/active_support/log_subscriber.rb#80 + # source://activesupport//lib/active_support/log_subscriber.rb#96 + 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#109 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#104 def log_subscribers; end - # source://activesupport//lib/active_support/log_subscriber.rb#83 + # source://activesupport//lib/active_support/log_subscriber.rb#90 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#102 def logger=(_arg0); end private - # source://activesupport//lib/active_support/log_subscriber.rb#101 + # source://activesupport//lib/active_support/log_subscriber.rb#114 def fetch_public_methods(subscriber, inherit_all); end + + # source://activesupport//lib/active_support/log_subscriber.rb#118 + def set_event_levels; end + + # source://activesupport//lib/active_support/log_subscriber.rb#124 + 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#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 @@ -6765,7 +7839,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 @@ -6775,11 +7849,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) @@ -6801,11 +7870,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 @@ -6820,49 +7889,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. # @@ -6880,7 +7950,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 @@ -6941,10 +8011,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 @@ -6952,171 +8021,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(*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/. + # + # ==== 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/. + # + # ==== 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 # - # @return [MessageEncryptor] a new instance of MessageEncryptor + # [+: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/messages/rotator.rb#6 - def initialize(*secrets, on_rotation: T.unsafe(nil), **options); end + # source://activesupport//lib/active_support/message_encryptor.rb#220 + def encrypt_and_sign(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 + # source://activesupport//lib/active_support/message_encryptor.rb#264 + def inspect; 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 + # source://activesupport//lib/active_support/messages/rotator.rb#23 + def read_message(message, on_rotation: T.unsafe(nil), **options); end private - # source://activesupport//lib/active_support/message_encryptor.rb#186 - def _decrypt(encrypted_message, purpose); end - - # source://activesupport//lib/active_support/message_encryptor.rb#169 - def _encrypt(value, **metadata_options); end + # Returns the value of attribute aead_mode. + # + # source://activesupport//lib/active_support/message_encryptor.rb#371 + def aead_mode; end - # @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 - # 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: -# -# @verifier = ActiveSupport::MessageVerifier.new('s3Krit', digest: 'SHA256') -# -# === Confining messages to a specific purpose +# === Confine 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+. +# 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+. # -# 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 # @@ -7134,41 +8316,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 + # + # [+: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#188 - def generate(value, expires_at: T.unsafe(nil), expires_in: T.unsafe(nil), purpose: T.unsafe(nil)); end + # 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 @@ -7176,19 +8441,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. @@ -7201,114 +8466,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/metadata.rb#58 - def verify(purpose); end + # 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/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 @@ -7330,46 +8699,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/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/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/rotator.rb#36 - def verified(*args, on_rotation: T.unsafe(nil), **options); end + # 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 - # source://activesupport//lib/active_support/messages/rotator.rb#41 - def build_rotation(secret = T.unsafe(nil), options); end + # @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 @@ -7390,6 +8936,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 @@ -7426,7 +8974,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 @@ -7434,19 +8982,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. @@ -7454,7 +9002,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. @@ -7462,7 +9010,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. @@ -7470,7 +9018,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 @@ -7479,25 +9027,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 @@ -7510,7 +9058,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 @@ -7519,7 +9067,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 @@ -7528,10 +9076,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. @@ -7539,7 +9087,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. @@ -7547,27 +9095,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 @@ -7576,7 +9124,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 @@ -7600,12 +9148,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 @@ -7616,7 +9164,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 @@ -7799,7 +9347,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 @@ -7883,31 +9431,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 @@ -7923,76 +9466,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 @@ -8001,27 +9544,40 @@ 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#47 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#50 def initialize; end - # source://activesupport//lib/active_support/notifications/fanout.rb#75 + # source://activesupport//lib/active_support/notifications/fanout.rb#295 + def all_listeners_for(name); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#270 + def build_handle(name, id, payload); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#101 + def clear_cache(key = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#281 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#187 + def groups_for(name); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#59 + def inspect; end - # source://activesupport//lib/active_support/notifications/fanout.rb#108 + # source://activesupport//lib/active_support/notifications/fanout.rb#304 def listeners_for(name); end # @return [Boolean] # - # source://activesupport//lib/active_support/notifications/fanout.rb#117 + # source://activesupport//lib/active_support/notifications/fanout.rb#308 def listening?(name); end # source://mutex_m/0.1.2/mutex_m.rb#93 @@ -8030,154 +9586,253 @@ class ActiveSupport::Notifications::Fanout # source://mutex_m/0.1.2/mutex_m.rb#83 def locked?; end - # source://activesupport//lib/active_support/notifications/fanout.rb#79 + # source://activesupport//lib/active_support/notifications/fanout.rb#287 def publish(name, *args); end - # source://activesupport//lib/active_support/notifications/fanout.rb#83 + # source://activesupport//lib/active_support/notifications/fanout.rb#291 def publish_event(event); end - # source://activesupport//lib/active_support/notifications/fanout.rb#71 + # source://activesupport//lib/active_support/notifications/fanout.rb#274 + def start(name, id, payload); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#64 + 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 + def synchronize(&block); end + + # source://mutex_m/0.1.2/mutex_m.rb#88 + def try_lock; end + + # source://mutex_m/0.1.2/mutex_m.rb#98 + def unlock; end + + # source://activesupport//lib/active_support/notifications/fanout.rb#81 + def unsubscribe(subscriber_or_name); end + + # This is a sync queue, so there is no waiting. + # + # source://activesupport//lib/active_support/notifications/fanout.rb#313 + def wait; end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#113 +class ActiveSupport::Notifications::Fanout::BaseGroup + include ::ActiveSupport::Notifications::FanoutIteration + + # @return [BaseGroup] a new instance of BaseGroup + # + # source://activesupport//lib/active_support/notifications/fanout.rb#116 + def initialize(listeners, name, id, payload); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#120 + def each(&block); end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#125 +class ActiveSupport::Notifications::Fanout::BaseTimeGroup < ::ActiveSupport::Notifications::Fanout::BaseGroup + # source://activesupport//lib/active_support/notifications/fanout.rb#130 + def finish(name, id, payload); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#126 + def start(name, id, payload); end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#166 +class ActiveSupport::Notifications::Fanout::EventObjectGroup < ::ActiveSupport::Notifications::Fanout::BaseGroup + # source://activesupport//lib/active_support/notifications/fanout.rb#172 + def finish(name, id, payload); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#167 + def start(name, id, payload); end + + private + + # source://activesupport//lib/active_support/notifications/fanout.rb#182 + def build_event(name, id, payload); end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#152 +class ActiveSupport::Notifications::Fanout::EventedGroup < ::ActiveSupport::Notifications::Fanout::BaseGroup + # source://activesupport//lib/active_support/notifications/fanout.rb#159 + def finish(name, id, payload); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#153 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#227 +class ActiveSupport::Notifications::Fanout::Handle + # @return [Handle] a new instance of Handle + # + # source://activesupport//lib/active_support/notifications/fanout.rb#228 + def initialize(notifier, name, id, payload); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#247 + def finish; end - # source://activesupport//lib/active_support/notifications/fanout.rb#34 - def subscribe(pattern = T.unsafe(nil), callable = T.unsafe(nil), monotonic: T.unsafe(nil), &block); end + # source://activesupport//lib/active_support/notifications/fanout.rb#251 + def finish_with_values(name, id, payload); end - # source://mutex_m/0.1.2/mutex_m.rb#78 - def synchronize(&block); end + # source://activesupport//lib/active_support/notifications/fanout.rb#238 + def start; end - # source://mutex_m/0.1.2/mutex_m.rb#88 - def try_lock; end + private - # source://mutex_m/0.1.2/mutex_m.rb#98 - def unlock; end + # source://activesupport//lib/active_support/notifications/fanout.rb#261 + def ensure_state!(expected); end +end - # source://activesupport//lib/active_support/notifications/fanout.rb#51 - def unsubscribe(subscriber_or_name); end +# source://activesupport//lib/active_support/notifications/fanout.rb#138 +class ActiveSupport::Notifications::Fanout::MonotonicTimedGroup < ::ActiveSupport::Notifications::Fanout::BaseTimeGroup + private - # This is a sync queue, so there is no waiting. - # - # source://activesupport//lib/active_support/notifications/fanout.rb#122 - def wait; end + # source://activesupport//lib/active_support/notifications/fanout.rb#140 + def now; end end -# source://activesupport//lib/active_support/notifications/fanout.rb#125 +# source://activesupport//lib/active_support/notifications/fanout.rb#316 module ActiveSupport::Notifications::Fanout::Subscribers class << self - # source://activesupport//lib/active_support/notifications/fanout.rb#126 + # source://activesupport//lib/active_support/notifications/fanout.rb#317 def new(pattern, listener, monotonic); end end end -# source://activesupport//lib/active_support/notifications/fanout.rb#257 +# source://activesupport//lib/active_support/notifications/fanout.rb#431 class ActiveSupport::Notifications::Fanout::Subscribers::EventObject < ::ActiveSupport::Notifications::Fanout::Subscribers::Evented - # source://activesupport//lib/active_support/notifications/fanout.rb#265 - def finish(name, id, payload); end + # source://activesupport//lib/active_support/notifications/fanout.rb#432 + def group_class; end - # source://activesupport//lib/active_support/notifications/fanout.rb#273 + # source://activesupport//lib/active_support/notifications/fanout.rb#436 def publish_event(event); end - - # source://activesupport//lib/active_support/notifications/fanout.rb#258 - def start(name, id, payload); end - - private - - # source://activesupport//lib/active_support/notifications/fanout.rb#278 - 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#373 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#376 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#374 + def delegate; end + + # source://activesupport//lib/active_support/notifications/fanout.rb#384 + 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#374 def pattern; end - # source://activesupport//lib/active_support/notifications/fanout.rb#192 + # source://activesupport//lib/active_support/notifications/fanout.rb#388 def publish(name, *args); end - # source://activesupport//lib/active_support/notifications/fanout.rb#198 + # source://activesupport//lib/active_support/notifications/fanout.rb#394 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#374 + def silenceable; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/notifications/fanout.rb#402 + def silenced?(name); end # @return [Boolean] # - # source://activesupport//lib/active_support/notifications/fanout.rb#214 + # source://activesupport//lib/active_support/notifications/fanout.rb#406 def subscribed_to?(name); end - # source://activesupport//lib/active_support/notifications/fanout.rb#218 + # source://activesupport//lib/active_support/notifications/fanout.rb#410 def unsubscribe!(name); end end -# source://activesupport//lib/active_support/notifications/fanout.rb#145 +# source://activesupport//lib/active_support/notifications/fanout.rb#336 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#349 def initialize(pattern); end - # source://activesupport//lib/active_support/notifications/fanout.rb#167 + # source://activesupport//lib/active_support/notifications/fanout.rb#358 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#337 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#337 def pattern; end - # source://activesupport//lib/active_support/notifications/fanout.rb#163 + # source://activesupport//lib/active_support/notifications/fanout.rb#354 def unsubscribe!(name); end class << self - # source://activesupport//lib/active_support/notifications/fanout.rb#148 + # source://activesupport//lib/active_support/notifications/fanout.rb#339 def wrap(pattern); end end end -# source://activesupport//lib/active_support/notifications/fanout.rb#171 +# source://activesupport//lib/active_support/notifications/fanout.rb#362 class ActiveSupport::Notifications::Fanout::Subscribers::Matcher::AllMessages - # source://activesupport//lib/active_support/notifications/fanout.rb#172 + # source://activesupport//lib/active_support/notifications/fanout.rb#363 def ===(name); end - # source://activesupport//lib/active_support/notifications/fanout.rb#176 + # source://activesupport//lib/active_support/notifications/fanout.rb#367 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#425 +class ActiveSupport::Notifications::Fanout::Subscribers::MonotonicTimed < ::ActiveSupport::Notifications::Fanout::Subscribers::Timed + # source://activesupport//lib/active_support/notifications/fanout.rb#426 + def group_class; end end -# source://activesupport//lib/active_support/notifications/fanout.rb#223 +# source://activesupport//lib/active_support/notifications/fanout.rb#415 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#416 + def group_class; end - # source://activesupport//lib/active_support/notifications/fanout.rb#224 + # source://activesupport//lib/active_support/notifications/fanout.rb#420 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#145 +class ActiveSupport::Notifications::Fanout::TimedGroup < ::ActiveSupport::Notifications::Fanout::BaseTimeGroup + private + + # source://activesupport//lib/active_support/notifications/fanout.rb#147 + def now; end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#20 +module ActiveSupport::Notifications::FanoutIteration + # source://activesupport//lib/active_support/notifications/fanout.rb#21 + def iterate_guarding_exceptions(listeners); end end # source://activesupport//lib/active_support/notifications/fanout.rb#10 @@ -8195,24 +9850,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 @@ -8220,23 +9889,54 @@ 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 @@ -8618,97 +10318,95 @@ module ActiveSupport::NumberHelper 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 @@ -8725,7 +10423,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 @@ -8744,7 +10442,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 @@ -8772,10 +10470,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 @@ -8814,10 +10512,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 @@ -8831,42 +10529,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 @@ -8884,10 +10582,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 @@ -8921,6 +10619,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. @@ -9025,9 +10725,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. @@ -9132,7 +10834,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 @@ -9154,7 +10856,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 @@ -9164,9 +10866,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 @@ -9194,6 +10896,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: @@ -9219,23 +10923,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(*keys); 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 @@ -9247,10 +10954,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. # @@ -9281,7 +10990,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+. @@ -9293,131 +11002,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: +# = Active Support Proxy \Object # -# module ActiveRecord -# class RuntimeRegistry -# extend ActiveSupport::PerThreadRegistry -# -# attr_accessor :connection_handler -# end -# end -# -# and invoke the declared instance accessors as class methods. So -# -# 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. # @@ -9426,16 +11075,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. @@ -9445,23 +11100,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 @@ -9481,139 +11143,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 @@ -9624,13 +11288,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 @@ -9646,9 +11310,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. @@ -9686,7 +11350,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. @@ -9704,15 +11368,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 @@ -9724,239 +11388,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. # @@ -9981,26 +11653,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 @@ -10040,6 +11709,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: @@ -10050,26 +11721,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. # @@ -10086,109 +11759,142 @@ 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#45 + def parse_message_for_trace; 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: # @@ -10201,84 +11907,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 @@ -10286,100 +12022,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.20.0/lib/minitest/assertions.rb#735 def assert_no_match(matcher, obj, msg = T.unsafe(nil)); end - # source://minitest/5.18.1/lib/minitest/assertions.rb#664 + # source://minitest/5.20.0/lib/minitest/assertions.rb#664 def assert_not_empty(obj, msg = T.unsafe(nil)); end - # source://minitest/5.18.1/lib/minitest/assertions.rb#675 + # source://minitest/5.20.0/lib/minitest/assertions.rb#675 def assert_not_equal(exp, act, msg = T.unsafe(nil)); end - # source://minitest/5.18.1/lib/minitest/assertions.rb#687 + # source://minitest/5.20.0/lib/minitest/assertions.rb#687 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.20.0/lib/minitest/assertions.rb#699 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.20.0/lib/minitest/assertions.rb#706 def assert_not_includes(collection, obj, msg = T.unsafe(nil)); end - # source://minitest/5.18.1/lib/minitest/assertions.rb#717 + # source://minitest/5.20.0/lib/minitest/assertions.rb#717 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.20.0/lib/minitest/assertions.rb#727 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.20.0/lib/minitest/assertions.rb#745 def assert_not_nil(obj, msg = T.unsafe(nil)); end - # source://minitest/5.18.1/lib/minitest/assertions.rb#780 + # source://minitest/5.20.0/lib/minitest/assertions.rb#780 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.20.0/lib/minitest/assertions.rb#803 def assert_not_predicate(o1, op, msg = T.unsafe(nil)); end - # source://minitest/5.18.1/lib/minitest/assertions.rb#811 + # source://minitest/5.20.0/lib/minitest/assertions.rb#811 def assert_not_respond_to(obj, meth, msg = T.unsafe(nil)); end - # source://minitest/5.18.1/lib/minitest/assertions.rb#820 + # source://minitest/5.20.0/lib/minitest/assertions.rb#820 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.20.0/lib/minitest.rb#307 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 @@ -10414,7 +12145,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) # @@ -10425,7 +12156,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 @@ -10442,7 +12173,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 @@ -10459,7 +12190,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. @@ -10469,7 +12200,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. @@ -10482,12 +12213,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 @@ -10530,7 +12261,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 @@ -10547,7 +12278,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: ... } @@ -10581,7 +12312,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 @@ -10604,7 +12335,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 @@ -10632,12 +12363,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 @@ -10658,12 +12389,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 @@ -10708,6 +12461,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 @@ -10723,6 +12498,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 @@ -10737,54 +12516,162 @@ 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. + # 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. + # + # assert_not_deprecated(CustomDeprecator) do + # CustomDeprecator.warn "message" # fails assertion + # end + # + # assert_not_deprecated(ActiveSupport::Deprecation.new) do + # CustomDeprecator.warn "message" # passes assertion, different deprecator + # end + # + # source://activesupport//lib/active_support/testing/deprecation.rb#54 + def assert_not_deprecated(deprecator = T.unsafe(nil), &block); end + + # 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" + # 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 # - # assert_deprecated do - # ActiveSupport::Deprecation.warn "foo should no longer be used" - # end + # @return [Object] the current value of context + def context; end + + # Sets the attribute context # - # source://activesupport//lib/active_support/testing/deprecation.rb#31 - def assert_deprecated(match = T.unsafe(nil), deprecator = T.unsafe(nil), &block); end + # @param value [Object] the value to set the attribute context to. + # @return [Object] the newly set value + def context=(_); end - # Asserts that no deprecation warnings are emitted by the given deprecator during the execution of the yielded block. + # Returns the value of attribute error # - # assert_not_deprecated(CustomDeprecator) do - # CustomDeprecator.warn "message" # fails assertion - # end + # @return [Object] the current value of error + def error; end + + # Sets the attribute error # - # If no +deprecator+ is given, defaults to ActiveSupport::Deprecation. + # @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 # - # assert_not_deprecated do - # ActiveSupport::Deprecation.warn "message" # fails assertion - # end + # @return [Object] the current value of handled + def handled; end + + # Sets the attribute handled # - # assert_not_deprecated do - # CustomDeprecator.warn "message" # passes assertion - # end + # @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 # - # source://activesupport//lib/active_support/testing/deprecation.rb#56 - def assert_not_deprecated(deprecator = T.unsafe(nil), &block); end + # @return [Object] the current value of handled + def handled?; end - # Returns an array of all the deprecation warnings emitted by the given - # +deprecator+ during the execution of the yielded block. + # Returns the value of attribute severity # - # collect_deprecations(CustomDeprecator) do - # CustomDeprecator.warn "message" - # end # => ["message"] + # @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. @@ -10849,7 +12736,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 @@ -10978,7 +12865,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. @@ -10986,7 +12873,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. @@ -10994,7 +12881,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. @@ -11004,32 +12891,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 @@ -11076,11 +12968,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 @@ -11091,36 +12983,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 # @@ -11197,12 +13089,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 @@ -11219,13 +13111,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#252 + 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 @@ -11241,8 +13138,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+. @@ -11268,10 +13165,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#226 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. # @@ -11292,7 +13189,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: @@ -11303,8 +13201,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+. @@ -11330,27 +13228,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#226 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#261 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#261 def in_block=(_arg0); end - # source://activesupport//lib/active_support/testing/time_helpers.rb#239 + # source://activesupport//lib/active_support/testing/time_helpers.rb#257 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. @@ -11383,14 +13283,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 @@ -11410,7 +13310,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 @@ -11436,19 +13336,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 @@ -11473,7 +13373,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 @@ -11496,7 +13396,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. @@ -11512,7 +13412,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 @@ -11522,14 +13422,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 @@ -11550,15 +13450,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 @@ -11570,17 +13470,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 @@ -11592,32 +13492,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. @@ -11629,28 +13529,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 @@ -11658,7 +13558,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 @@ -11678,29 +13578,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 @@ -11712,7 +13612,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 @@ -11720,43 +13620,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 @@ -11764,22 +13664,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 @@ -11787,7 +13687,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 @@ -11795,7 +13695,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 @@ -11803,7 +13703,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 @@ -11811,7 +13711,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 @@ -11819,10 +13719,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 @@ -11842,23 +13742,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 @@ -11867,10 +13767,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 @@ -11878,7 +13778,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 @@ -11886,7 +13786,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. @@ -11896,9 +13796,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. @@ -11908,9 +13808,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 @@ -11918,7 +13818,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 @@ -11926,19 +13826,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 @@ -11946,7 +13846,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 @@ -11954,7 +13854,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 @@ -11962,15 +13862,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. @@ -11982,15 +13882,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 @@ -11998,13 +13898,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 @@ -12012,7 +13912,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. @@ -12020,20 +13920,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 @@ -12041,44 +13941,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: @@ -12090,7 +13982,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 @@ -12101,19 +13993,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 @@ -12128,10 +14020,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 @@ -12141,10 +14033,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 @@ -12161,7 +14053,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 @@ -12170,13 +14062,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+ @@ -12184,12 +14076,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 @@ -12198,7 +14090,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 @@ -12220,22 +14112,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 @@ -12253,7 +14145,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. @@ -12277,32 +14169,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 @@ -12313,22 +14205,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 @@ -12338,35 +14230,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 @@ -12374,34 +14266,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 @@ -12509,10 +14401,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 @@ -12690,11 +14582,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. @@ -12704,7 +14596,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. @@ -12874,9 +14766,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" @@ -12903,6 +14792,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. # @@ -12941,9 +14833,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. # @@ -13074,7 +14963,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. @@ -13130,14 +15019,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 @@ -13149,15 +15034,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. # @@ -13255,8 +15142,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 @@ -13309,7 +15213,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) @@ -13383,7 +15287,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) @@ -13414,7 +15318,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) @@ -13423,6 +15327,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. @@ -13479,9 +15386,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+). # @@ -13497,7 +15401,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 @@ -13506,7 +15410,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 @@ -13564,9 +15468,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 @@ -13581,28 +15482,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. @@ -13636,7 +15537,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. @@ -13649,13 +15550,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. @@ -13676,13 +15577,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. @@ -13723,7 +15624,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. @@ -13736,7 +15637,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. @@ -13753,13 +15654,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. @@ -13780,13 +15681,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. @@ -13798,12 +15699,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. @@ -13811,23 +15712,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. @@ -13853,12 +15754,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. @@ -13878,12 +15779,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. @@ -13920,12 +15821,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. @@ -13933,18 +15834,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. @@ -14000,16 +15911,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 @@ -14111,7 +16022,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). @@ -14227,7 +16138,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. @@ -14268,7 +16179,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. @@ -14298,12 +16209,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. @@ -14338,9 +16249,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. @@ -14403,12 +16317,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 @@ -14419,7 +16330,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. @@ -14444,10 +16355,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 @@ -14459,7 +16370,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 @@ -14471,9 +16382,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 @@ -14482,12 +16390,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. @@ -14495,27 +16397,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 @@ -14532,27 +16434,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. # @@ -14562,7 +16450,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 @@ -14621,15 +16509,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') @@ -14637,26 +16519,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. @@ -14667,7 +16537,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 @@ -14726,13 +16596,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. @@ -14742,43 +16615,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. @@ -14795,7 +16668,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 @@ -14803,7 +16676,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. @@ -14817,7 +16690,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 @@ -14829,7 +16702,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. @@ -14840,7 +16713,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 @@ -14852,7 +16725,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 @@ -14869,7 +16742,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 @@ -14879,7 +16752,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. @@ -14887,7 +16760,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. @@ -14895,7 +16768,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. @@ -14906,7 +16779,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. @@ -14917,7 +16790,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 @@ -14927,31 +16800,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" @@ -14963,7 +16814,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 @@ -14973,15 +16824,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: @@ -15028,26 +16879,23 @@ 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 # Validates all keys in a hash match *valid_keys, raising @@ -15065,7 +16913,7 @@ class Hash # 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. @@ -15075,7 +16923,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. @@ -15090,28 +16938,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 @@ -15411,7 +17249,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. # @@ -15510,7 +17348,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: @@ -15565,13 +17403,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. @@ -15579,20 +17414,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 @@ -15707,16 +17545,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. # @@ -15732,9 +17569,6 @@ 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 - # Returns a Duration instance matching the number of years provided. # # 2.years # => 2 years @@ -15750,8 +17584,6 @@ class Integer < ::Numeric def years; end end -Integer::GMP_VERSION = T.let(T.unsafe(nil), String) - # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#3 module Kernel private @@ -15831,17 +17663,8 @@ module Kernel end end -# source://activesupport//lib/active_support/core_ext/load_error.rb#3 class LoadError < ::ScriptError include ::DidYouMean::Correctable - - # Returns true if the given path name (except perhaps for the ".rb" - # extension) is the missing file which caused the exception to be raised. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/load_error.rb#6 - def is_missing?(location); end end # source://activesupport//lib/active_support/core_ext/object/duplicable.rb#31 @@ -16005,6 +17828,7 @@ class Module # # module HairColors # mattr_accessor :hair_colors, default: [:brown, :black, :blonde, :red] + # mattr_accessor(:hair_styles) { [:long, :short] } # end # # class Person @@ -16012,8 +17836,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. @@ -16053,6 +17878,7 @@ class Module # # module HairColors # mattr_reader :hair_colors, default: [:brown, :black, :blonde, :red] + # mattr_reader(:hair_styles) { [:long, :short] } # end # # class Person @@ -16060,10 +17886,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 @@ -16101,6 +17928,7 @@ class Module # # module HairColors # mattr_writer :hair_colors, default: [:brown, :black, :blonde, :red] + # mattr_writer(:hair_styles) { [:long, :short] } # end # # class Person @@ -16108,12 +17936,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. # @@ -16318,20 +18157,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) @@ -16340,8 +18174,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 @@ -16400,6 +18234,7 @@ class Module # # module HairColors # mattr_accessor :hair_colors, default: [:brown, :black, :blonde, :red] + # mattr_accessor(:hair_styles) { [:long, :short] } # end # # class Person @@ -16407,8 +18242,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. @@ -16448,6 +18284,7 @@ class Module # # module HairColors # mattr_reader :hair_colors, default: [:brown, :black, :blonde, :red] + # mattr_reader(:hair_styles) { [:long, :short] } # end # # class Person @@ -16455,10 +18292,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 @@ -16496,6 +18334,7 @@ class Module # # module HairColors # mattr_writer :hair_colors, default: [:brown, :black, :blonde, :red] + # mattr_writer(:hair_styles) { [:long, :short] } # end # # class Person @@ -16503,10 +18342,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 @@ -16528,14 +18368,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 @@ -16551,7 +18391,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 @@ -16625,7 +18465,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. @@ -16677,8 +18521,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. # @@ -16722,7 +18566,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. @@ -16774,8 +18622,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 @@ -16989,7 +18837,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: @@ -17032,7 +18880,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: @@ -17049,14 +18897,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. @@ -17077,14 +18925,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. @@ -17105,14 +18953,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. @@ -17131,7 +18979,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. @@ -17147,28 +18995,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. @@ -17189,14 +19037,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. @@ -17217,14 +19065,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. @@ -17240,6 +19088,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 @@ -17260,6 +19122,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: # @@ -17365,21 +19230,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 @@ -17406,7 +19274,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+. @@ -17438,7 +19306,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. @@ -17459,11 +19327,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: # @@ -17549,9 +19441,9 @@ 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 end @@ -17564,16 +19456,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 @@ -17581,7 +19472,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 @@ -17590,13 +19481,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 @@ -17605,16 +19499,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/enumerable.rb#236 + def sum(initial_value = T.unsafe(nil)); end - # source://activesupport//lib/active_support/core_ext/range/deprecated_conversions.rb#6 - def to_s(format = T.unsafe(nil)); end + private + + # @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. @@ -17631,48 +19529,6 @@ 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 - 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 - def base58(n = T.unsafe(nil)); end - end -end - -# source://activesupport//lib/active_support/core_ext/securerandom.rb#7 -SecureRandom::BASE36_ALPHABET = T.let(T.unsafe(nil), Array) - -# source://activesupport//lib/active_support/core_ext/securerandom.rb#6 -SecureRandom::BASE58_ALPHABET = T.let(T.unsafe(nil), Array) - # source://activesupport//lib/active_support/core_ext/object/duplicable.rb#53 module Singleton mixes_in_class_methods ::Singleton::SingletonClassMethods @@ -17703,7 +19559,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 @@ -17781,7 +19637,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+.) # @@ -17844,6 +19700,17 @@ 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 + # 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. @@ -17868,7 +19735,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. @@ -17894,10 +19761,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. # @@ -18195,7 +20062,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" @@ -18209,7 +20076,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. @@ -18226,7 +20093,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. @@ -18297,7 +20164,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..." @@ -18310,16 +20177,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. @@ -18332,10 +20203,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): # @@ -18352,7 +20225,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. @@ -18367,7 +20240,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" @@ -18385,22 +20258,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 @@ -18408,20 +20295,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?. @@ -18447,80 +20334,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: @@ -18553,34 +20440,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 @@ -18594,73 +20481,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+ @@ -18690,9 +20577,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. @@ -18751,9 +20641,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+. # @@ -18862,10 +20749,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: @@ -18905,12 +20792,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: @@ -18928,12 +20812,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.4.rbi b/sorbet/rbi/gems/addressable@2.8.5.rbi similarity index 92% rename from sorbet/rbi/gems/addressable@2.8.4.rbi rename to sorbet/rbi/gems/addressable@2.8.5.rbi index 7d2a47ea0..932b611ea 100644 --- a/sorbet/rbi/gems/addressable@2.8.4.rbi +++ b/sorbet/rbi/gems/addressable@2.8.5.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#823 + # source://addressable//lib/addressable/uri.rb#819 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#1882 + # source://addressable//lib/addressable/uri.rb#1878 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#2232 + # source://addressable//lib/addressable/uri.rb#2228 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#2210 + # source://addressable//lib/addressable/uri.rb#2206 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#1872 + # source://addressable//lib/addressable/uri.rb#1868 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#1227 + # source://addressable//lib/addressable/uri.rb#1223 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#1267 + # source://addressable//lib/addressable/uri.rb#1263 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#1581 + # source://addressable//lib/addressable/uri.rb#1577 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#1447 + # source://addressable//lib/addressable/uri.rb#1443 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#2389 + # source://addressable//lib/addressable/uri.rb#2385 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#2194 + # source://addressable//lib/addressable/uri.rb#2190 def display_uri; end # Returns the public suffix domain for this host. @@ -886,23 +886,26 @@ class Addressable::URI # @example # Addressable::URI.parse("http://www.example.co.uk").domain # => "example.co.uk" # - # source://addressable//lib/addressable/uri.rb#1218 + # source://addressable//lib/addressable/uri.rb#1214 def domain; end # Clones the URI object. # # @return [Addressable::URI] The cloned URI. # - # source://addressable//lib/addressable/uri.rb#2264 + # source://addressable//lib/addressable/uri.rb#2260 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#2326 + # source://addressable//lib/addressable/uri.rb#2322 def empty?; end + # source://addressable//lib/addressable/uri.rb#2395 + def encode_with(coder); end + # Returns true if the URI objects are equal. This method # does NOT normalize either URI before doing the comparison. # @@ -910,7 +913,7 @@ class Addressable::URI # @return [TrueClass, FalseClass] true if the URIs are equivalent, false # otherwise. # - # source://addressable//lib/addressable/uri.rb#2246 + # source://addressable//lib/addressable/uri.rb#2242 def eql?(uri); end # The extname, if any, of the file in the path component. @@ -918,28 +921,28 @@ class Addressable::URI # # @return [String] The path's extname. # - # source://addressable//lib/addressable/uri.rb#1591 + # source://addressable//lib/addressable/uri.rb#1587 def extname; end # The fragment component for this URI. # # @return [String] The fragment component. # - # source://addressable//lib/addressable/uri.rb#1803 + # source://addressable//lib/addressable/uri.rb#1799 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#1828 + # source://addressable//lib/addressable/uri.rb#1824 def fragment=(new_fragment); end # Freeze URI, initializing instance variables. # # @return [Addressable::URI] The frozen URI object. # - # source://addressable//lib/addressable/uri.rb#863 + # source://addressable//lib/addressable/uri.rb#859 def freeze; end # A hash value that will make a URI equivalent to its normalized @@ -947,21 +950,21 @@ class Addressable::URI # # @return [Integer] A hash of the URI. # - # source://addressable//lib/addressable/uri.rb#2256 + # source://addressable//lib/addressable/uri.rb#2252 def hash; end # The host component for this URI. # # @return [String] The host component. # - # source://addressable//lib/addressable/uri.rb#1113 + # source://addressable//lib/addressable/uri.rb#1109 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#1149 + # source://addressable//lib/addressable/uri.rb#1145 def host=(new_host); end # This method is same as URI::Generic#host except @@ -970,7 +973,7 @@ class Addressable::URI # @return [String] The hostname for this URI. # @see Addressable::URI#host # - # source://addressable//lib/addressable/uri.rb#1171 + # source://addressable//lib/addressable/uri.rb#1167 def hostname; end # This method is same as URI::Generic#host= except @@ -979,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#1183 + # source://addressable//lib/addressable/uri.rb#1179 def hostname=(new_hostname); end # The inferred port component for this URI. @@ -988,14 +991,17 @@ class Addressable::URI # # @return [Integer] The inferred port component. # - # source://addressable//lib/addressable/uri.rb#1433 + # source://addressable//lib/addressable/uri.rb#1429 def inferred_port; end + # source://addressable//lib/addressable/uri.rb#2406 + 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#2377 + # source://addressable//lib/addressable/uri.rb#2373 def inspect; end # Determines if the scheme indicates an IP-based protocol. @@ -1003,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#1848 + # source://addressable//lib/addressable/uri.rb#1844 def ip_based?; end # Joins two URIs together. @@ -1011,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#1882 + # source://addressable//lib/addressable/uri.rb#1878 def join(uri); end # Destructive form of join. @@ -1020,7 +1026,7 @@ class Addressable::URI # @return [Addressable::URI] The joined URI. # @see Addressable::URI#join # - # source://addressable//lib/addressable/uri.rb#1985 + # source://addressable//lib/addressable/uri.rb#1981 def join!(uri); end # Merges a URI with a Hash of components. @@ -1032,7 +1038,7 @@ class Addressable::URI # @return [Addressable::URI] The merged URI. # @see Hash#merge # - # source://addressable//lib/addressable/uri.rb#2000 + # source://addressable//lib/addressable/uri.rb#1996 def merge(hash); end # Destructive form of merge. @@ -1041,7 +1047,7 @@ class Addressable::URI # @return [Addressable::URI] The merged URI. # @see Addressable::URI#merge # - # source://addressable//lib/addressable/uri.rb#2065 + # source://addressable//lib/addressable/uri.rb#2061 def merge!(uri); end # Returns a normalized URI object. @@ -1054,7 +1060,7 @@ class Addressable::URI # # @return [Addressable::URI] The normalized URI. # - # source://addressable//lib/addressable/uri.rb#2157 + # source://addressable//lib/addressable/uri.rb#2153 def normalize; end # Destructively normalizes this URI object. @@ -1062,63 +1068,63 @@ class Addressable::URI # @return [Addressable::URI] The normalized URI. # @see Addressable::URI#normalize # - # source://addressable//lib/addressable/uri.rb#2183 + # source://addressable//lib/addressable/uri.rb#2179 def normalize!; end # The authority component for this URI, normalized. # # @return [String] The authority component, normalized. # - # source://addressable//lib/addressable/uri.rb#1245 + # source://addressable//lib/addressable/uri.rb#1241 def normalized_authority; end # The fragment component for this URI, normalized. # # @return [String] The fragment component, normalized. # - # source://addressable//lib/addressable/uri.rb#1809 + # source://addressable//lib/addressable/uri.rb#1805 def normalized_fragment; end # The host component for this URI, normalized. # # @return [String] The host component, normalized. # - # source://addressable//lib/addressable/uri.rb#1119 + # source://addressable//lib/addressable/uri.rb#1115 def normalized_host; end # The password component for this URI, normalized. # # @return [String] The password component, normalized. # - # source://addressable//lib/addressable/uri.rb#995 + # source://addressable//lib/addressable/uri.rb#991 def normalized_password; end # The path component for this URI, normalized. # # @return [String] The path component, normalized. # - # source://addressable//lib/addressable/uri.rb#1528 + # source://addressable//lib/addressable/uri.rb#1524 def normalized_path; end # The port component for this URI, normalized. # # @return [Integer] The port component, normalized. # - # source://addressable//lib/addressable/uri.rb#1385 + # source://addressable//lib/addressable/uri.rb#1381 def normalized_port; end # The query component for this URI, normalized. # # @return [String] The query component, normalized. # - # source://addressable//lib/addressable/uri.rb#1606 + # source://addressable//lib/addressable/uri.rb#1602 def normalized_query(*flags); end # The scheme component for this URI, normalized. # # @return [String] The scheme component, normalized. # - # source://addressable//lib/addressable/uri.rb#889 + # source://addressable//lib/addressable/uri.rb#885 def normalized_scheme; end # The normalized combination of components that represent a site. @@ -1130,21 +1136,21 @@ class Addressable::URI # # @return [String] The normalized components that identify a site. # - # source://addressable//lib/addressable/uri.rb#1478 + # source://addressable//lib/addressable/uri.rb#1474 def normalized_site; end # The user component for this URI, normalized. # # @return [String] The user component, normalized. # - # source://addressable//lib/addressable/uri.rb#940 + # source://addressable//lib/addressable/uri.rb#936 def normalized_user; end # The userinfo component for this URI, normalized. # # @return [String] The userinfo component, normalized. # - # source://addressable//lib/addressable/uri.rb#1061 + # source://addressable//lib/addressable/uri.rb#1057 def normalized_userinfo; end # Omits components from a URI. @@ -1157,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#2290 + # source://addressable//lib/addressable/uri.rb#2286 def omit(*components); end # Destructive form of omit. @@ -1166,7 +1172,7 @@ class Addressable::URI # @return [Addressable::URI] The URI with components omitted. # @see Addressable::URI#omit # - # source://addressable//lib/addressable/uri.rb#2317 + # source://addressable//lib/addressable/uri.rb#2313 def omit!(*components); end # The origin for this URI, serialized to ASCII, as per @@ -1174,7 +1180,7 @@ class Addressable::URI # # @return [String] The serialized origin. # - # source://addressable//lib/addressable/uri.rb#1307 + # source://addressable//lib/addressable/uri.rb#1303 def origin; end # Sets the origin for this URI, serialized to ASCII, as per @@ -1183,35 +1189,35 @@ class Addressable::URI # # @param new_origin [String, #to_str] The new origin component. # - # source://addressable//lib/addressable/uri.rb#1326 + # source://addressable//lib/addressable/uri.rb#1322 def origin=(new_origin); end # The password component for this URI. # # @return [String] The password component. # - # source://addressable//lib/addressable/uri.rb#989 + # source://addressable//lib/addressable/uri.rb#985 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#1018 + # source://addressable//lib/addressable/uri.rb#1014 def password=(new_password); end # The path component for this URI. # # @return [String] The path component. # - # source://addressable//lib/addressable/uri.rb#1521 + # source://addressable//lib/addressable/uri.rb#1517 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#1560 + # source://addressable//lib/addressable/uri.rb#1556 def path=(new_path); end # The port component for this URI. @@ -1220,28 +1226,28 @@ class Addressable::URI # # @return [Integer] The port component. # - # source://addressable//lib/addressable/uri.rb#1379 + # source://addressable//lib/addressable/uri.rb#1375 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#1401 + # source://addressable//lib/addressable/uri.rb#1397 def port=(new_port); end # The query component for this URI. # # @return [String] The query component. # - # source://addressable//lib/addressable/uri.rb#1600 + # source://addressable//lib/addressable/uri.rb#1596 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#1634 + # source://addressable//lib/addressable/uri.rb#1630 def query=(new_query); end # Converts the query component to a Hash value. @@ -1262,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#1665 + # source://addressable//lib/addressable/uri.rb#1661 def query_values(return_type = T.unsafe(nil)); end # Sets the query component for this URI from a Hash object. @@ -1283,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#1716 + # source://addressable//lib/addressable/uri.rb#1712 def query_values=(new_query_values); end # Determines if the URI is relative. @@ -1291,7 +1297,7 @@ class Addressable::URI # @return [TrueClass, FalseClass] true if the URI is relative. false # otherwise. # - # source://addressable//lib/addressable/uri.rb#1862 + # source://addressable//lib/addressable/uri.rb#1858 def relative?; end # The HTTP request URI for this URI. This is the path and the @@ -1299,14 +1305,14 @@ class Addressable::URI # # @return [String] The request URI required for an HTTP request. # - # source://addressable//lib/addressable/uri.rb#1767 + # source://addressable//lib/addressable/uri.rb#1763 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#1779 + # source://addressable//lib/addressable/uri.rb#1775 def request_uri=(new_request_uri); end # Returns the shortest normalized relative form of this URI that uses the @@ -1316,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#2078 + # source://addressable//lib/addressable/uri.rb#2074 def route_from(uri); end # Returns the shortest normalized relative form of the supplied URI that @@ -1326,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#2143 + # source://addressable//lib/addressable/uri.rb#2139 def route_to(uri); end # The scheme component for this URI. # # @return [String] The scheme component. # - # source://addressable//lib/addressable/uri.rb#883 + # source://addressable//lib/addressable/uri.rb#879 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#910 + # source://addressable//lib/addressable/uri.rb#906 def scheme=(new_scheme); end # The combination of components that represent a site. @@ -1352,14 +1358,14 @@ class Addressable::URI # # @return [String] The components that identify a site. # - # source://addressable//lib/addressable/uri.rb#1460 + # source://addressable//lib/addressable/uri.rb#1456 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#1499 + # source://addressable//lib/addressable/uri.rb#1495 def site=(new_site); end # Returns the top-level domain for this host. @@ -1367,28 +1373,28 @@ class Addressable::URI # @example # Addressable::URI.parse("http://www.example.co.uk").tld # => "co.uk" # - # source://addressable//lib/addressable/uri.rb#1200 + # source://addressable//lib/addressable/uri.rb#1196 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#1208 + # source://addressable//lib/addressable/uri.rb#1204 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#2360 + # source://addressable//lib/addressable/uri.rb#2356 def to_hash; end # Converts the URI to a String. # # @return [String] The URI's String representation. # - # source://addressable//lib/addressable/uri.rb#2334 + # source://addressable//lib/addressable/uri.rb#2330 def to_s; end # Converts the URI to a String. @@ -1396,21 +1402,21 @@ class Addressable::URI # # @return [String] The URI's String representation. # - # source://addressable//lib/addressable/uri.rb#2334 + # source://addressable//lib/addressable/uri.rb#2330 def to_str; end # The user component for this URI. # # @return [String] The user component. # - # source://addressable//lib/addressable/uri.rb#934 + # source://addressable//lib/addressable/uri.rb#930 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#963 + # source://addressable//lib/addressable/uri.rb#959 def user=(new_user); end # The userinfo component for this URI. @@ -1418,14 +1424,14 @@ class Addressable::URI # # @return [String] The userinfo component. # - # source://addressable//lib/addressable/uri.rb#1045 + # source://addressable//lib/addressable/uri.rb#1041 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#1084 + # source://addressable//lib/addressable/uri.rb#1080 def userinfo=(new_userinfo); end protected @@ -1434,14 +1440,14 @@ class Addressable::URI # # @api private # - # source://addressable//lib/addressable/uri.rb#2535 + # source://addressable//lib/addressable/uri.rb#2550 def force_utf8_encoding_if_needed(str); end # Resets composite values for the entire URI # # @api private # - # source://addressable//lib/addressable/uri.rb#2526 + # source://addressable//lib/addressable/uri.rb#2541 def remove_composite_values; end # Replaces the internal state of self with the specified URI's state. @@ -1450,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#2493 + # source://addressable//lib/addressable/uri.rb#2508 def replace_self(uri); end # Splits path string with "/" (slash). @@ -1460,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#2516 + # source://addressable//lib/addressable/uri.rb#2531 def split_path(path); end # Ensures that the URI is valid. # - # source://addressable//lib/addressable/uri.rb#2450 + # source://addressable//lib/addressable/uri.rb#2465 def validate; end private @@ -1474,7 +1480,7 @@ class Addressable::URI # # @api private # - # source://addressable//lib/addressable/uri.rb#2547 + # source://addressable//lib/addressable/uri.rb#2562 def reset_ivs; end class << self @@ -1517,7 +1523,7 @@ class Addressable::URI # The return type is determined by the return_type # parameter. # - # source://addressable//lib/addressable/uri.rb#609 + # source://addressable//lib/addressable/uri.rb#605 def encode(uri, return_type = T.unsafe(nil)); end # Percent encodes a URI component. @@ -1550,7 +1556,7 @@ class Addressable::URI # character_class. # @return [String] The encoded component. # - # source://addressable//lib/addressable/uri.rb#394 + # source://addressable//lib/addressable/uri.rb#390 def encode_component(component, character_class = T.unsafe(nil), upcase_encoded = T.unsafe(nil)); end # Percent encodes any special characters in the URI. @@ -1564,7 +1570,7 @@ class Addressable::URI # The return type is determined by the return_type # parameter. # - # source://addressable//lib/addressable/uri.rb#609 + # source://addressable//lib/addressable/uri.rb#605 def escape(uri, return_type = T.unsafe(nil)); end # Percent encodes a URI component. @@ -1597,7 +1603,7 @@ class Addressable::URI # character_class. # @return [String] The encoded component. # - # source://addressable//lib/addressable/uri.rb#394 + # source://addressable//lib/addressable/uri.rb#390 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 @@ -1608,7 +1614,7 @@ class Addressable::URI # Defaults to false. # @return [String] The encoded value. # - # source://addressable//lib/addressable/uri.rb#733 + # source://addressable//lib/addressable/uri.rb#729 def form_encode(form_values, sort = T.unsafe(nil)); end # Decodes a String according to the rules for the @@ -1619,7 +1625,7 @@ class Addressable::URI # This is not a Hash because of the possibility for # duplicate keys. # - # source://addressable//lib/addressable/uri.rb#786 + # source://addressable//lib/addressable/uri.rb#782 def form_unencode(encoded_value); end # Converts an input to a URI. The input does not have to be a valid @@ -1640,7 +1646,7 @@ class Addressable::URI # use a similar URI form: # //:@:/ # - # source://addressable//lib/addressable/uri.rb#1362 + # source://addressable//lib/addressable/uri.rb#1358 def ip_based_schemes; end # Joins several URIs together. @@ -1695,7 +1701,7 @@ class Addressable::URI # normalized to "%2F") but otherwise left alone. # @return [String] The normalized component. # - # source://addressable//lib/addressable/uri.rb#544 + # source://addressable//lib/addressable/uri.rb#541 def normalize_component(component, character_class = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end # Resolves paths to their simplest form. @@ -1703,7 +1709,7 @@ class Addressable::URI # @param path [String] The path to normalize. # @return [String] The normalized path. # - # source://addressable//lib/addressable/uri.rb#2414 + # source://addressable//lib/addressable/uri.rb#2429 def normalize_path(path); end # Normalizes the encoding of a URI. Characters within a hostname are @@ -1718,7 +1724,7 @@ class Addressable::URI # The return type is determined by the return_type # parameter. # - # source://addressable//lib/addressable/uri.rb#664 + # source://addressable//lib/addressable/uri.rb#660 def normalized_encode(uri, return_type = T.unsafe(nil)); end # Returns a URI object based on the parsed string. @@ -1735,7 +1741,7 @@ class Addressable::URI # numbers. Adding new schemes to this hash, as necessary, will allow # for better URI normalization. # - # source://addressable//lib/addressable/uri.rb#1369 + # source://addressable//lib/addressable/uri.rb#1365 def port_mapping; end # Unencodes any percent encoded characters within a URI component. @@ -1754,7 +1760,7 @@ class Addressable::URI # The return type is determined by the return_type # parameter. # - # source://addressable//lib/addressable/uri.rb#464 + # source://addressable//lib/addressable/uri.rb#461 def unencode(uri, return_type = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end # Unencodes any percent encoded characters within a URI component. @@ -1773,7 +1779,7 @@ class Addressable::URI # The return type is determined by the return_type # parameter. # - # source://addressable//lib/addressable/uri.rb#464 + # source://addressable//lib/addressable/uri.rb#461 def unencode_component(uri, return_type = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end # Unencodes any percent encoded characters within a URI component. @@ -1792,7 +1798,7 @@ class Addressable::URI # The return type is determined by the return_type # parameter. # - # source://addressable//lib/addressable/uri.rb#464 + # source://addressable//lib/addressable/uri.rb#461 def unescape(uri, return_type = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end # Unencodes any percent encoded characters within a URI component. @@ -1811,7 +1817,7 @@ class Addressable::URI # The return type is determined by the return_type # parameter. # - # source://addressable//lib/addressable/uri.rb#464 + # source://addressable//lib/addressable/uri.rb#461 def unescape_component(uri, return_type = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end end end @@ -1875,10 +1881,10 @@ 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#2572 -Addressable::URI::NONE = T.let(T.unsafe(nil), Object) +# source://addressable//lib/addressable/uri.rb#2587 +module Addressable::URI::NONE; end -# source://addressable//lib/addressable/uri.rb#1523 +# source://addressable//lib/addressable/uri.rb#1519 Addressable::URI::NORMPATH = T.let(T.unsafe(nil), Regexp) # source://addressable//lib/addressable/uri.rb#62 @@ -1902,35 +1908,35 @@ Addressable::URI::NormalizeCharacterClasses::SCHEME = T.let(T.unsafe(nil), Regex # source://addressable//lib/addressable/uri.rb#64 Addressable::URI::NormalizeCharacterClasses::UNRESERVED = T.let(T.unsafe(nil), Regexp) -# source://addressable//lib/addressable/uri.rb#2401 +# source://addressable//lib/addressable/uri.rb#2416 Addressable::URI::PARENT = T.let(T.unsafe(nil), String) # source://addressable//lib/addressable/uri.rb#76 Addressable::URI::PORT_MAPPING = T.let(T.unsafe(nil), Hash) -# source://addressable//lib/addressable/uri.rb#2403 +# source://addressable//lib/addressable/uri.rb#2418 Addressable::URI::RULE_2A = T.let(T.unsafe(nil), Regexp) -# source://addressable//lib/addressable/uri.rb#2404 +# source://addressable//lib/addressable/uri.rb#2419 Addressable::URI::RULE_2B_2C = T.let(T.unsafe(nil), Regexp) -# source://addressable//lib/addressable/uri.rb#2405 +# source://addressable//lib/addressable/uri.rb#2420 Addressable::URI::RULE_2D = T.let(T.unsafe(nil), Regexp) -# source://addressable//lib/addressable/uri.rb#2406 +# source://addressable//lib/addressable/uri.rb#2421 Addressable::URI::RULE_PREFIXED_PARENT = T.let(T.unsafe(nil), Regexp) -# source://addressable//lib/addressable/uri.rb#2400 +# source://addressable//lib/addressable/uri.rb#2415 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 -Addressable::URI::SEQUENCE_ENCODING_TABLE = T.let(T.unsafe(nil), Hash) +Addressable::URI::SEQUENCE_ENCODING_TABLE = T.let(T.unsafe(nil), Array) -# source://addressable//lib/addressable/uri.rb#353 -Addressable::URI::SEQUENCE_UPCASED_PERCENT_ENCODING_TABLE = T.let(T.unsafe(nil), Hash) +# source://addressable//lib/addressable/uri.rb#351 +Addressable::URI::SEQUENCE_UPCASED_PERCENT_ENCODING_TABLE = T.let(T.unsafe(nil), Array) # source://addressable//lib/addressable/uri.rb#71 Addressable::URI::SLASH = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/appraisal@2.4.1-b200e636903700098bef25f4f51dbc4c46e4c04c.rbi b/sorbet/rbi/gems/appraisal@2.5.0.rbi similarity index 100% rename from sorbet/rbi/gems/appraisal@2.4.1-b200e636903700098bef25f4f51dbc4c46e4c04c.rbi rename to sorbet/rbi/gems/appraisal@2.5.0.rbi diff --git a/sorbet/rbi/gems/async-http@0.60.2.rbi b/sorbet/rbi/gems/async-http@0.61.0.rbi similarity index 98% rename from sorbet/rbi/gems/async-http@0.60.2.rbi rename to sorbet/rbi/gems/async-http@0.61.0.rbi index 2ced0f634..6d2b8433d 100644 --- a/sorbet/rbi/gems/async-http@0.60.2.rbi +++ b/sorbet/rbi/gems/async-http@0.61.0.rbi @@ -492,6 +492,9 @@ class Async::HTTP::Protocol::HTTP1::Request < ::Async::HTTP::Protocol::Request # source://async-http//lib/async/http/protocol/http1/request.rb#34 def hijack?; end + # source://async-http//lib/async/http/protocol/http1/request.rb#42 + def write_interim_response(response); end + class << self # source://async-http//lib/async/http/protocol/http1/request.rb#13 def read(connection); end @@ -503,43 +506,47 @@ Async::HTTP::Protocol::HTTP1::Request::UPGRADE = T.let(T.unsafe(nil), String) # source://async-http//lib/async/http/protocol/http1/response.rb#12 class Async::HTTP::Protocol::HTTP1::Response < ::Async::HTTP::Protocol::Response - # @param reason [String] HTTP response line reason, ignored. # @return [Response] a new instance of Response # - # source://async-http//lib/async/http/protocol/http1/response.rb#22 + # source://async-http//lib/async/http/protocol/http1/response.rb#29 def initialize(connection, version, status, reason, headers, body); end - # source://async-http//lib/async/http/protocol/http1/response.rb#30 + # source://async-http//lib/async/http/protocol/http1/response.rb#38 def connection; end - # source://async-http//lib/async/http/protocol/http1/response.rb#38 + # source://async-http//lib/async/http/protocol/http1/response.rb#46 def hijack!; end # @return [Boolean] # - # source://async-http//lib/async/http/protocol/http1/response.rb#34 + # source://async-http//lib/async/http/protocol/http1/response.rb#42 def hijack?; end + # Returns the value of attribute reason. + # + # source://async-http//lib/async/http/protocol/http1/response.rb#26 + def reason; end + class << self # source://async-http//lib/async/http/protocol/http1/response.rb#13 def read(connection, request); end end end -# source://async-http//lib/async/http/protocol/http1/response.rb#19 +# source://async-http//lib/async/http/protocol/http1/response.rb#23 Async::HTTP::Protocol::HTTP1::Response::UPGRADE = T.let(T.unsafe(nil), String) -# source://async-http//lib/async/http/protocol/http1/server.rb#13 +# source://async-http//lib/async/http/protocol/http1/server.rb#14 class Async::HTTP::Protocol::HTTP1::Server < ::Async::HTTP::Protocol::HTTP1::Connection # Server loop. # - # source://async-http//lib/async/http/protocol/http1/server.rb#42 + # source://async-http//lib/async/http/protocol/http1/server.rb#46 def each(task: T.unsafe(nil)); end - # source://async-http//lib/async/http/protocol/http1/server.rb#14 + # source://async-http//lib/async/http/protocol/http1/server.rb#15 def fail_request(status); end - # source://async-http//lib/async/http/protocol/http1/server.rb#19 + # source://async-http//lib/async/http/protocol/http1/server.rb#23 def next_request; end end @@ -779,6 +786,9 @@ class Async::HTTP::Protocol::HTTP2::Request < ::Async::HTTP::Protocol::Request # # source://async-http//lib/async/http/protocol/http2/request.rb#99 def valid?; end + + # source://async-http//lib/async/http/protocol/http2/request.rb#145 + def write_interim_response(response); end end # source://async-http//lib/async/http/protocol/http2/request.rb#107 @@ -809,41 +819,41 @@ end class Async::HTTP::Protocol::HTTP2::Response < ::Async::HTTP::Protocol::Response # @return [Response] a new instance of Response # - # source://async-http//lib/async/http/protocol/http2/response.rb#102 + # source://async-http//lib/async/http/protocol/http2/response.rb#108 def initialize(stream); end - # source://async-http//lib/async/http/protocol/http2/response.rb#128 + # source://async-http//lib/async/http/protocol/http2/response.rb#134 def build_request(headers); end - # source://async-http//lib/async/http/protocol/http2/response.rb#112 + # source://async-http//lib/async/http/protocol/http2/response.rb#118 def connection; end # @return [Boolean] # - # source://async-http//lib/async/http/protocol/http2/response.rb#120 + # source://async-http//lib/async/http/protocol/http2/response.rb#126 def head?; end # Returns the value of attribute request. # - # source://async-http//lib/async/http/protocol/http2/response.rb#110 + # source://async-http//lib/async/http/protocol/http2/response.rb#116 def request; end # Send a request and read it into this response. # - # source://async-http//lib/async/http/protocol/http2/response.rb#161 + # source://async-http//lib/async/http/protocol/http2/response.rb#167 def send_request(request); end # Returns the value of attribute stream. # - # source://async-http//lib/async/http/protocol/http2/response.rb#109 + # source://async-http//lib/async/http/protocol/http2/response.rb#115 def stream; end # @return [Boolean] # - # source://async-http//lib/async/http/protocol/http2/response.rb#124 + # source://async-http//lib/async/http/protocol/http2/response.rb#130 def valid?; end - # source://async-http//lib/async/http/protocol/http2/response.rb#116 + # source://async-http//lib/async/http/protocol/http2/response.rb#122 def wait; end end @@ -859,12 +869,12 @@ class Async::HTTP::Protocol::HTTP2::Response::Stream < ::Async::HTTP::Protocol:: # source://async-http//lib/async/http/protocol/http2/response.rb#35 def accept_push_promise_stream(promised_stream_id, headers); end - # source://async-http//lib/async/http/protocol/http2/response.rb#89 + # source://async-http//lib/async/http/protocol/http2/response.rb#95 def closed(error); end # Notify anyone waiting on the response headers to be received (or failure). # - # source://async-http//lib/async/http/protocol/http2/response.rb#72 + # source://async-http//lib/async/http/protocol/http2/response.rb#78 def notify!; end # This should be invoked from the background reader, and notifies the task waiting for the headers that we are done. @@ -879,7 +889,7 @@ class Async::HTTP::Protocol::HTTP2::Response::Stream < ::Async::HTTP::Protocol:: # Wait for the headers to be received or for stream reset. # - # source://async-http//lib/async/http/protocol/http2/response.rb#80 + # source://async-http//lib/async/http/protocol/http2/response.rb#86 def wait; end # source://async-http//lib/async/http/protocol/http2/response.rb#27 @@ -934,12 +944,12 @@ class Async::HTTP::Protocol::HTTP2::Stream < ::Protocol::HTTP2::Stream # - A frame is sent which causes this stream to enter the closed state. This method will be invoked from that task. # While the input stream is relatively straight forward, the output stream can trigger the second case above # - # source://async-http//lib/async/http/protocol/http2/stream.rb#150 + # source://async-http//lib/async/http/protocol/http2/stream.rb#148 def closed(error); end # Called when the output terminates normally. # - # source://async-http//lib/async/http/protocol/http2/stream.rb#123 + # source://async-http//lib/async/http/protocol/http2/stream.rb#121 def finish_output(error = T.unsafe(nil)); end # Returns the value of attribute headers. @@ -963,10 +973,10 @@ class Async::HTTP::Protocol::HTTP2::Stream < ::Protocol::HTTP2::Stream # # @return [Input] the input body. # - # source://async-http//lib/async/http/protocol/http2/stream.rb#79 + # source://async-http//lib/async/http/protocol/http2/stream.rb#77 def prepare_input(length); end - # source://async-http//lib/async/http/protocol/http2/stream.rb#94 + # source://async-http//lib/async/http/protocol/http2/stream.rb#92 def process_data(frame); end # source://async-http//lib/async/http/protocol/http2/stream.rb#52 @@ -977,16 +987,16 @@ class Async::HTTP::Protocol::HTTP2::Stream < ::Protocol::HTTP2::Stream # Set the body and begin sending it. # - # source://async-http//lib/async/http/protocol/http2/stream.rb#116 + # source://async-http//lib/async/http/protocol/http2/stream.rb#114 def send_body(body, trailer = T.unsafe(nil)); end - # source://async-http//lib/async/http/protocol/http2/stream.rb#87 + # source://async-http//lib/async/http/protocol/http2/stream.rb#85 def update_local_window(frame); end - # source://async-http//lib/async/http/protocol/http2/stream.rb#73 + # source://async-http//lib/async/http/protocol/http2/stream.rb#71 def wait_for_input; end - # source://async-http//lib/async/http/protocol/http2/stream.rb#140 + # source://async-http//lib/async/http/protocol/http2/stream.rb#138 def window_updated(size); end end @@ -1032,14 +1042,17 @@ class Async::HTTP::Protocol::Request < ::Protocol::HTTP::Request # source://async-http//lib/async/http/protocol/request.rb#24 def hijack?; end - # source://async-http//lib/async/http/protocol/request.rb#28 + # source://async-http//lib/async/http/protocol/request.rb#31 def peer; end - # source://async-http//lib/async/http/protocol/request.rb#34 + # source://async-http//lib/async/http/protocol/request.rb#37 def remote_address; end - # source://async-http//lib/async/http/protocol/request.rb#38 + # source://async-http//lib/async/http/protocol/request.rb#41 def remote_address=(value); end + + # source://async-http//lib/async/http/protocol/request.rb#28 + def write_interim_response(response); end end # Failed to send the request. The request body has NOT been consumed (i.e. #read) and you should retry the request. diff --git a/sorbet/rbi/gems/async-io@1.35.0.rbi b/sorbet/rbi/gems/async-io@1.36.1.rbi similarity index 78% rename from sorbet/rbi/gems/async-io@1.35.0.rbi rename to sorbet/rbi/gems/async-io@1.36.1.rbi index fdb1d94fd..78bb0fbab 100644 --- a/sorbet/rbi/gems/async-io@1.35.0.rbi +++ b/sorbet/rbi/gems/async-io@1.36.1.rbi @@ -4,37 +4,37 @@ # This is an autogenerated file for types exported from the `async-io` gem. # Please instead update this file by running `bin/tapioca gem async-io`. -# source://async-io//lib/async/io/address.rb#25 +# source://async-io//lib/async/io/address.rb#8 module Async; end -# source://async-io//lib/async/io/address.rb#26 +# source://async-io//lib/async/io/address.rb#9 module Async::IO class << self - # source://async-io//lib/async/io/generic.rb#43 + # source://async-io//lib/async/io/generic.rb#27 def pipe; end # Convert a Ruby ::IO object to a wrapped instance: # - # source://async-io//lib/async/io/generic.rb#35 + # source://async-io//lib/async/io/generic.rb#19 def try_convert(io, &block); end end end -# source://async-io//lib/async/io/address.rb#27 +# source://async-io//lib/async/io/address.rb#10 Async::IO::Address = Addrinfo # This class will open and close the socket automatically. # -# source://async-io//lib/async/io/address_endpoint.rb#28 +# source://async-io//lib/async/io/address_endpoint.rb#11 class Async::IO::AddressEndpoint < ::Async::IO::Endpoint # @return [AddressEndpoint] a new instance of AddressEndpoint # - # source://async-io//lib/async/io/address_endpoint.rb#29 + # source://async-io//lib/async/io/address_endpoint.rb#12 def initialize(address, **options); end # Returns the value of attribute address. # - # source://async-io//lib/async/io/address_endpoint.rb#39 + # source://async-io//lib/async/io/address_endpoint.rb#22 def address; end # Bind a socket to the given address. If a block is given, the socket will be automatically closed when the block exits. @@ -42,26 +42,26 @@ class Async::IO::AddressEndpoint < ::Async::IO::Endpoint # @return [Socket] the bound socket # @yield [Socket] the bound socket # - # source://async-io//lib/async/io/address_endpoint.rb#44 + # source://async-io//lib/async/io/address_endpoint.rb#27 def bind(&block); end # Connects a socket to the given address. If a block is given, the socket will be automatically closed when the block exits. # # @return [Socket] the connected socket # - # source://async-io//lib/async/io/address_endpoint.rb#50 + # source://async-io//lib/async/io/address_endpoint.rb#33 def connect(&block); end - # source://async-io//lib/async/io/address_endpoint.rb#35 + # source://async-io//lib/async/io/address_endpoint.rb#18 def to_s; end end # The default block size for IO buffers. Defaults to 64KB (typical pipe buffer size). # -# source://async-io//lib/async/io/generic.rb#29 +# source://async-io//lib/async/io/generic.rb#13 Async::IO::BLOCK_SIZE = T.let(T.unsafe(nil), Integer) -# source://async-io//lib/async/io/socket.rb#32 +# source://async-io//lib/async/io/socket.rb#17 class Async::IO::BasicSocket < ::Async::IO::Generic include ::Socket::Constants include ::Async::IO::Peer @@ -98,18 +98,18 @@ class Async::IO::BasicSocket < ::Async::IO::Generic # Invokes `recv_nonblock` on the underlying {io}. If the operation would block, the current task is paused until the operation can succeed, at which point it's resumed and the operation is completed. # - # source://async-io//lib/async/io/generic.rb#61 + # source://async-io//lib/async/io/generic.rb#45 def recv(*args); end - # source://async-io//lib/async/io/generic.rb#68 + # source://async-io//lib/async/io/generic.rb#52 def recv_nonblock(*args, exception: T.unsafe(nil)); end # Invokes `recvmsg_nonblock` on the underlying {io}. If the operation would block, the current task is paused until the operation can succeed, at which point it's resumed and the operation is completed. # - # source://async-io//lib/async/io/generic.rb#61 + # source://async-io//lib/async/io/generic.rb#45 def recvmsg(*args); end - # source://async-io//lib/async/io/generic.rb#68 + # source://async-io//lib/async/io/generic.rb#52 def recvmsg_nonblock(*args, exception: T.unsafe(nil)); end # source://forwardable/1.3.3/forwardable.rb#231 @@ -117,15 +117,15 @@ class Async::IO::BasicSocket < ::Async::IO::Generic # Invokes `sendmsg_nonblock` on the underlying {io}. If the operation would block, the current task is paused until the operation can succeed, at which point it's resumed and the operation is completed. # - # source://async-io//lib/async/io/generic.rb#61 + # source://async-io//lib/async/io/generic.rb#45 def send(*args); end # Invokes `sendmsg_nonblock` on the underlying {io}. If the operation would block, the current task is paused until the operation can succeed, at which point it's resumed and the operation is completed. # - # source://async-io//lib/async/io/generic.rb#61 + # source://async-io//lib/async/io/generic.rb#45 def sendmsg(*args); end - # source://async-io//lib/async/io/generic.rb#68 + # source://async-io//lib/async/io/generic.rb#52 def sendmsg_nonblock(*args, exception: T.unsafe(nil)); end # source://forwardable/1.3.3/forwardable.rb#231 @@ -135,102 +135,102 @@ class Async::IO::BasicSocket < ::Async::IO::Generic def shutdown(*args, **_arg1, &block); end end -# source://async-io//lib/async/io/buffer.rb#25 +# source://async-io//lib/async/io/buffer.rb#8 class Async::IO::Buffer < ::String # @return [Buffer] a new instance of Buffer # - # source://async-io//lib/async/io/buffer.rb#28 + # source://async-io//lib/async/io/buffer.rb#11 def initialize; end - # source://async-io//lib/async/io/buffer.rb#34 + # source://async-io//lib/async/io/buffer.rb#17 def <<(string); end - # source://async-io//lib/async/io/buffer.rb#34 + # source://async-io//lib/async/io/buffer.rb#17 def concat(string); end end -# source://async-io//lib/async/io/buffer.rb#26 +# source://async-io//lib/async/io/buffer.rb#9 Async::IO::Buffer::BINARY = T.let(T.unsafe(nil), Encoding) # Endpoints represent a way of connecting or binding to an address. # -# source://async-io//lib/async/io/endpoint.rb#31 +# source://async-io//lib/async/io/endpoint.rb#15 class Async::IO::Endpoint # @return [Endpoint] a new instance of Endpoint # - # source://async-io//lib/async/io/endpoint.rb#32 + # source://async-io//lib/async/io/endpoint.rb#16 def initialize(**options); end # Accept connections from the specified endpoint. # # @param backlog [Integer] the number of connections to listen for. # - # source://async-io//lib/async/io/endpoint.rb#89 + # source://async-io//lib/async/io/endpoint.rb#73 def accept(backlog = T.unsafe(nil), &block); end # Map all endpoints by invoking `#bind`. # # @yield the bound wrapper. # - # source://async-io//lib/async/io/endpoint.rb#99 + # source://async-io//lib/async/io/endpoint.rb#83 def bound; end # Endpoints sometimes have multiple paths. # # @yield [Endpoint] Enumerate all discrete paths as endpoints. # - # source://async-io//lib/async/io/endpoint.rb#81 + # source://async-io//lib/async/io/endpoint.rb#65 def each; end # @return [String] The hostname of the bound socket. # - # source://async-io//lib/async/io/endpoint.rb#47 + # source://async-io//lib/async/io/endpoint.rb#31 def hostname; end # Controls SO_LINGER. The amount of time the socket will stay in the `TIME_WAIT` state after being closed. # # @return [Integer, nil] The value for SO_LINGER. # - # source://async-io//lib/async/io/endpoint.rb#65 + # source://async-io//lib/async/io/endpoint.rb#49 def linger; end # @return [Address] the address to bind to before connecting. # - # source://async-io//lib/async/io/endpoint.rb#75 + # source://async-io//lib/async/io/endpoint.rb#59 def local_address; end # Returns the value of attribute options. # - # source://async-io//lib/async/io/endpoint.rb#44 + # source://async-io//lib/async/io/endpoint.rb#28 def options; end # Sets the attribute options # # @param value the value to set the attribute options to. # - # source://async-io//lib/async/io/endpoint.rb#44 + # source://async-io//lib/async/io/endpoint.rb#28 def options=(_arg0); end # If `SO_REUSEADDR` is enabled on a socket prior to binding it, the socket can be successfully bound unless there is a conflict with another socket bound to exactly the same combination of source address and port. Additionally, when set, binding a socket to the address of an existing socket in `TIME_WAIT` is not an error. # # @return [Boolean] The value for `SO_REUSEADDR`. # - # source://async-io//lib/async/io/endpoint.rb#59 + # source://async-io//lib/async/io/endpoint.rb#43 def reuse_address; end # If `SO_REUSEPORT` is enabled on a socket, the socket can be successfully bound even if there are existing sockets bound to the same address, as long as all prior bound sockets also had `SO_REUSEPORT` set before they were bound. # # @return [Boolean, nil] The value for `SO_REUSEPORT`. # - # source://async-io//lib/async/io/endpoint.rb#53 + # source://async-io//lib/async/io/endpoint.rb#37 def reuse_port; end # @return [Numeric] The default timeout for socket operations. # - # source://async-io//lib/async/io/endpoint.rb#70 + # source://async-io//lib/async/io/endpoint.rb#54 def timeout; end - # source://async-io//lib/async/io/endpoint.rb#36 + # source://async-io//lib/async/io/endpoint.rb#20 def with(**options); end class << self @@ -243,7 +243,7 @@ class Async::IO::Endpoint # @see Endpoint.udp udp - invoked when parsing a URL with the udp scheme: "udp://127.0.0.1" # @see Endpoint.unix unix - invoked when parsing a URL with the unix scheme: "unix://127.0.0.1" # - # source://async-io//lib/async/io/endpoint.rb#123 + # source://async-io//lib/async/io/endpoint.rb#107 def parse(string, **options); end # @param args @@ -252,32 +252,32 @@ class Async::IO::Endpoint # @param options keyword arguments passed through to {Endpoint.tcp} # @return [SSLEndpoint] # - # source://async-io//lib/async/io/ssl_endpoint.rb#114 + # source://async-io//lib/async/io/ssl_endpoint.rb#98 def ssl(*args, ssl_context: T.unsafe(nil), hostname: T.unsafe(nil), **options); end # @param args nodename, service, family, socktype, protocol, flags. `socktype` will be set to Socket::SOCK_STREAM. # @param options keyword arguments passed on to {HostEndpoint#initialize} # @return [HostEndpoint] # - # source://async-io//lib/async/io/host_endpoint.rb#100 + # source://async-io//lib/async/io/host_endpoint.rb#85 def tcp(*args, **options); end # @param args nodename, service, family, socktype, protocol, flags. `socktype` will be set to Socket::SOCK_DGRAM. # @param options keyword arguments passed on to {HostEndpoint#initialize} # @return [HostEndpoint] # - # source://async-io//lib/async/io/host_endpoint.rb#110 + # source://async-io//lib/async/io/host_endpoint.rb#95 def udp(*args, **options); end end end # Represents an asynchronous IO within a reactor. # -# source://async-io//lib/async/io/generic.rb#48 +# source://async-io//lib/async/io/generic.rb#32 class Async::IO::Generic < ::Async::Wrapper extend ::Forwardable - # source://async-io//lib/async/io/generic.rb#170 + # source://async-io//lib/async/io/generic.rb#154 def <<(buffer); end # source://forwardable/1.3.3/forwardable.rb#231 @@ -312,10 +312,10 @@ class Async::IO::Generic < ::Async::Wrapper # @return [Boolean] # - # source://async-io//lib/async/io/generic.rb#206 + # source://async-io//lib/async/io/generic.rb#190 def connected?; end - # source://async-io//lib/async/io/generic.rb#175 + # source://async-io//lib/async/io/generic.rb#159 def dup; end # source://forwardable/1.3.3/forwardable.rb#231 @@ -351,15 +351,15 @@ class Async::IO::Generic < ::Async::Wrapper # source://forwardable/1.3.3/forwardable.rb#231 def isatty(*args, **_arg1, &block); end - # source://async-io//lib/async/io/generic.rb#194 + # source://async-io//lib/async/io/generic.rb#178 def nonblock; end - # source://async-io//lib/async/io/generic.rb#198 + # source://async-io//lib/async/io/generic.rb#182 def nonblock=(value); end # @return [Boolean] # - # source://async-io//lib/async/io/generic.rb#202 + # source://async-io//lib/async/io/generic.rb#186 def nonblock?; end # source://forwardable/1.3.3/forwardable.rb#231 @@ -388,13 +388,13 @@ class Async::IO::Generic < ::Async::Wrapper # Read `length` bytes of data from the underlying I/O. If length is unspecified, read everything. # - # source://async-io//lib/async/io/generic.rb#111 + # source://async-io//lib/async/io/generic.rb#95 def read(length = T.unsafe(nil), buffer = T.unsafe(nil)); end - # source://async-io//lib/async/io/generic.rb#68 + # source://async-io//lib/async/io/generic.rb#52 def read_nonblock(*args, exception: T.unsafe(nil)); end - # source://async-io//lib/async/io/generic.rb#68 + # source://async-io//lib/async/io/generic.rb#52 def readpartial(*args, exception: T.unsafe(nil)); end # source://forwardable/1.3.3/forwardable.rb#231 @@ -430,7 +430,7 @@ class Async::IO::Generic < ::Async::Wrapper # @example # data = io.sysread(512) # - # source://async-io//lib/async/io/generic.rb#61 + # source://async-io//lib/async/io/generic.rb#45 def sysread(*args); end # source://forwardable/1.3.3/forwardable.rb#231 @@ -442,7 +442,7 @@ class Async::IO::Generic < ::Async::Wrapper # @example # io.syswrite("Hello World") # - # source://async-io//lib/async/io/generic.rb#61 + # source://async-io//lib/async/io/generic.rb#45 def syswrite(*args); end # source://forwardable/1.3.3/forwardable.rb#231 @@ -450,14 +450,14 @@ class Async::IO::Generic < ::Async::Wrapper # Returns the value of attribute timeout. # - # source://async-io//lib/async/io/generic.rb#210 + # source://async-io//lib/async/io/generic.rb#194 def timeout; end # Sets the attribute timeout # # @param value the value to set the attribute timeout to. # - # source://async-io//lib/async/io/generic.rb#210 + # source://async-io//lib/async/io/generic.rb#194 def timeout=(_arg0); end # source://forwardable/1.3.3/forwardable.rb#231 @@ -472,50 +472,50 @@ class Async::IO::Generic < ::Async::Wrapper # source://forwardable/1.3.3/forwardable.rb#231 def tty?(*args, **_arg1, &block); end - # source://async-io//lib/async/io/generic.rb#181 + # source://async-io//lib/async/io/generic.rb#165 def wait(timeout = T.unsafe(nil), mode = T.unsafe(nil)); end - # source://async-io//lib/async/io/generic.rb#154 + # source://async-io//lib/async/io/generic.rb#138 def write(buffer); end - # source://async-io//lib/async/io/generic.rb#68 + # source://async-io//lib/async/io/generic.rb#52 def write_nonblock(*args, exception: T.unsafe(nil)); end protected - # source://async-io//lib/async/io/generic.rb#214 + # source://async-io//lib/async/io/generic.rb#198 def async_send(*arguments, timeout: T.unsafe(nil)); end class << self # Instantiate a wrapped instance of the class, and optionally yield it to a given block, closing it afterwards. # - # source://async-io//lib/async/io/generic.rb#88 + # source://async-io//lib/async/io/generic.rb#72 def wrap(*args); end - # source://async-io//lib/async/io/generic.rb#57 + # source://async-io//lib/async/io/generic.rb#41 def wrap_blocking_method(new_name, method_name, invert: T.unsafe(nil), &block); end # Returns the value of attribute wrapped_klass. # - # source://async-io//lib/async/io/generic.rb#74 + # source://async-io//lib/async/io/generic.rb#58 def wrapped_klass; end - # source://async-io//lib/async/io/generic.rb#76 + # source://async-io//lib/async/io/generic.rb#60 def wraps(klass, *additional_methods); end end end -# source://async-io//lib/async/io/generic.rb#51 +# source://async-io//lib/async/io/generic.rb#35 Async::IO::Generic::WRAPPERS = T.let(T.unsafe(nil), Hash) -# source://async-io//lib/async/io/host_endpoint.rb#27 +# source://async-io//lib/async/io/host_endpoint.rb#12 class Async::IO::HostEndpoint < ::Async::IO::Endpoint # @return [HostEndpoint] a new instance of HostEndpoint # - # source://async-io//lib/async/io/host_endpoint.rb#28 + # source://async-io//lib/async/io/host_endpoint.rb#13 def initialize(specification, **options); end - # source://async-io//lib/async/io/host_endpoint.rb#40 + # source://async-io//lib/async/io/host_endpoint.rb#25 def address; end # Invokes the given block for every address which can be bound to. @@ -523,7 +523,7 @@ class Async::IO::HostEndpoint < ::Async::IO::Endpoint # @return [Array] an array of bound sockets # @yield [Socket] the bound socket # - # source://async-io//lib/async/io/host_endpoint.rb#79 + # source://async-io//lib/async/io/host_endpoint.rb#64 def bind(&block); end # Try to connect to the given host by connecting to each address in sequence until a connection is made. @@ -532,22 +532,22 @@ class Async::IO::HostEndpoint < ::Async::IO::Endpoint # @return [Socket] the connected socket # @yield [Socket] the socket which is being connected, may be invoked more than once # - # source://async-io//lib/async/io/host_endpoint.rb#52 + # source://async-io//lib/async/io/host_endpoint.rb#37 def connect; end # @yield [AddressEndpoint] address endpoints by resolving the given host specification # - # source://async-io//lib/async/io/host_endpoint.rb#86 + # source://async-io//lib/async/io/host_endpoint.rb#71 def each; end - # source://async-io//lib/async/io/host_endpoint.rb#44 + # source://async-io//lib/async/io/host_endpoint.rb#29 def hostname; end - # source://async-io//lib/async/io/host_endpoint.rb#34 + # source://async-io//lib/async/io/host_endpoint.rb#19 def to_s; end end -# source://async-io//lib/async/io/socket.rb#192 +# source://async-io//lib/async/io/socket.rb#177 class Async::IO::IPSocket < ::Async::IO::BasicSocket # source://forwardable/1.3.3/forwardable.rb#231 def addr(*args, **_arg1, &block); end @@ -557,19 +557,19 @@ class Async::IO::IPSocket < ::Async::IO::BasicSocket # Invokes `recvfrom_nonblock` on the underlying {io}. If the operation would block, the current task is paused until the operation can succeed, at which point it's resumed and the operation is completed. # - # source://async-io//lib/async/io/generic.rb#61 + # source://async-io//lib/async/io/generic.rb#45 def recvfrom(*args); end - # source://async-io//lib/async/io/generic.rb#68 + # source://async-io//lib/async/io/generic.rb#52 def recvfrom_nonblock(*args, exception: T.unsafe(nil)); end end # The maximum read size when appending to IO buffers. Defaults to 8MB. # -# source://async-io//lib/async/io/generic.rb#32 +# source://async-io//lib/async/io/generic.rb#16 Async::IO::MAXIMUM_READ_SIZE = T.let(T.unsafe(nil), Integer) -# source://async-io//lib/async/io/peer.rb#27 +# source://async-io//lib/async/io/peer.rb#10 module Async::IO::Peer include ::Socket::Constants @@ -578,40 +578,40 @@ module Async::IO::Peer # # @return [Boolean] # - # source://async-io//lib/async/io/peer.rb#32 + # source://async-io//lib/async/io/peer.rb#15 def connected?; end - # source://async-io//lib/async/io/peer.rb#46 + # source://async-io//lib/async/io/peer.rb#32 def eof; end # @return [Boolean] # - # source://async-io//lib/async/io/peer.rb#50 + # source://async-io//lib/async/io/peer.rb#36 def eof?; end - # source://async-io//lib/async/io/peer.rb#84 + # source://async-io//lib/async/io/peer.rb#70 def protocol; end - # source://async-io//lib/async/io/peer.rb#71 + # source://async-io//lib/async/io/peer.rb#57 def sync; end # Best effort to set *_NODELAY if it makes sense. Swallows errors where possible. # - # source://async-io//lib/async/io/peer.rb#55 + # source://async-io//lib/async/io/peer.rb#41 def sync=(value); end - # source://async-io//lib/async/io/peer.rb#80 + # source://async-io//lib/async/io/peer.rb#66 def type; end end -# source://async-io//lib/async/io/ssl_endpoint.rb#28 +# source://async-io//lib/async/io/ssl_endpoint.rb#12 class Async::IO::SSLEndpoint < ::Async::IO::Endpoint # @return [SSLEndpoint] a new instance of SSLEndpoint # - # source://async-io//lib/async/io/ssl_endpoint.rb#29 + # source://async-io//lib/async/io/ssl_endpoint.rb#13 def initialize(endpoint, **options); end - # source://async-io//lib/async/io/ssl_endpoint.rb#45 + # source://async-io//lib/async/io/ssl_endpoint.rb#29 def address; end # Connect to the underlying endpoint and establish a SSL connection. @@ -619,10 +619,10 @@ class Async::IO::SSLEndpoint < ::Async::IO::Endpoint # @return [Socket] the connected socket # @yield [Socket] the socket which is being connected # - # source://async-io//lib/async/io/ssl_endpoint.rb#78 + # source://async-io//lib/async/io/ssl_endpoint.rb#62 def bind; end - # source://async-io//lib/async/io/ssl_endpoint.rb#60 + # source://async-io//lib/async/io/ssl_endpoint.rb#44 def build_context(context = T.unsafe(nil)); end # Connect to the underlying endpoint and establish a SSL connection. @@ -630,51 +630,51 @@ class Async::IO::SSLEndpoint < ::Async::IO::Endpoint # @return [Socket] the connected socket # @yield [Socket] the socket which is being connected # - # source://async-io//lib/async/io/ssl_endpoint.rb#91 + # source://async-io//lib/async/io/ssl_endpoint.rb#75 def connect(&block); end - # source://async-io//lib/async/io/ssl_endpoint.rb#71 + # source://async-io//lib/async/io/ssl_endpoint.rb#55 def context; end - # source://async-io//lib/async/io/ssl_endpoint.rb#95 + # source://async-io//lib/async/io/ssl_endpoint.rb#79 def each; end # Returns the value of attribute endpoint. # - # source://async-io//lib/async/io/ssl_endpoint.rb#53 + # source://async-io//lib/async/io/ssl_endpoint.rb#37 def endpoint; end - # source://async-io//lib/async/io/ssl_endpoint.rb#49 + # source://async-io//lib/async/io/ssl_endpoint.rb#33 def hostname; end # Returns the value of attribute options. # - # source://async-io//lib/async/io/ssl_endpoint.rb#54 + # source://async-io//lib/async/io/ssl_endpoint.rb#38 def options; end - # source://async-io//lib/async/io/ssl_endpoint.rb#56 + # source://async-io//lib/async/io/ssl_endpoint.rb#40 def params; end - # source://async-io//lib/async/io/ssl_endpoint.rb#41 + # source://async-io//lib/async/io/ssl_endpoint.rb#25 def to_s; end end -# source://async-io//lib/async/io/ssl_socket.rb#29 +# source://async-io//lib/async/io/ssl_socket.rb#12 Async::IO::SSLError = OpenSSL::SSL::SSLError # We reimplement this from scratch because the native implementation doesn't expose the underlying server/context that we need to implement non-blocking accept. # -# source://async-io//lib/async/io/ssl_socket.rb#107 +# source://async-io//lib/async/io/ssl_socket.rb#90 class Async::IO::SSLServer include ::Async::IO::Server extend ::Forwardable # @return [SSLServer] a new instance of SSLServer # - # source://async-io//lib/async/io/ssl_socket.rb#110 + # source://async-io//lib/async/io/ssl_socket.rb#93 def initialize(server, context); end - # source://async-io//lib/async/io/ssl_socket.rb#132 + # source://async-io//lib/async/io/ssl_socket.rb#115 def accept(task: T.unsafe(nil), **options); end # source://forwardable/1.3.3/forwardable.rb#231 @@ -685,19 +685,19 @@ class Async::IO::SSLServer # Returns the value of attribute context. # - # source://async-io//lib/async/io/ssl_socket.rb#126 + # source://async-io//lib/async/io/ssl_socket.rb#109 def context; end - # source://async-io//lib/async/io/ssl_socket.rb#119 + # source://async-io//lib/async/io/ssl_socket.rb#102 def dup; end - # source://async-io//lib/async/io/ssl_socket.rb#115 + # source://async-io//lib/async/io/ssl_socket.rb#98 def fileno; end # source://forwardable/1.3.3/forwardable.rb#231 def getsockopt(*args, **_arg1, &block); end - # source://async-io//lib/async/io/ssl_socket.rb#128 + # source://async-io//lib/async/io/ssl_socket.rb#111 def listen(*args); end # source://forwardable/1.3.3/forwardable.rb#231 @@ -708,7 +708,7 @@ class Async::IO::SSLServer # Returns the value of attribute server. # - # source://async-io//lib/async/io/ssl_socket.rb#125 + # source://async-io//lib/async/io/ssl_socket.rb#108 def server; end # source://forwardable/1.3.3/forwardable.rb#231 @@ -726,22 +726,22 @@ end # Asynchronous TCP socket wrapper. # -# source://async-io//lib/async/io/ssl_socket.rb#32 +# source://async-io//lib/async/io/ssl_socket.rb#15 class Async::IO::SSLSocket < ::Async::IO::Generic include ::Socket::Constants include ::Async::IO::Peer # @return [SSLSocket] a new instance of SSLSocket # - # source://async-io//lib/async/io/ssl_socket.rb#66 + # source://async-io//lib/async/io/ssl_socket.rb#49 def initialize(socket, context); end # Invokes `accept_nonblock` on the underlying {io}. If the operation would block, the current task is paused until the operation can succeed, at which point it's resumed and the operation is completed. # - # source://async-io//lib/async/io/generic.rb#61 + # source://async-io//lib/async/io/generic.rb#45 def accept(*args); end - # source://async-io//lib/async/io/generic.rb#68 + # source://async-io//lib/async/io/generic.rb#52 def accept_nonblock(*args, exception: T.unsafe(nil)); end # source://forwardable/1.3.3/forwardable.rb#231 @@ -756,18 +756,18 @@ class Async::IO::SSLSocket < ::Async::IO::Generic # source://forwardable/1.3.3/forwardable.rb#231 def client_ca(*args, **_arg1, &block); end - # source://async-io//lib/async/io/ssl_socket.rb#96 + # source://async-io//lib/async/io/ssl_socket.rb#79 def close_read; end - # source://async-io//lib/async/io/ssl_socket.rb#91 + # source://async-io//lib/async/io/ssl_socket.rb#74 def close_write; end # Invokes `connect_nonblock` on the underlying {io}. If the operation would block, the current task is paused until the operation can succeed, at which point it's resumed and the operation is completed. # - # source://async-io//lib/async/io/generic.rb#61 + # source://async-io//lib/async/io/generic.rb#45 def connect(*args); end - # source://async-io//lib/async/io/generic.rb#68 + # source://async-io//lib/async/io/generic.rb#52 def connect_nonblock(*args, exception: T.unsafe(nil)); end # source://forwardable/1.3.3/forwardable.rb#231 @@ -788,7 +788,7 @@ class Async::IO::SSLSocket < ::Async::IO::Generic # source://forwardable/1.3.3/forwardable.rb#231 def hostname=(*args, **_arg1, &block); end - # source://async-io//lib/async/io/ssl_socket.rb#83 + # source://async-io//lib/async/io/ssl_socket.rb#66 def local_address; end # source://forwardable/1.3.3/forwardable.rb#231 @@ -809,7 +809,7 @@ class Async::IO::SSLSocket < ::Async::IO::Generic # source://forwardable/1.3.3/forwardable.rb#231 def post_connection_check(*args, **_arg1, &block); end - # source://async-io//lib/async/io/ssl_socket.rb#87 + # source://async-io//lib/async/io/ssl_socket.rb#70 def remote_address; end # source://forwardable/1.3.3/forwardable.rb#231 @@ -824,7 +824,7 @@ class Async::IO::SSLSocket < ::Async::IO::Generic # source://forwardable/1.3.3/forwardable.rb#231 def setsockopt(*args, **_arg1, &block); end - # source://async-io//lib/async/io/ssl_socket.rb#100 + # source://async-io//lib/async/io/ssl_socket.rb#83 def shutdown(how); end # source://forwardable/1.3.3/forwardable.rb#231 @@ -849,34 +849,34 @@ class Async::IO::SSLSocket < ::Async::IO::Generic def verify_result(*args, **_arg1, &block); end class << self - # source://async-io//lib/async/io/ssl_socket.rb#38 + # source://async-io//lib/async/io/ssl_socket.rb#21 def connect(socket, context, hostname = T.unsafe(nil), &block); end end end # Backwards compatibility. # -# source://async-io//lib/async/io/ssl_endpoint.rb#105 +# source://async-io//lib/async/io/ssl_endpoint.rb#89 Async::IO::SecureEndpoint = Async::IO::SSLEndpoint -# source://async-io//lib/async/io/server.rb#27 +# source://async-io//lib/async/io/server.rb#10 module Async::IO::Server - # source://async-io//lib/async/io/server.rb#28 + # source://async-io//lib/async/io/server.rb#11 def accept_each(timeout: T.unsafe(nil), task: T.unsafe(nil)); end end -# source://async-io//lib/async/io/socket.rb#44 +# source://async-io//lib/async/io/socket.rb#29 class Async::IO::Socket < ::Async::IO::BasicSocket include ::Async::IO::Server # @param timeout [Numeric] the maximum time to wait for accepting a connection, if specified. # - # source://async-io//lib/async/io/socket.rb#61 + # source://async-io//lib/async/io/socket.rb#46 def accept(timeout: T.unsafe(nil), task: T.unsafe(nil)); end # @param timeout [Numeric] the maximum time to wait for accepting a connection, if specified. # - # source://async-io//lib/async/io/socket.rb#61 + # source://async-io//lib/async/io/socket.rb#46 def accept_nonblock(timeout: T.unsafe(nil), task: T.unsafe(nil)); end # source://forwardable/1.3.3/forwardable.rb#231 @@ -884,12 +884,12 @@ class Async::IO::Socket < ::Async::IO::BasicSocket # @raise Errno::EAGAIN the connection failed due to the remote end being overloaded. # - # source://async-io//lib/async/io/socket.rb#50 + # source://async-io//lib/async/io/socket.rb#35 def connect(*args); end # @raise Errno::EAGAIN the connection failed due to the remote end being overloaded. # - # source://async-io//lib/async/io/socket.rb#50 + # source://async-io//lib/async/io/socket.rb#35 def connect_nonblock(*args); end # source://forwardable/1.3.3/forwardable.rb#231 @@ -900,21 +900,21 @@ class Async::IO::Socket < ::Async::IO::BasicSocket # Invokes `recvfrom_nonblock` on the underlying {io}. If the operation would block, the current task is paused until the operation can succeed, at which point it's resumed and the operation is completed. # - # source://async-io//lib/async/io/generic.rb#61 + # source://async-io//lib/async/io/generic.rb#45 def recvfrom(*args); end - # source://async-io//lib/async/io/generic.rb#68 + # source://async-io//lib/async/io/generic.rb#52 def recvfrom_nonblock(*args, exception: T.unsafe(nil)); end # @param timeout [Numeric] the maximum time to wait for accepting a connection, if specified. # - # source://async-io//lib/async/io/socket.rb#61 + # source://async-io//lib/async/io/socket.rb#46 def sysaccept(timeout: T.unsafe(nil), task: T.unsafe(nil)); end class << self # Bind to a local address and accept connections in a loop. # - # source://async-io//lib/async/io/socket.rb#177 + # source://async-io//lib/async/io/socket.rb#162 def accept(*args, backlog: T.unsafe(nil), &block); end # Bind to a local address. @@ -925,7 +925,7 @@ class Async::IO::Socket < ::Async::IO::BasicSocket # @param local_address [Address] The local address to bind to. # @param protocol [Hash] a customizable set of options # - # source://async-io//lib/async/io/socket.rb#156 + # source://async-io//lib/async/io/socket.rb#141 def bind(local_address, protocol: T.unsafe(nil), task: T.unsafe(nil), **options, &block); end # Build and wrap the underlying io. @@ -935,7 +935,7 @@ class Async::IO::Socket < ::Async::IO::BasicSocket # @param reuse_port [Hash] a customizable set of options # @param reuse_address [Hash] a customizable set of options # - # source://async-io//lib/async/io/socket.rb#86 + # source://async-io//lib/async/io/socket.rb#71 def build(*args, timeout: T.unsafe(nil), reuse_address: T.unsafe(nil), reuse_port: T.unsafe(nil), linger: T.unsafe(nil), task: T.unsafe(nil)); end # Establish a connection to a given `remote_address`. @@ -946,103 +946,103 @@ class Async::IO::Socket < ::Async::IO::BasicSocket # @param remote_address [Address] The remote address to connect to. # @param local_address [Hash] a customizable set of options # - # source://async-io//lib/async/io/socket.rb#118 + # source://async-io//lib/async/io/socket.rb#103 def connect(remote_address, local_address: T.unsafe(nil), task: T.unsafe(nil), **options); end - # source://async-io//lib/async/io/socket.rb#187 + # source://async-io//lib/async/io/socket.rb#172 def pair(*args); end end end -# source://async-io//lib/async/io/stream.rb#30 +# source://async-io//lib/async/io/stream.rb#15 class Async::IO::Stream # @return [Stream] a new instance of Stream # - # source://async-io//lib/async/io/stream.rb#45 + # source://async-io//lib/async/io/stream.rb#30 def initialize(io, block_size: T.unsafe(nil), maximum_read_size: T.unsafe(nil), sync: T.unsafe(nil), deferred: T.unsafe(nil)); end # Writes `string` to the stream and returns self. # - # source://async-io//lib/async/io/stream.rb#185 + # source://async-io//lib/async/io/stream.rb#170 def <<(string); end # Returns the value of attribute block_size. # - # source://async-io//lib/async/io/stream.rb#71 + # source://async-io//lib/async/io/stream.rb#56 def block_size; end # Best effort to flush any unwritten data, and then close the underling IO. # - # source://async-io//lib/async/io/stream.rb#218 + # source://async-io//lib/async/io/stream.rb#203 def close; end - # source://async-io//lib/async/io/stream.rb#207 + # source://async-io//lib/async/io/stream.rb#192 def close_read; end - # source://async-io//lib/async/io/stream.rb#211 + # source://async-io//lib/async/io/stream.rb#196 def close_write; end # @return [Boolean] # - # source://async-io//lib/async/io/stream.rb#203 + # source://async-io//lib/async/io/stream.rb#188 def closed?; end # @return [Boolean] # - # source://async-io//lib/async/io/stream.rb#199 + # source://async-io//lib/async/io/stream.rb#184 def connected?; end # Returns true if the stream is at file which means there is no more data to be read. # # @return [Boolean] # - # source://async-io//lib/async/io/stream.rb#231 + # source://async-io//lib/async/io/stream.rb#216 def eof; end # @raise [EOFError] # - # source://async-io//lib/async/io/stream.rb#243 + # source://async-io//lib/async/io/stream.rb#228 def eof!; end # Returns true if the stream is at file which means there is no more data to be read. # # @return [Boolean] # - # source://async-io//lib/async/io/stream.rb#231 + # source://async-io//lib/async/io/stream.rb#216 def eof?; end # Flushes buffered data to the stream. # - # source://async-io//lib/async/io/stream.rb#154 + # source://async-io//lib/async/io/stream.rb#139 def flush; end - # source://async-io//lib/async/io/stream.rb#149 + # source://async-io//lib/async/io/stream.rb#134 def gets(separator = T.unsafe(nil), **options); end # Returns the value of attribute io. # - # source://async-io//lib/async/io/stream.rb#69 + # source://async-io//lib/async/io/stream.rb#54 def io; end - # source://async-io//lib/async/io/stream.rb#143 + # source://async-io//lib/async/io/stream.rb#128 def peek; end - # source://async-io//lib/async/io/stream.rb#191 + # source://async-io//lib/async/io/stream.rb#176 def puts(*arguments, separator: T.unsafe(nil)); end # Reads `size` bytes from the stream. If size is not specified, read until end of file. # - # source://async-io//lib/async/io/stream.rb#74 + # source://async-io//lib/async/io/stream.rb#59 def read(size = T.unsafe(nil)); end # @raise [exception] # - # source://async-io//lib/async/io/stream.rb#105 + # source://async-io//lib/async/io/stream.rb#90 def read_exactly(size, exception: T.unsafe(nil)); end # Read at most `size` bytes from the stream. Will avoid reading from the underlying stream if possible. # - # source://async-io//lib/async/io/stream.rb#95 + # source://async-io//lib/async/io/stream.rb#80 def read_partial(size = T.unsafe(nil)); end # Efficiently read data from the stream until encountering pattern. @@ -1050,10 +1050,10 @@ class Async::IO::Stream # @param pattern [String] The pattern to match. # @return [String] The contents of the stream up until the pattern, which is consumed but not returned. # - # source://async-io//lib/async/io/stream.rb#124 + # source://async-io//lib/async/io/stream.rb#109 def read_until(pattern, offset = T.unsafe(nil), chomp: T.unsafe(nil)); end - # source://async-io//lib/async/io/stream.rb#117 + # source://async-io//lib/async/io/stream.rb#102 def readpartial(size = T.unsafe(nil)); end # Writes `string` to the buffer. When the buffer is full or #sync is true the @@ -1062,7 +1062,7 @@ class Async::IO::Stream # @param string the string to write to the buffer. # @return the number of bytes appended to the buffer. # - # source://async-io//lib/async/io/stream.rb#174 + # source://async-io//lib/async/io/stream.rb#159 def write(string); end private @@ -1071,19 +1071,19 @@ class Async::IO::Stream # # @param size [Integer|nil] The amount of data to consume. If nil, consume entire buffer. # - # source://async-io//lib/async/io/stream.rb#283 + # source://async-io//lib/async/io/stream.rb#268 def consume_read_buffer(size = T.unsafe(nil)); end # Fills the buffer from the underlying stream. # - # source://async-io//lib/async/io/stream.rb#253 + # source://async-io//lib/async/io/stream.rb#238 def fill_read_buffer(size = T.unsafe(nil)); end class << self - # source://async-io//lib/async/io/stream.rb#33 + # source://async-io//lib/async/io/stream.rb#18 def open(path, mode = T.unsafe(nil), **options); end end end -# source://async-io//lib/async/io/stream.rb#31 +# source://async-io//lib/async/io/stream.rb#16 Async::IO::Stream::BLOCK_SIZE = T.let(T.unsafe(nil), Integer) diff --git a/sorbet/rbi/gems/async@2.6.2.rbi b/sorbet/rbi/gems/async@2.6.5.rbi similarity index 89% rename from sorbet/rbi/gems/async@2.6.2.rbi rename to sorbet/rbi/gems/async@2.6.5.rbi index d409a037a..5372adf92 100644 --- a/sorbet/rbi/gems/async@2.6.2.rbi +++ b/sorbet/rbi/gems/async@2.6.5.rbi @@ -416,10 +416,10 @@ class Async::Node # A useful identifier for the current node. # - # source://async//lib/async/node.rb#126 + # source://async//lib/async/node.rb#94 def annotation; end - # source://async//lib/async/node.rb#142 + # source://async//lib/async/node.rb#138 def backtrace(*arguments); end # Returns the value of attribute children. @@ -437,17 +437,17 @@ class Async::Node # If the node has a parent, and is {finished?}, then remove this node from # the parent. # - # source://async//lib/async/node.rb#195 + # source://async//lib/async/node.rb#191 def consume; end - # source://async//lib/async/node.rb#130 + # source://async//lib/async/node.rb#126 def description; end # Whether the node can be consumed (deleted) safely. By default, checks if the children set is empty. # # @return [Boolean] # - # source://async//lib/async/node.rb#189 + # source://async//lib/async/node.rb#185 def finished?; end # @private @@ -460,7 +460,7 @@ class Async::Node # source://async//lib/async/node.rb#82 def head=(_arg0); end - # source://async//lib/async/node.rb#146 + # source://async//lib/async/node.rb#142 def inspect; end # Returns the value of attribute parent. @@ -470,10 +470,10 @@ class Async::Node # Change the parent of this node. # - # source://async//lib/async/node.rb#156 + # source://async//lib/async/node.rb#152 def parent=(parent); end - # source://async//lib/async/node.rb#266 + # source://async//lib/async/node.rb#262 def print_hierarchy(out = T.unsafe(nil), backtrace: T.unsafe(nil)); end # source://async//lib/async/node.rb#77 @@ -481,12 +481,12 @@ class Async::Node # Attempt to stop the current node immediately, including all non-transient children. Invokes {#stop_children} to stop all children. # - # source://async//lib/async/node.rb#250 + # source://async//lib/async/node.rb#246 def stop(later = T.unsafe(nil)); end # @return [Boolean] # - # source://async//lib/async/node.rb#262 + # source://async//lib/async/node.rb#258 def stopped?; end # @private @@ -501,10 +501,10 @@ class Async::Node # Immediately terminate all children tasks, including transient tasks. Internally invokes `stop(false)` on all children. This should be considered a last ditch effort and is used when closing the scheduler. # - # source://async//lib/async/node.rb#235 + # source://async//lib/async/node.rb#231 def terminate; end - # source://async//lib/async/node.rb#146 + # source://async//lib/async/node.rb#142 def to_s; end # Represents whether a node is transient. Transient nodes are not considered @@ -521,34 +521,34 @@ class Async::Node # Traverse the task tree. # - # source://async//lib/async/node.rb#220 + # source://async//lib/async/node.rb#216 def traverse(&block); end protected - # source://async//lib/async/node.rb#175 + # source://async//lib/async/node.rb#171 def add_child(child); end - # source://async//lib/async/node.rb#181 + # source://async//lib/async/node.rb#177 def remove_child(child); end - # source://async//lib/async/node.rb#171 + # source://async//lib/async/node.rb#167 def set_parent(parent); end # @yield [_self, level] # @yieldparam _self [Async::Node] the object that the method was called on # - # source://async//lib/async/node.rb#226 + # source://async//lib/async/node.rb#222 def traverse_recurse(level = T.unsafe(nil), &block); end private - # source://async//lib/async/node.rb#278 + # source://async//lib/async/node.rb#274 def print_backtrace(out, indent, node); end # Attempt to stop all non-transient children. # - # source://async//lib/async/node.rb#256 + # source://async//lib/async/node.rb#252 def stop_children(later = T.unsafe(nil)); end end @@ -672,7 +672,7 @@ class Async::Scheduler < ::Async::Node # source://async//lib/async/scheduler.rb#32 def initialize(parent = T.unsafe(nil), selector: T.unsafe(nil)); end - # source://async//lib/async/scheduler.rb#158 + # source://async//lib/async/scheduler.rb#161 def address_resolve(hostname); end # Start an asynchronous task within the specified reactor. The task will be @@ -683,99 +683,107 @@ class Async::Scheduler < ::Async::Node # # @deprecated With no replacement. # - # source://async//lib/async/scheduler.rb#284 + # source://async//lib/async/scheduler.rb#297 def async(*arguments, **options, &block); end # Invoked when a fiber tries to perform a blocking operation which cannot continue. A corresponding call {unblock} must be performed to allow this fiber to continue. # - # source://async//lib/async/scheduler.rb#115 + # source://async//lib/async/scheduler.rb#118 def block(blocker, timeout); end - # source://async//lib/async/scheduler.rb#50 + # source://async//lib/async/scheduler.rb#53 def close; end # @return [Boolean] # - # source://async//lib/async/scheduler.rb#74 + # source://async//lib/async/scheduler.rb#77 def closed?; end - # source://async//lib/async/scheduler.rb#302 + # source://async//lib/async/scheduler.rb#315 def fiber(*_arg0, **_arg1, &_arg2); end # Interrupt the event loop and cause it to exit. # - # source://async//lib/async/scheduler.rb#84 + # source://async//lib/async/scheduler.rb#87 def interrupt; end - # source://async//lib/async/scheduler.rb#187 + # source://async//lib/async/scheduler.rb#184 def io_read(io, buffer, length, offset = T.unsafe(nil)); end - # source://async//lib/async/scheduler.rb#166 + # source://async//lib/async/scheduler.rb#169 def io_wait(io, events, timeout = T.unsafe(nil)); end - # source://async//lib/async/scheduler.rb#149 + # source://async//lib/async/scheduler.rb#152 def kernel_sleep(duration = T.unsafe(nil)); end # Wait for the specified process ID to exit. # - # source://async//lib/async/scheduler.rb#203 + # source://async//lib/async/scheduler.rb#200 def process_wait(pid, flags); end # Schedule a fiber (or equivalent object) to be resumed on the next loop through the reactor. # - # source://async//lib/async/scheduler.rb#101 + # source://async//lib/async/scheduler.rb#104 def push(fiber); end - # source://async//lib/async/scheduler.rb#105 + # source://async//lib/async/scheduler.rb#108 def raise(*arguments); end - # source://async//lib/async/scheduler.rb#109 + # source://async//lib/async/scheduler.rb#112 def resume(fiber, *arguments); end # Run the reactor until all tasks are finished. Proxies arguments to {#async} immediately before entering the loop, if a block is provided. # - # source://async//lib/async/scheduler.rb#254 + # source://async//lib/async/scheduler.rb#267 def run(*_arg0, **_arg1, &_arg2); end # Run one iteration of the event loop. + # Does not handle interrupts. # - # source://async//lib/async/scheduler.rb#210 + # source://async//lib/async/scheduler.rb#208 def run_once(timeout = T.unsafe(nil)); end # source://async//lib/async/scheduler.rb#43 def scheduler_close; end - # source://async//lib/async/scheduler.rb#322 + # source://async//lib/async/scheduler.rb#335 def timeout_after(duration, exception, message, &block); end - # source://async//lib/async/scheduler.rb#78 + # source://async//lib/async/scheduler.rb#81 def to_s; end # Transfer from the calling fiber to the event loop. # - # source://async//lib/async/scheduler.rb#90 + # source://async//lib/async/scheduler.rb#93 def transfer; end - # source://async//lib/async/scheduler.rb#138 + # source://async//lib/async/scheduler.rb#141 def unblock(blocker, fiber); end # Invoke the block, but after the specified timeout, raise {TimeoutError} in any currenly blocking operation. If the block runs to completion before the timeout occurs or there are no non-blocking operations after the timeout expires, the code will complete without any exception. # - # source://async//lib/async/scheduler.rb#308 + # source://async//lib/async/scheduler.rb#321 def with_timeout(duration, exception = T.unsafe(nil), message = T.unsafe(nil), &block); end # Yield the current fiber and resume it on the next iteration of the event loop. # - # source://async//lib/async/scheduler.rb#95 + # source://async//lib/async/scheduler.rb#98 def yield; end private + # Checks and clears the interrupted state of the scheduler. + # + # @return [Boolean] + # + # source://async//lib/async/scheduler.rb#253 + def interrupted?; end + # Run one iteration of the event loop. # # When terminating the event loop, we already know we are finished. So we don't need to check the task tree. This is a logical requirement because `run_once` ignores transient tasks. For example, a single top level transient task is not enough to keep the reactor running, but during termination we must still process it in order to terminate child tasks. # - # source://async//lib/async/scheduler.rb#227 + # source://async//lib/async/scheduler.rb#225 def run_once!(timeout = T.unsafe(nil)); end class << self @@ -897,215 +905,195 @@ class Async::Stop::Later def transfer; end end -# Encapsulates the state of a running task and it's result. -# -# ```mermaid -# stateDiagram-v2 -# [*] --> Initialized -# Initialized --> Running : Run -# -# Running --> Completed : Return Value -# Running --> Failed : Exception -# -# Completed --> [*] -# Failed --> [*] -# -# Running --> Stopped : Stop -# Stopped --> [*] -# Completed --> Stopped : Stop -# Failed --> Stopped : Stop -# Initialized --> Stopped : Stop -# ``` -# -# source://async//lib/async/task.rb#61 +# source://async//lib/async/task.rb#41 class Async::Task < ::Async::Node # Create a new task. # # @return [Task] a new instance of Task # - # source://async//lib/async/task.rb#76 + # source://async//lib/async/task.rb#56 def initialize(parent = T.unsafe(nil), finished: T.unsafe(nil), **options, &block); end # Whether the internal fiber is alive, i.e. it # # @return [Boolean] # - # source://async//lib/async/task.rb#138 + # source://async//lib/async/task.rb#118 def alive?; end - # source://async//lib/async/task.rb#99 + # source://async//lib/async/task.rb#79 def annotate(annotation, &block); end - # source://async//lib/async/task.rb#107 + # source://async//lib/async/task.rb#87 def annotation; end # Run an asynchronous task as a child of the current task. # # @raise [FinishedError] # - # source://async//lib/async/task.rb#188 + # source://async//lib/async/task.rb#168 def async(*arguments, **options, &block); end - # source://async//lib/async/task.rb#95 + # source://async//lib/async/task.rb#75 def backtrace(*arguments); end # The task has completed execution and generated a result. # # @return [Boolean] # - # source://async//lib/async/task.rb#165 + # source://async//lib/async/task.rb#145 def complete?; end # The task has completed execution and generated a result. # # @return [Boolean] # - # source://async//lib/async/task.rb#165 + # source://async//lib/async/task.rb#145 def completed?; end # @return [Boolean] # - # source://async//lib/async/task.rb#274 + # source://async//lib/async/task.rb#254 def current?; end # @return [Boolean] # - # source://async//lib/async/task.rb#155 + # source://async//lib/async/task.rb#135 def failed?; end # @attr fiber [Fiber] The fiber which is being used for the execution of this task. # - # source://async//lib/async/task.rb#135 + # source://async//lib/async/task.rb#115 def fiber; end # Whether we can remove this node from the reactor graph. # # @return [Boolean] # - # source://async//lib/async/task.rb#144 + # source://async//lib/async/task.rb#124 def finished?; end - # source://async//lib/async/task.rb#91 + # source://async//lib/async/task.rb#71 def reactor; end # Access the result of the task without waiting. May be nil if the task is not completed. Does not raise exceptions. # - # source://async//lib/async/task.rb#221 + # source://async//lib/async/task.rb#201 def result; end # Begin the execution of the task. # - # source://async//lib/async/task.rb#175 + # source://async//lib/async/task.rb#155 def run(*arguments); end # Whether the task is running. # # @return [Boolean] # - # source://async//lib/async/task.rb#151 + # source://async//lib/async/task.rb#131 def running?; end # @deprecated Prefer {Kernel#sleep} except when compatibility with `stable-v1` is required. # - # source://async//lib/async/task.rb#120 + # source://async//lib/async/task.rb#100 def sleep(duration = T.unsafe(nil)); end # @attr status [Symbol] The status of the execution of the fiber, one of `:initialized`, `:running`, `:complete`, `:stopped` or `:failed`. # - # source://async//lib/async/task.rb#172 + # source://async//lib/async/task.rb#152 def status; end # Stop the task and all of its children. # # If `later` is false, it means that `stop` has been invoked directly. When `later` is true, it means that `stop` is invoked by `stop_children` or some other indirect mechanism. In that case, if we encounter the "current" fiber, we can't stop it right away, as it's currently performing `#stop`. Stopping it immediately would interrupt the current stop traversal, so we need to schedule the stop to occur later. # - # source://async//lib/async/task.rb#228 + # source://async//lib/async/task.rb#208 def stop(later = T.unsafe(nil)); end # The task has been stopped # # @return [Boolean] # - # source://async//lib/async/task.rb#160 + # source://async//lib/async/task.rb#140 def stopped?; end - # source://async//lib/async/task.rb#115 + # source://async//lib/async/task.rb#95 def to_s; end - # Retrieve the current result of the task. Will cause the caller to wait until result is available. If the result was an exception, raise that exception. + # Retrieve the current result of the task. Will cause the caller to wait until result is available. If the task resulted in an unhandled error (derived from `StandardError`), this will be raised. If the task was stopped, this will return `nil`. # # Conceptually speaking, waiting on a task should return a result, and if it throws an exception, this is certainly an exceptional case that should represent a failure in your program, not an expected outcome. In other words, you should not design your programs to expect exceptions from `#wait` as a normal flow control, and prefer to catch known exceptions within the task itself and return a result that captures the intention of the failure, e.g. a `TimeoutError` might simply return `nil` or `false` to indicate that the operation did not generate a valid result (as a timeout was an expected outcome of the internal operation in this case). # - # source://async//lib/async/task.rb#204 + # source://async//lib/async/task.rb#184 def wait; end # Execute the given block of code, raising the specified exception if it exceeds the given duration during a non-blocking operation. # - # source://async//lib/async/task.rb#125 + # source://async//lib/async/task.rb#105 def with_timeout(duration, exception = T.unsafe(nil), message = T.unsafe(nil), &block); end # Yield back to the reactor and allow other fibers to execute. # - # source://async//lib/async/task.rb#130 + # source://async//lib/async/task.rb#110 def yield; end private # State transition into the completed state. # - # source://async//lib/async/task.rb#297 + # source://async//lib/async/task.rb#277 def completed!(result); end # This is a very tricky aspect of tasks to get right. I've modelled it after `Thread` but it's slightly different in that the exception can propagate back up through the reactor. If the user writes code which raises an exception, that exception should always be visible, i.e. cause a failure. If it's not visible, such code fails silently and can be very difficult to debug. # - # source://async//lib/async/task.rb#303 + # source://async//lib/async/task.rb#283 def failed!(exception = T.unsafe(nil), propagate = T.unsafe(nil)); end # Finish the current task, moving any children to the parent. # - # source://async//lib/async/task.rb#281 + # source://async//lib/async/task.rb#261 def finish!; end - # source://async//lib/async/task.rb#345 + # source://async//lib/async/task.rb#325 def schedule(&block); end # Set the current fiber's `:async_task` to this task. # - # source://async//lib/async/task.rb#368 + # source://async//lib/async/task.rb#348 def set!; end - # source://async//lib/async/task.rb#339 + # source://async//lib/async/task.rb#319 def stop!; end - # source://async//lib/async/task.rb#319 + # source://async//lib/async/task.rb#299 def stopped!; end class << self # Lookup the {Task} for the current fiber. Raise `RuntimeError` if none is available. # @raises[RuntimeError] If task was not {set!} for the current fiber. # - # source://async//lib/async/task.rb#264 + # source://async//lib/async/task.rb#244 def current; end # Check if there is a task defined for the current fiber. # # @return [Boolean] # - # source://async//lib/async/task.rb#270 + # source://async//lib/async/task.rb#250 def current?; end # @deprecated With no replacement. # - # source://async//lib/async/task.rb#69 + # source://async//lib/async/task.rb#49 def yield; end end end -# source://async//lib/async/task.rb#62 +# source://async//lib/async/task.rb#42 class Async::Task::FinishedError < ::RuntimeError # @return [FinishedError] a new instance of FinishedError # - # source://async//lib/async/task.rb#63 + # source://async//lib/async/task.rb#43 def initialize(message = T.unsafe(nil)); end end diff --git a/sorbet/rbi/gems/base64@0.1.1.rbi b/sorbet/rbi/gems/base64@0.1.1.rbi new file mode 100644 index 000000000..58bcecc24 --- /dev/null +++ b/sorbet/rbi/gems/base64@0.1.1.rbi @@ -0,0 +1,172 @@ +# 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/better_html@2.0.1.rbi b/sorbet/rbi/gems/better_html@2.0.2.rbi similarity index 98% rename from sorbet/rbi/gems/better_html@2.0.1.rbi rename to sorbet/rbi/gems/better_html@2.0.2.rbi index 2182b5b78..8d7395eaf 100644 --- a/sorbet/rbi/gems/better_html@2.0.1.rbi +++ b/sorbet/rbi/gems/better_html@2.0.2.rbi @@ -394,16 +394,16 @@ class BetterHtml::Tokenizer::Location < ::Parser::Source::Range # source://better_html//lib/better_html/tokenizer/location.rb#54 def resize(new_size); end - # source://parser/3.2.2.3/lib/parser/source/range.rb#92 + # source://parser/3.2.2.4/lib/parser/source/range.rb#92 def start_column; end - # source://parser/3.2.2.3/lib/parser/source/range.rb#83 + # source://parser/3.2.2.4/lib/parser/source/range.rb#83 def start_line; end - # source://parser/3.2.2.3/lib/parser/source/range.rb#106 + # source://parser/3.2.2.4/lib/parser/source/range.rb#106 def stop_column; end - # source://parser/3.2.2.3/lib/parser/source/range.rb#99 + # source://parser/3.2.2.4/lib/parser/source/range.rb#99 def stop_line; end # source://better_html//lib/better_html/tokenizer/location.rb#46 diff --git a/sorbet/rbi/gems/bigdecimal@3.1.4.rbi b/sorbet/rbi/gems/bigdecimal@3.1.4.rbi new file mode 100644 index 000000000..d1d4ebe1a --- /dev/null +++ b/sorbet/rbi/gems/bigdecimal@3.1.4.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 BigDecimal::new. + # + # 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/chef-utils@18.2.7.rbi b/sorbet/rbi/gems/chef-utils@18.3.0.rbi similarity index 100% rename from sorbet/rbi/gems/chef-utils@18.2.7.rbi rename to sorbet/rbi/gems/chef-utils@18.3.0.rbi diff --git a/sorbet/rbi/gems/connection_pool@2.4.1.rbi b/sorbet/rbi/gems/connection_pool@2.4.1.rbi new file mode 100644 index 000000000..7b69a77c1 --- /dev/null +++ b/sorbet/rbi/gems/connection_pool@2.4.1.rbi @@ -0,0 +1,8 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `connection_pool` gem. +# Please instead update this file by running `bin/tapioca gem connection_pool`. + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/console@1.17.2.rbi b/sorbet/rbi/gems/console@1.23.2.rbi similarity index 80% rename from sorbet/rbi/gems/console@1.17.2.rbi rename to sorbet/rbi/gems/console@1.23.2.rbi index 8e22415fa..6edd8f69e 100644 --- a/sorbet/rbi/gems/console@1.17.2.rbi +++ b/sorbet/rbi/gems/console@1.23.2.rbi @@ -6,23 +6,36 @@ # source://console//lib/console/version.rb#6 module Console - # source://console//lib/console.rb#25 + # source://console//lib/console.rb#51 def logger; end - # source://console//lib/console.rb#21 + # source://console//lib/console.rb#47 def logger=(logger); end class << self - # @private - # - # source://console//lib/console.rb#29 - def extended(klass); end + # source://console//lib/console.rb#42 + def call(*_arg0, **_arg1, &_arg2); end + + # source://console//lib/console.rb#22 + def debug(*_arg0, **_arg1, &_arg2); end + + # source://console//lib/console.rb#34 + def error(*_arg0, **_arg1, &_arg2); end + + # source://console//lib/console.rb#38 + def fatal(*_arg0, **_arg1, &_arg2); end - # source://console//lib/console.rb#13 + # source://console//lib/console.rb#26 + def info(*_arg0, **_arg1, &_arg2); end + + # source://console//lib/console.rb#14 def logger; end - # source://console//lib/console.rb#17 + # source://console//lib/console.rb#18 def logger=(instance); end + + # source://console//lib/console.rb#30 + def warn(*_arg0, **_arg1, &_arg2); end end end @@ -194,22 +207,25 @@ class Console::Filter # @return [Filter] a new instance of Filter # # source://console//lib/console/filter.rb#46 - def initialize(output, verbose: T.unsafe(nil), level: T.unsafe(nil), enabled: T.unsafe(nil), **options); end + def initialize(output, verbose: T.unsafe(nil), level: T.unsafe(nil), **options); end - # source://console//lib/console/filter.rb#93 + # source://console//lib/console/filter.rb#89 def all!; end - # source://console//lib/console/filter.rb#129 + # source://console//lib/console/filter.rb#137 def call(*arguments, **options, &block); end - # Disable specific logging for the specific class. + # Clear any specific filters for the given class. # - # source://console//lib/console/filter.rb#121 + # source://console//lib/console/filter.rb#129 + def clear(subject); end + + # source://console//lib/console/filter.rb#122 def disable(subject); end # Enable specific log level for the given class. # - # source://console//lib/console/filter.rb#111 + # source://console//lib/console/filter.rb#117 def enable(subject, level = T.unsafe(nil)); end # You can enable and disable logging for classes. This function checks if logging for a given subject is enabled. @@ -217,58 +233,61 @@ class Console::Filter # @param subject [Object] the subject to check. # @return [Boolean] # - # source://console//lib/console/filter.rb#99 + # source://console//lib/console/filter.rb#103 def enabled?(subject, level = T.unsafe(nil)); end + # source://console//lib/console/filter.rb#93 + def filter(subject, level); end + # Returns the value of attribute level. # - # source://console//lib/console/filter.rb#70 + # source://console//lib/console/filter.rb#66 def level; end - # source://console//lib/console/filter.rb#76 + # source://console//lib/console/filter.rb#72 def level=(level); end - # source://console//lib/console/filter.rb#89 + # source://console//lib/console/filter.rb#85 def off!; end # Returns the value of attribute options. # - # source://console//lib/console/filter.rb#74 + # source://console//lib/console/filter.rb#70 def options; end # Sets the attribute options # # @param value the value to set the attribute options to. # - # source://console//lib/console/filter.rb#74 + # source://console//lib/console/filter.rb#70 def options=(_arg0); end # Returns the value of attribute output. # - # source://console//lib/console/filter.rb#68 + # source://console//lib/console/filter.rb#64 def output; end # Sets the attribute output # # @param value the value to set the attribute output to. # - # source://console//lib/console/filter.rb#68 + # source://console//lib/console/filter.rb#64 def output=(_arg0); end # Returns the value of attribute subjects. # - # source://console//lib/console/filter.rb#72 + # source://console//lib/console/filter.rb#68 def subjects; end # Returns the value of attribute verbose. # - # source://console//lib/console/filter.rb#69 + # source://console//lib/console/filter.rb#65 def verbose; end - # source://console//lib/console/filter.rb#84 + # source://console//lib/console/filter.rb#80 def verbose!(value = T.unsafe(nil)); end - # source://console//lib/console/filter.rb#60 + # source://console//lib/console/filter.rb#56 def with(level: T.unsafe(nil), verbose: T.unsafe(nil), **options); end class << self @@ -277,6 +296,54 @@ class Console::Filter end end +# source://console//lib/console/format/safe.rb#9 +module Console::Format + class << self + # source://console//lib/console/format.rb#10 + def default; end + + # source://console//lib/console/format.rb#14 + def default_json; end + end +end + +# This class is used to safely dump objects. +# It will attempt to dump the object using the given format, but if it fails, it will generate a safe version of the object. +# +# source://console//lib/console/format/safe.rb#12 +class Console::Format::Safe + # @return [Safe] a new instance of Safe + # + # source://console//lib/console/format/safe.rb#13 + def initialize(format: T.unsafe(nil), limit: T.unsafe(nil), encoding: T.unsafe(nil)); end + + # source://console//lib/console/format/safe.rb#19 + def dump(object); end + + private + + # source://console//lib/console/format/safe.rb#88 + def default_objects; end + + # source://console//lib/console/format/safe.rb#27 + def filter_backtrace(error); end + + # source://console//lib/console/format/safe.rb#77 + def replacement_for(object); end + + # source://console//lib/console/format/safe.rb#64 + def safe_dump(object, error); end + + # This will recursively generate a safe version of the object. + # Nested hashes and arrays will be transformed recursively. + # Strings will be encoded with the given encoding. + # Primitive values will be returned as-is. + # Other values will be converted using `as_json` if available, otherwise `to_s`. + # + # source://console//lib/console/format/safe.rb#97 + def safe_dump_recurse(object, limit = T.unsafe(nil), objects = T.unsafe(nil)); end +end + # source://console//lib/console/logger.rb#19 class Console::Logger < ::Console::Filter extend ::Fiber::Local @@ -323,7 +390,7 @@ Console::Logger::DEFAULT_LEVEL = T.let(T.unsafe(nil), Integer) # source://console//lib/console/output/xterm.rb#9 module Console::Output class << self - # source://console//lib/console/output.rb#13 + # source://console//lib/console/output.rb#14 def new(output = T.unsafe(nil), env = T.unsafe(nil), **options); end end end @@ -344,6 +411,17 @@ module Console::Output::JSON end end +# source://console//lib/console/output/null.rb#8 +class Console::Output::Null + # @return [Null] a new instance of Null + # + # source://console//lib/console/output/null.rb#9 + def initialize(*_arg0, **_arg1, &_arg2); end + + # source://console//lib/console/output/null.rb#12 + def call(*_arg0, **_arg1, &_arg2); end +end + # source://console//lib/console/output/text.rb#10 module Console::Output::Text class << self @@ -360,67 +438,67 @@ module Console::Output::XTerm end end -# source://console//lib/console/progress.rb#10 +# source://console//lib/console/progress.rb#11 class Console::Progress # @return [Progress] a new instance of Progress # - # source://console//lib/console/progress.rb#15 + # source://console//lib/console/progress.rb#16 def initialize(output, subject, total = T.unsafe(nil), minimum_output_duration: T.unsafe(nil)); end - # source://console//lib/console/progress.rb#44 + # source://console//lib/console/progress.rb#45 def average_duration; end # Returns the value of attribute current. # - # source://console//lib/console/progress.rb#29 + # source://console//lib/console/progress.rb#30 def current; end - # source://console//lib/console/progress.rb#32 + # source://console//lib/console/progress.rb#33 def duration; end - # source://console//lib/console/progress.rb#50 + # source://console//lib/console/progress.rb#51 def estimated_remaining_time; end - # source://console//lib/console/progress.rb#56 + # source://console//lib/console/progress.rb#57 def increment(amount = T.unsafe(nil)); end - # source://console//lib/console/progress.rb#76 + # source://console//lib/console/progress.rb#77 def mark(*_arg0, **_arg1, &_arg2); end - # source://console//lib/console/progress.rb#36 + # source://console//lib/console/progress.rb#37 def ratio; end - # source://console//lib/console/progress.rb#40 + # source://console//lib/console/progress.rb#41 def remaining; end - # source://console//lib/console/progress.rb#67 + # source://console//lib/console/progress.rb#68 def resize(total); end # Returns the value of attribute subject. # - # source://console//lib/console/progress.rb#28 + # source://console//lib/console/progress.rb#29 def subject; end - # source://console//lib/console/progress.rb#80 + # source://console//lib/console/progress.rb#81 def to_s; end # Returns the value of attribute total. # - # source://console//lib/console/progress.rb#30 + # source://console//lib/console/progress.rb#31 def total; end private - # source://console//lib/console/progress.rb#90 + # source://console//lib/console/progress.rb#91 def duration_since_last_output; end # @return [Boolean] # - # source://console//lib/console/progress.rb#96 + # source://console//lib/console/progress.rb#97 def output?; end class << self - # source://console//lib/console/progress.rb#11 + # source://console//lib/console/progress.rb#12 def now; end end end @@ -491,13 +569,13 @@ class Console::Serialized::Logger private - # source://console//lib/console/serialized/logger.rb#86 + # source://console//lib/console/serialized/logger.rb#90 def find_exception(message); end - # source://console//lib/console/serialized/logger.rb#96 + # source://console//lib/console/serialized/logger.rb#100 def format_backtrace(exception, buffer); end - # source://console//lib/console/serialized/logger.rb#90 + # source://console//lib/console/serialized/logger.rb#94 def format_stack(exception); end end diff --git a/sorbet/rbi/gems/dotenv@2.7.6.rbi b/sorbet/rbi/gems/dotenv@2.8.1.rbi similarity index 95% rename from sorbet/rbi/gems/dotenv@2.7.6.rbi rename to sorbet/rbi/gems/dotenv@2.8.1.rbi index 605d72e97..c941a034d 100644 --- a/sorbet/rbi/gems/dotenv@2.7.6.rbi +++ b/sorbet/rbi/gems/dotenv@2.8.1.rbi @@ -163,7 +163,7 @@ class Dotenv::Parser private - # source://dotenv//lib/dotenv/parser.rb#90 + # source://dotenv//lib/dotenv/parser.rb#82 def expand_newlines(value); end # source://dotenv//lib/dotenv/parser.rb#62 @@ -172,12 +172,18 @@ class Dotenv::Parser # source://dotenv//lib/dotenv/parser.rb#70 def parse_value(value); end - # source://dotenv//lib/dotenv/parser.rb#86 + # source://dotenv//lib/dotenv/parser.rb#100 + def perform_substitutions(value, maybe_quote); end + + # source://dotenv//lib/dotenv/parser.rb#78 def unescape_characters(value); end + # source://dotenv//lib/dotenv/parser.rb#90 + def unescape_value(value, maybe_quote); end + # @return [Boolean] # - # source://dotenv//lib/dotenv/parser.rb#94 + # source://dotenv//lib/dotenv/parser.rb#86 def variable_not_set?(line); end class << self @@ -222,7 +228,7 @@ module Dotenv::Substitutions::Variable private - # source://dotenv//lib/dotenv/substitutions/variable.rb#35 + # source://dotenv//lib/dotenv/substitutions/variable.rb#31 def substitute(match, variable, env); end end end diff --git a/sorbet/rbi/gems/drb@2.1.1.rbi b/sorbet/rbi/gems/drb@2.1.1.rbi new file mode 100644 index 000000000..bc69613c0 --- /dev/null +++ b/sorbet/rbi/gems/drb@2.1.1.rbi @@ -0,0 +1,1313 @@ +# 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 +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//drb/drb.rb#1831 + 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//drb/drb.rb#1788 + def current_server; end + + # Retrieves the server with the given +uri+. + # + # See also regist_server and remove_server. + # + # source://drb//drb/drb.rb#1933 + 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//drb/drb.rb#1842 + def front; end + + # Is +uri+ the URI for the current local server? + # + # @return [Boolean] + # + # source://drb//drb/drb.rb#1821 + def here?(uri); end + + # Set the default ACL to +acl+. + # + # See DRb::DRbServer.default_acl. + # + # source://drb//drb/drb.rb#1887 + 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//drb/drb.rb#1879 + def install_id_conv(idconv); end + + # source://drb//drb/drb.rb#1893 + def mutex; end + + # The primary local dRuby server. + # + # This is the server created by the #start_service call. + # + # source://drb//drb/drb.rb#1775 + def primary_server; end + + # The primary local dRuby server. + # + # This is the server created by the #start_service call. + # + # source://drb//drb/drb.rb#1775 + 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//drb/drb.rb#1911 + def regist_server(server); end + + # Removes +server+ from the list of registered servers. + # + # source://drb//drb/drb.rb#1920 + 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//drb/drb.rb#1767 + 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//drb/drb.rb#1800 + def stop_service; end + + # Get the thread of the primary server. + # + # This returns nil if there is no primary server. See #primary_server. + # + # source://drb//drb/drb.rb#1868 + 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//drb/drb.rb#1859 + 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//drb/drb.rb#1851 + def to_obj(ref); end + + # Get the URI defining the local dRuby space. + # + # This is the URI of the current server. See #current_server. + # + # source://drb//drb/drb.rb#1809 + 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//drb/drb.rb#1831 + 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//drb/drb.rb#1788 + def current_server; end + + # Retrieves the server with the given +uri+. + # + # See also regist_server and remove_server. + # + # source://drb//drb/drb.rb#1933 + 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//drb/drb.rb#1842 + def front; end + + # Is +uri+ the URI for the current local server? + # + # @return [Boolean] + # + # source://drb//drb/drb.rb#1821 + def here?(uri); end + + # Set the default ACL to +acl+. + # + # See DRb::DRbServer.default_acl. + # + # source://drb//drb/drb.rb#1887 + 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//drb/drb.rb#1879 + def install_id_conv(idconv); end + + # source://drb//drb/drb.rb#1893 + def mutex; end + + # The primary local dRuby server. + # + # This is the server created by the #start_service call. + # + # source://drb//drb/drb.rb#1775 + def primary_server; end + + # The primary local dRuby server. + # + # This is the server created by the #start_service call. + # + # source://drb//drb/drb.rb#1775 + 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//drb/drb.rb#1911 + def regist_server(server); end + + # Removes +server+ from the list of registered servers. + # + # source://drb//drb/drb.rb#1920 + 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//drb/drb.rb#1767 + 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//drb/drb.rb#1800 + def stop_service; end + + # Get the thread of the primary server. + # + # This returns nil if there is no primary server. See #primary_server. + # + # source://drb//drb/drb.rb#1868 + 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//drb/drb.rb#1859 + 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//drb/drb.rb#1851 + def to_obj(ref); end + + # Get the URI defining the local dRuby space. + # + # This is the URI of the current server. See #current_server. + # + # source://drb//drb/drb.rb#1809 + 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. +class DRb::DRbArray + # Creates a new DRbArray that either dumps or wraps all the items in the + # Array +ary+ so they can be loaded by a remote DRb server. + # + # @return [DRbArray] a new instance of DRbArray + # + # source://drb//drb/drb.rb#522 + def initialize(ary); end + + # source://drb//drb/drb.rb#541 + def _dump(lv); end + + class << self + # source://drb//drb/drb.rb#537 + 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. +class DRb::DRbConn + # @return [DRbConn] a new instance of DRbConn + # + # source://drb//drb/drb.rb#1316 + def initialize(remote_uri); end + + # @return [Boolean] + # + # source://drb//drb/drb.rb#1332 + def alive?; end + + # source://drb//drb/drb.rb#1327 + def close; end + + # source://drb//drb/drb.rb#1322 + def send_message(ref, msg_id, arg, block); end + + # source://drb//drb/drb.rb#1320 + def uri; end + + class << self + # source://drb//drb/drb.rb#1258 + def make_pool; end + + # source://drb//drb/drb.rb#1296 + def open(remote_uri); end + + # source://drb//drb/drb.rb#1291 + 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. +class DRb::DRbIdConv + # Convert an object into a reference id. + # + # This implementation returns the object's __id__ in the local + # object space. + # + # source://drb//drb/drb.rb#373 + 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//drb/drb.rb#365 + 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. +class DRb::DRbMessage + # @return [DRbMessage] a new instance of DRbMessage + # + # source://drb//drb/drb.rb#556 + def initialize(config); end + + # source://drb//drb/drb.rb#561 + def dump(obj, error = T.unsafe(nil)); end + + # @raise [DRbConnError] + # + # source://drb//drb/drb.rb#578 + def load(soc); end + + # source://drb//drb/drb.rb#638 + def recv_reply(stream); end + + # @raise [DRbConnError] + # + # source://drb//drb/drb.rb#618 + def recv_request(stream); end + + # source://drb//drb/drb.rb#632 + def send_reply(stream, succ, result); end + + # source://drb//drb/drb.rb#604 + def send_request(stream, ref, msg_id, arg, b); end + + private + + # source://drb//drb/drb.rb#645 + def make_proxy(obj, error = T.unsafe(nil)); end +end + +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//drb/drb.rb#1088 + def initialize(obj, uri = T.unsafe(nil)); end + + # source://drb//drb/eq.rb#4 + def ==(other); end + + # Get the reference of the object, if local. + # + # source://drb//drb/drb.rb#1114 + def __drbref; end + + # Get the URI of the remote object. + # + # source://drb//drb/drb.rb#1109 + def __drburi; end + + # Marshall this object. + # + # The URI and ref of the object are marshalled. + # + # source://drb//drb/drb.rb#1079 + def _dump(lv); end + + # source://drb//drb/eq.rb#4 + def eql?(other); end + + # source://drb//drb/eq.rb#9 + def hash; end + + # source://drb//drb/drb.rb#1134 + def method_missing(msg_id, *a, **_arg2, &b); end + + # source://drb//drb/drb.rb#1186 + def pretty_print(q); end + + # source://drb//drb/drb.rb#1190 + def pretty_print_cycle(q); end + + # Routes respond_to? to the referenced remote object. + # + # @return [Boolean] + # + # source://drb//drb/drb.rb#1122 + 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//drb/drb.rb#1050 + def _load(s); end + + # Creates a DRb::DRbObject given the reference information to the remote + # host +uri+ and object +ref+. + # + # source://drb//drb/drb.rb#1064 + def new_with(uri, ref); end + + # Create a new DRbObject from a URI alone. + # + # source://drb//drb/drb.rb#1072 + def new_with_uri(uri); end + + # Returns a modified backtrace from +result+ with the +uri+ where each call + # in the backtrace came from. + # + # source://drb//drb/drb.rb#1172 + def prepare_backtrace(uri, result); end + + # Given the +uri+ of another host executes the block provided. + # + # source://drb//drb/drb.rb#1159 + 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. +module DRb::DRbProtocol + private + + # Add a new protocol to the DRbProtocol module. + # + # source://drb//drb/drb.rb#723 + def add_protocol(prot); end + + # source://drb//drb/drb.rb#801 + 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//drb/drb.rb#735 + 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//drb/drb.rb#763 + 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//drb/drb.rb#784 + def uri_option(uri, config, first = T.unsafe(nil)); end + + class << self + # Add a new protocol to the DRbProtocol module. + # + # source://drb//drb/drb.rb#723 + def add_protocol(prot); end + + # source://drb//drb/drb.rb#801 + 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//drb/drb.rb#735 + 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//drb/drb.rb#763 + 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//drb/drb.rb#784 + def uri_option(uri, config, first = T.unsafe(nil)); end + end +end + +# An exception wrapping an error object +class DRb::DRbRemoteError < ::DRb::DRbError + # Creates a new remote error that wraps the Exception +error+ + # + # @return [DRbRemoteError] a new instance of DRbRemoteError + # + # source://drb//drb/drb.rb#433 + def initialize(error); end + + # the class of the error, as a string. + # + # source://drb//drb/drb.rb#440 + def reason; end +end + +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//drb/drb.rb#1450 + def initialize(uri = T.unsafe(nil), front = T.unsafe(nil), config_or_acl = T.unsafe(nil)); end + + # Is this server alive? + # + # @return [Boolean] + # + # source://drb//drb/drb.rb#1505 + 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//drb/drb.rb#1593 + def check_insecure_method(obj, msg_id); end + + # The configuration of this DRbServer + # + # source://drb//drb/drb.rb#1492 + 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//drb/drb.rb#1489 + def front; end + + # Is +uri+ the URI for this server? + # + # @return [Boolean] + # + # source://drb//drb/drb.rb#1510 + def here?(uri); end + + # Stop this server. + # + # source://drb//drb/drb.rb#1515 + 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//drb/drb.rb#1483 + def thread; end + + # Convert a local object to a dRuby reference. + # + # source://drb//drb/drb.rb#1532 + def to_id(obj); end + + # Convert a dRuby reference to the local object it refers to. + # + # source://drb//drb/drb.rb#1525 + def to_obj(ref); end + + # The URI of this DRbServer. + # + # source://drb//drb/drb.rb#1476 + def uri; end + + # Get whether the server is in verbose mode. + # + # In verbose mode, failed calls are logged to stdout. + # + # source://drb//drb/drb.rb#1502 + def verbose; end + + # Set whether to operate in verbose mode. + # + # In verbose mode, failed calls are logged to stdout. + # + # source://drb//drb/drb.rb#1497 + 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//drb/drb.rb#1579 + def any_to_s(obj); end + + # source://drb//drb/drb.rb#1695 + def error_print(exception); end + + # Has a method been included in the list of insecure methods? + # + # @return [Boolean] + # + # source://drb//drb/drb.rb#1573 + 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//drb/drb.rb#1713 + def main_loop; end + + # Starts the DRb main loop in a new thread. + # + # source://drb//drb/drb.rb#1554 + def run; end + + # source://drb//drb/drb.rb#1539 + 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//drb/drb.rb#1374 + def default_acl(acl); end + + # Set the default value for the :argc_limit option. + # + # See #new(). The initial default value is 256. + # + # source://drb//drb/drb.rb#1360 + def default_argc_limit(argc); end + + # Set the default value for the :id_conv option. + # + # See #new(). The initial default value is a DRbIdConv instance. + # + # source://drb//drb/drb.rb#1381 + def default_id_conv(idconv); end + + # Set the default value for the :load_limit option. + # + # See #new(). The initial default value is 25 MB. + # + # source://drb//drb/drb.rb#1367 + def default_load_limit(sz); end + + # source://drb//drb/drb.rb#1397 + def make_config(hash = T.unsafe(nil)); end + + # Get the default value of the :verbose option. + # + # source://drb//drb/drb.rb#1393 + def verbose; end + + # Set the default value of the :verbose option. + # + # See #new(). The initial default value is false. + # + # source://drb//drb/drb.rb#1388 + def verbose=(on); end + end +end + +class DRb::DRbServer::InvokeMethod + include ::DRb::DRbServer::InvokeMethod18Mixin + + # @return [InvokeMethod] a new instance of InvokeMethod + # + # source://drb//drb/drb.rb#1624 + def initialize(drb_server, client); end + + # source://drb//drb/drb.rb#1629 + def perform; end + + private + + # source://drb//drb/drb.rb#1666 + def check_insecure_method; end + + # source://drb//drb/drb.rb#1658 + def init_with_client; end + + # source://drb//drb/drb.rb#1675 + def perform_without_block; end + + # source://drb//drb/drb.rb#1670 + def setup_message; end +end + +module DRb::DRbServer::InvokeMethod18Mixin + # source://drb//drb/invokemethod.rb#7 + def block_yield(x); end + + # source://drb//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. +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//drb/drb.rb#902 + def initialize(uri, soc, config = T.unsafe(nil)); end + + # On the server side, for an instance returned by #open_server, + # accept a client connection and return a new instance to handle + # the server's side of this client-server session. + # + # source://drb//drb/drb.rb#970 + def accept; end + + # Check to see if this connection is alive. + # + # @return [Boolean] + # + # source://drb//drb/drb.rb#1000 + 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//drb/drb.rb#952 + def close; end + + # Get the address of our TCP peer (the other end of the socket + # we are bound to. + # + # source://drb//drb/drb.rb#917 + def peeraddr; end + + # On the client side, receive a reply from the server. + # + # source://drb//drb/drb.rb#940 + def recv_reply; end + + # On the server side, receive a request from the client. + # + # source://drb//drb/drb.rb#930 + def recv_request; end + + # On the server side, send a reply to the client. + # + # source://drb//drb/drb.rb#935 + def send_reply(succ, result); end + + # On the client side, send a request to the server. + # + # source://drb//drb/drb.rb#925 + def send_request(ref, msg_id, arg, b); end + + # source://drb//drb/drb.rb#1009 + def set_sockopt(soc); end + + # Graceful shutdown + # + # source://drb//drb/drb.rb#995 + def shutdown; end + + # Get the socket. + # + # source://drb//drb/drb.rb#922 + def stream; end + + # Get the URI that we are connected to. + # + # source://drb//drb/drb.rb#913 + def uri; end + + private + + # source://drb//drb/drb.rb#985 + def accept_or_shutdown; end + + # source://drb//drb/drb.rb#961 + def close_shutdown_pipe; end + + class << self + # Returns the hostname of this server + # + # source://drb//drb/drb.rb#844 + 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//drb/drb.rb#837 + def open(uri, config); end + + # Open a server listening for connections at +uri+ using + # configuration +config+. + # + # source://drb//drb/drb.rb#875 + def open_server(uri, config); end + + # For the families available for +host+, returns a TCPServer on +port+. + # If +port+ is 0 the first available port is used. IPv4 servers are + # preferred over IPv6 servers. + # + # source://drb//drb/drb.rb#860 + def open_server_inaddr_any(host, port); end + + # source://drb//drb/drb.rb#817 + def parse_uri(uri); end + + # Parse +uri+ into a [uri, option] pair. + # + # source://drb//drb/drb.rb#892 + 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. +class DRb::DRbUNIXSocket < ::DRb::DRbTCPSocket + # @return [DRbUNIXSocket] a new instance of DRbUNIXSocket + # + # source://drb//drb/unix.rb#62 + def initialize(uri, soc, config = T.unsafe(nil), server_mode = T.unsafe(nil)); end + + # source://drb//drb/unix.rb#105 + def accept; end + + # source://drb//drb/unix.rb#95 + def close; end + + # source://drb//drb/unix.rb#111 + def set_sockopt(soc); end + + class << self + # source://drb//drb/unix.rb#28 + def open(uri, config); end + + # source://drb//drb/unix.rb#34 + def open_server(uri, config); end + + # :stopdoc: + # + # source://drb//drb/unix.rb#17 + def parse_uri(uri); end + + # source://drb//drb/unix.rb#72 + def temp_server; end + + # source://drb//drb/unix.rb#57 + def uri_option(uri, config); end + end +end + +# import from tempfile.rb +# +# source://drb//drb/unix.rb#70 +DRb::DRbUNIXSocket::Max_try = T.let(T.unsafe(nil), Integer) + +class DRb::DRbURIOption + # @return [DRbURIOption] a new instance of DRbURIOption + # + # source://drb//drb/drb.rb#1021 + def initialize(option); end + + # source://drb//drb/drb.rb#1027 + def ==(other); end + + # source://drb//drb/drb.rb#1027 + def eql?(other); end + + # source://drb//drb/drb.rb#1032 + def hash; end + + # Returns the value of attribute option. + # + # source://drb//drb/drb.rb#1024 + def option; end + + # source://drb//drb/drb.rb#1025 + 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. +module DRb::DRbUndumped + # @raise [TypeError] + # + # source://drb//drb/drb.rb#390 + 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. +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//drb/drb.rb#464 + def initialize(err, buf); end + + # source://drb//drb/drb.rb#493 + def _dump(lv); end + + # Buffer contained the marshalled, unknown object. + # + # source://drb//drb/drb.rb#483 + def buf; end + + # Create a DRbUnknownError exception containing this object. + # + # source://drb//drb/drb.rb#507 + def exception; end + + # The name of the unknown thing. + # + # Class name for unknown objects; variable name for unknown + # constants. + # + # source://drb//drb/drb.rb#480 + 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//drb/drb.rb#502 + def reload; end + + class << self + # source://drb//drb/drb.rb#485 + def _load(s); end + end +end + +# An exception wrapping a DRb::DRbUnknown object +class DRb::DRbUnknownError < ::DRb::DRbError + # Create a new DRbUnknownError for the DRb::DRbUnknown object +unknown+ + # + # @return [DRbUnknownError] a new instance of DRbUnknownError + # + # source://drb//drb/drb.rb#412 + def initialize(unknown); end + + # source://drb//drb/drb.rb#424 + def _dump(lv); end + + # Get the wrapped DRb::DRbUnknown object. + # + # source://drb//drb/drb.rb#418 + def unknown; end + + class << self + # source://drb//drb/drb.rb#420 + def _load(s); end + end +end + +class DRb::ThreadObject + include ::MonitorMixin + + # @return [ThreadObject] a new instance of ThreadObject + # + # source://drb//drb/drb.rb#1201 + def initialize(&blk); end + + # source://drb//drb/drb.rb#1236 + def _execute; end + + # @return [Boolean] + # + # source://drb//drb/drb.rb#1212 + def alive?; end + + # source://drb//drb/drb.rb#1216 + def kill; end + + # source://drb//drb/drb.rb#1221 + def method_missing(msg, *arg, &blk); end +end + +# source://drb//drb/drb.rb#1942 +DRbIdConv = DRb::DRbIdConv + +# :stopdoc: +# +# source://drb//drb/drb.rb#1940 +DRbObject = DRb::DRbObject + +# source://drb//drb/drb.rb#1941 +DRbUndumped = DRb::DRbUndumped diff --git a/sorbet/rbi/gems/erb_lint@0.4.0.rbi b/sorbet/rbi/gems/erb_lint@0.5.0.rbi similarity index 100% rename from sorbet/rbi/gems/erb_lint@0.4.0.rbi rename to sorbet/rbi/gems/erb_lint@0.5.0.rbi diff --git a/sorbet/rbi/gems/faraday-http-cache@2.5.0.rbi b/sorbet/rbi/gems/faraday-http-cache@2.5.0.rbi index 452dfddfa..c5440ef36 100644 --- a/sorbet/rbi/gems/faraday-http-cache@2.5.0.rbi +++ b/sorbet/rbi/gems/faraday-http-cache@2.5.0.rbi @@ -7,57 +7,57 @@ # source://faraday-http-cache//lib/faraday/http_cache/memory_store.rb#3 module Faraday class << self - # source://faraday/2.7.7/lib/faraday.rb#55 + # source://faraday/2.7.11/lib/faraday.rb#55 def default_adapter; end - # source://faraday/2.7.7/lib/faraday.rb#102 + # source://faraday/2.7.11/lib/faraday.rb#102 def default_adapter=(adapter); end - # source://faraday/2.7.7/lib/faraday.rb#59 + # source://faraday/2.7.11/lib/faraday.rb#59 def default_adapter_options; end - # source://faraday/2.7.7/lib/faraday.rb#59 + # source://faraday/2.7.11/lib/faraday.rb#59 def default_adapter_options=(_arg0); end - # source://faraday/2.7.7/lib/faraday.rb#120 + # source://faraday/2.7.11/lib/faraday.rb#120 def default_connection; end - # source://faraday/2.7.7/lib/faraday.rb#62 + # source://faraday/2.7.11/lib/faraday.rb#62 def default_connection=(_arg0); end - # source://faraday/2.7.7/lib/faraday.rb#127 + # source://faraday/2.7.11/lib/faraday.rb#127 def default_connection_options; end - # source://faraday/2.7.7/lib/faraday.rb#134 + # source://faraday/2.7.11/lib/faraday.rb#134 def default_connection_options=(options); end - # source://faraday/2.7.7/lib/faraday.rb#67 + # source://faraday/2.7.11/lib/faraday.rb#67 def ignore_env_proxy; end - # source://faraday/2.7.7/lib/faraday.rb#67 + # source://faraday/2.7.11/lib/faraday.rb#67 def ignore_env_proxy=(_arg0); end - # source://faraday/2.7.7/lib/faraday.rb#46 + # source://faraday/2.7.11/lib/faraday.rb#46 def lib_path; end - # source://faraday/2.7.7/lib/faraday.rb#46 + # source://faraday/2.7.11/lib/faraday.rb#46 def lib_path=(_arg0); end - # source://faraday/2.7.7/lib/faraday.rb#96 + # source://faraday/2.7.11/lib/faraday.rb#96 def new(url = T.unsafe(nil), options = T.unsafe(nil), &block); end - # source://faraday/2.7.7/lib/faraday.rb#107 + # source://faraday/2.7.11/lib/faraday.rb#107 def respond_to_missing?(symbol, include_private = T.unsafe(nil)); end - # source://faraday/2.7.7/lib/faraday.rb#42 + # source://faraday/2.7.11/lib/faraday.rb#42 def root_path; end - # source://faraday/2.7.7/lib/faraday.rb#42 + # source://faraday/2.7.11/lib/faraday.rb#42 def root_path=(_arg0); end private - # source://faraday/2.7.7/lib/faraday.rb#143 + # source://faraday/2.7.11/lib/faraday.rb#143 def method_missing(name, *args, &block); end end end diff --git a/sorbet/rbi/gems/faraday-net_http@3.0.2.rbi b/sorbet/rbi/gems/faraday-net_http@3.0.2.rbi index cce39128a..aa059e0c4 100644 --- a/sorbet/rbi/gems/faraday-net_http@3.0.2.rbi +++ b/sorbet/rbi/gems/faraday-net_http@3.0.2.rbi @@ -7,81 +7,81 @@ # source://faraday-net_http//lib/faraday/adapter/net_http.rb#12 module Faraday class << self - # source://faraday/2.7.7/lib/faraday.rb#55 + # source://faraday/2.7.11/lib/faraday.rb#55 def default_adapter; end - # source://faraday/2.7.7/lib/faraday.rb#102 + # source://faraday/2.7.11/lib/faraday.rb#102 def default_adapter=(adapter); end - # source://faraday/2.7.7/lib/faraday.rb#59 + # source://faraday/2.7.11/lib/faraday.rb#59 def default_adapter_options; end - # source://faraday/2.7.7/lib/faraday.rb#59 + # source://faraday/2.7.11/lib/faraday.rb#59 def default_adapter_options=(_arg0); end - # source://faraday/2.7.7/lib/faraday.rb#120 + # source://faraday/2.7.11/lib/faraday.rb#120 def default_connection; end - # source://faraday/2.7.7/lib/faraday.rb#62 + # source://faraday/2.7.11/lib/faraday.rb#62 def default_connection=(_arg0); end - # source://faraday/2.7.7/lib/faraday.rb#127 + # source://faraday/2.7.11/lib/faraday.rb#127 def default_connection_options; end - # source://faraday/2.7.7/lib/faraday.rb#134 + # source://faraday/2.7.11/lib/faraday.rb#134 def default_connection_options=(options); end - # source://faraday/2.7.7/lib/faraday.rb#67 + # source://faraday/2.7.11/lib/faraday.rb#67 def ignore_env_proxy; end - # source://faraday/2.7.7/lib/faraday.rb#67 + # source://faraday/2.7.11/lib/faraday.rb#67 def ignore_env_proxy=(_arg0); end - # source://faraday/2.7.7/lib/faraday.rb#46 + # source://faraday/2.7.11/lib/faraday.rb#46 def lib_path; end - # source://faraday/2.7.7/lib/faraday.rb#46 + # source://faraday/2.7.11/lib/faraday.rb#46 def lib_path=(_arg0); end - # source://faraday/2.7.7/lib/faraday.rb#96 + # source://faraday/2.7.11/lib/faraday.rb#96 def new(url = T.unsafe(nil), options = T.unsafe(nil), &block); end - # source://faraday/2.7.7/lib/faraday.rb#107 + # source://faraday/2.7.11/lib/faraday.rb#107 def respond_to_missing?(symbol, include_private = T.unsafe(nil)); end - # source://faraday/2.7.7/lib/faraday.rb#42 + # source://faraday/2.7.11/lib/faraday.rb#42 def root_path; end - # source://faraday/2.7.7/lib/faraday.rb#42 + # source://faraday/2.7.11/lib/faraday.rb#42 def root_path=(_arg0); end private - # source://faraday/2.7.7/lib/faraday.rb#143 + # source://faraday/2.7.11/lib/faraday.rb#143 def method_missing(name, *args, &block); end end end # source://faraday-net_http//lib/faraday/adapter/net_http.rb#13 class Faraday::Adapter - # source://faraday/2.7.7/lib/faraday/adapter.rb#28 + # source://faraday/2.7.11/lib/faraday/adapter.rb#28 def initialize(_app = T.unsafe(nil), opts = T.unsafe(nil), &block); end - # source://faraday/2.7.7/lib/faraday/adapter.rb#55 + # source://faraday/2.7.11/lib/faraday/adapter.rb#55 def call(env); end - # source://faraday/2.7.7/lib/faraday/adapter.rb#50 + # source://faraday/2.7.11/lib/faraday/adapter.rb#50 def close; end - # source://faraday/2.7.7/lib/faraday/adapter.rb#41 + # source://faraday/2.7.11/lib/faraday/adapter.rb#41 def connection(env); end private - # source://faraday/2.7.7/lib/faraday/adapter.rb#85 + # source://faraday/2.7.11/lib/faraday/adapter.rb#85 def request_timeout(type, options); end - # source://faraday/2.7.7/lib/faraday/adapter.rb#62 + # source://faraday/2.7.11/lib/faraday/adapter.rb#62 def save_response(env, status, body, headers = T.unsafe(nil), reason_phrase = T.unsafe(nil), finished: T.unsafe(nil)); end end diff --git a/sorbet/rbi/gems/faraday@2.7.7.rbi b/sorbet/rbi/gems/faraday@2.7.11.rbi similarity index 98% rename from sorbet/rbi/gems/faraday@2.7.7.rbi rename to sorbet/rbi/gems/faraday@2.7.11.rbi index eacaa12ca..5158c704b 100644 --- a/sorbet/rbi/gems/faraday@2.7.7.rbi +++ b/sorbet/rbi/gems/faraday@2.7.11.rbi @@ -533,7 +533,7 @@ class Faraday::ClientError < ::Faraday::Error; end # Raised by Faraday::Response::RaiseError in case of a 409 response. # -# source://faraday//lib/faraday/error.rb#116 +# source://faraday//lib/faraday/error.rb#120 class Faraday::ConflictError < ::Faraday::ClientError; end # Connection objects manage the default properties and the middleware @@ -864,7 +864,7 @@ Faraday::Connection::USER_AGENT = T.let(T.unsafe(nil), String) # A unified error for failed connections. # -# source://faraday//lib/faraday/error.rb#143 +# source://faraday//lib/faraday/error.rb#147 class Faraday::ConnectionFailed < ::Faraday::Error; end # ConnectionOptions contains the configurable properties for a Faraday @@ -1309,7 +1309,7 @@ class Faraday::Logging::Formatter # source://forwardable/1.3.3/forwardable.rb#231 def error(*args, **_arg1, &block); end - # source://faraday//lib/faraday/logging/formatter.rb#40 + # source://faraday//lib/faraday/logging/formatter.rb#41 def exception(exc); end # source://forwardable/1.3.3/forwardable.rb#231 @@ -1321,10 +1321,10 @@ class Faraday::Logging::Formatter # source://forwardable/1.3.3/forwardable.rb#231 def info(*args, **_arg1, &block); end - # source://faraday//lib/faraday/logging/formatter.rb#22 + # source://faraday//lib/faraday/logging/formatter.rb#25 def request(env); end - # source://faraday//lib/faraday/logging/formatter.rb#32 + # source://faraday//lib/faraday/logging/formatter.rb#34 def response(env); end # source://forwardable/1.3.3/forwardable.rb#231 @@ -1332,40 +1332,40 @@ class Faraday::Logging::Formatter private - # source://faraday//lib/faraday/logging/formatter.rb#96 + # source://faraday//lib/faraday/logging/formatter.rb#98 def apply_filters(output); end - # source://faraday//lib/faraday/logging/formatter.rb#62 + # source://faraday//lib/faraday/logging/formatter.rb#64 def dump_body(body); end # source://faraday//lib/faraday/logging/formatter.rb#58 def dump_headers(headers); end - # source://faraday//lib/faraday/logging/formatter.rb#116 + # source://faraday//lib/faraday/logging/formatter.rb#113 def log_body(type, body); end # @return [Boolean] # - # source://faraday//lib/faraday/logging/formatter.rb#83 + # source://faraday//lib/faraday/logging/formatter.rb#85 def log_body?(type); end # @return [Boolean] # - # source://faraday//lib/faraday/logging/formatter.rb#92 + # source://faraday//lib/faraday/logging/formatter.rb#94 def log_errors?; end - # source://faraday//lib/faraday/logging/formatter.rb#111 + # source://faraday//lib/faraday/logging/formatter.rb#109 def log_headers(type, headers); end # @return [Boolean] # - # source://faraday//lib/faraday/logging/formatter.rb#74 + # source://faraday//lib/faraday/logging/formatter.rb#76 def log_headers?(type); end - # source://faraday//lib/faraday/logging/formatter.rb#103 + # source://faraday//lib/faraday/logging/formatter.rb#105 def log_level; end - # source://faraday//lib/faraday/logging/formatter.rb#70 + # source://faraday//lib/faraday/logging/formatter.rb#72 def pretty_inspect(body); end end @@ -1510,11 +1510,11 @@ end # Raised by Faraday::Response::RaiseError in case of a nil status in response. # -# source://faraday//lib/faraday/error.rb#135 +# source://faraday//lib/faraday/error.rb#139 class Faraday::NilStatusError < ::Faraday::ServerError # @return [NilStatusError] a new instance of NilStatusError # - # source://faraday//lib/faraday/error.rb#136 + # source://faraday//lib/faraday/error.rb#140 def initialize(exc, response = T.unsafe(nil)); end end @@ -1673,7 +1673,7 @@ end # Raised by middlewares that parse the response, like the JSON response middleware. # -# source://faraday//lib/faraday/error.rb#151 +# source://faraday//lib/faraday/error.rb#155 class Faraday::ParsingError < ::Faraday::Error; end # Raised by Faraday::Response::RaiseError in case of a 407 response. @@ -2289,6 +2289,11 @@ class Faraday::RequestOptions < ::Faraday::Options end end +# Raised by Faraday::Response::RaiseError in case of a 408 response. +# +# source://faraday//lib/faraday/error.rb#116 +class Faraday::RequestTimeoutError < ::Faraday::ClientError; end + # Raised by Faraday::Response::RaiseError in case of a 404 response. # # source://faraday//lib/faraday/error.rb#108 @@ -2424,10 +2429,19 @@ class Faraday::Response::RaiseError < ::Faraday::Middleware # source://faraday//lib/faraday/response/raise_error.rb#13 def on_complete(env); end - # source://faraday//lib/faraday/response/raise_error.rb#56 + # source://faraday//lib/faraday/response/raise_error.rb#73 def query_params(env); end - # source://faraday//lib/faraday/response/raise_error.rb#40 + # Returns a hash of response data with the following keys: + # - status + # - headers + # - body + # - request + # + # The `request` key is omitted when the middleware is explicitly + # configured with the option `include_request: false`. + # + # source://faraday//lib/faraday/response/raise_error.rb#50 def response_values(env); end end @@ -2439,7 +2453,7 @@ Faraday::Response::RaiseError::ServerErrorStatuses = T.let(T.unsafe(nil), Range) # A unified client error for SSL errors. # -# source://faraday//lib/faraday/error.rb#147 +# source://faraday//lib/faraday/error.rb#151 class Faraday::SSLError < ::Faraday::Error; end # SSL-related options. @@ -2552,16 +2566,16 @@ end # Faraday server error class. Represents 5xx status responses. # -# source://faraday//lib/faraday/error.rb#124 +# source://faraday//lib/faraday/error.rb#128 class Faraday::ServerError < ::Faraday::Error; end # A unified client error for timeouts. # -# source://faraday//lib/faraday/error.rb#128 +# source://faraday//lib/faraday/error.rb#132 class Faraday::TimeoutError < ::Faraday::ServerError # @return [TimeoutError] a new instance of TimeoutError # - # source://faraday//lib/faraday/error.rb#129 + # source://faraday//lib/faraday/error.rb#133 def initialize(exc = T.unsafe(nil), response = T.unsafe(nil)); end end @@ -2572,7 +2586,7 @@ class Faraday::UnauthorizedError < ::Faraday::ClientError; end # Raised by Faraday::Response::RaiseError in case of a 422 response. # -# source://faraday//lib/faraday/error.rb#120 +# source://faraday//lib/faraday/error.rb#124 class Faraday::UnprocessableEntityError < ::Faraday::ClientError; end # Utils contains various static helper methods. diff --git a/sorbet/rbi/gems/ffi@1.15.5.rbi b/sorbet/rbi/gems/ffi@1.16.3.rbi similarity index 100% rename from sorbet/rbi/gems/ffi@1.15.5.rbi rename to sorbet/rbi/gems/ffi@1.16.3.rbi diff --git a/sorbet/rbi/gems/fugit@1.8.1.rbi b/sorbet/rbi/gems/fugit@1.9.0.rbi similarity index 87% rename from sorbet/rbi/gems/fugit@1.8.1.rbi rename to sorbet/rbi/gems/fugit@1.9.0.rbi index cda7024af..04ab2e649 100644 --- a/sorbet/rbi/gems/fugit@1.8.1.rbi +++ b/sorbet/rbi/gems/fugit@1.9.0.rbi @@ -79,7 +79,7 @@ end # source://fugit//lib/fugit/cron.rb#5 class Fugit::Cron - # source://fugit//lib/fugit/cron.rb#433 + # source://fugit//lib/fugit/cron.rb#431 def ==(o); end # Mostly used as a #next_time sanity check. @@ -90,23 +90,23 @@ class Fugit::Cron # # Nota bene: cron with seconds are not supported. # - # source://fugit//lib/fugit/cron.rb#331 + # source://fugit//lib/fugit/cron.rb#329 def brute_frequency(year = T.unsafe(nil)); end # @return [Boolean] # - # source://fugit//lib/fugit/cron.rb#200 + # source://fugit//lib/fugit/cron.rb#198 def day_match?(nt); end - # source://fugit//lib/fugit/cron.rb#433 + # source://fugit//lib/fugit/cron.rb#431 def eql?(o); end - # source://fugit//lib/fugit/cron.rb#439 + # source://fugit//lib/fugit/cron.rb#437 def hash; end # @return [Boolean] # - # source://fugit//lib/fugit/cron.rb#153 + # source://fugit//lib/fugit/cron.rb#151 def hour_match?(nt); end # Returns the value of attribute hours. @@ -116,12 +116,12 @@ class Fugit::Cron # @return [Boolean] # - # source://fugit//lib/fugit/cron.rb#230 + # source://fugit//lib/fugit/cron.rb#228 def match?(t); end # @return [Boolean] # - # source://fugit//lib/fugit/cron.rb#154 + # source://fugit//lib/fugit/cron.rb#152 def min_match?(nt); end # Returns the value of attribute minutes. @@ -131,12 +131,12 @@ class Fugit::Cron # @return [Boolean] # - # source://fugit//lib/fugit/cron.rb#152 + # source://fugit//lib/fugit/cron.rb#150 def month_match?(nt); end # @return [Boolean] # - # source://fugit//lib/fugit/cron.rb#189 + # source://fugit//lib/fugit/cron.rb#187 def monthday_match?(nt); end # Returns the value of attribute monthdays. @@ -156,7 +156,7 @@ class Fugit::Cron # gh-18 and noticing some > 1024 for some experiments. 2048 should # be ok. # - # source://fugit//lib/fugit/cron.rb#247 + # source://fugit//lib/fugit/cron.rb#245 def next_time(from = T.unsafe(nil)); end # Returns the value of attribute original. @@ -164,15 +164,15 @@ class Fugit::Cron # source://fugit//lib/fugit/cron.rb#20 def original; end - # source://fugit//lib/fugit/cron.rb#297 + # source://fugit//lib/fugit/cron.rb#295 def previous_time(from = T.unsafe(nil)); end - # source://fugit//lib/fugit/cron.rb#361 + # source://fugit//lib/fugit/cron.rb#359 def rough_frequency; end # @return [Boolean] # - # source://fugit//lib/fugit/cron.rb#155 + # source://fugit//lib/fugit/cron.rb#153 def sec_match?(nt); end # Returns the value of attribute seconds. @@ -185,28 +185,28 @@ class Fugit::Cron # source://fugit//lib/fugit/cron.rb#22 def timezone; end - # source://fugit//lib/fugit/cron.rb#418 + # source://fugit//lib/fugit/cron.rb#416 def to_a; end - # source://fugit//lib/fugit/cron.rb#55 + # source://fugit//lib/fugit/cron.rb#53 def to_cron_s; end - # source://fugit//lib/fugit/cron.rb#423 + # source://fugit//lib/fugit/cron.rb#421 def to_h; end # @return [Boolean] # - # source://fugit//lib/fugit/cron.rb#157 + # source://fugit//lib/fugit/cron.rb#155 def weekday_hash_match?(nt, hsh); end # @return [Boolean] # - # source://fugit//lib/fugit/cron.rb#173 + # source://fugit//lib/fugit/cron.rb#171 def weekday_match?(nt); end # @return [Boolean] # - # source://fugit//lib/fugit/cron.rb#168 + # source://fugit//lib/fugit/cron.rb#166 def weekday_modulo_match?(nt, mod); end # Returns the value of attribute weekdays. @@ -221,50 +221,50 @@ class Fugit::Cron protected - # source://fugit//lib/fugit/cron.rb#566 - def compact(key); end - - # source://fugit//lib/fugit/cron.rb#446 + # source://fugit//lib/fugit/cron.rb#444 def compact_month_days; end - # source://fugit//lib/fugit/cron.rb#587 + # source://fugit//lib/fugit/cron.rb#595 def determine_hours(arr); end - # source://fugit//lib/fugit/cron.rb#582 + # source://fugit//lib/fugit/cron.rb#591 def determine_minutes(arr); end - # source://fugit//lib/fugit/cron.rb#594 + # source://fugit//lib/fugit/cron.rb#599 def determine_monthdays(arr); end - # source://fugit//lib/fugit/cron.rb#599 + # source://fugit//lib/fugit/cron.rb#603 def determine_months(arr); end - # source://fugit//lib/fugit/cron.rb#577 + # source://fugit//lib/fugit/cron.rb#587 def determine_seconds(arr); end - # source://fugit//lib/fugit/cron.rb#629 + # source://fugit//lib/fugit/cron.rb#634 def determine_timezone(z); end - # source://fugit//lib/fugit/cron.rb#604 + # source://fugit//lib/fugit/cron.rb#607 def determine_weekdays(arr); end - # source://fugit//lib/fugit/cron.rb#508 + # source://fugit//lib/fugit/cron.rb#570 + def do_determine(key, arr, min, max); end + + # source://fugit//lib/fugit/cron.rb#510 def expand(min, max, r); end - # source://fugit//lib/fugit/cron.rb#489 + # source://fugit//lib/fugit/cron.rb#487 def init(original, h); end - # source://fugit//lib/fugit/cron.rb#524 + # source://fugit//lib/fugit/cron.rb#528 def range(min, max, sta, edn, sla); end - # source://fugit//lib/fugit/cron.rb#462 + # source://fugit//lib/fugit/cron.rb#460 def rough_days; end - # source://fugit//lib/fugit/cron.rb#634 + # source://fugit//lib/fugit/cron.rb#641 def weekdays_to_cron_s; end class << self - # source://fugit//lib/fugit/cron.rb#48 + # source://fugit//lib/fugit/cron.rb#46 def do_parse(s); end # source://fugit//lib/fugit/cron.rb#27 @@ -275,381 +275,381 @@ class Fugit::Cron end end -# source://fugit//lib/fugit/cron.rb#487 +# source://fugit//lib/fugit/cron.rb#485 Fugit::Cron::FREQUENCY_CACHE = T.let(T.unsafe(nil), Hash) -# source://fugit//lib/fugit/cron.rb#390 +# source://fugit//lib/fugit/cron.rb#388 class Fugit::Cron::Frequency # @return [Frequency] a new instance of Frequency # - # source://fugit//lib/fugit/cron.rb#395 + # source://fugit//lib/fugit/cron.rb#393 def initialize(deltas, span); end # Returns the value of attribute delta_max. # - # source://fugit//lib/fugit/cron.rb#392 + # source://fugit//lib/fugit/cron.rb#390 def delta_max; end # Returns the value of attribute delta_min. # - # source://fugit//lib/fugit/cron.rb#392 + # source://fugit//lib/fugit/cron.rb#390 def delta_min; end # Returns the value of attribute occurrences. # - # source://fugit//lib/fugit/cron.rb#392 + # source://fugit//lib/fugit/cron.rb#390 def occurrences; end # Returns the value of attribute span. # - # source://fugit//lib/fugit/cron.rb#392 + # source://fugit//lib/fugit/cron.rb#390 def span; end # Returns the value of attribute span_years. # - # source://fugit//lib/fugit/cron.rb#393 + # source://fugit//lib/fugit/cron.rb#391 def span_years; end - # source://fugit//lib/fugit/cron.rb#405 + # source://fugit//lib/fugit/cron.rb#403 def to_debug_s; end # Returns the value of attribute yearly_occurrences. # - # source://fugit//lib/fugit/cron.rb#393 + # source://fugit//lib/fugit/cron.rb#391 def yearly_occurrences; end end # source://fugit//lib/fugit/cron.rb#17 Fugit::Cron::MAXDAYS = T.let(T.unsafe(nil), Array) -# source://fugit//lib/fugit/cron.rb#238 +# source://fugit//lib/fugit/cron.rb#236 Fugit::Cron::MAX_ITERATION_COUNT = T.let(T.unsafe(nil), Integer) -# source://fugit//lib/fugit/cron.rb#652 +# source://fugit//lib/fugit/cron.rb#659 module Fugit::Cron::Parser include ::Raabro extend ::Raabro::ModuleMethods extend ::Raabro extend ::Fugit::Cron::Parser - # source://fugit//lib/fugit/cron.rb#688 + # source://fugit//lib/fugit/cron.rb#695 def _dom(i); end - # source://fugit//lib/fugit/cron.rb#690 + # source://fugit//lib/fugit/cron.rb#697 def _dow(i); end - # source://fugit//lib/fugit/cron.rb#687 + # source://fugit//lib/fugit/cron.rb#694 def _hou(i); end - # source://fugit//lib/fugit/cron.rb#689 + # source://fugit//lib/fugit/cron.rb#696 def _mon(i); end - # source://fugit//lib/fugit/cron.rb#686 + # source://fugit//lib/fugit/cron.rb#693 def _mos(i); end - # source://fugit//lib/fugit/cron.rb#747 + # source://fugit//lib/fugit/cron.rb#754 def _tz(i); end - # source://fugit//lib/fugit/cron.rb#744 + # source://fugit//lib/fugit/cron.rb#751 def _tz_delta(i); end - # source://fugit//lib/fugit/cron.rb#741 + # source://fugit//lib/fugit/cron.rb#748 def _tz_name(i); end # @return [Boolean] # - # source://fugit//lib/fugit/cron.rb#674 + # source://fugit//lib/fugit/cron.rb#681 def and?(i); end - # source://fugit//lib/fugit/cron.rb#749 + # source://fugit//lib/fugit/cron.rb#756 def classic_cron(i); end - # source://fugit//lib/fugit/cron.rb#672 + # source://fugit//lib/fugit/cron.rb#679 def comma(i); end # @return [Boolean] # - # source://fugit//lib/fugit/cron.rb#673 + # source://fugit//lib/fugit/cron.rb#680 def comma?(i); end - # source://fugit//lib/fugit/cron.rb#758 + # source://fugit//lib/fugit/cron.rb#765 def cron(i); end - # source://fugit//lib/fugit/cron.rb#680 + # source://fugit//lib/fugit/cron.rb#687 def dom(i); end - # source://fugit//lib/fugit/cron.rb#716 + # source://fugit//lib/fugit/cron.rb#723 def dom_elt(i); end - # source://fugit//lib/fugit/cron.rb#682 + # source://fugit//lib/fugit/cron.rb#689 def dow(i); end - # source://fugit//lib/fugit/cron.rb#718 + # source://fugit//lib/fugit/cron.rb#725 def dow_elt(i); end - # source://fugit//lib/fugit/cron.rb#725 + # source://fugit//lib/fugit/cron.rb#732 def dow_elt_(i); end - # source://fugit//lib/fugit/cron.rb#684 + # source://fugit//lib/fugit/cron.rb#691 def dow_hash(i); end - # source://fugit//lib/fugit/cron.rb#723 + # source://fugit//lib/fugit/cron.rb#730 def h_dow(i); end - # source://fugit//lib/fugit/cron.rb#679 + # source://fugit//lib/fugit/cron.rb#686 def hou(i); end - # source://fugit//lib/fugit/cron.rb#715 + # source://fugit//lib/fugit/cron.rb#722 def hou_elt(i); end - # source://fugit//lib/fugit/cron.rb#671 + # source://fugit//lib/fugit/cron.rb#678 def hyphen(i); end - # source://fugit//lib/fugit/cron.rb#737 + # source://fugit//lib/fugit/cron.rb#744 def ldom_(i); end - # source://fugit//lib/fugit/cron.rb#739 + # source://fugit//lib/fugit/cron.rb#746 def ldow(i); end - # source://fugit//lib/fugit/cron.rb#736 + # source://fugit//lib/fugit/cron.rb#743 def lhou_(i); end - # source://fugit//lib/fugit/cron.rb#730 + # source://fugit//lib/fugit/cron.rb#737 def list_dom(i); end - # source://fugit//lib/fugit/cron.rb#732 + # source://fugit//lib/fugit/cron.rb#739 def list_dow(i); end - # source://fugit//lib/fugit/cron.rb#729 + # source://fugit//lib/fugit/cron.rb#736 def list_hou(i); end - # source://fugit//lib/fugit/cron.rb#728 + # source://fugit//lib/fugit/cron.rb#735 def list_min(i); end - # source://fugit//lib/fugit/cron.rb#731 + # source://fugit//lib/fugit/cron.rb#738 def list_mon(i); end - # source://fugit//lib/fugit/cron.rb#727 + # source://fugit//lib/fugit/cron.rb#734 def list_sec(i); end - # source://fugit//lib/fugit/cron.rb#735 + # source://fugit//lib/fugit/cron.rb#742 def lmin_(i); end - # source://fugit//lib/fugit/cron.rb#738 + # source://fugit//lib/fugit/cron.rb#745 def lmon_(i); end - # source://fugit//lib/fugit/cron.rb#734 + # source://fugit//lib/fugit/cron.rb#741 def lsec_(i); end - # source://fugit//lib/fugit/cron.rb#720 + # source://fugit//lib/fugit/cron.rb#727 def mod(i); end - # source://fugit//lib/fugit/cron.rb#722 + # source://fugit//lib/fugit/cron.rb#729 def mod_dow(i); end - # source://fugit//lib/fugit/cron.rb#681 + # source://fugit//lib/fugit/cron.rb#688 def mon(i); end - # source://fugit//lib/fugit/cron.rb#717 + # source://fugit//lib/fugit/cron.rb#724 def mon_elt(i); end # min or sec # - # source://fugit//lib/fugit/cron.rb#678 + # source://fugit//lib/fugit/cron.rb#685 def mos(i); end # ssws: slash or sorws # - # source://fugit//lib/fugit/cron.rb#714 + # source://fugit//lib/fugit/cron.rb#721 def mos_elt(i); end - # source://fugit//lib/fugit/cron.rb#695 + # source://fugit//lib/fugit/cron.rb#702 def r_dom(i); end - # source://fugit//lib/fugit/cron.rb#697 + # source://fugit//lib/fugit/cron.rb#704 def r_dow(i); end - # source://fugit//lib/fugit/cron.rb#694 + # source://fugit//lib/fugit/cron.rb#701 def r_hou(i); end - # source://fugit//lib/fugit/cron.rb#696 + # source://fugit//lib/fugit/cron.rb#703 def r_mon(i); end # r: range # - # source://fugit//lib/fugit/cron.rb#693 + # source://fugit//lib/fugit/cron.rb#700 def r_mos(i); end # rewriting the parsed tree # - # source://fugit//lib/fugit/cron.rb#764 + # source://fugit//lib/fugit/cron.rb#771 def rewrite_bound(k, t); end - # source://fugit//lib/fugit/cron.rb#825 + # source://fugit//lib/fugit/cron.rb#832 def rewrite_cron(t); end - # source://fugit//lib/fugit/cron.rb#782 + # source://fugit//lib/fugit/cron.rb#789 def rewrite_elt(k, t); end - # source://fugit//lib/fugit/cron.rb#810 + # source://fugit//lib/fugit/cron.rb#817 def rewrite_entry(t); end - # source://fugit//lib/fugit/cron.rb#774 + # source://fugit//lib/fugit/cron.rb#781 def rewrite_mod(k, t); end - # source://fugit//lib/fugit/cron.rb#817 + # source://fugit//lib/fugit/cron.rb#824 def rewrite_tz(t); end # piece parsers bottom to top # - # source://fugit//lib/fugit/cron.rb#669 + # source://fugit//lib/fugit/cron.rb#676 def s(i); end - # source://fugit//lib/fugit/cron.rb#753 + # source://fugit//lib/fugit/cron.rb#760 def second_cron(i); end - # source://fugit//lib/fugit/cron.rb#676 + # source://fugit//lib/fugit/cron.rb#683 def slash(i); end - # source://fugit//lib/fugit/cron.rb#702 + # source://fugit//lib/fugit/cron.rb#709 def sor_dom(i); end - # source://fugit//lib/fugit/cron.rb#704 + # source://fugit//lib/fugit/cron.rb#711 def sor_dow(i); end - # source://fugit//lib/fugit/cron.rb#701 + # source://fugit//lib/fugit/cron.rb#708 def sor_hou(i); end - # source://fugit//lib/fugit/cron.rb#703 + # source://fugit//lib/fugit/cron.rb#710 def sor_mon(i); end # sor: star or range # - # source://fugit//lib/fugit/cron.rb#700 + # source://fugit//lib/fugit/cron.rb#707 def sor_mos(i); end - # source://fugit//lib/fugit/cron.rb#709 + # source://fugit//lib/fugit/cron.rb#716 def sorws_dom(i); end - # source://fugit//lib/fugit/cron.rb#711 + # source://fugit//lib/fugit/cron.rb#718 def sorws_dow(i); end - # source://fugit//lib/fugit/cron.rb#708 + # source://fugit//lib/fugit/cron.rb#715 def sorws_hou(i); end - # source://fugit//lib/fugit/cron.rb#710 + # source://fugit//lib/fugit/cron.rb#717 def sorws_mon(i); end # sorws: star or range with[out] slash # - # source://fugit//lib/fugit/cron.rb#707 + # source://fugit//lib/fugit/cron.rb#714 def sorws_mos(i); end - # source://fugit//lib/fugit/cron.rb#670 + # source://fugit//lib/fugit/cron.rb#677 def star(i); end end -# source://fugit//lib/fugit/cron.rb#659 +# source://fugit//lib/fugit/cron.rb#666 Fugit::Cron::Parser::DOW_REX = T.let(T.unsafe(nil), Regexp) -# source://fugit//lib/fugit/cron.rb#662 +# source://fugit//lib/fugit/cron.rb#669 Fugit::Cron::Parser::MONTHS = T.let(T.unsafe(nil), Array) -# source://fugit//lib/fugit/cron.rb#664 +# source://fugit//lib/fugit/cron.rb#671 Fugit::Cron::Parser::MONTH_REX = T.let(T.unsafe(nil), Regexp) -# source://fugit//lib/fugit/cron.rb#654 +# source://fugit//lib/fugit/cron.rb#661 Fugit::Cron::Parser::WEEKDAYS = T.let(T.unsafe(nil), Array) -# source://fugit//lib/fugit/cron.rb#657 +# source://fugit//lib/fugit/cron.rb#664 Fugit::Cron::Parser::WEEKDS = T.let(T.unsafe(nil), Array) -# source://fugit//lib/fugit/cron.rb#355 +# source://fugit//lib/fugit/cron.rb#353 Fugit::Cron::SLOTS = T.let(T.unsafe(nil), Array) # source://fugit//lib/fugit/cron.rb#7 Fugit::Cron::SPECIALS = T.let(T.unsafe(nil), Hash) -# source://fugit//lib/fugit/cron.rb#68 +# source://fugit//lib/fugit/cron.rb#66 class Fugit::Cron::TimeCursor # @return [TimeCursor] a new instance of TimeCursor # - # source://fugit//lib/fugit/cron.rb#70 + # source://fugit//lib/fugit/cron.rb#68 def initialize(cron, t); end - # source://fugit//lib/fugit/cron.rb#82 + # source://fugit//lib/fugit/cron.rb#80 def day; end - # source://fugit//lib/fugit/cron.rb#85 + # source://fugit//lib/fugit/cron.rb#83 def dec(i); end - # source://fugit//lib/fugit/cron.rb#134 + # source://fugit//lib/fugit/cron.rb#132 def dec_day; end - # source://fugit//lib/fugit/cron.rb#137 + # source://fugit//lib/fugit/cron.rb#135 def dec_hour; end - # source://fugit//lib/fugit/cron.rb#140 + # source://fugit//lib/fugit/cron.rb#138 def dec_min; end - # source://fugit//lib/fugit/cron.rb#130 + # source://fugit//lib/fugit/cron.rb#128 def dec_month; end - # source://fugit//lib/fugit/cron.rb#144 + # source://fugit//lib/fugit/cron.rb#142 def dec_sec; end - # source://fugit//lib/fugit/cron.rb#82 + # source://fugit//lib/fugit/cron.rb#80 def hour; end - # source://fugit//lib/fugit/cron.rb#84 + # source://fugit//lib/fugit/cron.rb#82 def inc(i); end - # source://fugit//lib/fugit/cron.rb#98 + # source://fugit//lib/fugit/cron.rb#96 def inc_day; end - # source://fugit//lib/fugit/cron.rb#115 + # source://fugit//lib/fugit/cron.rb#113 def inc_hour; end - # source://fugit//lib/fugit/cron.rb#118 + # source://fugit//lib/fugit/cron.rb#116 def inc_min; end - # source://fugit//lib/fugit/cron.rb#87 + # source://fugit//lib/fugit/cron.rb#85 def inc_month; end - # source://fugit//lib/fugit/cron.rb#122 + # source://fugit//lib/fugit/cron.rb#120 def inc_sec; end - # source://fugit//lib/fugit/cron.rb#82 + # source://fugit//lib/fugit/cron.rb#80 def min; end - # source://fugit//lib/fugit/cron.rb#82 + # source://fugit//lib/fugit/cron.rb#80 def month; end - # source://fugit//lib/fugit/cron.rb#82 + # source://fugit//lib/fugit/cron.rb#80 def rday; end - # source://fugit//lib/fugit/cron.rb#82 + # source://fugit//lib/fugit/cron.rb#80 def rweek; end - # source://fugit//lib/fugit/cron.rb#82 + # source://fugit//lib/fugit/cron.rb#80 def sec; end - # source://fugit//lib/fugit/cron.rb#76 + # source://fugit//lib/fugit/cron.rb#74 def time; end - # source://fugit//lib/fugit/cron.rb#79 + # source://fugit//lib/fugit/cron.rb#77 def to_i; end - # source://fugit//lib/fugit/cron.rb#77 + # source://fugit//lib/fugit/cron.rb#75 def to_t; end - # source://fugit//lib/fugit/cron.rb#82 + # source://fugit//lib/fugit/cron.rb#80 def wday; end - # source://fugit//lib/fugit/cron.rb#82 + # source://fugit//lib/fugit/cron.rb#80 def wday_in_month; end - # source://fugit//lib/fugit/cron.rb#82 + # source://fugit//lib/fugit/cron.rb#80 def year; end end @@ -1414,9 +1414,20 @@ class Fugit::Nat::SlotGroup def make_slot(key, data0, data1 = T.unsafe(nil)); end # source://fugit//lib/fugit/nat.rb#681 - def parse_cron(hm); end + def parse_cron(hm, opts); end + + # Return nil if the cron is "not strict" + # + # For example, "0 0/17 * * *" (gh-86) is a perfectly valid + # cron string, but makes not much sense when derived via `.parse_nat` + # from "every 17 hours". + # + # It happens here because it's nat being strict, not cron. + # + # source://fugit//lib/fugit/nat.rb#718 + def restrict(a, cron); end - # source://fugit//lib/fugit/nat.rb#701 + # source://fugit//lib/fugit/nat.rb#729 def slot(key, default); end 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 5adde8958..fe0b8cf9d 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.1/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/i18n-tasks@1.0.12.rbi b/sorbet/rbi/gems/i18n-tasks@1.0.13.rbi similarity index 95% rename from sorbet/rbi/gems/i18n-tasks@1.0.12.rbi rename to sorbet/rbi/gems/i18n-tasks@1.0.13.rbi index a0c339a70..b4c2422a8 100644 --- a/sorbet/rbi/gems/i18n-tasks@1.0.12.rbi +++ b/sorbet/rbi/gems/i18n-tasks@1.0.13.rbi @@ -198,7 +198,7 @@ I18n::Tasks::Concurrent::CachedValue::NULL = T.let(T.unsafe(nil), Object) module I18n::Tasks::Configuration # @return [String] default i18n locale # - # source://i18n-tasks//lib/i18n/tasks/configuration.rb#80 + # source://i18n-tasks//lib/i18n/tasks/configuration.rb#81 def base_locale; end # i18n-tasks config (defaults + config/i18n-tasks.yml) @@ -211,12 +211,12 @@ module I18n::Tasks::Configuration # source://i18n-tasks//lib/i18n/tasks/configuration.rb#46 def config=(conf); end - # source://i18n-tasks//lib/i18n/tasks/configuration.rb#119 + # source://i18n-tasks//lib/i18n/tasks/configuration.rb#120 def config_for_inspect; end # evaluated configuration (as the app sees it) # - # source://i18n-tasks//lib/i18n/tasks/configuration.rb#105 + # source://i18n-tasks//lib/i18n/tasks/configuration.rb#106 def config_sections; end # data config @@ -228,15 +228,15 @@ module I18n::Tasks::Configuration # source://i18n-tasks//lib/i18n/tasks/configuration.rb#22 def file_config; end - # source://i18n-tasks//lib/i18n/tasks/configuration.rb#98 + # source://i18n-tasks//lib/i18n/tasks/configuration.rb#99 def ignore_config(type = T.unsafe(nil)); end - # source://i18n-tasks//lib/i18n/tasks/configuration.rb#84 + # source://i18n-tasks//lib/i18n/tasks/configuration.rb#85 def internal_locale; end # @return [Array] all available locales, base_locale is always first # - # source://i18n-tasks//lib/i18n/tasks/configuration.rb#75 + # source://i18n-tasks//lib/i18n/tasks/configuration.rb#76 def locales; end # translation config @@ -248,7 +248,7 @@ module I18n::Tasks::Configuration private - # source://i18n-tasks//lib/i18n/tasks/configuration.rb#129 + # source://i18n-tasks//lib/i18n/tasks/configuration.rb#130 def to_hash_from_indifferent(value); end end @@ -258,7 +258,7 @@ I18n::Tasks::Configuration::CONFIG_FILES = T.let(T.unsafe(nil), Array) # source://i18n-tasks//lib/i18n/tasks/configuration.rb#4 I18n::Tasks::Configuration::DEFAULTS = T.let(T.unsafe(nil), Hash) -# source://i18n-tasks//lib/i18n/tasks/configuration.rb#103 +# source://i18n-tasks//lib/i18n/tasks/configuration.rb#104 I18n::Tasks::Configuration::IGNORE_TYPES = T.let(T.unsafe(nil), Array) # source://i18n-tasks//lib/i18n/tasks.rb#52 @@ -346,24 +346,32 @@ module I18n::Tasks::Data::Adapter::YamlAdapter class << self # @return [String] # - # source://i18n-tasks//lib/i18n/tasks/data/adapter/yaml_adapter.rb#22 + # source://i18n-tasks//lib/i18n/tasks/data/adapter/yaml_adapter.rb#23 def dump(tree, options); end # @return [Hash] locale tree # - # source://i18n-tasks//lib/i18n/tasks/data/adapter/yaml_adapter.rb#12 + # source://i18n-tasks//lib/i18n/tasks/data/adapter/yaml_adapter.rb#13 def parse(str, options); end # @return [String] # - # source://i18n-tasks//lib/i18n/tasks/data/adapter/yaml_adapter.rb#27 + # source://i18n-tasks//lib/i18n/tasks/data/adapter/yaml_adapter.rb#28 def restore_emojis(yaml); end + + # @return [String] + # + # source://i18n-tasks//lib/i18n/tasks/data/adapter/yaml_adapter.rb#33 + def strip_trailing_spaces(yaml); end end end # source://i18n-tasks//lib/i18n/tasks/data/adapter/yaml_adapter.rb#8 I18n::Tasks::Data::Adapter::YamlAdapter::EMOJI_REGEX = T.let(T.unsafe(nil), Regexp) +# source://i18n-tasks//lib/i18n/tasks/data/adapter/yaml_adapter.rb#9 +I18n::Tasks::Data::Adapter::YamlAdapter::TRAILING_SPACE_REGEX = T.let(T.unsafe(nil), Regexp) + # source://i18n-tasks//lib/i18n/tasks/data.rb#7 I18n::Tasks::Data::DATA_DEFAULTS = T.let(T.unsafe(nil), Hash) @@ -1198,9 +1206,10 @@ module I18n::Tasks::KeyPatternMatching # In patterns: # * is like .* in regexs # : matches a single key + # *: matches part of a single key, equivalent to `[^.]+?` regex # { a, b.c } match any in set, can use : and *, match is captured # - # source://i18n-tasks//lib/i18n/tasks/key_pattern_matching.rb#25 + # source://i18n-tasks//lib/i18n/tasks/key_pattern_matching.rb#26 def compile_key_pattern(key_pattern); end # one regex to match any @@ -1208,7 +1217,7 @@ module I18n::Tasks::KeyPatternMatching # source://i18n-tasks//lib/i18n/tasks/key_pattern_matching.rb#11 def compile_patterns_re(key_patterns); end - # source://i18n-tasks//lib/i18n/tasks/key_pattern_matching.rb#31 + # source://i18n-tasks//lib/i18n/tasks/key_pattern_matching.rb#32 def key_pattern_re_body(key_pattern); end end @@ -1547,6 +1556,32 @@ class I18n::Tasks::Scanners::AstMatchers::MessageReceiversMatcher < ::I18n::Task def process_options(node:, key:); end end +# source://i18n-tasks//lib/i18n/tasks/scanners/ast_matchers/rails_model_matcher.rb#6 +class I18n::Tasks::Scanners::AstMatchers::RailsModelMatcher < ::I18n::Tasks::Scanners::AstMatchers::BaseMatcher + # source://i18n-tasks//lib/i18n/tasks/scanners/ast_matchers/rails_model_matcher.rb#7 + def convert_to_key_occurrences(send_node, _method_name, location: T.unsafe(nil)); end + + private + + # source://i18n-tasks//lib/i18n/tasks/scanners/ast_matchers/rails_model_matcher.rb#14 + def human_attribute_name_to_key_occurences(send_node:, location:); end + + # User.model_name.human(count: 2) + # s(:send, + # s(:send, + # s(:const, nil, :User), :model_name), :human, + # s(:hash, + # s(:pair, + # s(:sym, :count), + # s(:int, 2)))) + # + # source://i18n-tasks//lib/i18n/tasks/scanners/ast_matchers/rails_model_matcher.rb#43 + def model_name_human_to_key_occurences(send_node:, location:); end + + # source://i18n-tasks//lib/i18n/tasks/scanners/ast_matchers/rails_model_matcher.rb#63 + def underscore(value); end +end + # source://i18n-tasks//lib/i18n/tasks/scanners/erb_ast_processor.rb#8 class I18n::Tasks::Scanners::ErbAstProcessor include ::AST::Processor::Mixin @@ -2246,14 +2281,14 @@ end # Scan for I18n.translate calls using whitequark/parser # -# source://i18n-tasks//lib/i18n/tasks/scanners/ruby_ast_scanner.rb#11 +# source://i18n-tasks//lib/i18n/tasks/scanners/ruby_ast_scanner.rb#12 class I18n::Tasks::Scanners::RubyAstScanner < ::I18n::Tasks::Scanners::FileScanner include ::I18n::Tasks::Scanners::RelativeKeys include ::AST::Sexp # @return [RubyAstScanner] a new instance of RubyAstScanner # - # source://i18n-tasks//lib/i18n/tasks/scanners/ruby_ast_scanner.rb#17 + # source://i18n-tasks//lib/i18n/tasks/scanners/ruby_ast_scanner.rb#18 def initialize(**args); end protected @@ -2263,7 +2298,7 @@ class I18n::Tasks::Scanners::RubyAstScanner < ::I18n::Tasks::Scanners::FileScann # @param ast [Parser::Source::Comment] # @return [nil, [key, Occurrence]] full absolute key name and the occurrence. # - # source://i18n-tasks//lib/i18n/tasks/scanners/ruby_ast_scanner.rb#101 + # source://i18n-tasks//lib/i18n/tasks/scanners/ruby_ast_scanner.rb#102 def ast_to_occurences(ast); end # Convert an array of {Parser::Source::Comment} to occurrences. @@ -2273,12 +2308,12 @@ class I18n::Tasks::Scanners::RubyAstScanner < ::I18n::Tasks::Scanners::FileScann # @param comments [Parser::Source::Comment] # @return [nil, [key, Occurrence]] full absolute key name and the occurrence. # - # source://i18n-tasks//lib/i18n/tasks/scanners/ruby_ast_scanner.rb#68 + # source://i18n-tasks//lib/i18n/tasks/scanners/ruby_ast_scanner.rb#69 def comments_to_occurences(path, ast, comments); end # @return [Boolean] # - # source://i18n-tasks//lib/i18n/tasks/scanners/ruby_ast_scanner.rb#46 + # source://i18n-tasks//lib/i18n/tasks/scanners/ruby_ast_scanner.rb#47 def keys_relative_to_calling_method?(path); end # Create an {Parser::Source::Buffer} with the given contents. @@ -2288,7 +2323,7 @@ class I18n::Tasks::Scanners::RubyAstScanner < ::I18n::Tasks::Scanners::FileScann # @param contents [String] # @return [Parser::Source::Buffer] file contents # - # source://i18n-tasks//lib/i18n/tasks/scanners/ruby_ast_scanner.rb#56 + # source://i18n-tasks//lib/i18n/tasks/scanners/ruby_ast_scanner.rb#57 def make_buffer(path, contents = T.unsafe(nil)); end # Parse file on path and returns AST and comments. @@ -2296,21 +2331,21 @@ class I18n::Tasks::Scanners::RubyAstScanner < ::I18n::Tasks::Scanners::FileScann # @param path Path to file to parse # @return [{Parser::AST::Node}, [Parser::Source::Comment]] # - # source://i18n-tasks//lib/i18n/tasks/scanners/ruby_ast_scanner.rb#41 + # source://i18n-tasks//lib/i18n/tasks/scanners/ruby_ast_scanner.rb#42 def path_to_ast_and_comments(path); end # Extract all occurrences of translate calls from the file at the given path. # # @return [Array<[key, Results::KeyOccurrence]>] each occurrence found in the file # - # source://i18n-tasks//lib/i18n/tasks/scanners/ruby_ast_scanner.rb#29 + # source://i18n-tasks//lib/i18n/tasks/scanners/ruby_ast_scanner.rb#30 def scan_file(path); end - # source://i18n-tasks//lib/i18n/tasks/scanners/ruby_ast_scanner.rb#114 + # source://i18n-tasks//lib/i18n/tasks/scanners/ruby_ast_scanner.rb#115 def setup_matchers; end end -# source://i18n-tasks//lib/i18n/tasks/scanners/ruby_ast_scanner.rb#15 +# source://i18n-tasks//lib/i18n/tasks/scanners/ruby_ast_scanner.rb#16 I18n::Tasks::Scanners::RubyAstScanner::MAGIC_COMMENT_PREFIX = T.let(T.unsafe(nil), Regexp) # source://i18n-tasks//lib/i18n/tasks/scanners/ruby_key_literals.rb#4 @@ -2462,14 +2497,14 @@ module I18n::Tasks::StringInterpolation end end -# source://i18n-tasks//lib/i18n/tasks/translation.rb#8 +# source://i18n-tasks//lib/i18n/tasks/translation.rb#9 module I18n::Tasks::Translation # @param forest [I18n::Tasks::Tree::Siblings] to translate to the locales of its root nodes # @param from [String] locale - # @param backend [:deepl, :google, :yandex] + # @param backend [:deepl, :openai, :google, :yandex] # @return [I18n::Tasks::Tree::Siblings] translated forest # - # source://i18n-tasks//lib/i18n/tasks/translation.rb#13 + # source://i18n-tasks//lib/i18n/tasks/translation.rb#14 def translate_forest(forest, from:, backend: T.unsafe(nil)); end end @@ -2478,17 +2513,19 @@ module I18n::Tasks::Translators; end # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#5 class I18n::Tasks::Translators::BaseTranslator + include ::I18n::Tasks::Logging + # @param i18n_tasks [I18n::Tasks::BaseTask] # @return [BaseTranslator] a new instance of BaseTranslator # - # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#7 + # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#8 def initialize(i18n_tasks); end # @param forest [I18n::Tasks::Tree::Siblings] to translate to the locales of its root nodes # @param from [String] locale # @return [I18n::Tasks::Tree::Siblings] translated forest # - # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#14 + # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#15 def translate_forest(forest, from); end protected @@ -2497,45 +2534,45 @@ class I18n::Tasks::Translators::BaseTranslator # # @return [String, Array, nil] value for Google Translate or nil for non-string values # - # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#66 - def dump_value(value); end + # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#68 + def dump_value(value, opts); end # @param list [Array<[String, Object]>] of key-value pairs # @return [Array<[String, Object]>] translated list # - # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#43 + # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#44 def fetch_translations(list, opts); end # @param list [Array<[String, Object]>] # @param translated_values [Array] # @return [Array<[String, Object]>] translated key-value pairs # - # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#58 - def from_values(list, translated_values); end + # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#60 + def from_values(list, translated_values, opts); end # @abstract # @return [String] # - # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#153 + # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#158 def no_results_error_message; end # @abstract # @return [Hash] # - # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#145 + # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#150 def options_for_html; end # @abstract # @return [Hash] # - # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#149 + # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#154 def options_for_plain; end # @abstract # @param options [Hash] # @return [Hash] # - # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#141 + # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#146 def options_for_translate_values(options); end # Parse translated value from the each_translated enumerator @@ -2544,35 +2581,35 @@ class I18n::Tasks::Translators::BaseTranslator # @param each_translated [Enumerator] # @return [Object] final translated value # - # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#80 - def parse_value(untranslated, each_translated); end + # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#83 + def parse_value(untranslated, each_translated, opts); end - # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#123 + # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#128 def raise_interpolation_error(untranslated, translated, e); end # @param value [String] # @return [String] 'hello, %{name}' => 'hello, ' # - # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#101 + # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#106 def replace_interpolations(value); end # @param untranslated [String] # @param translated [String] # @return [String] 'hello, ' => 'hello, %{name}' # - # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#112 + # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#117 def restore_interpolations(untranslated, translated); end # @param list [Array<[String, Object]>] of key-value pairs # @return [Array] values for translation extracted from list # - # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#51 - def to_values(list); end + # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#53 + def to_values(list, opts); end # @param list [Array<[String, Object]>] of key-value pairs # @return [Array<[String, Object]>] translated list # - # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#25 + # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#26 def translate_pairs(list, opts); end # @abstract @@ -2580,64 +2617,79 @@ class I18n::Tasks::Translators::BaseTranslator # @param options [Hash] # @return [Array] # - # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#136 + # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#141 def translate_values(list, **options); end end -# source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#96 +# source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#101 I18n::Tasks::Translators::BaseTranslator::INTERPOLATION_KEY_RE = T.let(T.unsafe(nil), Regexp) -# source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#97 +# source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#102 I18n::Tasks::Translators::BaseTranslator::UNTRANSLATABLE_STRING = T.let(T.unsafe(nil), String) # source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#6 class I18n::Tasks::Translators::DeeplTranslator < ::I18n::Tasks::Translators::BaseTranslator # @return [DeeplTranslator] a new instance of DeeplTranslator # - # source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#7 + # source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#12 def initialize(*_arg0); end protected - # source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#57 + # source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#68 def no_results_error_message; end - # source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#32 + # source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#43 def options_for_html; end - # source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#36 + # source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#47 def options_for_plain; end - # source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#28 + # source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#37 def options_for_translate_values(**options); end # @param value [String] # @return [String] 'hello, %{name}' => 'hello, %{name}' # - # source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#42 + # source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#53 def replace_interpolations(value); end # @param untranslated [String] # @param translated [String] # @return [String] 'hello, %{name}' => 'hello, %{name}' # - # source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#49 + # source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#60 def restore_interpolations(untranslated, translated); end - # source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#19 + # source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#24 def translate_values(list, from:, to:, **options); end private - # source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#68 + # source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#91 def configure_api_key!; end - # Convert 'es-ES' to 'ES' + # Convert 'es-ES' to 'ES', en-us to EN + # + # source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#75 + def to_deepl_source_locale(locale); end + + # Convert 'es-ES' to 'ES' but warn about locales requiring a specific variant # - # source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#64 - def to_deepl_compatible_locale(locale); end + # source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#80 + def to_deepl_target_locale(locale); end end +# max allowed texts per request +# +# source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#8 +I18n::Tasks::Translators::DeeplTranslator::BATCH_SIZE = T.let(T.unsafe(nil), Integer) + +# those languages must be specified with their sub-kind e.g en-us +# +# source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#10 +I18n::Tasks::Translators::DeeplTranslator::SPECIFIC_TARGETS = T.let(T.unsafe(nil), Array) + # source://i18n-tasks//lib/i18n/tasks/translators/google_translator.rb#6 class I18n::Tasks::Translators::GoogleTranslator < ::I18n::Tasks::Translators::BaseTranslator # @return [GoogleTranslator] a new instance of GoogleTranslator @@ -2676,6 +2728,45 @@ end # source://i18n-tasks//lib/i18n/tasks/translators/google_translator.rb#44 I18n::Tasks::Translators::GoogleTranslator::SUPPORTED_LOCALES_WITH_REGION = T.let(T.unsafe(nil), Array) +# source://i18n-tasks//lib/i18n/tasks/translators/openai_translator.rb#6 +class I18n::Tasks::Translators::OpenAiTranslator < ::I18n::Tasks::Translators::BaseTranslator + # @return [OpenAiTranslator] a new instance of OpenAiTranslator + # + # source://i18n-tasks//lib/i18n/tasks/translators/openai_translator.rb#10 + def initialize(*_arg0); end + + # source://i18n-tasks//lib/i18n/tasks/translators/openai_translator.rb#34 + def no_results_error_message; end + + # source://i18n-tasks//lib/i18n/tasks/translators/openai_translator.rb#26 + def options_for_html; end + + # source://i18n-tasks//lib/i18n/tasks/translators/openai_translator.rb#30 + def options_for_plain; end + + # source://i18n-tasks//lib/i18n/tasks/translators/openai_translator.rb#19 + def options_for_translate_values(from:, to:, **options); end + + private + + # source://i18n-tasks//lib/i18n/tasks/translators/openai_translator.rb#44 + def api_key; end + + # source://i18n-tasks//lib/i18n/tasks/translators/openai_translator.rb#65 + def translate(values, from, to); end + + # source://i18n-tasks//lib/i18n/tasks/translators/openai_translator.rb#53 + def translate_values(list, from:, to:); end + + # source://i18n-tasks//lib/i18n/tasks/translators/openai_translator.rb#40 + def translator; end +end + +# max allowed texts per request +# +# source://i18n-tasks//lib/i18n/tasks/translators/openai_translator.rb#8 +I18n::Tasks::Translators::OpenAiTranslator::BATCH_SIZE = T.let(T.unsafe(nil), Integer) + # source://i18n-tasks//lib/i18n/tasks/translators/yandex_translator.rb#6 class I18n::Tasks::Translators::YandexTranslator < ::I18n::Tasks::Translators::BaseTranslator # @return [YandexTranslator] a new instance of YandexTranslator diff --git a/sorbet/rbi/gems/io-console@0.6.0.rbi b/sorbet/rbi/gems/io-console@0.6.0.rbi new file mode 100644 index 000000000..ffc1f7aa9 --- /dev/null +++ b/sorbet/rbi/gems/io-console@0.6.0.rbi @@ -0,0 +1,8 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `io-console` gem. +# Please instead update this file by running `bin/tapioca gem io-console`. + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/io-event@1.2.2.rbi b/sorbet/rbi/gems/io-event@1.3.3.rbi similarity index 82% rename from sorbet/rbi/gems/io-event@1.2.2.rbi rename to sorbet/rbi/gems/io-event@1.3.3.rbi index 4bc29a277..6b9ffb7f1 100644 --- a/sorbet/rbi/gems/io-event@1.2.2.rbi +++ b/sorbet/rbi/gems/io-event@1.3.3.rbi @@ -204,13 +204,13 @@ class IO::Event::Interrupt end end -# source://io-event//lib/io/event/selector/select.rb#10 +# source://io-event//lib/io/event/selector/select.rb#11 module IO::Event::Selector class << self # source://io-event//lib/io/event/selector.rb#12 def default(env = T.unsafe(nil)); end - # source://io-event//lib/io/event/selector.rb#32 + # source://io-event//lib/io/event/selector.rb#28 def new(loop, env = T.unsafe(nil)); end def nonblock(_arg0); end @@ -236,96 +236,98 @@ class IO::Event::Selector::KQueue def yield; end end -# source://io-event//lib/io/event/selector/select.rb#11 +# source://io-event//lib/io/event/selector/select.rb#12 class IO::Event::Selector::Select # @return [Select] a new instance of Select # - # source://io-event//lib/io/event/selector/select.rb#12 + # source://io-event//lib/io/event/selector/select.rb#13 def initialize(loop); end # @return [Boolean] # - # source://io-event//lib/io/event/selector/select.rb#146 + # source://io-event//lib/io/event/selector/select.rb#159 def again?(errno); end - # source://io-event//lib/io/event/selector/select.rb#36 + # source://io-event//lib/io/event/selector/select.rb#37 def close; end - # source://io-event//lib/io/event/selector/select.rb#151 + # Ruby <= 3.1, limited IO::Buffer support. + # + # source://io-event//lib/io/event/selector/select.rb#223 def io_read(fiber, io, buffer, length, offset = T.unsafe(nil)); end - # source://io-event//lib/io/event/selector/select.rb#137 + # source://io-event//lib/io/event/selector/select.rb#150 def io_select(readable, writable, priority, timeout); end - # source://io-event//lib/io/event/selector/select.rb#129 + # source://io-event//lib/io/event/selector/select.rb#142 def io_wait(fiber, io, events); end - # source://io-event//lib/io/event/selector/select.rb#178 + # source://io-event//lib/io/event/selector/select.rb#252 def io_write(fiber, io, buffer, length, offset = T.unsafe(nil)); end # Returns the value of attribute loop. # - # source://io-event//lib/io/event/selector/select.rb#23 + # source://io-event//lib/io/event/selector/select.rb#24 def loop; end - # source://io-event//lib/io/event/selector/select.rb#287 + # source://io-event//lib/io/event/selector/select.rb#370 def process_wait(fiber, pid, flags); end # Append the given fiber into the ready list. # - # source://io-event//lib/io/event/selector/select.rb#83 + # source://io-event//lib/io/event/selector/select.rb#84 def push(fiber); end # Transfer to the given fiber and raise an exception. Put the current fiber into the ready list. # - # source://io-event//lib/io/event/selector/select.rb#88 + # source://io-event//lib/io/event/selector/select.rb#89 def raise(fiber, *arguments); end # @return [Boolean] # - # source://io-event//lib/io/event/selector/select.rb#97 + # source://io-event//lib/io/event/selector/select.rb#98 def ready?; end # Transfer from the current fiber to the specified fiber. Put the current fiber into the ready list. # - # source://io-event//lib/io/event/selector/select.rb#63 + # source://io-event//lib/io/event/selector/select.rb#64 def resume(fiber, *arguments); end - # source://io-event//lib/io/event/selector/select.rb#306 + # source://io-event//lib/io/event/selector/select.rb#389 def select(duration = T.unsafe(nil)); end # Transfer from the current fiber to the event loop. # - # source://io-event//lib/io/event/selector/select.rb#58 + # source://io-event//lib/io/event/selector/select.rb#59 def transfer; end # If the event loop is currently sleeping, wake it up. # - # source://io-event//lib/io/event/selector/select.rb#26 + # source://io-event//lib/io/event/selector/select.rb#27 def wakeup; end # Yield from the current fiber back to the event loop. Put the current fiber into the ready list. # - # source://io-event//lib/io/event/selector/select.rb#73 + # source://io-event//lib/io/event/selector/select.rb#74 def yield; end private - # source://io-event//lib/io/event/selector/select.rb#293 + # source://io-event//lib/io/event/selector/select.rb#376 def pop_ready; end end -# source://io-event//lib/io/event/selector/select.rb#143 +# source://io-event//lib/io/event/selector/select.rb#156 IO::Event::Selector::Select::EAGAIN = T.let(T.unsafe(nil), Integer) -# source://io-event//lib/io/event/selector/select.rb#144 +# source://io-event//lib/io/event/selector/select.rb#157 IO::Event::Selector::Select::EWOULDBLOCK = T.let(T.unsafe(nil), Integer) -# source://io-event//lib/io/event/selector/select.rb#43 +# source://io-event//lib/io/event/selector/select.rb#44 class IO::Event::Selector::Select::Optional < ::Struct # @return [Boolean] # - # source://io-event//lib/io/event/selector/select.rb#48 + # source://io-event//lib/io/event/selector/select.rb#49 def alive?; end # Returns the value of attribute fiber @@ -339,10 +341,10 @@ class IO::Event::Selector::Select::Optional < ::Struct # @return [Object] the newly set value def fiber=(_); end - # source://io-event//lib/io/event/selector/select.rb#52 + # source://io-event//lib/io/event/selector/select.rb#53 def nullify; end - # source://io-event//lib/io/event/selector/select.rb#44 + # source://io-event//lib/io/event/selector/select.rb#45 def transfer(*arguments); end class << self @@ -354,14 +356,19 @@ class IO::Event::Selector::Select::Optional < ::Struct end end -# source://io-event//lib/io/event/selector/select.rb#101 +# source://io-event//lib/io/event/selector/select.rb#102 class IO::Event::Selector::Select::Waiter < ::Struct # @return [Boolean] # - # source://io-event//lib/io/event/selector/select.rb#102 + # source://io-event//lib/io/event/selector/select.rb#103 def alive?; end - # source://io-event//lib/io/event/selector/select.rb#120 + # Dispatch the given events to the list of waiting fibers. If the fiber was not waiting for the given events, it is reactivated by calling the given block. + # + # source://io-event//lib/io/event/selector/select.rb#108 + def dispatch(events, &reactivate); end + + # source://io-event//lib/io/event/selector/select.rb#133 def each(&block); end # Returns the value of attribute events @@ -386,7 +393,7 @@ class IO::Event::Selector::Select::Waiter < ::Struct # @return [Object] the newly set value def fiber=(_); end - # source://io-event//lib/io/event/selector/select.rb#116 + # source://io-event//lib/io/event/selector/select.rb#129 def invalidate; end # Returns the value of attribute tail @@ -400,9 +407,6 @@ class IO::Event::Selector::Select::Waiter < ::Struct # @return [Object] the newly set value def tail=(_); end - # source://io-event//lib/io/event/selector/select.rb#106 - def transfer(events); end - class << self def [](*_arg0); end def inspect; end @@ -429,6 +433,11 @@ module IO::Event::Support # # source://io-event//lib/io/event/support.rb#17 def fiber_scheduler_v2?; end + + # @return [Boolean] + # + # source://io-event//lib/io/event/support.rb#21 + def fiber_scheduler_v3?; end end end diff --git a/sorbet/rbi/gems/irb@1.8.3.rbi b/sorbet/rbi/gems/irb@1.8.3.rbi new file mode 100644 index 000000000..ba4194794 --- /dev/null +++ b/sorbet/rbi/gems/irb@1.8.3.rbi @@ -0,0 +1,2874 @@ +# 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#1006 +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@Usage for more information. + # + # source://irb//lib/irb.rb#1064 + 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 EvalHistory 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> ", +# :PROMPT_S => "%N(%m):%03n%l ", +# :PROMPT_C => "%N(%m):%03n* ", +# :RETURN => "%s\n" # used to printf +# } +# +# irb comes with a number of available modes: +# +# # :NULL: +# # :PROMPT_I: +# # :PROMPT_S: +# # :PROMPT_C: +# # :RETURN: | +# # %s +# # :DEFAULT: +# # :PROMPT_I: ! '%N(%m):%03n> ' +# # :PROMPT_S: ! '%N(%m):%03n%l ' +# # :PROMPT_C: ! '%N(%m):%03n* ' +# # :RETURN: | +# # => %s +# # :CLASSIC: +# # :PROMPT_I: ! '%N(%m):%03n:%i> ' +# # :PROMPT_S: ! '%N(%m):%03n:%i%l ' +# # :PROMPT_C: ! '%N(%m):%03n:%i* ' +# # :RETURN: | +# # %s +# # :SIMPLE: +# # :PROMPT_I: ! '>> ' +# # :PROMPT_S: +# # :PROMPT_C: ! '?> ' +# # :RETURN: | +# # => %s +# # :INF_RUBY: +# # :PROMPT_I: ! '%N(%m):%03n> ' +# # :PROMPT_S: +# # :PROMPT_C: +# # :RETURN: | +# # %s +# # :AUTO_INDENT: true +# # :XMP: +# # :PROMPT_I: +# # :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#393 + 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#376 + def conf; end + + # source://irb//lib/irb/init.rb#23 + def init_config(ap_path); end + + # source://irb//lib/irb/init.rb#206 + def init_error; end + + # Aborts then interrupts irb. + # + # Will raise an Abort exception, or the given +exception+. + # + # source://irb//lib/irb.rb#420 + def irb_abort(irb, exception = T.unsafe(nil)); end + + # Quits irb + # + # source://irb//lib/irb.rb#413 + def irb_exit(irb, ret); end + + # loading modules + # + # source://irb//lib/irb/init.rb#408 + def load_modules; end + + # option analyzing + # + # source://irb//lib/irb/init.rb#211 + def parse_opts(argv: T.unsafe(nil)); end + + # source://irb//lib/irb/init.rb#367 + 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#386 + def rc_file_generators; end + + # running config + # + # source://irb//lib/irb/init.rb#351 + def run_config; end + + # source://irb//lib/irb/init.rb#161 + 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#398 + def start(ap_path = T.unsafe(nil)); end + + # source://irb//lib/irb/init.rb#197 + 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#382 + 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#420 + def set_encoding(extern, intern = T.unsafe(nil), override: T.unsafe(nil)); end + end +end + +# source://irb//lib/irb/completion.rb#11 +class IRB::BaseCompletor + # @raise [NotImplementedError] + # + # source://irb//lib/irb/completion.rb#12 + def completion_candidates(preposing, target, postposing, bind:); end + + # @raise [NotImplementedError] + # + # source://irb//lib/irb/completion.rb#16 + def doc_namespace(preposing, matched, postposing, bind:); end + + # source://irb//lib/irb/completion.rb#46 + def retrieve_files_to_require_from_load_path; end + + # source://irb//lib/irb/completion.rb#65 + def retrieve_files_to_require_relative_from_current_dir; end + + # source://irb//lib/irb/completion.rb#35 + def retrieve_gem_and_system_load_path; end +end + +# source://irb//lib/irb/completion.rb#20 +IRB::BaseCompletor::GEM_PATHS = T.let(T.unsafe(nil), Array) + +# source://irb//lib/irb/color.rb#7 +module IRB::Color + class << self + # source://irb//lib/irb/color.rb#114 + def clear(colorable: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://irb//lib/irb/color.rb#81 + def colorable?; end + + # source://irb//lib/irb/color.rb#119 + 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#128 + 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#93 + def inspect_colorable?(obj, seen: T.unsafe(nil)); end + + private + + # source://irb//lib/irb/color.rb#213 + def dispatch_seq(token, expr, str, in_symbol:); end + + # source://irb//lib/irb/color.rb#177 + def scan(code, allow_last_error:); end + + # source://irb//lib/irb/color.rb#169 + 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#28 +IRB::Color::ALL = T.let(T.unsafe(nil), Integer) + +# source://irb//lib/irb/color.rb#12 +IRB::Color::BLACK = T.let(T.unsafe(nil), Integer) + +# source://irb//lib/irb/color.rb#16 +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#18 +IRB::Color::CYAN = T.let(T.unsafe(nil), Integer) + +# source://irb//lib/irb/color.rb#77 +IRB::Color::ERROR_TOKENS = T.let(T.unsafe(nil), Array) + +# source://irb//lib/irb/color.rb#14 +IRB::Color::GREEN = T.let(T.unsafe(nil), Integer) + +# source://irb//lib/irb/color.rb#17 +IRB::Color::MAGENTA = T.let(T.unsafe(nil), Integer) + +# source://irb//lib/irb/color.rb#13 +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#229 +class IRB::Color::SymbolState + # @return [SymbolState] a new instance of SymbolState + # + # source://irb//lib/irb/color.rb#230 + def initialize; end + + # Return true if the token is a part of Symbol. + # + # source://irb//lib/irb/color.rb#236 + def scan_token(token); end +end + +# source://irb//lib/irb/color.rb#21 +IRB::Color::TOKEN_KEYWORDS = T.let(T.unsafe(nil), Hash) + +# source://irb//lib/irb/color.rb#34 +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#19 +IRB::Color::WHITE = T.let(T.unsafe(nil), Integer) + +# source://irb//lib/irb/color.rb#15 +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#191 + def ap_name; end + + # A copy of the default IRB.conf[:AP_NAME] + # + # source://irb//lib/irb/context.rb#191 + 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#261 + 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#261 + 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#354 + 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#354 + def back_trace_limit=(_arg0); end + + # User-defined IRB command aliases + # + # source://irb//lib/irb/context.rb#357 + def command_aliases; end + + # User-defined IRB command aliases + # + # source://irb//lib/irb/context.rb#357 + 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#292 + 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#292 + 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#292 + 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#327 + 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#327 + 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#327 + 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). + # + # EvalHistory values are available via __ variable, see + # IRB::EvalHistory. + # + # source://irb//lib/irb/extend-command.rb#341 + def eval_history=(*opts, &b); end + + # source://irb//lib/irb/context.rb#504 + def evaluate(line, line_no); end + + # Exits the current session, see IRB.irb_exit + # + # source://irb//lib/irb/context.rb#537 + 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#281 + 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#281 + 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#444 + def file_input?; end + + # A copy of the default IRB.conf[:HISTORY_FILE] + # + # source://irb//lib/irb/context.rb#161 + def history_file; end + + # Set IRB.conf[:HISTORY_FILE] to the given +hist+. + # + # source://irb//lib/irb/context.rb#166 + def history_file=(hist); end + + # Whether ^D (+control-d+) will be ignored or not. + # + # If set to +false+, ^D will quit irb. + # + # source://irb//lib/irb/context.rb#278 + 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#278 + 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#278 + 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#274 + 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#274 + 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#274 + def ignore_sigint?; end + + # source://irb//lib/irb/context.rb#548 + def inspect; end + + # Whether #inspect_mode is set or not, see #inspect_mode= for more detail. + # + # @return [Boolean] + # + # source://irb//lib/irb/context.rb#438 + def inspect?; end + + # source://irb//lib/irb/context.rb#531 + def inspect_last_value; end + + # A copy of the default IRB.conf[:INSPECT_MODE] + # + # source://irb//lib/irb/context.rb#216 + 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#461 + 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#186 + 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#186 + def io=(_arg0); end + + # Current irb session. + # + # source://irb//lib/irb/context.rb#189 + def irb; end + + # Current irb session. + # + # source://irb//lib/irb/context.rb#189 + 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#198 + 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#198 + 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#201 + 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#201 + def irb_path=(_arg0); end + + # The return value of the last statement evaluated. + # + # source://irb//lib/irb/context.rb#410 + def last_value; end + + # A copy of the default IRB.conf[:LOAD_MODULES] + # + # source://irb//lib/irb/context.rb#195 + def load_modules; end + + # A copy of the default IRB.conf[:LOAD_MODULES] + # + # source://irb//lib/irb/context.rb#195 + def load_modules=(_arg0); end + + # source://irb//lib/irb/context.rb#570 + def local_variables; end + + # The top-level workspace, see WorkSpace#main + # + # source://irb//lib/irb/context.rb#171 + 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#341 + 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#341 + 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#341 + 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#231 + 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#231 + def prompt_c=(_arg0); end + + # Standard IRB prompt. + # + # See IRB@Customizing+the+IRB+Prompt for more information. + # + # source://irb//lib/irb/context.rb#223 + def prompt_i; end + + # Standard IRB prompt. + # + # See IRB@Customizing+the+IRB+Prompt for more information. + # + # source://irb//lib/irb/context.rb#223 + def prompt_i=(_arg0); end + + # A copy of the default IRB.conf[:PROMPT_MODE] + # + # source://irb//lib/irb/context.rb#219 + 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#422 + def prompt_mode=(mode); end + + # TODO: Remove this when developing v2.0 + # + # source://irb//lib/irb/context.rb#234 + def prompt_n; end + + # TODO: Remove this when developing v2.0 + # + # source://irb//lib/irb/context.rb#240 + def prompt_n=(_); end + + # IRB prompt for continuated strings. + # + # See IRB@Customizing+the+IRB+Prompt for more information. + # + # source://irb//lib/irb/context.rb#227 + def prompt_s; end + + # IRB prompt for continuated strings. + # + # See IRB@Customizing+the+IRB+Prompt for more information. + # + # source://irb//lib/irb/context.rb#227 + 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#403 + def prompting?; end + + # A copy of the default IRB.conf[:RC] + # + # source://irb//lib/irb/context.rb#193 + def rc; end + + # A copy of the default IRB.conf[:RC] + # + # source://irb//lib/irb/context.rb#193 + def rc=(_arg0); end + + # A copy of the default IRB.conf[:RC] + # Alias for #rc + # + # source://irb//lib/irb/context.rb#193 + 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#264 + 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#264 + def return_format=(_arg0); end + + # source://irb//lib/irb/context.rb#156 + def save_history; end + + # source://irb//lib/irb/context.rb#152 + def save_history=(val); end + + # Sets the return value from the last statement evaluated in this context + # to #last_value. + # + # source://irb//lib/irb/context.rb#414 + 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#575 + def symbol_alias?(command); end + + # The current thread in this context. + # + # source://irb//lib/irb/context.rb#180 + def thread; end + + # source://irb//lib/irb/context.rb#548 + def to_s; end + + # Return true if the command supports transforming args + # + # @return [Boolean] + # + # source://irb//lib/irb/context.rb#581 + 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#214 + 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#214 + def use_autocomplete?; end + + # Sets IRB.conf[:USE_LOADER] + # + # See #use_loader for more information. + # + # source://irb//lib/irb/extend-command.rb#341 + 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#206 + 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#206 + 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#210 + 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#210 + 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#206 + 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#206 + 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#210 + 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#210 + 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#341 + 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#345 + def verbose; end + + # Whether verbose messages are displayed or not. + # + # A copy of the default IRB.conf[:VERBOSE] + # + # source://irb//lib/irb/context.rb#345 + def verbose=(_arg0); end + + # Returns whether messages are displayed or not. + # + # @return [Boolean] + # + # source://irb//lib/irb/context.rb#384 + def verbose?; end + + # Returns the value of attribute with_debugger. + # + # source://irb//lib/irb/context.rb#359 + def with_debugger; end + + # Sets the attribute with_debugger + # + # @param value the value to set the attribute with_debugger to. + # + # source://irb//lib/irb/context.rb#359 + def with_debugger=(_arg0); end + + # WorkSpace in the current context. + # + # source://irb//lib/irb/context.rb#178 + def workspace; end + + # WorkSpace in the current context. + # + # source://irb//lib/irb/context.rb#178 + def workspace=(_arg0); end + + # The toplevel workspace, see #home_workspace + # + # source://irb//lib/irb/context.rb#176 + def workspace_home; end +end + +# source://irb//lib/irb/context.rb#545 +IRB::Context::IDNAME_IVARS = T.let(T.unsafe(nil), Array) + +# source://irb//lib/irb/context.rb#543 +IRB::Context::NOPRINTING_IVARS = T.let(T.unsafe(nil), Array) + +# source://irb//lib/irb/context.rb#544 +IRB::Context::NO_INSPECTING_IVARS = T.let(T.unsafe(nil), Array) + +# Extends methods for the Context module +# +# source://irb//lib/irb/extend-command.rb#315 +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#339 + 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+ + # + # source://irb//lib/irb/extend-command.rb#329 + def install_extend_commands; end + end +end + +# source://irb//lib/irb/debug.rb#4 +module IRB::Debug + class << self + # source://irb//lib/irb/debug.rb#8 + def insert_debug_break(pre_cmds: T.unsafe(nil), do_cmds: T.unsafe(nil)); end + + # source://irb//lib/irb/debug.rb#25 + def setup(irb); end + + private + + # source://irb//lib/irb/debug.rb#65 + def configure_irb_for_debugger(irb); end + + # This is used when debug.gem is not written in Gemfile. Even if it's not + # installed by `bundle install`, debug.gem is installed by default because + # it's a bundled gem. This method tries to activate and load that. + # + # source://irb//lib/irb/debug.rb#82 + def load_bundled_debug_gem; end + end +end + +# source://irb//lib/irb/debug.rb#5 +IRB::Debug::IRB_DIR = T.let(T.unsafe(nil), String) + +# 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#276 + def install_alias_method(to, from, override = T.unsafe(nil)); end + + # source://irb//lib/irb/extend-command.rb#263 + def irb(*opts, **kwargs, &b); end + + # source://irb//lib/irb/extend-command.rb#263 + def irb_backtrace(*opts, **kwargs, &b); end + + # source://irb//lib/irb/extend-command.rb#263 + def irb_break(*opts, **kwargs, &b); end + + # source://irb//lib/irb/extend-command.rb#263 + def irb_catch(*opts, **kwargs, &b); end + + # source://irb//lib/irb/extend-command.rb#263 + 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#263 + def irb_continue(*opts, **kwargs, &b); end + + # source://irb//lib/irb/extend-command.rb#263 + def irb_current_working_workspace(*opts, **kwargs, &b); end + + # source://irb//lib/irb/extend-command.rb#263 + def irb_debug(*opts, **kwargs, &b); end + + # source://irb//lib/irb/extend-command.rb#263 + def irb_debug_info(*opts, **kwargs, &b); end + + # source://irb//lib/irb/extend-command.rb#263 + def irb_delete(*opts, **kwargs, &b); end + + # source://irb//lib/irb/extend-command.rb#263 + 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#263 + def irb_fg(*opts, **kwargs, &b); end + + # source://irb//lib/irb/extend-command.rb#263 + def irb_finish(*opts, **kwargs, &b); end + + # source://irb//lib/irb/extend-command.rb#263 + def irb_help(*opts, **kwargs, &b); end + + # source://irb//lib/irb/extend-command.rb#263 + def irb_info(*opts, **kwargs, &b); end + + # source://irb//lib/irb/extend-command.rb#263 + def irb_jobs(*opts, **kwargs, &b); end + + # source://irb//lib/irb/extend-command.rb#263 + 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#263 + def irb_load(*opts, **kwargs, &b); end + + # source://irb//lib/irb/extend-command.rb#263 + def irb_ls(*opts, **kwargs, &b); end + + # source://irb//lib/irb/extend-command.rb#263 + def irb_measure(*opts, **kwargs, &b); end + + # source://irb//lib/irb/extend-command.rb#263 + def irb_next(*opts, **kwargs, &b); end + + # source://irb//lib/irb/extend-command.rb#263 + def irb_pop_workspace(*opts, **kwargs, &b); end + + # source://irb//lib/irb/extend-command.rb#263 + def irb_push_workspace(*opts, **kwargs, &b); end + + # Loads the given file similarly to Kernel#require + # + # source://irb//lib/irb/extend-command.rb#263 + def irb_require(*opts, **kwargs, &b); end + + # source://irb//lib/irb/extend-command.rb#263 + def irb_show_cmds(*opts, **kwargs, &b); end + + # source://irb//lib/irb/extend-command.rb#263 + def irb_show_doc(*opts, **kwargs, &b); end + + # source://irb//lib/irb/extend-command.rb#263 + def irb_show_source(*opts, **kwargs, &b); end + + # source://irb//lib/irb/extend-command.rb#263 + def irb_source(*opts, **kwargs, &b); end + + # source://irb//lib/irb/extend-command.rb#263 + def irb_step(*opts, **kwargs, &b); end + + # source://irb//lib/irb/extend-command.rb#263 + def irb_whereami(*opts, **kwargs, &b); end + + # source://irb//lib/irb/extend-command.rb#263 + def irb_workspaces(*opts, **kwargs, &b); end + + class << self + # source://irb//lib/irb/extend-command.rb#200 + 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#253 + 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#302 + def extend_object(obj); end + + # Installs the default irb commands. + # + # source://irb//lib/irb/extend-command.rb#241 + def install_extend_commands; end + + # source://irb//lib/irb/extend-command.rb#296 + 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#227 + 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#115 +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#128 + def initialize(file); end + + # source://irb//lib/irb/input-method.rb#159 + def close; end + + # The external encoding for standard input. + # + # source://irb//lib/irb/input-method.rb#150 + 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#137 + def eof?; end + + # Reads the next line from this input method. + # + # See IO#gets for more information. + # + # source://irb//lib/irb/input-method.rb#144 + def gets; end + + # For debug message + # + # source://irb//lib/irb/input-method.rb#155 + def inspect; end + + class << self + # source://irb//lib/irb/input-method.rb#117 + def open(file, &block); end + end +end + +# source://irb//lib/irb/history.rb#2 +module IRB::HistorySavingAbility + # source://irb//lib/irb/history.rb#11 + def load_history; end + + # source://irb//lib/irb/history.rb#7 + def reset_history_counter; end + + # source://irb//lib/irb/history.rb#35 + def save_history; end + + # @return [Boolean] + # + # source://irb//lib/irb/history.rb#3 + def support_history_saving?; end +end + +# source://irb//lib/irb/init.rb#366 +IRB::IRBRC_EXT = T.let(T.unsafe(nil), String) + +# source://irb//lib/irb/completion.rb#419 +module IRB::InputCompletor + class << self + # source://irb//lib/irb/completion.rb#425 + def retrieve_completion_data(input, bind: T.unsafe(nil), doc_namespace: T.unsafe(nil)); end + + private + + # source://irb//lib/irb/completion.rb#421 + def regexp_completor; end + end +end + +# source://irb//lib/irb/completion.rb#429 +IRB::InputCompletor::CompletionProc = T.let(T.unsafe(nil), Proc) + +# source://irb//lib/irb/input-method.rb#13 +class IRB::InputMethod + # Reads the next line from this input method. + # + # See IO#gets for more information. + # + # source://irb//lib/irb/input-method.rb#22 + def gets; end + + # For debug message + # + # source://irb//lib/irb/input-method.rb#48 + def inspect; end + + # The irb prompt associated with this input method + # + # source://irb//lib/irb/input-method.rb#17 + def prompt; end + + # The irb prompt associated with this input method + # + # source://irb//lib/irb/input-method.rb#17 + 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#39 + def readable_after_eof?; end + + # @return [Boolean] + # + # source://irb//lib/irb/input-method.rb#43 + def support_history_saving?; end + + # source://irb//lib/irb/input-method.rb#27 + def winsize; end +end + +# source://irb//lib/irb/input-method.rb#14 +IRB::InputMethod::BASIC_WORD_BREAK_CHARACTERS = T.let(T.unsafe(nil), String) + +# 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#424 +class IRB::Irb + # Creates a new irb session + # + # @return [Irb] a new instance of Irb + # + # source://irb//lib/irb.rb#435 + def initialize(workspace = T.unsafe(nil), input_method = T.unsafe(nil)); end + + # source://irb//lib/irb.rb#641 + def build_statement(code); end + + # source://irb//lib/irb.rb#662 + def configure_io; end + + # Returns the current context of this irb session + # + # source://irb//lib/irb.rb#513 + def context; end + + # source://irb//lib/irb.rb#714 + def convert_invalid_byte_sequence(str, enc); end + + # A hook point for `debug` command's breakpoint after :IRB_EXIT as well as its clean-up + # + # source://irb//lib/irb.rb#444 + def debug_break; end + + # source://irb//lib/irb.rb#454 + def debug_readline(binding); end + + # source://irb//lib/irb.rb#628 + def each_top_level_statement; end + + # source://irb//lib/irb.rb#721 + def encode_with_invalid_byte_sequence(str, enc); end + + # Evaluates input for this session. + # + # source://irb//lib/irb.rb#548 + def eval_input; end + + # source://irb//lib/irb.rb#743 + 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#967 + def inspect; end + + # source://irb//lib/irb.rb#929 + def output_value(omit = T.unsafe(nil)); end + + # source://irb//lib/irb.rb#580 + def read_input(prompt); end + + # source://irb//lib/irb.rb#599 + def readmultiline; end + + # source://irb//lib/irb.rb#486 + def run(conf = T.unsafe(nil)); end + + # The lexer used by this irb session + # + # source://irb//lib/irb.rb#515 + def scanner; end + + # The lexer used by this irb session + # + # source://irb//lib/irb.rb#515 + def scanner=(_arg0); end + + # Handler for the signal SIGINT, see Kernel#trap for more information. + # + # source://irb//lib/irb.rb#849 + def signal_handle; end + + # Evaluates the given block using the given +status+. + # + # source://irb//lib/irb.rb#871 + def signal_status(status); end + + # @return [Boolean] + # + # source://irb//lib/irb.rb#657 + def single_line_command?(code); end + + # Evaluates the given block using the given +context+ as the Context. + # + # source://irb//lib/irb.rb#839 + 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#828 + 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#798 + 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#814 + def suspend_workspace(workspace); end + + private + + # source://irb//lib/irb.rb#892 + def format_prompt(format, ltype, indent, line_no); end + + # source://irb//lib/irb.rb#517 + def generate_prompt(opens, continue, line_offset); end + + # source://irb//lib/irb.rb#883 + def truncate_prompt_main(str); end +end + +# source://irb//lib/irb.rb#432 +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#430 +IRB::Irb::PROMPT_MAIN_TRUNCATE_LENGTH = T.let(T.unsafe(nil), Integer) + +# source://irb//lib/irb.rb#431 +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#25 + def initialize(locale = T.unsafe(nil)); end + + # source://irb//lib/irb/locale.rb#49 + def String(mes); end + + # source://irb//lib/irb/locale.rb#126 + def each_localized_path(dir, file); end + + # @yield [nil] + # + # source://irb//lib/irb/locale.rb#133 + def each_sublocale; end + + # source://irb//lib/irb/locale.rb#45 + def encoding; end + + # source://irb//lib/irb/locale.rb#97 + def find(file, paths = T.unsafe(nil)); end + + # source://irb//lib/irb/locale.rb#58 + def format(*opts); end + + # source://irb//lib/irb/locale.rb#62 + def gets(*rs); end + + # Returns the value of attribute lang. + # + # source://irb//lib/irb/locale.rb#43 + def lang; end + + # source://irb//lib/irb/locale.rb#85 + def load(file); end + + # Returns the value of attribute modifier. + # + # source://irb//lib/irb/locale.rb#43 + def modifier; end + + # source://irb//lib/irb/locale.rb#70 + def print(*opts); end + + # source://irb//lib/irb/locale.rb#75 + def printf(*opts); end + + # source://irb//lib/irb/locale.rb#80 + def puts(*opts); end + + # source://irb//lib/irb/locale.rb#66 + def readline(*rs); 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#115 + def search_file(lib_paths, dir, file); end + + # Returns the value of attribute territory. + # + # source://irb//lib/irb/locale.rb#43 + def territory; end +end + +# source://irb//lib/irb/locale.rb#18 +IRB::Locale::LEGACY_ENCODING_ALIAS_MAP = T.let(T.unsafe(nil), Hash) + +# 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/nesting_parser.rb#3 +module IRB::NestingParser + class << self + # source://irb//lib/irb/nesting_parser.rb#182 + def open_tokens(tokens); end + + # Calculates token information [line_tokens, prev_opens, next_opens, min_depth] for each line. + # Example code + # ["hello + # world"+( + # First line + # line_tokens: [[lbracket, '['], [tstring_beg, '"'], [tstring_content("hello\nworld"), "hello\n"]] + # prev_opens: [] + # next_tokens: [lbracket, tstring_beg] + # min_depth: 0 (minimum at beginning of line) + # Second line + # line_tokens: [[tstring_content("hello\nworld"), "world"], [tstring_end, '"'], [op, '+'], [lparen, '(']] + # prev_opens: [lbracket, tstring_beg] + # next_tokens: [lbracket, lparen] + # min_depth: 1 (minimum just after tstring_end) + # + # source://irb//lib/irb/nesting_parser.rb#201 + def parse_by_line(tokens); end + + # Scan each token and call the given block with array of token and other information for parsing + # + # source://irb//lib/irb/nesting_parser.rb#7 + def scan_opens(tokens); end + end +end + +# source://irb//lib/irb/nesting_parser.rb#4 +IRB::NestingParser::IGNORE_TOKENS = T.let(T.unsafe(nil), Array) + +# 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#114 +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#213 +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#164 +class IRB::ReadlineInputMethod < ::IRB::InputMethod + include ::IRB::HistorySavingAbility + + # Creates a new input method object using Readline + # + # @return [ReadlineInputMethod] a new instance of ReadlineInputMethod + # + # source://irb//lib/irb/input-method.rb#175 + def initialize; 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#215 + def eof?; end + + # Reads the next line from this input method. + # + # See IO#gets for more information. + # + # source://irb//lib/irb/input-method.rb#199 + def gets; end + + # For debug message + # + # source://irb//lib/irb/input-method.rb#220 + def inspect; end + + class << self + # source://irb//lib/irb/input-method.rb#165 + def initialize_readline; end + end +end + +# source://irb//lib/irb/completion.rb#72 +class IRB::RegexpCompletor < ::IRB::BaseCompletor + # source://irb//lib/irb/completion.rb#120 + def complete_require_path(target, preposing, postposing); end + + # source://irb//lib/irb/completion.rb#153 + def completion_candidates(preposing, target, postposing, bind:); end + + # source://irb//lib/irb/completion.rb#161 + def doc_namespace(_preposing, matched, _postposing, bind:); end + + # source://irb//lib/irb/completion.rb#165 + def retrieve_completion_data(input, bind:, doc_namespace:); end + + # source://irb//lib/irb/completion.rb#406 + def select_message(receiver, message, candidates, sep = T.unsafe(nil)); end +end + +# Set of available operators in Ruby +# +# source://irb//lib/irb/completion.rb#404 +IRB::RegexpCompletor::Operators = T.let(T.unsafe(nil), Array) + +# Set of reserved words used by Ruby, you should not use these for +# constants or variables +# +# source://irb//lib/irb/completion.rb#99 +IRB::RegexpCompletor::ReservedWords = T.let(T.unsafe(nil), Array) + +# source://irb//lib/irb/input-method.rb#455 +class IRB::ReidlineInputMethod < ::IRB::RelineInputMethod + # @return [ReidlineInputMethod] a new instance of ReidlineInputMethod + # + # source://irb//lib/irb/input-method.rb#456 + def initialize; end +end + +# source://irb//lib/irb/input-method.rb#229 +class IRB::RelineInputMethod < ::IRB::InputMethod + include ::IRB::HistorySavingAbility + + # Creates a new input method object using Reline + # + # @return [RelineInputMethod] a new instance of RelineInputMethod + # + # source://irb//lib/irb/input-method.rb#233 + def initialize; end + + # source://irb//lib/irb/input-method.rb#281 + def auto_indent(&block); end + + # source://irb//lib/irb/input-method.rb#273 + def check_termination(&block); end + + # source://irb//lib/irb/input-method.rb#386 + def display_document(matched, driver: T.unsafe(nil)); end + + # source://irb//lib/irb/input-method.rb#277 + def dynamic_prompt(&block); 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#441 + def eof?; end + + # Reads the next line from this input method. + # + # See IO#gets for more information. + # + # source://irb//lib/irb/input-method.rb#423 + def gets; end + + # For debug message + # + # source://irb//lib/irb/input-method.rb#446 + def inspect; end + + # source://irb//lib/irb/input-method.rb#285 + def show_doc_dialog_proc; end +end + +# source://irb//lib/irb/input-method.rb#230 +IRB::RelineInputMethod::HISTORY = T.let(T.unsafe(nil), Reline::History) + +# :stopdoc: +# +# source://irb//lib/irb/ruby-lex.rb#13 +class IRB::RubyLex + # @return [Boolean] + # + # source://irb//lib/irb/ruby-lex.rb#156 + def assignment_expression?(code, local_variables:); end + + # source://irb//lib/irb/ruby-lex.rb#274 + def calc_indent_level(opens); end + + # source://irb//lib/irb/ruby-lex.rb#137 + def check_code_state(code, local_variables:); end + + # source://irb//lib/irb/ruby-lex.rb#198 + def check_code_syntax(code, local_variables:); end + + # source://irb//lib/irb/ruby-lex.rb#431 + def check_termination_in_prev_line(code, local_variables:); end + + # @return [Boolean] + # + # source://irb//lib/irb/ruby-lex.rb#143 + def code_terminated?(code, tokens, opens, local_variables:); end + + # @return [Boolean] + # + # source://irb//lib/irb/ruby-lex.rb#301 + def free_indent_token?(token); end + + # Calculates the difference of pasted code's indent and indent calculated from tokens + # + # source://irb//lib/irb/ruby-lex.rb#306 + def indent_difference(lines, line_results, line_index); end + + # source://irb//lib/irb/ruby-lex.rb#401 + def ltype_from_open_tokens(opens); end + + # source://irb//lib/irb/ruby-lex.rb#325 + def process_indent_level(tokens, lines, line_index, is_newline); end + + # @return [Boolean] + # + # source://irb//lib/irb/ruby-lex.rb#174 + def should_continue?(tokens); end + + class << self + # source://irb//lib/irb/ruby-lex.rb#45 + def compile_with_errors_suppressed(code, line_no: T.unsafe(nil)); end + + # source://irb//lib/irb/ruby-lex.rb#71 + def generate_local_variables_assign_code(local_variables); end + + # Some part of the code is not included in Ripper's token. + # Example: DATA part, token after heredoc_beg when heredoc has unclosed embexpr. + # With interpolated tokens, tokens.map(&:tok).join will be equal to code. + # + # source://irb//lib/irb/ruby-lex.rb#78 + def interpolate_ripper_ignored_tokens(code, tokens); end + + # source://irb//lib/irb/ruby-lex.rb#107 + def ripper_lex_without_warning(code, local_variables: T.unsafe(nil)); end + end +end + +# source://irb//lib/irb/ruby-lex.rb#14 +IRB::RubyLex::ASSIGNMENT_NODE_TYPES = T.let(T.unsafe(nil), Array) + +# source://irb//lib/irb/ruby-lex.rb#62 +IRB::RubyLex::ERROR_TOKENS = T.let(T.unsafe(nil), Array) + +# source://irb//lib/irb/ruby-lex.rb#299 +IRB::RubyLex::FREE_INDENT_TOKENS = T.let(T.unsafe(nil), Array) + +# source://irb//lib/irb/ruby-lex.rb#394 +IRB::RubyLex::LTYPE_TOKENS = T.let(T.unsafe(nil), Array) + +# source://irb//lib/irb/ruby-lex.rb#39 +class IRB::RubyLex::TerminateLineInput < ::StandardError + # @return [TerminateLineInput] a new instance of TerminateLineInput + # + # source://irb//lib/irb/ruby-lex.rb#40 + def initialize; end +end + +# source://irb//lib/irb/statement.rb#4 +class IRB::Statement + # Returns the value of attribute code. + # + # source://irb//lib/irb/statement.rb#5 + def code; end + + # @raise [NotImplementedError] + # + # source://irb//lib/irb/statement.rb#19 + def evaluable_code; end + + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://irb//lib/irb/statement.rb#7 + def is_assignment?; end + + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://irb//lib/irb/statement.rb#15 + def should_be_handled_by_debugger?; end + + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://irb//lib/irb/statement.rb#11 + def suppresses_echo?; end +end + +# source://irb//lib/irb/statement.rb#46 +class IRB::Statement::Command < ::IRB::Statement + # @return [Command] a new instance of Command + # + # source://irb//lib/irb/statement.rb#47 + def initialize(code, command, arg, command_class); end + + # source://irb//lib/irb/statement.rb#68 + def evaluable_code; end + + # @return [Boolean] + # + # source://irb//lib/irb/statement.rb#54 + def is_assignment?; end + + # @return [Boolean] + # + # source://irb//lib/irb/statement.rb#62 + def should_be_handled_by_debugger?; end + + # @return [Boolean] + # + # source://irb//lib/irb/statement.rb#58 + def suppresses_echo?; end +end + +# source://irb//lib/irb/statement.rb#23 +class IRB::Statement::Expression < ::IRB::Statement + # @return [Expression] a new instance of Expression + # + # source://irb//lib/irb/statement.rb#24 + def initialize(code, is_assignment); end + + # source://irb//lib/irb/statement.rb#41 + def evaluable_code; end + + # @return [Boolean] + # + # source://irb//lib/irb/statement.rb#37 + def is_assignment?; end + + # @return [Boolean] + # + # source://irb//lib/irb/statement.rb#33 + def should_be_handled_by_debugger?; end + + # @return [Boolean] + # + # source://irb//lib/irb/statement.rb#29 + def suppresses_echo?; end +end + +# source://irb//lib/irb/input-method.rb#53 +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#55 + def initialize; end + + # The external encoding for standard input. + # + # source://irb//lib/irb/input-method.rb#104 + 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#75 + def eof?; end + + # Reads the next line from this input method. + # + # See IO#gets for more information. + # + # source://irb//lib/irb/input-method.rb#65 + def gets; end + + # For debug message + # + # source://irb//lib/irb/input-method.rb#109 + 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#99 + 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#90 + def readable_after_eof?; end +end + +# A standard output printer +# +# source://irb//lib/irb/output-method.rb#79 +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#144 + def code_around_binding; end + + # Evaluate the given +statements+ within the context of this workspace. + # + # source://irb//lib/irb/workspace.rb#116 + 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#131 + def filter_backtrace(bt); end + + # source://irb//lib/irb/workspace.rb#111 + def load_commands_to_main; end + + # source://irb//lib/irb/workspace.rb#124 + def local_variable_get(name); end + + # source://irb//lib/irb/workspace.rb#120 + 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 + +# source://irb//lib/irb/ruby-lex.rb#473 +RubyLex = IRB::RubyLex diff --git a/sorbet/rbi/gems/loofah@2.21.3.rbi b/sorbet/rbi/gems/loofah@2.21.4.rbi similarity index 98% rename from sorbet/rbi/gems/loofah@2.21.3.rbi rename to sorbet/rbi/gems/loofah@2.21.4.rbi index e43c8957f..908c30abe 100644 --- a/sorbet/rbi/gems/loofah@2.21.3.rbi +++ b/sorbet/rbi/gems/loofah@2.21.4.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 diff --git a/sorbet/rbi/gems/mail@2.8.1.rbi b/sorbet/rbi/gems/mail@2.8.1.rbi index bfb2e3f6a..f447d20ac 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.6/lib/action_mailbox/mail_ext/from_source.rb#4 + # source://actionmailbox/7.1.1/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.6/lib/action_mailbox/mail_ext/address_equality.rb#5 + # source://actionmailbox/7.1.1/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.6/lib/action_mailbox/mail_ext/address_wrapping.rb#5 + # source://actionmailbox/7.1.1/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.6/lib/action_mailbox/mail_ext/addresses.rb#21 + # source://actionmailbox/7.1.1/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.6/lib/action_mailbox/mail_ext/addresses.rb#17 + # source://actionmailbox/7.1.1/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.6/lib/action_mailbox/mail_ext/addresses.rb#5 + # source://actionmailbox/7.1.1/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.6/lib/action_mailbox/mail_ext/recipients.rb#5 + # source://actionmailbox/7.1.1/lib/action_mailbox/mail_ext/recipients.rb#5 def recipients; end - # source://actionmailbox/7.0.6/lib/action_mailbox/mail_ext/addresses.rb#9 + # source://actionmailbox/7.1.1/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.6/lib/action_mailbox/mail_ext/addresses.rb#13 + # source://actionmailbox/7.1.1/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,10 @@ class Mail::Message # source://mail//lib/mail/message.rb#1811 def without_attachments!; end - # source://actionmailbox/7.0.6/lib/action_mailbox/mail_ext/addresses.rb#25 + # source://actionmailbox/7.1.1/lib/action_mailbox/mail_ext/addresses.rb#29 + def x_forwarded_to_addresses; end + + # source://actionmailbox/7.1.1/lib/action_mailbox/mail_ext/addresses.rb#25 def x_original_to_addresses; end private @@ -4892,7 +4895,7 @@ class Mail::Message # source://mail//lib/mail/message.rb#2056 def add_required_message_fields; end - # source://actionmailbox/7.0.6/lib/action_mailbox/mail_ext/addresses.rb#30 + # source://actionmailbox/7.1.1/lib/action_mailbox/mail_ext/addresses.rb#34 def address_list(obj); end # source://mail//lib/mail/message.rb#2025 diff --git a/sorbet/rbi/gems/mdl@0.12.0.rbi b/sorbet/rbi/gems/mdl@0.13.0.rbi similarity index 85% rename from sorbet/rbi/gems/mdl@0.12.0.rbi rename to sorbet/rbi/gems/mdl@0.13.0.rbi index 38401e7ad..9a34a8058 100644 --- a/sorbet/rbi/gems/mdl@0.12.0.rbi +++ b/sorbet/rbi/gems/mdl@0.13.0.rbi @@ -32,18 +32,18 @@ Kramdown::Parser::MarkdownLint::FENCED_CODEBLOCK_MATCH = T.let(T.unsafe(nil), Re # Primary MDL container # -# source://mdl//lib/mdl/cli.rb#4 +# source://mdl//lib/mdl/formatters/sarif.rb#3 module MarkdownLint class << self # Creates hyperlinks in terminal emulators, if available: https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda # - # source://mdl//lib/mdl.rb#151 + # source://mdl//lib/mdl.rb#155 def linkify(text, url); end - # source://mdl//lib/mdl.rb#144 + # source://mdl//lib/mdl.rb#148 def printable_id(rule); end - # source://mdl//lib/mdl.rb#14 + # source://mdl//lib/mdl.rb#15 def run(argv = T.unsafe(nil)); end end end @@ -56,14 +56,14 @@ class MarkdownLint::CLI extend ::Mixlib::CLI::ClassMethods extend ::Mixlib::CLI::InheritMethods - # source://mdl//lib/mdl/cli.rb#110 + # source://mdl//lib/mdl/cli.rb#116 def run(argv = T.unsafe(nil)); end class << self - # source://mdl//lib/mdl/cli.rb#164 + # source://mdl//lib/mdl/cli.rb#170 def probe_config_file(path); end - # source://mdl//lib/mdl/cli.rb#147 + # source://mdl//lib/mdl/cli.rb#153 def toggle_list(parts, to_sym = T.unsafe(nil)); end end end @@ -167,6 +167,11 @@ class MarkdownLint::Doc # source://mdl//lib/mdl/doc.rb#14 def elements; end + # Returns the element as plaintext + # + # source://mdl//lib/mdl/doc.rb#274 + def extract_as_text(element); end + # Extracts the text from an element whose children consist of text # elements and other things # @@ -272,7 +277,7 @@ class MarkdownLint::Doc # Adds a 'level' and 'parent' option to all elements to show how nested they # are # - # source://mdl//lib/mdl/doc.rb#277 + # source://mdl//lib/mdl/doc.rb#301 def add_annotations(elements, level = T.unsafe(nil), parent = T.unsafe(nil)); end class << self @@ -316,6 +321,15 @@ class MarkdownLint::Rule # source://mdl//lib/mdl/ruleset.rb#48 def docs_url; end + # This method returns all the rows of a table + # + # @param lines [Array] Lines of a doc as an array + # @param pos [Numeric] Position/index of the table in the array + # @return [Array] Rows of the table in an array + # + # source://mdl//lib/mdl/ruleset.rb#89 + def get_table_rows(lines, pos); end + # Returns the value of attribute id. # # source://mdl//lib/mdl/ruleset.rb#4 @@ -328,6 +342,14 @@ class MarkdownLint::Rule # source://mdl//lib/mdl/ruleset.rb#4 def id=(_arg0); end + # This method calculates the number of columns in a table row + # + # @param table_row [String] A row of the table in question. + # @return [Numeric] Number of columns in the row + # + # source://mdl//lib/mdl/ruleset.rb#56 + def number_of_columns_in_a_table_row(table_row); end + # source://mdl//lib/mdl/ruleset.rb#32 def params(params = T.unsafe(nil)); end @@ -337,31 +359,52 @@ end # defines a ruleset # -# source://mdl//lib/mdl/ruleset.rb#54 +# source://mdl//lib/mdl/ruleset.rb#115 class MarkdownLint::RuleSet # @return [RuleSet] a new instance of RuleSet # - # source://mdl//lib/mdl/ruleset.rb#57 + # source://mdl//lib/mdl/ruleset.rb#118 def initialize; end - # source://mdl//lib/mdl/ruleset.rb#71 + # source://mdl//lib/mdl/ruleset.rb#132 def docs(url = T.unsafe(nil), &block); end - # source://mdl//lib/mdl/ruleset.rb#66 + # source://mdl//lib/mdl/ruleset.rb#127 def load(rules_file); end - # source://mdl//lib/mdl/ruleset.rb#79 + # source://mdl//lib/mdl/ruleset.rb#140 def load_default; end - # source://mdl//lib/mdl/ruleset.rb#61 + # source://mdl//lib/mdl/ruleset.rb#122 def rule(id, description, &block); end # Returns the value of attribute rules. # - # source://mdl//lib/mdl/ruleset.rb#55 + # source://mdl//lib/mdl/ruleset.rb#116 def rules; end end +# SARIF formatter +# +# @see https://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html +# +# source://mdl//lib/mdl/formatters/sarif.rb#7 +class MarkdownLint::SarifFormatter + class << self + # source://mdl//lib/mdl/formatters/sarif.rb#9 + def generate(rules, results); end + + # source://mdl//lib/mdl/formatters/sarif.rb#15 + def generate_sarif(rules, results); end + + # source://mdl//lib/mdl/formatters/sarif.rb#63 + def generate_sarif_results(rules, results); end + + # source://mdl//lib/mdl/formatters/sarif.rb#35 + def generate_sarif_rules(rules); end + end +end + # defines a style # # source://mdl//lib/mdl/style.rb#5 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@5.18.1.rbi b/sorbet/rbi/gems/minitest@5.20.0.rbi similarity index 84% rename from sorbet/rbi/gems/minitest@5.18.1.rbi rename to sorbet/rbi/gems/minitest@5.20.0.rbi index f68a238d1..de27f9c6f 100644 --- a/sorbet/rbi/gems/minitest@5.18.1.rbi +++ b/sorbet/rbi/gems/minitest@5.20.0.rbi @@ -12,7 +12,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#176 def __run(reporter, options); end # A simple hook allowing you to run a block of code after everything @@ -20,12 +20,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 @@ -37,7 +43,7 @@ module Minitest # source://minitest//lib/minitest.rb#18 def cattr_accessor(name); end - # source://minitest//lib/minitest.rb#1073 + # source://minitest//lib/minitest.rb#1102 def clock_time; end # source://minitest//lib/minitest.rb#19 @@ -46,7 +52,7 @@ module Minitest # source://minitest//lib/minitest.rb#19 def extensions=(_arg0); end - # source://minitest//lib/minitest.rb#264 + # source://minitest//lib/minitest.rb#267 def filter_backtrace(bt); end # source://minitest//lib/minitest.rb#19 @@ -55,10 +61,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 @@ -67,7 +73,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#189 def process_args(args = T.unsafe(nil)); end # source://minitest//lib/minitest.rb#19 @@ -92,10 +98,10 @@ module Minitest # 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#1064 + # source://minitest//lib/minitest.rb#1093 def run_one_method(klass, method_name); end # source://minitest//lib/minitest.rb#19 @@ -109,7 +115,7 @@ end # Defines the API for Reporters. Subclass this and override whatever # you want. Go nuts. # -# source://minitest//lib/minitest.rb#592 +# source://minitest//lib/minitest.rb#621 class Minitest::AbstractReporter include ::Mutex_m @@ -123,13 +129,13 @@ class Minitest::AbstractReporter # # @return [Boolean] # - # source://minitest//lib/minitest.rb#626 + # source://minitest//lib/minitest.rb#655 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#605 + # source://minitest//lib/minitest.rb#634 def prerecord(klass, name); end # Output and record the result of the test. Call @@ -137,17 +143,17 @@ class Minitest::AbstractReporter # result character string. Stores the result of the run if the run # did not pass. # - # source://minitest//lib/minitest.rb#614 + # source://minitest//lib/minitest.rb#643 def record(result); end # Outputs the summary of the run. # - # source://minitest//lib/minitest.rb#620 + # source://minitest//lib/minitest.rb#649 def report; end # Starts reporting on the run. # - # source://minitest//lib/minitest.rb#598 + # source://minitest//lib/minitest.rb#627 def start; end # source://mutex_m/0.1.2/mutex_m.rb#78 @@ -162,20 +168,20 @@ end # Represents run failures. # -# source://minitest//lib/minitest.rb#909 +# source://minitest//lib/minitest.rb#938 class Minitest::Assertion < ::Exception - # source://minitest//lib/minitest.rb#910 + # source://minitest//lib/minitest.rb#939 def error; end # Where was this run before an assertion was raised? # - # source://minitest//lib/minitest.rb#917 + # source://minitest//lib/minitest.rb#946 def location; end - # source://minitest//lib/minitest.rb#926 + # source://minitest//lib/minitest.rb#955 def result_code; end - # source://minitest//lib/minitest.rb#930 + # source://minitest//lib/minitest.rb#959 def result_label; end end @@ -618,60 +624,60 @@ Minitest::Assertions::UNDEFINED = T.let(T.unsafe(nil), Object) # # See Minitest.backtrace_filter=. # -# source://minitest//lib/minitest.rb#1041 +# source://minitest//lib/minitest.rb#1070 class Minitest::BacktraceFilter # Filter +bt+ to something useful. Returns the whole thing if # $DEBUG (ruby) or $MT_DEBUG (env). # - # source://minitest//lib/minitest.rb#1049 + # source://minitest//lib/minitest.rb#1078 def filter(bt); end end -# source://minitest//lib/minitest.rb#1043 +# source://minitest//lib/minitest.rb#1072 Minitest::BacktraceFilter::MT_RE = T.let(T.unsafe(nil), Regexp) # Dispatch to multiple reporters as one. # -# source://minitest//lib/minitest.rb#858 +# source://minitest//lib/minitest.rb#887 class Minitest::CompositeReporter < ::Minitest::AbstractReporter # @return [CompositeReporter] a new instance of CompositeReporter # - # source://minitest//lib/minitest.rb#864 + # source://minitest//lib/minitest.rb#893 def initialize(*reporters); end # Add another reporter to the mix. # - # source://minitest//lib/minitest.rb#876 + # source://minitest//lib/minitest.rb#905 def <<(reporter); end - # source://minitest//lib/minitest.rb#869 + # source://minitest//lib/minitest.rb#898 def io; end # @return [Boolean] # - # source://minitest//lib/minitest.rb#880 + # source://minitest//lib/minitest.rb#909 def passed?; end - # source://minitest//lib/minitest.rb#888 + # source://minitest//lib/minitest.rb#917 def prerecord(klass, name); end - # source://minitest//lib/minitest.rb#895 + # source://minitest//lib/minitest.rb#924 def record(result); end - # source://minitest//lib/minitest.rb#901 + # source://minitest//lib/minitest.rb#930 def report; end # The list of reporters to dispatch to. # - # source://minitest//lib/minitest.rb#862 + # source://minitest//lib/minitest.rb#891 def reporters; end # The list of reporters to dispatch to. # - # source://minitest//lib/minitest.rb#862 + # source://minitest//lib/minitest.rb#891 def reporters=(_arg0); end - # source://minitest//lib/minitest.rb#884 + # source://minitest//lib/minitest.rb#913 def start; end end @@ -689,48 +695,48 @@ end # # ... lots of test methods ... # end # -# source://minitest//lib/minitest.rb#985 +# source://minitest//lib/minitest.rb#1014 module Minitest::Guard # Is this running on jruby? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#990 + # source://minitest//lib/minitest.rb#1019 def jruby?(platform = T.unsafe(nil)); end # Is this running on maglev? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#997 + # source://minitest//lib/minitest.rb#1026 def maglev?(platform = T.unsafe(nil)); end # Is this running on mri? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#1007 + # source://minitest//lib/minitest.rb#1036 def mri?(platform = T.unsafe(nil)); end # Is this running on macOS? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#1014 + # source://minitest//lib/minitest.rb#1043 def osx?(platform = T.unsafe(nil)); end # Is this running on rubinius? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#1021 + # source://minitest//lib/minitest.rb#1050 def rubinius?(platform = T.unsafe(nil)); end # Is this running on windows? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#1031 + # source://minitest//lib/minitest.rb#1060 def windows?(platform = T.unsafe(nil)); end end @@ -793,36 +799,36 @@ end # plugin, pull this out of the composite and replace it with your # own. # -# source://minitest//lib/minitest.rb#657 +# source://minitest//lib/minitest.rb#686 class Minitest::ProgressReporter < ::Minitest::Reporter - # source://minitest//lib/minitest.rb#658 + # source://minitest//lib/minitest.rb#687 def prerecord(klass, name); end - # source://minitest//lib/minitest.rb#665 + # source://minitest//lib/minitest.rb#694 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#489 +# source://minitest//lib/minitest.rb#517 module Minitest::Reportable # @raise [NotImplementedError] # - # source://minitest//lib/minitest.rb#509 + # source://minitest//lib/minitest.rb#537 def class_name; end # Did this run error? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#530 + # source://minitest//lib/minitest.rb#558 def error?; end # The location identifier of this test. Depends on a method # existing called class_name. # - # source://minitest//lib/minitest.rb#504 + # source://minitest//lib/minitest.rb#532 def location; end # Did this run pass? @@ -832,47 +838,47 @@ module Minitest::Reportable # # @return [Boolean] # - # source://minitest//lib/minitest.rb#496 + # source://minitest//lib/minitest.rb#524 def passed?; end # Returns ".", "F", or "E" based on the result of the run. # - # source://minitest//lib/minitest.rb#516 + # source://minitest//lib/minitest.rb#544 def result_code; end # Was this run skipped? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#523 + # source://minitest//lib/minitest.rb#551 def skipped?; end end -# source://minitest//lib/minitest.rb#633 +# source://minitest//lib/minitest.rb#662 class Minitest::Reporter < ::Minitest::AbstractReporter # @return [Reporter] a new instance of Reporter # - # source://minitest//lib/minitest.rb#642 + # source://minitest//lib/minitest.rb#671 def initialize(io = T.unsafe(nil), options = T.unsafe(nil)); end # The IO used to report. # - # source://minitest//lib/minitest.rb#635 + # source://minitest//lib/minitest.rb#664 def io; end # The IO used to report. # - # source://minitest//lib/minitest.rb#635 + # source://minitest//lib/minitest.rb#664 def io=(_arg0); end # Command-line options for this run. # - # source://minitest//lib/minitest.rb#640 + # source://minitest//lib/minitest.rb#669 def options; end # Command-line options for this run. # - # source://minitest//lib/minitest.rb#640 + # source://minitest//lib/minitest.rb#669 def options=(_arg0); end end @@ -882,90 +888,112 @@ 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#542 +# source://minitest//lib/minitest.rb#570 class Minitest::Result < ::Minitest::Runnable include ::Minitest::Reportable - # source://minitest//lib/minitest.rb#575 + # source://minitest//lib/minitest.rb#604 def class_name; end # The class name of the test result. # - # source://minitest//lib/minitest.rb#551 + # source://minitest//lib/minitest.rb#579 def klass; end # The class name of the test result. # - # source://minitest//lib/minitest.rb#551 + # source://minitest//lib/minitest.rb#579 def klass=(_arg0); end # The location of the test method. # - # source://minitest//lib/minitest.rb#556 + # source://minitest//lib/minitest.rb#584 def source_location; end # The location of the test method. # - # source://minitest//lib/minitest.rb#556 + # source://minitest//lib/minitest.rb#584 def source_location=(_arg0); end - # source://minitest//lib/minitest.rb#579 + # source://minitest//lib/minitest.rb#608 def to_s; end class << self # Create a new test result from a Runnable instance. # - # source://minitest//lib/minitest.rb#561 + # source://minitest//lib/minitest.rb#589 def from(runnable); end end end # re-open # -# source://minitest//lib/minitest.rb#277 +# source://minitest//lib/minitest.rb#280 class Minitest::Runnable # @return [Runnable] a new instance of Runnable # - # source://minitest//lib/minitest.rb#445 + # source://minitest//lib/minitest.rb#448 def initialize(name); end # Number of assertions executed in this run. # - # source://minitest//lib/minitest.rb#281 + # source://minitest//lib/minitest.rb#284 def assertions; end # Number of assertions executed in this run. # - # source://minitest//lib/minitest.rb#281 + # source://minitest//lib/minitest.rb#284 def assertions=(_arg0); end - # source://minitest//lib/minitest.rb#441 + # source://minitest//lib/minitest.rb#444 def failure; end # An assertion raised during the run, if any. # - # source://minitest//lib/minitest.rb#286 + # source://minitest//lib/minitest.rb#289 def failures; end # An assertion raised during the run, if any. # - # source://minitest//lib/minitest.rb#286 + # source://minitest//lib/minitest.rb#289 def failures=(_arg0); end - # source://minitest//lib/minitest.rb#427 + # source://minitest//lib/minitest.rb#430 def marshal_dump; end - # source://minitest//lib/minitest.rb#437 + # source://minitest//lib/minitest.rb#440 def marshal_load(ary); end + # Metadata you attach to the test results that get sent to the reporter. + # + # Lazily initializes to a hash, to keep memory down. + # + # NOTE: this data *must* be plain (read: marshal-able) data! + # Hashes! Arrays! Strings! + # + # source://minitest//lib/minitest.rb#463 + def metadata; end + + # Sets metadata, mainly used for +Result.from+. + # + # source://minitest//lib/minitest.rb#470 + def metadata=(_arg0); end + + # Returns true if metadata exists. + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#475 + def metadata?; end + # Name of the run. # - # source://minitest//lib/minitest.rb#304 + # source://minitest//lib/minitest.rb#307 def name; end # Set the name of the run. # - # source://minitest//lib/minitest.rb#311 + # source://minitest//lib/minitest.rb#314 def name=(o); end # Did this run pass? @@ -976,7 +1004,7 @@ class Minitest::Runnable # @raise [NotImplementedError] # @return [Boolean] # - # source://minitest//lib/minitest.rb#464 + # source://minitest//lib/minitest.rb#492 def passed?; end # Returns a single character string to print based on the result @@ -985,14 +1013,14 @@ class Minitest::Runnable # # @raise [NotImplementedError] # - # source://minitest//lib/minitest.rb#473 + # source://minitest//lib/minitest.rb#501 def result_code; end # Runs a single method. Needs to return self. # # @raise [NotImplementedError] # - # source://minitest//lib/minitest.rb#454 + # source://minitest//lib/minitest.rb#482 def run; end # Was this run skipped? See #passed? for more information. @@ -1000,42 +1028,42 @@ class Minitest::Runnable # @raise [NotImplementedError] # @return [Boolean] # - # source://minitest//lib/minitest.rb#480 + # source://minitest//lib/minitest.rb#508 def skipped?; end # The time it took to run. # - # source://minitest//lib/minitest.rb#291 + # source://minitest//lib/minitest.rb#294 def time; end # The time it took to run. # - # source://minitest//lib/minitest.rb#291 + # source://minitest//lib/minitest.rb#294 def time=(_arg0); end - # source://minitest//lib/minitest.rb#293 + # source://minitest//lib/minitest.rb#296 def time_it; end class << self - # source://minitest//lib/minitest.rb#1083 + # source://minitest//lib/minitest.rb#1112 def inherited(klass); end # Returns all instance methods matching the pattern +re+. # - # source://minitest//lib/minitest.rb#318 + # source://minitest//lib/minitest.rb#321 def methods_matching(re); end - # source://minitest//lib/minitest.rb#397 + # source://minitest//lib/minitest.rb#400 def on_signal(name, action); end - # source://minitest//lib/minitest.rb#322 + # source://minitest//lib/minitest.rb#325 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#336 def run(reporter, options = T.unsafe(nil)); end # Runs a single method and has the reporter record the result. @@ -1043,7 +1071,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#372 def run_one_method(klass, method_name, reporter); end # Each subclass of Runnable is responsible for overriding this @@ -1051,33 +1079,33 @@ class Minitest::Runnable # # @raise [NotImplementedError] # - # source://minitest//lib/minitest.rb#414 + # source://minitest//lib/minitest.rb#417 def runnable_methods; end # Returns all subclasses of Runnable. # - # source://minitest//lib/minitest.rb#421 + # source://minitest//lib/minitest.rb#424 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#381 def test_order; end - # source://minitest//lib/minitest.rb#382 + # source://minitest//lib/minitest.rb#385 def with_info_handler(reporter, &block); end end end -# source://minitest//lib/minitest.rb#395 +# source://minitest//lib/minitest.rb#398 Minitest::Runnable::SIGNALS = T.let(T.unsafe(nil), Hash) # Assertion raised when skipping a run. # -# source://minitest//lib/minitest.rb#938 +# source://minitest//lib/minitest.rb#967 class Minitest::Skip < ::Minitest::Assertion - # source://minitest//lib/minitest.rb#939 + # source://minitest//lib/minitest.rb#968 def result_label; end end @@ -1101,113 +1129,113 @@ end # end # end # -# source://minitest//lib/minitest.rb#693 +# source://minitest//lib/minitest.rb#722 class Minitest::StatisticsReporter < ::Minitest::Reporter # @return [StatisticsReporter] a new instance of StatisticsReporter # - # source://minitest//lib/minitest.rb#737 + # source://minitest//lib/minitest.rb#766 def initialize(io = T.unsafe(nil), options = T.unsafe(nil)); end # Total number of assertions. # - # source://minitest//lib/minitest.rb#697 + # source://minitest//lib/minitest.rb#726 def assertions; end # Total number of assertions. # - # source://minitest//lib/minitest.rb#697 + # source://minitest//lib/minitest.rb#726 def assertions=(_arg0); end # Total number of test cases. # - # source://minitest//lib/minitest.rb#702 + # source://minitest//lib/minitest.rb#731 def count; end # Total number of test cases. # - # source://minitest//lib/minitest.rb#702 + # source://minitest//lib/minitest.rb#731 def count=(_arg0); end # Total number of tests that erred. # - # source://minitest//lib/minitest.rb#730 + # source://minitest//lib/minitest.rb#759 def errors; end # Total number of tests that erred. # - # source://minitest//lib/minitest.rb#730 + # source://minitest//lib/minitest.rb#759 def errors=(_arg0); end # Total number of tests that failed. # - # source://minitest//lib/minitest.rb#725 + # source://minitest//lib/minitest.rb#754 def failures; end # Total number of tests that failed. # - # source://minitest//lib/minitest.rb#725 + # source://minitest//lib/minitest.rb#754 def failures=(_arg0); end # @return [Boolean] # - # source://minitest//lib/minitest.rb#750 + # source://minitest//lib/minitest.rb#779 def passed?; end - # source://minitest//lib/minitest.rb#758 + # source://minitest//lib/minitest.rb#787 def record(result); end # Report on the tracked statistics. # - # source://minitest//lib/minitest.rb#768 + # source://minitest//lib/minitest.rb#797 def report; end # An +Array+ of test cases that failed or were skipped. # - # source://minitest//lib/minitest.rb#707 + # source://minitest//lib/minitest.rb#736 def results; end # An +Array+ of test cases that failed or were skipped. # - # source://minitest//lib/minitest.rb#707 + # source://minitest//lib/minitest.rb#736 def results=(_arg0); end # Total number of tests that where skipped. # - # source://minitest//lib/minitest.rb#735 + # source://minitest//lib/minitest.rb#764 def skips; end # Total number of tests that where skipped. # - # source://minitest//lib/minitest.rb#735 + # source://minitest//lib/minitest.rb#764 def skips=(_arg0); end - # source://minitest//lib/minitest.rb#754 + # source://minitest//lib/minitest.rb#783 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#714 + # source://minitest//lib/minitest.rb#743 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#714 + # source://minitest//lib/minitest.rb#743 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#720 + # source://minitest//lib/minitest.rb#749 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#720 + # source://minitest//lib/minitest.rb#749 def total_time=(_arg0); end end @@ -1219,48 +1247,48 @@ end # plugin, pull this out of the composite and replace it with your # own. # -# source://minitest//lib/minitest.rb#788 +# source://minitest//lib/minitest.rb#817 class Minitest::SummaryReporter < ::Minitest::StatisticsReporter - # source://minitest//lib/minitest.rb#823 + # source://minitest//lib/minitest.rb#852 def aggregated_results(io); end # Returns the value of attribute old_sync. # - # source://minitest//lib/minitest.rb#791 + # source://minitest//lib/minitest.rb#820 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#791 + # source://minitest//lib/minitest.rb#820 def old_sync=(_arg0); end - # source://minitest//lib/minitest.rb#806 + # source://minitest//lib/minitest.rb#835 def report; end # :startdoc: # - # source://minitest//lib/minitest.rb#794 + # source://minitest//lib/minitest.rb#823 def start; end - # source://minitest//lib/minitest.rb#818 + # source://minitest//lib/minitest.rb#847 def statistics; end - # source://minitest//lib/minitest.rb#843 + # source://minitest//lib/minitest.rb#872 def summary; end # :stopdoc: # - # source://minitest//lib/minitest.rb#790 + # source://minitest//lib/minitest.rb#819 def sync; end # :stopdoc: # - # source://minitest//lib/minitest.rb#790 + # source://minitest//lib/minitest.rb#819 def sync=(_arg0); end - # source://minitest//lib/minitest.rb#839 + # source://minitest//lib/minitest.rb#868 def to_s; end end @@ -1398,7 +1426,7 @@ module Minitest::Test::LifecycleHooks # end # end # - # class MiniTest::Test + # class Minitest::Test # include MyMinitestPlugin # end # @@ -1438,54 +1466,32 @@ 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#947 +# source://minitest//lib/minitest.rb#976 class Minitest::UnexpectedError < ::Minitest::Assertion # @return [UnexpectedError] a new instance of UnexpectedError # - # source://minitest//lib/minitest.rb#951 + # source://minitest//lib/minitest.rb#980 def initialize(error); end - # source://minitest//lib/minitest.rb#956 + # source://minitest//lib/minitest.rb#985 def backtrace; end # TODO: figure out how to use `cause` instead # - # source://minitest//lib/minitest.rb#949 + # source://minitest//lib/minitest.rb#978 def error; end # TODO: figure out how to use `cause` instead # - # source://minitest//lib/minitest.rb#949 + # source://minitest//lib/minitest.rb#978 def error=(_arg0); end - # source://minitest//lib/minitest.rb#960 + # source://minitest//lib/minitest.rb#989 def message; end - # source://minitest//lib/minitest.rb#965 + # source://minitest//lib/minitest.rb#994 def result_label; end end -# source://minitest//lib/minitest/unit.rb#20 -class Minitest::Unit - class << self - # source://minitest//lib/minitest/unit.rb#36 - def after_tests(&b); end - - # source://minitest//lib/minitest/unit.rb#30 - def autorun; end - end -end - -# source://minitest//lib/minitest/unit.rb#22 -class Minitest::Unit::TestCase < ::Minitest::Test - class << self - # source://minitest//lib/minitest/unit.rb#23 - def inherited(klass); end - end -end - -# source://minitest//lib/minitest/unit.rb#21 -Minitest::Unit::VERSION = T.let(T.unsafe(nil), String) - # source://minitest//lib/minitest.rb#12 Minitest::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/msgpack@1.7.1.rbi b/sorbet/rbi/gems/msgpack@1.7.2.rbi similarity index 100% rename from sorbet/rbi/gems/msgpack@1.7.1.rbi rename to sorbet/rbi/gems/msgpack@1.7.2.rbi diff --git a/sorbet/rbi/gems/mutex_m@0.1.2.rbi b/sorbet/rbi/gems/mutex_m@0.1.2.rbi new file mode 100644 index 000000000..64a5bbb1a --- /dev/null +++ b/sorbet/rbi/gems/mutex_m@0.1.2.rbi @@ -0,0 +1,91 @@ +# 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 +module Mutex_m + # source://mutex_m//mutex_m.rb#113 + def initialize(*args, **_arg1); end + + # source://mutex_m//mutex_m.rb#66 + def mu_extended; end + + # See Thread::Mutex#lock + # + # source://mutex_m//mutex_m.rb#93 + def mu_lock; end + + # See Thread::Mutex#locked? + # + # @return [Boolean] + # + # source://mutex_m//mutex_m.rb#83 + def mu_locked?; end + + # See Thread::Mutex#synchronize + # + # source://mutex_m//mutex_m.rb#78 + def mu_synchronize(&block); end + + # See Thread::Mutex#try_lock + # + # source://mutex_m//mutex_m.rb#88 + def mu_try_lock; end + + # See Thread::Mutex#unlock + # + # source://mutex_m//mutex_m.rb#98 + def mu_unlock; end + + # See Thread::Mutex#sleep + # + # source://mutex_m//mutex_m.rb#103 + def sleep(timeout = T.unsafe(nil)); end + + private + + # source://mutex_m//mutex_m.rb#109 + def mu_initialize; end + + class << self + # source://mutex_m//mutex_m.rb#56 + def append_features(cl); end + + # source://mutex_m//mutex_m.rb#46 + def define_aliases(cl); end + + # source://mutex_m//mutex_m.rb#61 + def extend_object(obj); end + end +end + +# source://mutex_m//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.3.rbi b/sorbet/rbi/gems/net-imap@0.4.3.rbi new file mode 100644 index 000000000..cc022e03f --- /dev/null +++ b/sorbet/rbi/gems/net-imap@0.4.3.rbi @@ -0,0 +1,7447 @@ +# 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+, and +UNSELECT+. +# 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-+, +BINARY+ fetch, and +SPECIAL-USE+. The +# following extensions are implicitly supported, but will be updated with +# more direct support: RFC5530 response codes, STATUS=SIZE, and +# STATUS=DELETED. +# +# ==== 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. +# +# ==== 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. +# +# ==== +XLIST+ (non-standard, deprecated) +# - #xlist: replaced by +SPECIAL-USE+ attributes in #list responses. +# +# ==== 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. +# +# == 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, . +# [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, +# . +# +# === 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#664 +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#2373 + 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#972 + 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#955 + 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#1251 + 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#931 + 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#982 + 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#1020 + 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#917 + 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#917 + 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#1734 + 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#995 + 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#2330 + def clear_responses(type = T.unsafe(nil)); end + + # source://net-imap//lib/net/imap.rb#870 + 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#1744 + 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#1979 + 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#1361 + 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#1373 + def delete(mailbox); end + + # Disconnects from the server. + # + # Related: #logout, #logout! + # + # source://net-imap//lib/net/imap.rb#878 + def disconnect; end + + # Returns true if disconnected from the server. + # + # Related: #logout, #disconnect + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap.rb#903 + 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: + # + # [+: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#2183 + 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#1347 + 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#1769 + 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. + # + # 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#1911 + 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#1641 + 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#1585 + 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#1564 + def getquotaroot(mailbox); end + + # Returns the initial greeting the server, an UntaggedResponse. + # + # source://net-imap//lib/net/imap.rb#710 + def greeting; end + + # The hostname this client connected to + # + # source://net-imap//lib/net/imap.rb#721 + 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#1049 + 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#2221 + def idle(timeout = T.unsafe(nil), &response_handler); end + + # Leaves IDLE. + # + # Related: #idle + # + # source://net-imap//lib/net/imap.rb#2253 + def idle_done; end + + # Seconds to wait until an IDLE response is received. + # + # source://net-imap//lib/net/imap.rb#718 + 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#1445 + 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#1304 + 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#1077 + 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#1094 + 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#1656 + 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#2015 + 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#1502 + 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#1068 + 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#715 + def open_timeout; end + + # The port this client connected to + # + # source://net-imap//lib/net/imap.rb#724 + def port; end + + # Removes the response handler. + # + # Related: #add_response_handler, #response_handlers + # + # source://net-imap//lib/net/imap.rb#2383 + 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#1386 + 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#2356 + 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#2308 + 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. + # + # 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] + # + # source://net-imap//lib/net/imap.rb#1862 + 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. + # + # 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" + # + # source://net-imap//lib/net/imap.rb#1331 + 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#1623 + 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#1603 + 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#2059 + 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#732 + 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#739 + 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 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#1680 + 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#1949 + 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#1398 + 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#2099 + 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#868 + 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#1992 + 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#1801 + 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#1927 + 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#2033 + 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#1871 + 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#2074 + 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#1961 + 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#2113 + 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#1760 + 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#1411 + 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#1546 + def xlist(refname, mailbox); end + + private + + # source://net-imap//lib/net/imap.rb#2722 + def build_ssl_ctx(ssl); end + + # NOTE: only call this for greeting, login, and authenticate + # + # source://net-imap//lib/net/imap.rb#2564 + def capabilities_from_resp_code(resp); end + + # source://net-imap//lib/net/imap.rb#2681 + def copy_internal(cmd, set, mailbox); end + + # source://net-imap//lib/net/imap.rb#2649 + def fetch_internal(cmd, set, attr, mod = T.unsafe(nil)); end + + # source://net-imap//lib/net/imap.rb#2613 + def generate_tag; end + + # source://net-imap//lib/net/imap.rb#2527 + def get_response; end + + # @raise [Error] + # + # source://net-imap//lib/net/imap.rb#2406 + def get_server_greeting; end + + # source://net-imap//lib/net/imap.rb#2499 + def get_tagged_response(tag, cmd, timeout = T.unsafe(nil)); end + + # source://net-imap//lib/net/imap.rb#2711 + def normalize_searching_criteria(keys); end + + # source://net-imap//lib/net/imap.rb#2618 + def put_string(str); end + + # source://net-imap//lib/net/imap.rb#2432 + def receive_responses; end + + # store name => [..., data] + # + # source://net-imap//lib/net/imap.rb#2551 + def record_untagged_response(resp); end + + # store code.name => [..., code.data] + # + # source://net-imap//lib/net/imap.rb#2557 + def record_untagged_response_code(resp); end + + # source://net-imap//lib/net/imap.rb#2751 + def sasl_adapter; end + + # source://net-imap//lib/net/imap.rb#2633 + def search_internal(cmd, keys, charset); end + + # source://net-imap//lib/net/imap.rb#2585 + 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#2576 + 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#2685 + def sort_internal(cmd, sort_keys, search_keys, charset); end + + # source://net-imap//lib/net/imap.rb#2397 + def start_imap_connection; end + + # source://net-imap//lib/net/imap.rb#2414 + def start_receiver_thread; end + + # source://net-imap//lib/net/imap.rb#2737 + def start_tls_session; end + + # source://net-imap//lib/net/imap.rb#2670 + def store_internal(cmd, set, attr, flags); end + + # source://net-imap//lib/net/imap.rb#2423 + def tcp_socket(host, port); end + + # source://net-imap//lib/net/imap.rb#2698 + 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#684 + def debug; end + + # Sets the debug mode. + # + # source://net-imap//lib/net/imap.rb#689 + 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#694 + def default_imap_port; end + + # The default port for IMAPS connections, port 993 + # + # source://net-imap//lib/net/imap.rb#699 + def default_imaps_port; end + + # The default port for IMAP connections, port 143 + # + # source://net-imap//lib/net/imap.rb#694 + def default_port; end + + # The default port for IMAPS connections, port 993 + # + # source://net-imap//lib/net/imap.rb#699 + def default_ssl_port; end + + # The default port for IMAPS connections, port 993 + # + # source://net-imap//lib/net/imap.rb#699 + 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 + + # -- + # 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#2761 + 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#934 +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#1199 +class Net::IMAP::BodyTypeAttachment < ::Struct + # *invalid for BodyTypeAttachment* + # + # source://net-imap//lib/net/imap/response_data.rb#1201 + def media_type; end + + # @return [Boolean] + # + # source://net-imap//lib/net/imap/response_data.rb#1229 + def multipart?; end + + # *invalid for BodyTypeAttachment* + # + # source://net-imap//lib/net/imap/response_data.rb#1209 + 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#951 +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#1062 + 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#1048 + 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#1323 +class Net::IMAP::BodyTypeExtension < ::Struct + # @return [Boolean] + # + # source://net-imap//lib/net/imap/response_data.rb#1324 + 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#1133 +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#1159 + 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#1152 + 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#1242 +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#1306 + 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#1298 + 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#1087 +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#1107 + 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#1100 + 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#668 +Net::IMAP::ENABLE_ALIASES = T.let(T.unsafe(nil), Hash) + +# 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#62 +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#427 +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#453 +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 + +# 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#103 + def CRLF!; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#95 + def CRLF?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#103 + def EOF!; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#95 + def EOF?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#103 + def NIL!; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#95 + def NIL?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#45 + def PLUS!; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#34 + def PLUS?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#45 + def SP!; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#34 + def SP?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#45 + def STAR!; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#34 + 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#103 + 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#103 + def body_fld_lines; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#103 + def body_fld_octets; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#103 + def case_insensitive__string; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#95 + 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#103 + def date_time; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#45 + def lbra; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#34 + def lbra?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#85 + def lookahead_CRLF!; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#85 + def lookahead_EOF!; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#85 + def lookahead_NIL!; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#24 + def lookahead_PLUS?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#24 + def lookahead_SP?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#24 + def lookahead_STAR?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#24 + def lookahead_body?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#85 + def lookahead_case_insensitive__string!; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#24 + def lookahead_lbra?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#24 + def lookahead_lpar?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#85 + def lookahead_number!; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#85 + def lookahead_quoted!; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#24 + def lookahead_rbra?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#24 + def lookahead_rpar?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#85 + def lookahead_string!; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#85 + def lookahead_tagged_ext_label!; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#45 + def lpar; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#34 + def lpar?; end + + # text/* + # + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#103 + 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#103 + def mod_sequence_value; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#103 + 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#103 + def number64; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#95 + def number64?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#95 + 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#103 + 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#103 + def nz_number64; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#95 + 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#29 + def peek_PLUS?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#29 + def peek_SP?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#29 + def peek_STAR?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#29 + def peek_lbra?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#29 + def peek_lpar?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#29 + def peek_rbra?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#29 + 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#103 + def permsg_modsequence; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#103 + def quoted; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#95 + def quoted?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#45 + def rbra; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#34 + def rbra?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#45 + def rpar; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#34 + def rpar?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#103 + def string; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#95 + def string?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#103 + def tagged_ext_label; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#95 + 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#103 + def uniqueid; 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#1793 + def accept_spaces; end + + # acl-data = "ACL" SP mailbox *(SP identifier SP rights) + # + # source://net-imap//lib/net/imap/response_parser.rb#1231 + def acl_data; end + + # source://net-imap//lib/net/imap/response_parser.rb#1686 + def address; end + + # source://net-imap//lib/net/imap/response_parser.rb#1656 + def address_list; end + + # astring = 1*ASTRING-CHAR / string + # + # source://net-imap//lib/net/imap/response_parser.rb#419 + def astring; end + + # @return [Boolean] + # + # source://net-imap//lib/net/imap/response_parser.rb#423 + def astring?; end + + # source://net-imap//lib/net/imap/response_parser.rb#404 + def astring_chars; end + + # TODO: handle atom, astring_chars, and tag entirely inside the lexer + # + # source://net-imap//lib/net/imap/response_parser.rb#403 + def atom; end + + # the #accept version of #atom + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/response_parser.rb#408 + def atom?; end + + # RFC-3501 & RFC-9051: + # body = "(" (body-type-1part / body-type-mpart) ")" + # + # source://net-imap//lib/net/imap/response_parser.rb#812 + 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#983 + 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#1002 + 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#1059 + def body_extension; end + + # body-extension *(SP body-extension) + # + # source://net-imap//lib/net/imap/response_parser.rb#1045 + 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#948 + def body_fields; end + + # nstring = string / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#459 + def body_fld_desc; end + + # body-fld-dsp = "(" string SP body-fld-param ")" / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#1024 + def body_fld_dsp; end + + # nstring = string / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#459 + def body_fld_id; end + + # body-fld-lang = nstring / "(" string *(SP string) ")" + # + # source://net-imap//lib/net/imap/response_parser.rb#1033 + def body_fld_lang; end + + # nstring = string / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#459 + def body_fld_loc; end + + # nstring = string / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#459 + 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#960 + 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#824 + 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#848 + def body_type_basic; end + + # This is a malformed body-type-mpart with no subparts. + # + # source://net-imap//lib/net/imap/response_parser.rb#897 + 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#907 + 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#869 + 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#858 + 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#411 + def capability; end + + # Returns atom?&.upcase + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/response_parser.rb#414 + 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#1413 + 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#1402 + def capability_data__untagged; end + + # Returns atom.upcase + # + # source://net-imap//lib/net/imap/response_parser.rb#411 + def case_insensitive__atom; end + + # Returns atom?&.upcase + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/response_parser.rb#414 + def case_insensitive__atom?; end + + # use where nstring represents "LABEL" values + # + # source://net-imap//lib/net/imap/response_parser.rb#468 + 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#1746 + def charset; end + + # "(" charset *(SP charset) ")" + # + # source://net-imap//lib/net/imap/response_parser.rb#1624 + def charset__list; end + + # source://net-imap//lib/net/imap/response_parser.rb#600 + 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#525 + def continue_req; end + + # enable-data = "ENABLED" *(SP capability) + # + # source://net-imap//lib/net/imap/response_parser.rb#1407 + def enable_data; end + + # source://net-imap//lib/net/imap/response_parser.rb#770 + def envelope; end + + # source://net-imap//lib/net/imap/response_parser.rb#600 + def esearch_response(klass = T.unsafe(nil)); end + + # source://net-imap//lib/net/imap/response_parser.rb#600 + def expunged_resp(klass = T.unsafe(nil)); end + + # flag-list = "(" [flag *(SP flag)] ")" + # + # source://net-imap//lib/net/imap/response_parser.rb#1712 + def flag_list; end + + # "(" [flag-perm *(SP flag-perm)] ")" + # + # source://net-imap//lib/net/imap/response_parser.rb#1719 + def flag_perm__list; end + + # source://net-imap//lib/net/imap/response_parser.rb#1180 + def getquota_response; end + + # source://net-imap//lib/net/imap/response_parser.rb#1213 + def getquotaroot_response; end + + # RFC3501 & RFC9051: + # header-fld-name = astring + # + # 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 syntax is 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 + # ; ":". + # + # Atom and quoted should be sufficient. + # + # TODO: Use original source string, rather than decode and re-encode. + # TODO: or at least, DRY up this code with the send_command formatting. + # + # source://net-imap//lib/net/imap/response_parser.rb#1122 + def header_fld_name; end + + # header-list = "(" header-fld-name *(SP header-fld-name) ")" + # + # source://net-imap//lib/net/imap/response_parser.rb#1096 + def header_list; end + + # source://net-imap//lib/net/imap/response_parser.rb#1426 + 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#429 + 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#436 + def label_in(*labels); end + + # source://net-imap//lib/net/imap/response_parser.rb#600 + def language_data(klass = T.unsafe(nil)); end + + # source://net-imap//lib/net/imap/response_parser.rb#600 + def listrights_data(klass = T.unsafe(nil)); end + + # source://net-imap//lib/net/imap/response_parser.rb#671 + 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#1152 + def mailbox_data__flags; end + + # source://net-imap//lib/net/imap/response_parser.rb#1158 + def mailbox_data__list; end + + # source://net-imap//lib/net/imap/response_parser.rb#1158 + def mailbox_data__lsub; end + + # source://net-imap//lib/net/imap/response_parser.rb#671 + 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#1271 + def mailbox_data__search; end + + # source://net-imap//lib/net/imap/response_parser.rb#1365 + def mailbox_data__status; end + + # source://net-imap//lib/net/imap/response_parser.rb#1158 + def mailbox_data__xlist; end + + # source://net-imap//lib/net/imap/response_parser.rb#1166 + def mailbox_list; 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#931 + 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#931 + 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#931 + 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#931 + def media_type; end + + # source://net-imap//lib/net/imap/response_parser.rb#600 + def message_data__converted(klass = T.unsafe(nil)); end + + # source://net-imap//lib/net/imap/response_parser.rb#671 + def message_data__expunge; end + + # message-data = nz-number SP ("EXPUNGE" / ("FETCH" SP msg-att)) + # + # source://net-imap//lib/net/imap/response_parser.rb#664 + def message_data__fetch; end + + # source://net-imap//lib/net/imap/response_parser.rb#600 + 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#728 + def msg_att(n); end + + # appends "[section]" and "" to the base label + # + # source://net-imap//lib/net/imap/response_parser.rb#758 + def msg_att__label; end + + # source://net-imap//lib/net/imap/response_parser.rb#600 + def myrights_data(klass = T.unsafe(nil)); end + + # namespace = nil / "(" 1*namespace-descr ")" + # + # source://net-imap//lib/net/imap/response_parser.rb#1473 + def namespace; end + + # namespace-descr = "(" string SP + # (DQUOTE QUOTED-CHAR DQUOTE / nil) + # [namespace-response-extensions] ")" + # + # source://net-imap//lib/net/imap/response_parser.rb#1484 + 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#1461 + 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#1496 + def namespace_response_extensions; end + + # source://net-imap//lib/net/imap/response_parser.rb#463 + def ndatetime; end + + # source://net-imap//lib/net/imap/response_parser.rb#1800 + def next_token; end + + # source://net-imap//lib/net/imap/response_parser.rb#1782 + def nil_atom; end + + # source://net-imap//lib/net/imap/response_parser.rb#463 + def nquoted; end + + # nstring = string / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#459 + def nstring; end + + # Not checking for max one mbx-list-sflag in the parser. + # >>> + # mbx-list-flags = *(mbx-list-oflag SP) mbx-list-sflag + # *(SP mbx-list-oflag) / + # mbx-list-oflag *(SP mbx-list-oflag) + # 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 + # + # source://net-imap//lib/net/imap/response_parser.rb#1738 + def parens__mbx_list_flags; end + + # source://net-imap//lib/net/imap/response_parser.rb#1760 + def parens__modseq; end + + # reads all the way up until CRLF + # + # source://net-imap//lib/net/imap/response_parser.rb#613 + 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#1413 + 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#1640 + 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#1649 + def resp_code_copy__data; end + + # resp-cond-auth = ("OK" / "PREAUTH") SP resp-text + # + # source://net-imap//lib/net/imap/response_parser.rb#652 + 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#443 + def resp_cond_auth__name; end + + # resp-cond-bye = "BYE" SP resp-text + # + # source://net-imap//lib/net/imap/response_parser.rb#658 + def resp_cond_bye; end + + # expects "OK" or "NO" or "BAD" and raises InvalidResponseError on failure + # + # @raise [InvalidResponseError] + # + # source://net-imap//lib/net/imap/response_parser.rb#451 + def resp_cond_state__name; end + + # RFC3501 & RFC9051: + # resp-cond-state = ("OK" / "NO" / "BAD") SP resp-text + # + # source://net-imap//lib/net/imap/response_parser.rb#646 + 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#1532 + 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 + # + # source://net-imap//lib/net/imap/response_parser.rb#1591 + def resp_text_code; end + + # Returns atom.upcase + # + # source://net-imap//lib/net/imap/response_parser.rb#411 + 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#506 + 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#558 + def response_data; end + + # source://net-imap//lib/net/imap/response_parser.rb#618 + def response_data__ignored; end + + # source://net-imap//lib/net/imap/response_parser.rb#618 + def response_data__noop; end + + # source://net-imap//lib/net/imap/response_parser.rb#671 + def response_data__simple_numeric; end + + # source://net-imap//lib/net/imap/response_parser.rb#600 + def response_data__unhandled(klass = T.unsafe(nil)); end + + # RFC3501 & RFC9051: + # response-tagged = tag SP resp-cond-state CRLF + # + # resp-cond-state = ("OK" / "NO" / "BAD") SP resp-text + # ; Status condition + # + # tag = 1* + # + # source://net-imap//lib/net/imap/response_parser.rb#638 + def response_tagged; end + + # section = "[" [section-spec] "]" + # + # source://net-imap//lib/net/imap/response_parser.rb#1067 + def section; 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#1088 + def section_spec; 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#1271 + def sort_data; end + + # source://net-imap//lib/net/imap/response_parser.rb#405 + def tag; 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#1516 + def text; end + + # an "accept" versiun of #text + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/response_parser.rb#1521 + def text?; end + + # 1* + # + # source://net-imap//lib/net/imap/response_parser.rb#1619 + def text_chars_except_rbra; end + + # source://net-imap//lib/net/imap/response_parser.rb#1330 + def thread_branch(token); end + + # source://net-imap//lib/net/imap/response_parser.rb#1303 + def thread_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#1770 + def uid_set; end + + # source://net-imap//lib/net/imap/response_parser.rb#600 + def uidfetch_resp(klass = T.unsafe(nil)); end +end + +# ASTRING-CHAR = ATOM-CHAR / resp-specials +# resp-specials = "]" +# +# source://net-imap//lib/net/imap/response_parser.rb#395 +Net::IMAP::ResponseParser::ASTRING_CHARS_TOKENS = T.let(T.unsafe(nil), Array) + +# source://net-imap//lib/net/imap/response_parser.rb#397 +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#61 + 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#76 +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#290 + def unescape_quoted(quoted); end + + # source://net-imap//lib/net/imap/response_parser.rb#284 + def unescape_quoted!(quoted); end + + class << self + # source://net-imap//lib/net/imap/response_parser.rb#290 + def unescape_quoted(quoted); end + + # source://net-imap//lib/net/imap/response_parser.rb#284 + def unescape_quoted!(quoted); end + end +end + +# source://net-imap//lib/net/imap/response_parser.rb#173 +Net::IMAP::ResponseParser::Patterns::ASTRING_CHAR = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#177 +Net::IMAP::ResponseParser::Patterns::ASTRING_CHARS = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#171 +Net::IMAP::ResponseParser::Patterns::ASTRING_SPECIALS = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#176 +Net::IMAP::ResponseParser::Patterns::ATOM = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#178 +Net::IMAP::ResponseParser::Patterns::ATOMISH = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#174 +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#170 +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#150 +Net::IMAP::ResponseParser::Patterns::CHAR8 = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#186 +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#185 +Net::IMAP::ResponseParser::Patterns::CODE_TEXT_CHAR = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#78 +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#215 +Net::IMAP::ResponseParser::Patterns::FLAG = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#216 +Net::IMAP::ResponseParser::Patterns::FLAG_EXTENSION = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#217 +Net::IMAP::ResponseParser::Patterns::FLAG_KEYWORD = T.let(T.unsafe(nil), Regexp) + +# flag-list = "(" [flag *(SP flag)] ")" +# +# part of resp-text-code: +# >>> +# "PERMANENTFLAGS" SP "(" [flag-perm *(SP flag-perm)] ")" +# +# parens from mailbox-list are included in the regexp: +# >>> +# mbx-list-flags = *(mbx-list-oflag SP) mbx-list-sflag +# *(SP mbx-list-oflag) / +# mbx-list-oflag *(SP mbx-list-oflag) +# +# source://net-imap//lib/net/imap/response_parser.rb#232 +Net::IMAP::ResponseParser::Patterns::FLAG_LIST = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#218 +Net::IMAP::ResponseParser::Patterns::FLAG_PERM = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#233 +Net::IMAP::ResponseParser::Patterns::FLAG_PERM_LIST = T.let(T.unsafe(nil), Regexp) + +# list-wildcards = "%" / "*" +# +# source://net-imap//lib/net/imap/response_parser.rb#153 +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#280 +Net::IMAP::ResponseParser::Patterns::LITERAL = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#219 +Net::IMAP::ResponseParser::Patterns::MBX_FLAG = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#234 +Net::IMAP::ResponseParser::Patterns::MBX_LIST_FLAGS = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#245 +Net::IMAP::ResponseParser::Patterns::QUOTED_CHAR_esc = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#246 +Net::IMAP::ResponseParser::Patterns::QUOTED_CHAR_rev1 = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#247 +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#244 +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#155 +Net::IMAP::ResponseParser::Patterns::QUOTED_SPECIALS = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#249 +Net::IMAP::ResponseParser::Patterns::QUOTED_rev1 = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#250 +Net::IMAP::ResponseParser::Patterns::QUOTED_rev2 = T.let(T.unsafe(nil), Regexp) + +# resp-specials = "]" +# +# source://net-imap//lib/net/imap/response_parser.rb#157 +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#130 +module Net::IMAP::ResponseParser::Patterns::RFC3629; end + +# aka ASCII 7bit +# +# source://net-imap//lib/net/imap/response_parser.rb#131 +Net::IMAP::ResponseParser::Patterns::RFC3629::UTF8_1 = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#133 +Net::IMAP::ResponseParser::Patterns::RFC3629::UTF8_2 = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#134 +Net::IMAP::ResponseParser::Patterns::RFC3629::UTF8_3 = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#138 +Net::IMAP::ResponseParser::Patterns::RFC3629::UTF8_4 = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#141 +Net::IMAP::ResponseParser::Patterns::RFC3629::UTF8_CHAR = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#142 +Net::IMAP::ResponseParser::Patterns::RFC3629::UTF8_OCTETS = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#132 +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#100 +module Net::IMAP::ResponseParser::Patterns::RFC5234; end + +# source://net-imap//lib/net/imap/response_parser.rb#101 +Net::IMAP::ResponseParser::Patterns::RFC5234::ALPHA = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#102 +Net::IMAP::ResponseParser::Patterns::RFC5234::CHAR = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#103 +Net::IMAP::ResponseParser::Patterns::RFC5234::CRLF = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#104 +Net::IMAP::ResponseParser::Patterns::RFC5234::CTL = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#105 +Net::IMAP::ResponseParser::Patterns::RFC5234::DIGIT = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#106 +Net::IMAP::ResponseParser::Patterns::RFC5234::DQUOTE = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#107 +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#108 +Net::IMAP::ResponseParser::Patterns::RFC5234::OCTET = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#109 +Net::IMAP::ResponseParser::Patterns::RFC5234::SP = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#179 +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#267 +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#264 +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#262 +Net::IMAP::ResponseParser::Patterns::TAGGED_LABEL_FCHAR = T.let(T.unsafe(nil), Regexp) + +# TEXT-CHAR = +# +# source://net-imap//lib/net/imap/response_parser.rb#182 +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#258 +Net::IMAP::ResponseParser::Patterns::TEXT_rev1 = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#259 +Net::IMAP::ResponseParser::Patterns::TEXT_rev2 = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#530 +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#61 +module Net::IMAP::ResponseParser::ResponseConditions; end + +# source://net-imap//lib/net/imap/response_parser.rb#70 +Net::IMAP::ResponseParser::ResponseConditions::AUTH_CONDS = T.let(T.unsafe(nil), Array) + +# source://net-imap//lib/net/imap/response_parser.rb#64 +Net::IMAP::ResponseParser::ResponseConditions::BAD = T.let(T.unsafe(nil), String) + +# source://net-imap//lib/net/imap/response_parser.rb#65 +Net::IMAP::ResponseParser::ResponseConditions::BYE = T.let(T.unsafe(nil), String) + +# source://net-imap//lib/net/imap/response_parser.rb#71 +Net::IMAP::ResponseParser::ResponseConditions::GREETING_CONDS = T.let(T.unsafe(nil), Array) + +# source://net-imap//lib/net/imap/response_parser.rb#63 +Net::IMAP::ResponseParser::ResponseConditions::NO = T.let(T.unsafe(nil), String) + +# source://net-imap//lib/net/imap/response_parser.rb#62 +Net::IMAP::ResponseParser::ResponseConditions::OK = T.let(T.unsafe(nil), String) + +# source://net-imap//lib/net/imap/response_parser.rb#66 +Net::IMAP::ResponseParser::ResponseConditions::PREAUTH = T.let(T.unsafe(nil), String) + +# source://net-imap//lib/net/imap/response_parser.rb#72 +Net::IMAP::ResponseParser::ResponseConditions::RESP_CONDS = T.let(T.unsafe(nil), Array) + +# source://net-imap//lib/net/imap/response_parser.rb#68 +Net::IMAP::ResponseParser::ResponseConditions::RESP_COND_STATES = T.let(T.unsafe(nil), Array) + +# source://net-imap//lib/net/imap/response_parser.rb#69 +Net::IMAP::ResponseParser::ResponseConditions::RESP_DATA_CONDS = T.let(T.unsafe(nil), Array) + +# source://net-imap//lib/net/imap/response_parser.rb#1787 +Net::IMAP::ResponseParser::SPACES_REGEXP = T.let(T.unsafe(nil), Regexp) + +# tag = 1* +# +# source://net-imap//lib/net/imap/response_parser.rb#400 +Net::IMAP::ResponseParser::TAG_TOKENS = T.let(T.unsafe(nil), Array) + +# Used to avoid an allocation when ResponseText is empty +# +# source://net-imap//lib/net/imap/response_data.rb#149 +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#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#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::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#277 +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#307 + 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 +# +# source://net-imap//lib/net/imap/response_data.rb#74 +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 +# +# source://net-imap//lib/net/imap/response_data.rb#90 +class Net::IMAP::UnparsedNumericResponseData < ::Struct; end + +# source://net-imap//lib/net/imap.rb#665 +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-smtp@0.3.3.rbi b/sorbet/rbi/gems/net-smtp@0.4.0.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.rbi index 54df6e622..87c5f2e1e 100644 --- a/sorbet/rbi/gems/net-smtp@0.3.3.rbi +++ b/sorbet/rbi/gems/net-smtp@0.4.0.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/nokogiri@1.15.2.rbi b/sorbet/rbi/gems/nokogiri@1.15.4.rbi similarity index 100% rename from sorbet/rbi/gems/nokogiri@1.15.2.rbi rename to sorbet/rbi/gems/nokogiri@1.15.4.rbi diff --git a/sorbet/rbi/gems/optimist@3.0.1.rbi b/sorbet/rbi/gems/optimist@3.1.0.rbi similarity index 100% rename from sorbet/rbi/gems/optimist@3.0.1.rbi rename to sorbet/rbi/gems/optimist@3.1.0.rbi diff --git a/sorbet/rbi/gems/parser@3.2.2.3.rbi b/sorbet/rbi/gems/parser@3.2.2.4.rbi similarity index 98% rename from sorbet/rbi/gems/parser@3.2.2.3.rbi rename to sorbet/rbi/gems/parser@3.2.2.4.rbi index 680c9da48..70c907823 100644 --- a/sorbet/rbi/gems/parser@3.2.2.3.rbi +++ b/sorbet/rbi/gems/parser@3.2.2.4.rbi @@ -6,7 +6,7 @@ # @api public # -# source://parser//lib/parser.rb#19 +# source://parser//lib/parser/current.rb#3 module Parser class << self private @@ -1298,184 +1298,184 @@ class Parser::Builders::Default private - # source://parser//lib/parser/builders/default.rb#1798 + # source://parser//lib/parser/builders/default.rb#1808 def arg_name_collides?(this_name, that_name); end - # source://parser//lib/parser/builders/default.rb#1994 + # source://parser//lib/parser/builders/default.rb#2004 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#1978 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#2106 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#1783 def check_assignment_to_numparam(name, loc); end # source://parser//lib/parser/builders/default.rb#1675 def check_condition(cond); end - # source://parser//lib/parser/builders/default.rb#1744 + # source://parser//lib/parser/builders/default.rb#1754 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#1729 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#1841 def check_duplicate_pattern_key(name, loc); end - # source://parser//lib/parser/builders/default.rb#1821 + # source://parser//lib/parser/builders/default.rb#1831 def check_duplicate_pattern_variable(name, loc); end - # source://parser//lib/parser/builders/default.rb#1813 + # source://parser//lib/parser/builders/default.rb#1823 def check_lvar_name(name, loc); end - # source://parser//lib/parser/builders/default.rb#1788 + # source://parser//lib/parser/builders/default.rb#1798 def check_reserved_for_numparam(name, loc); end - # source://parser//lib/parser/builders/default.rb#2253 + # source://parser//lib/parser/builders/default.rb#2263 def collapse_string_parts?(parts); end - # source://parser//lib/parser/builders/default.rb#1919 + # source://parser//lib/parser/builders/default.rb#1929 def collection_map(begin_t, parts, end_t); end - # source://parser//lib/parser/builders/default.rb#2123 + # source://parser//lib/parser/builders/default.rb#2133 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#1964 def constant_map(scope, colon2_t, name_t); end - # source://parser//lib/parser/builders/default.rb#2027 + # source://parser//lib/parser/builders/default.rb#2037 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#1870 def delimited_string_map(string_t); end - # source://parser//lib/parser/builders/default.rb#2275 + # source://parser//lib/parser/builders/default.rb#2285 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#2177 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#2043 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#1925 def expr_map(loc); end - # source://parser//lib/parser/builders/default.rb#2148 + # source://parser//lib/parser/builders/default.rb#2158 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#2205 def guard_map(keyword_t, guard_body_e); end - # source://parser//lib/parser/builders/default.rb#2085 + # source://parser//lib/parser/builders/default.rb#2095 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#1861 def join_exprs(left_expr, right_expr); end - # source://parser//lib/parser/builders/default.rb#2101 + # source://parser//lib/parser/builders/default.rb#2111 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#2128 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#2014 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#2316 def kwargs?(node); end - # source://parser//lib/parser/builders/default.rb#2270 + # source://parser//lib/parser/builders/default.rb#2280 def loc(token); end - # source://parser//lib/parser/builders/default.rb#2017 + # source://parser//lib/parser/builders/default.rb#2027 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#1853 def n(type, children, source_map); end - # source://parser//lib/parser/builders/default.rb#1847 + # source://parser//lib/parser/builders/default.rb#1857 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#1895 def pair_keyword_map(key_t, value_e); end - # source://parser//lib/parser/builders/default.rb#1900 + # source://parser//lib/parser/builders/default.rb#1910 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#1881 def prefix_string_map(symbol); end - # source://parser//lib/parser/builders/default.rb#1982 + # source://parser//lib/parser/builders/default.rb#1992 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#1959 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#2164 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#2306 def rewrite_hash_args_to_kwargs(args); end - # source://parser//lib/parser/builders/default.rb#2067 + # source://parser//lib/parser/builders/default.rb#2077 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#2100 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#2051 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#2083 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#2236 def static_regexp(parts, options); end - # source://parser//lib/parser/builders/default.rb#2246 + # source://parser//lib/parser/builders/default.rb#2256 def static_regexp_node(node); end - # source://parser//lib/parser/builders/default.rb#2209 + # source://parser//lib/parser/builders/default.rb#2219 def static_string(nodes); end - # source://parser//lib/parser/builders/default.rb#1935 + # source://parser//lib/parser/builders/default.rb#1945 def string_map(begin_t, parts, end_t); end - # source://parser//lib/parser/builders/default.rb#2262 + # source://parser//lib/parser/builders/default.rb#2272 def string_value(token); end - # source://parser//lib/parser/builders/default.rb#2143 + # source://parser//lib/parser/builders/default.rb#2153 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#1866 def token_map(token); end - # source://parser//lib/parser/builders/default.rb#1972 + # source://parser//lib/parser/builders/default.rb#1982 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#1890 def unquoted_map(token); end - # source://parser//lib/parser/builders/default.rb#2284 + # source://parser//lib/parser/builders/default.rb#2294 def validate_definee(definee); end - # source://parser//lib/parser/builders/default.rb#1758 + # source://parser//lib/parser/builders/default.rb#1768 def validate_no_forward_arg_after_restarg(args); end - # source://parser//lib/parser/builders/default.rb#2258 + # source://parser//lib/parser/builders/default.rb#2268 def value(token); end - # source://parser//lib/parser/builders/default.rb#2061 + # source://parser//lib/parser/builders/default.rb#2071 def var_send_map(variable_e); end - # source://parser//lib/parser/builders/default.rb#1964 + # source://parser//lib/parser/builders/default.rb#1974 def variable_map(name_t); end class << self @@ -5452,7 +5452,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 diff --git a/sorbet/rbi/gems/pg@1.5.3.rbi b/sorbet/rbi/gems/pg@1.5.4.rbi similarity index 99% rename from sorbet/rbi/gems/pg@1.5.3.rbi rename to sorbet/rbi/gems/pg@1.5.4.rbi index 7e1c13ff7..1b0e4f9db 100644 --- a/sorbet/rbi/gems/pg@1.5.3.rbi +++ b/sorbet/rbi/gems/pg@1.5.4.rbi @@ -853,7 +853,7 @@ class PG::Connection # source://pg//lib/pg/connection.rb#555 def async_encrypt_password(password, username, algorithm = T.unsafe(nil)); end - # source://rack-mini-profiler/3.1.0/lib/patches/db/pg.rb#109 + # source://rack-mini-profiler/3.1.1/lib/patches/db/pg.rb#109 def async_exec(*args, &blk); end def async_exec_params(*_arg0); end @@ -1175,15 +1175,15 @@ class PG::Connection def escape_literal(_arg0); end def escape_string(_arg0); end - # source://rack-mini-profiler/3.1.0/lib/patches/db/pg.rb#55 + # source://rack-mini-profiler/3.1.1/lib/patches/db/pg.rb#55 def exec(*args, &blk); end - # source://rack-mini-profiler/3.1.0/lib/patches/db/pg.rb#68 + # source://rack-mini-profiler/3.1.1/lib/patches/db/pg.rb#68 def exec_params(*args, &blk); end def exec_params_without_profiling(*_arg0); end - # source://rack-mini-profiler/3.1.0/lib/patches/db/pg.rb#81 + # source://rack-mini-profiler/3.1.1/lib/patches/db/pg.rb#81 def exec_prepared(*args, &blk); end def exec_prepared_without_profiling(*_arg0); end @@ -1304,7 +1304,7 @@ class PG::Connection def pipeline_sync; end def port; end - # source://rack-mini-profiler/3.1.0/lib/patches/db/pg.rb#42 + # source://rack-mini-profiler/3.1.1/lib/patches/db/pg.rb#42 def prepare(*args, &blk); end def prepare_without_profiling(*_arg0); end @@ -1347,7 +1347,7 @@ class PG::Connection # source://pg//lib/pg/connection.rb#525 def put_copy_end(*args); end - # source://rack-mini-profiler/3.1.0/lib/patches/db/pg.rb#55 + # source://rack-mini-profiler/3.1.1/lib/patches/db/pg.rb#55 def query(*args, &blk); end def quote_ident(_arg0); end @@ -1370,7 +1370,7 @@ class PG::Connection def send_query(*_arg0); end def send_query_params(*_arg0); end - # source://rack-mini-profiler/3.1.0/lib/patches/db/pg.rb#95 + # source://rack-mini-profiler/3.1.1/lib/patches/db/pg.rb#95 def send_query_prepared(*args, &blk); end def send_query_prepared_without_profiling(*_arg0); end @@ -2281,7 +2281,7 @@ class PG::Result def cmdtuples; end def column_values(_arg0); end - # source://rack-mini-profiler/3.1.0/lib/patches/db/pg.rb#15 + # source://rack-mini-profiler/3.1.1/lib/patches/db/pg.rb#15 def each(*args, &blk); end def each_row; end @@ -2331,7 +2331,7 @@ class PG::Result # source://pg//lib/pg/result.rb#16 def map_types!(type_map); end - # source://rack-mini-profiler/3.1.0/lib/patches/db/pg.rb#22 + # source://rack-mini-profiler/3.1.1/lib/patches/db/pg.rb#22 def mp_report_sql(&block); end def nfields; end @@ -2354,7 +2354,7 @@ class PG::Result def type_map; end def type_map=(_arg0); end - # source://rack-mini-profiler/3.1.0/lib/patches/db/pg.rb#8 + # source://rack-mini-profiler/3.1.1/lib/patches/db/pg.rb#8 def values(*args, &blk); end def values_without_profiling; end diff --git a/sorbet/rbi/gems/prism@0.16.0.rbi b/sorbet/rbi/gems/prism@0.16.0.rbi new file mode 100644 index 000000000..c1dc23d01 --- /dev/null +++ b/sorbet/rbi/gems/prism@0.16.0.rbi @@ -0,0 +1,26307 @@ +# 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`. + +# typed: true + +# =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 + +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/lib/prism/visitor.rb.erb +# if you are looking to modify the template +# +# source://prism//lib/prism.rb#3 +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 + + # Returns an array of tokens that closely resembles that of the Ripper lexer. + # The only difference is that since we don't keep track of lexer state in the + # same way, it's going to always return the NONE state. + # + # source://prism//lib/prism.rb#33 + def lex_compat(source, filepath = T.unsafe(nil)); end + + # Mirror the Prism.lex_file API by using the serialization API. + def lex_file(_arg0); end + + # 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#40 + def lex_ripper(source); end + + # Load the serialized AST using the source as a reference into a tree. + # + # source://prism//lib/prism.rb#45 + 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 + + # 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 + + # 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 + end +end + +# Represents the use of the `alias` keyword to alias a global variable. +# +# alias $foo $bar +# ^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#45 +class Prism::AliasGlobalVariableNode < ::Prism::Node + # def initialize: (new_name: Node, old_name: Node, keyword_loc: Location, location: Location) -> void + # + # @return [AliasGlobalVariableNode] a new instance of AliasGlobalVariableNode + # + # source://prism//lib/prism/node.rb#56 + sig { params(new_name: Node, old_name: Node, keyword_loc: Location, location: Location).void } + def initialize(new_name, old_name, keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#64 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#69 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#79 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#74 + def compact_child_nodes; end + + # def copy: (**params) -> AliasGlobalVariableNode + # + # source://prism//lib/prism/node.rb#84 + sig { params(params: T.untyped).returns(AliasGlobalVariableNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#69 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#97 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#106 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#102 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#53 + def keyword_loc; end + + # attr_reader new_name: Node + # + # source://prism//lib/prism/node.rb#47 + def new_name; end + + # attr_reader old_name: Node + # + # source://prism//lib/prism/node.rb#50 + 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#130 + 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#140 + 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#149 +class Prism::AliasMethodNode < ::Prism::Node + # def initialize: (new_name: Node, old_name: Node, keyword_loc: Location, location: Location) -> void + # + # @return [AliasMethodNode] a new instance of AliasMethodNode + # + # source://prism//lib/prism/node.rb#160 + sig { params(new_name: Node, old_name: Node, keyword_loc: Location, location: Location).void } + def initialize(new_name, old_name, keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#168 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#173 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#183 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#178 + def compact_child_nodes; end + + # def copy: (**params) -> AliasMethodNode + # + # source://prism//lib/prism/node.rb#188 + sig { params(params: T.untyped).returns(AliasMethodNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#173 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#201 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#210 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#206 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#157 + def keyword_loc; end + + # attr_reader new_name: Node + # + # source://prism//lib/prism/node.rb#151 + def new_name; end + + # attr_reader old_name: Node + # + # source://prism//lib/prism/node.rb#154 + 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#234 + 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#244 + def type; end + end +end + +# Represents an alternation pattern in pattern matching. +# +# foo => bar | baz +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#253 +class Prism::AlternationPatternNode < ::Prism::Node + # def initialize: (left: Node, right: Node, operator_loc: Location, location: Location) -> void + # + # @return [AlternationPatternNode] a new instance of AlternationPatternNode + # + # source://prism//lib/prism/node.rb#264 + sig { params(left: Node, right: Node, operator_loc: Location, location: Location).void } + def initialize(left, right, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#272 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#277 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#287 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#282 + def compact_child_nodes; end + + # def copy: (**params) -> AlternationPatternNode + # + # source://prism//lib/prism/node.rb#292 + sig { params(params: T.untyped).returns(AlternationPatternNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#277 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#305 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#314 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader left: Node + # + # source://prism//lib/prism/node.rb#255 + def left; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#310 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#261 + def operator_loc; end + + # attr_reader right: Node + # + # source://prism//lib/prism/node.rb#258 + 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#338 + 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#348 + def type; end + end +end + +# Represents the use of the `&&` operator or the `and` keyword. +# +# left and right +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#357 +class Prism::AndNode < ::Prism::Node + # def initialize: (left: Node, right: Node, operator_loc: Location, location: Location) -> void + # + # @return [AndNode] a new instance of AndNode + # + # source://prism//lib/prism/node.rb#368 + sig { params(left: Node, right: Node, operator_loc: Location, location: Location).void } + def initialize(left, right, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#376 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#381 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#391 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#386 + def compact_child_nodes; end + + # def copy: (**params) -> AndNode + # + # source://prism//lib/prism/node.rb#396 + sig { params(params: T.untyped).returns(AndNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#381 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#409 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#418 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader left: Node + # + # source://prism//lib/prism/node.rb#359 + def left; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#414 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#365 + def operator_loc; end + + # attr_reader right: Node + # + # source://prism//lib/prism/node.rb#362 + 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#442 + 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#452 + 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#461 +class Prism::ArgumentsNode < ::Prism::Node + # def initialize: (arguments: Array[Node], flags: Integer, location: Location) -> void + # + # @return [ArgumentsNode] a new instance of ArgumentsNode + # + # source://prism//lib/prism/node.rb#469 + sig { params(arguments: T::Array[Node], flags: Integer, location: Location).void } + def initialize(arguments, flags, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#476 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # attr_reader arguments: Array[Node] + # + # source://prism//lib/prism/node.rb#463 + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#481 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#491 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#486 + def compact_child_nodes; end + + # def copy: (**params) -> ArgumentsNode + # + # source://prism//lib/prism/node.rb#496 + sig { params(params: T.untyped).returns(ArgumentsNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#481 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#508 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#517 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword_splat?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#513 + sig { returns(T::Boolean) } + def keyword_splat?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case 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#539 + def type; end + + private + + # Returns the value of attribute flags. + # + # source://prism//lib/prism/node.rb#466 + 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#549 + def type; end + end +end + +# source://prism//lib/prism/node.rb#16307 +module Prism::ArgumentsNodeFlags; end + +# if arguments contain keyword splat +# +# source://prism//lib/prism/node.rb#16309 +Prism::ArgumentsNodeFlags::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#559 +class Prism::ArrayNode < ::Prism::Node + # def initialize: (elements: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> void + # + # @return [ArrayNode] a new instance of ArrayNode + # + # source://prism//lib/prism/node.rb#570 + sig do + params( + elements: T::Array[Node], + opening_loc: T.nilable(Location), + closing_loc: T.nilable(Location), + location: Location + ).void + end + def initialize(elements, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#578 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#583 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#621 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#567 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#593 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#588 + def compact_child_nodes; end + + # def copy: (**params) -> ArrayNode + # + # source://prism//lib/prism/node.rb#598 + sig { params(params: T.untyped).returns(ArrayNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#583 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#611 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader elements: Array[Node] + # + # source://prism//lib/prism/node.rb#561 + def elements; end + + # source://prism//lib/prism/node.rb#625 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#616 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#564 + 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#647 + 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#657 + def type; end + end +end + +# 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#678 +class Prism::ArrayPatternNode < ::Prism::Node + # def initialize: (constant: Node?, requireds: Array[Node], rest: Node?, posts: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> void + # + # @return [ArrayPatternNode] a new instance of ArrayPatternNode + # + # source://prism//lib/prism/node.rb#698 + sig do + params( + constant: T.nilable(Node), + requireds: T::Array[Node], + rest: T.nilable(Node), + posts: T::Array[Node], + opening_loc: T.nilable(Location), + closing_loc: T.nilable(Location), + location: Location + ).void + end + def initialize(constant, requireds, rest, posts, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#709 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#714 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#760 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#695 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#729 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#719 + def compact_child_nodes; end + + # attr_reader constant: Node? + # + # source://prism//lib/prism/node.rb#680 + def constant; end + + # def copy: (**params) -> ArrayPatternNode + # + # source://prism//lib/prism/node.rb#734 + sig { params(params: T.untyped).returns(ArrayPatternNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#714 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#750 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#764 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#755 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#692 + def opening_loc; end + + # attr_reader posts: Array[Node] + # + # source://prism//lib/prism/node.rb#689 + def posts; end + + # attr_reader requireds: Array[Node] + # + # source://prism//lib/prism/node.rb#683 + def requireds; end + + # attr_reader rest: Node? + # + # source://prism//lib/prism/node.rb#686 + 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#799 + 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#809 + def type; end + end +end + +# Represents a hash key/value pair. +# +# { a => b } +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#818 +class Prism::AssocNode < ::Prism::Node + # def initialize: (key: Node, value: Node?, operator_loc: Location?, location: Location) -> void + # + # @return [AssocNode] a new instance of AssocNode + # + # source://prism//lib/prism/node.rb#829 + sig { params(key: Node, value: T.nilable(Node), operator_loc: T.nilable(Location), location: Location).void } + def initialize(key, value, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#837 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#842 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#855 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#847 + def compact_child_nodes; end + + # def copy: (**params) -> AssocNode + # + # source://prism//lib/prism/node.rb#860 + sig { params(params: T.untyped).returns(AssocNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#842 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#873 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#882 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader key: Node + # + # source://prism//lib/prism/node.rb#820 + def key; end + + # def operator: () -> String? + # + # source://prism//lib/prism/node.rb#878 + sig { returns(T.nilable(String)) } + def operator; end + + # attr_reader operator_loc: Location? + # + # source://prism//lib/prism/node.rb#826 + 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#910 + def type; end + + # attr_reader value: Node? + # + # source://prism//lib/prism/node.rb#823 + 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#920 + def type; end + end +end + +# Represents a splat in a hash literal. +# +# { **foo } +# ^^^^^ +# +# source://prism//lib/prism/node.rb#929 +class Prism::AssocSplatNode < ::Prism::Node + # def initialize: (value: Node?, operator_loc: Location, location: Location) -> void + # + # @return [AssocSplatNode] a new instance of AssocSplatNode + # + # source://prism//lib/prism/node.rb#937 + sig { params(value: T.nilable(Node), operator_loc: Location, location: Location).void } + def initialize(value, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#944 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#949 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#961 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#954 + def compact_child_nodes; end + + # def copy: (**params) -> AssocSplatNode + # + # source://prism//lib/prism/node.rb#966 + sig { params(params: T.untyped).returns(AssocSplatNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#949 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#978 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#987 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#983 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#934 + 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#1013 + def type; end + + # attr_reader value: Node? + # + # source://prism//lib/prism/node.rb#931 + 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#1023 + 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#1032 +class Prism::BackReferenceReadNode < ::Prism::Node + # def initialize: (name: Symbol, location: Location) -> void + # + # @return [BackReferenceReadNode] a new instance of BackReferenceReadNode + # + # source://prism//lib/prism/node.rb#1037 + sig { params(name: Symbol, location: Location).void } + def initialize(name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#1043 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1048 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1058 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1053 + def compact_child_nodes; end + + # def copy: (**params) -> BackReferenceReadNode + # + # source://prism//lib/prism/node.rb#1063 + sig { params(params: T.untyped).returns(BackReferenceReadNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1048 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#1074 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#1078 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#1034 + 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#1098 + 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#1108 + 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 + # source://prism//lib/prism/visitor.rb#14 + sig { params(node: T.nilable(Node)).void } + def visit(node); end + + # source://prism//lib/prism/visitor.rb#18 + sig { params(nodes: T::Array[T.nilable(Node)]).void } + def visit_all(nodes); end + + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: Node).void } + def visit_child_nodes(node); end +end + +# Represents a begin statement. +# +# begin +# foo +# end +# ^^^^^ +# +# source://prism//lib/prism/node.rb#1119 +class Prism::BeginNode < ::Prism::Node + # def initialize: (begin_keyword_loc: Location?, statements: StatementsNode?, rescue_clause: RescueNode?, else_clause: ElseNode?, ensure_clause: EnsureNode?, end_keyword_loc: Location?, location: Location) -> void + # + # @return [BeginNode] a new instance of BeginNode + # + # source://prism//lib/prism/node.rb#1139 + sig do + params( + begin_keyword_loc: T.nilable(Location), + statements: T.nilable(StatementsNode), + rescue_clause: T.nilable(RescueNode), + else_clause: T.nilable(ElseNode), + ensure_clause: T.nilable(EnsureNode), + end_keyword_loc: T.nilable(Location), + location: Location + ).void + end + def initialize(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#1150 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def begin_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#1200 + sig { returns(T.nilable(String)) } + def begin_keyword; end + + # attr_reader begin_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#1121 + def begin_keyword_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1159 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1174 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1164 + def compact_child_nodes; end + + # def copy: (**params) -> BeginNode + # + # source://prism//lib/prism/node.rb#1179 + sig { params(params: T.untyped).returns(BeginNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1159 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#1195 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader else_clause: ElseNode? + # + # source://prism//lib/prism/node.rb#1130 + def else_clause; end + + # def end_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#1205 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#1136 + def end_keyword_loc; end + + # attr_reader ensure_clause: EnsureNode? + # + # source://prism//lib/prism/node.rb#1133 + def ensure_clause; end + + # source://prism//lib/prism/node.rb#1209 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader rescue_clause: RescueNode? + # + # source://prism//lib/prism/node.rb#1127 + def rescue_clause; end + + # source://prism//lib/prism/node.rb#1154 + def set_newline_flag(newline_marked); end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#1124 + 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#1254 + 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#1264 + def type; end + end +end + +# Represents block method arguments. +# +# bar(&args) +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#1273 +class Prism::BlockArgumentNode < ::Prism::Node + # def initialize: (expression: Node?, operator_loc: Location, location: Location) -> void + # + # @return [BlockArgumentNode] a new instance of BlockArgumentNode + # + # source://prism//lib/prism/node.rb#1281 + sig { params(expression: T.nilable(Node), operator_loc: Location, location: Location).void } + def initialize(expression, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#1288 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1293 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1305 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1298 + def compact_child_nodes; end + + # def copy: (**params) -> BlockArgumentNode + # + # source://prism//lib/prism/node.rb#1310 + sig { params(params: T.untyped).returns(BlockArgumentNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1293 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#1322 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader expression: Node? + # + # source://prism//lib/prism/node.rb#1275 + def expression; end + + # source://prism//lib/prism/node.rb#1331 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#1327 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#1278 + 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#1357 + 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#1367 + def type; end + end +end + +# Represents a block local variable. +# +# a { |; b| } +# ^ +# +# source://prism//lib/prism/node.rb#1376 +class Prism::BlockLocalVariableNode < ::Prism::Node + # def initialize: (name: Symbol, location: Location) -> void + # + # @return [BlockLocalVariableNode] a new instance of BlockLocalVariableNode + # + # source://prism//lib/prism/node.rb#1381 + sig { params(name: Symbol, location: Location).void } + def initialize(name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#1387 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1392 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1402 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1397 + def compact_child_nodes; end + + # def copy: (**params) -> BlockLocalVariableNode + # + # source://prism//lib/prism/node.rb#1407 + sig { params(params: T.untyped).returns(BlockLocalVariableNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1392 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#1418 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#1422 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#1378 + 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#1442 + 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#1452 + def type; end + end +end + +# Represents a block of ruby code. +# +# [1, 2, 3].each { |i| puts x } +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#1461 +class Prism::BlockNode < ::Prism::Node + # def initialize: (locals: Array[Symbol], parameters: BlockParametersNode?, body: Node?, opening_loc: Location, closing_loc: Location, location: Location) -> void + # + # @return [BlockNode] a new instance of BlockNode + # + # source://prism//lib/prism/node.rb#1478 + sig do + params( + locals: T::Array[Symbol], + parameters: T.nilable(BlockParametersNode), + body: T.nilable(Node), + opening_loc: Location, + closing_loc: Location, + location: Location + ).void + end + def initialize(locals, parameters, body, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#1488 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # attr_reader body: Node? + # + # source://prism//lib/prism/node.rb#1469 + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1493 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#1536 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#1475 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1506 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1498 + def compact_child_nodes; end + + # def copy: (**params) -> BlockNode + # + # source://prism//lib/prism/node.rb#1511 + sig { params(params: T.untyped).returns(BlockNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1493 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#1526 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#1540 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#1463 + def locals; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#1531 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#1472 + def opening_loc; end + + # attr_reader parameters: BlockParametersNode? + # + # source://prism//lib/prism/node.rb#1466 + 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#1574 + 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#1584 + 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#1594 +class Prism::BlockParameterNode < ::Prism::Node + # def initialize: (name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location) -> void + # + # @return [BlockParameterNode] a new instance of BlockParameterNode + # + # source://prism//lib/prism/node.rb#1605 + sig do + params( + name: T.nilable(Symbol), + name_loc: T.nilable(Location), + operator_loc: Location, + location: Location + ).void + end + def initialize(name, name_loc, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#1613 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1618 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1628 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1623 + def compact_child_nodes; end + + # def copy: (**params) -> BlockParameterNode + # + # source://prism//lib/prism/node.rb#1633 + sig { params(params: T.untyped).returns(BlockParameterNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1618 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#1646 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#1655 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol? + # + # source://prism//lib/prism/node.rb#1596 + def name; end + + # attr_reader name_loc: Location? + # + # source://prism//lib/prism/node.rb#1599 + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#1651 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#1602 + 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#1681 + 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#1691 + 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#1704 +class Prism::BlockParametersNode < ::Prism::Node + # def initialize: (parameters: ParametersNode?, locals: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> void + # + # @return [BlockParametersNode] a new instance of BlockParametersNode + # + # source://prism//lib/prism/node.rb#1718 + sig do + params( + parameters: T.nilable(ParametersNode), + locals: T::Array[Node], + opening_loc: T.nilable(Location), + closing_loc: T.nilable(Location), + location: Location + ).void + end + def initialize(parameters, locals, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#1727 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1732 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#1774 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#1715 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1745 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1737 + def compact_child_nodes; end + + # def copy: (**params) -> BlockParametersNode + # + # source://prism//lib/prism/node.rb#1750 + sig { params(params: T.untyped).returns(BlockParametersNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1732 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#1764 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#1778 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader locals: Array[Node] + # + # source://prism//lib/prism/node.rb#1709 + def locals; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#1769 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#1712 + def opening_loc; end + + # attr_reader parameters: ParametersNode? + # + # source://prism//lib/prism/node.rb#1706 + 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#1806 + 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#1816 + def type; end + end +end + +# Represents the use of the `break` keyword. +# +# break foo +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#1825 +class Prism::BreakNode < ::Prism::Node + # def initialize: (arguments: ArgumentsNode?, keyword_loc: Location, location: Location) -> void + # + # @return [BreakNode] a new instance of BreakNode + # + # source://prism//lib/prism/node.rb#1833 + sig { params(arguments: T.nilable(ArgumentsNode), keyword_loc: Location, location: Location).void } + def initialize(arguments, keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#1840 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#1827 + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1845 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1857 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1850 + def compact_child_nodes; end + + # def copy: (**params) -> BreakNode + # + # source://prism//lib/prism/node.rb#1862 + sig { params(params: T.untyped).returns(BreakNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1845 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#1874 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#1883 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#1879 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#1830 + 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#1909 + 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#1919 + def type; end + end +end + +# Represents the use of the `&&=` operator on a call. +# +# foo.bar &&= value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#1928 +class Prism::CallAndWriteNode < ::Prism::Node + # def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, flags: Integer, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [CallAndWriteNode] a new instance of CallAndWriteNode + # + # source://prism//lib/prism/node.rb#1954 + sig do + params( + receiver: T.nilable(Node), + call_operator_loc: T.nilable(Location), + message_loc: T.nilable(Location), + flags: Integer, + read_name: Symbol, + write_name: Symbol, + operator_loc: Location, + value: Node, + location: Location + ).void + end + def initialize(receiver, call_operator_loc, message_loc, flags, read_name, write_name, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#1967 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#2013 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#1933 + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1972 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1985 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1977 + def compact_child_nodes; end + + # def copy: (**params) -> CallAndWriteNode + # + # source://prism//lib/prism/node.rb#1990 + sig { params(params: T.untyped).returns(CallAndWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1972 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#2008 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#2037 + def inspect(inspector = T.unsafe(nil)); end + + # def message: () -> String? + # + # source://prism//lib/prism/node.rb#2018 + sig { returns(T.nilable(String)) } + def message; end + + # attr_reader message_loc: Location? + # + # source://prism//lib/prism/node.rb#1936 + def message_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#2033 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#1948 + def operator_loc; end + + # attr_reader read_name: Symbol + # + # source://prism//lib/prism/node.rb#1942 + def read_name; end + + # attr_reader receiver: Node? + # + # source://prism//lib/prism/node.rb#1930 + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2023 + 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#2071 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#1951 + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2028 + sig { returns(T::Boolean) } + def variable_call?; end + + # attr_reader write_name: Symbol + # + # source://prism//lib/prism/node.rb#1945 + def write_name; end + + private + + # Returns the value of attribute flags. + # + # source://prism//lib/prism/node.rb#1939 + 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#2081 + 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#2105 +class Prism::CallNode < ::Prism::Node + # def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, block: Node?, flags: Integer, name: Symbol, location: Location) -> void + # + # @return [CallNode] a new instance of CallNode + # + # source://prism//lib/prism/node.rb#2134 + sig do + params( + receiver: T.nilable(Node), + call_operator_loc: T.nilable(Location), + message_loc: T.nilable(Location), + opening_loc: T.nilable(Location), + arguments: T.nilable(ArgumentsNode), + closing_loc: T.nilable(Location), + block: T.nilable(Node), + flags: Integer, + name: Symbol, + location: Location + ).void + end + def initialize(receiver, call_operator_loc, message_loc, opening_loc, arguments, closing_loc, block, flags, name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#2148 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#2119 + def arguments; end + + # attr_reader block: Node? + # + # source://prism//lib/prism/node.rb#2125 + def block; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#2196 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#2110 + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2153 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#2211 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#2122 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#2167 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#2158 + def compact_child_nodes; end + + # def copy: (**params) -> CallNode + # + # source://prism//lib/prism/node.rb#2172 + sig { params(params: T.untyped).returns(CallNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2153 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#2191 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#2225 + def inspect(inspector = T.unsafe(nil)); end + + # def message: () -> String? + # + # source://prism//lib/prism/node.rb#2201 + sig { returns(T.nilable(String)) } + def message; end + + # attr_reader message_loc: Location? + # + # source://prism//lib/prism/node.rb#2113 + def message_loc; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#2131 + def name; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#2206 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#2116 + def opening_loc; end + + # attr_reader receiver: Node? + # + # source://prism//lib/prism/node.rb#2107 + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2216 + 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#2269 + def type; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2221 + sig { returns(T::Boolean) } + def variable_call?; end + + private + + # Returns the value of attribute flags. + # + # source://prism//lib/prism/node.rb#2128 + 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#2279 + def type; end + end +end + +# source://prism//lib/prism/node.rb#16312 +module Prism::CallNodeFlags; end + +# &. operator +# +# source://prism//lib/prism/node.rb#16314 +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#16317 +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#2288 +class Prism::CallOperatorWriteNode < ::Prism::Node + # def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, flags: Integer, read_name: Symbol, write_name: Symbol, operator: Symbol, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [CallOperatorWriteNode] a new instance of CallOperatorWriteNode + # + # source://prism//lib/prism/node.rb#2317 + sig do + params( + receiver: T.nilable(Node), + call_operator_loc: T.nilable(Location), + message_loc: T.nilable(Location), + flags: Integer, + read_name: Symbol, + write_name: Symbol, + operator: Symbol, + operator_loc: Location, + value: Node, + location: Location + ).void + end + def initialize(receiver, call_operator_loc, message_loc, flags, read_name, write_name, operator, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#2331 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#2378 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#2293 + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2336 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#2349 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#2341 + def compact_child_nodes; end + + # def copy: (**params) -> CallOperatorWriteNode + # + # source://prism//lib/prism/node.rb#2354 + sig { params(params: T.untyped).returns(CallOperatorWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2336 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#2373 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#2397 + def inspect(inspector = T.unsafe(nil)); end + + # def message: () -> String? + # + # source://prism//lib/prism/node.rb#2383 + sig { returns(T.nilable(String)) } + def message; end + + # attr_reader message_loc: Location? + # + # source://prism//lib/prism/node.rb#2296 + def message_loc; end + + # attr_reader operator: Symbol + # + # source://prism//lib/prism/node.rb#2308 + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#2311 + def operator_loc; end + + # attr_reader read_name: Symbol + # + # source://prism//lib/prism/node.rb#2302 + def read_name; end + + # attr_reader receiver: Node? + # + # source://prism//lib/prism/node.rb#2290 + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2388 + 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#2432 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#2314 + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2393 + sig { returns(T::Boolean) } + def variable_call?; end + + # attr_reader write_name: Symbol + # + # source://prism//lib/prism/node.rb#2305 + def write_name; end + + private + + # Returns the value of attribute flags. + # + # source://prism//lib/prism/node.rb#2299 + 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#2442 + def type; end + end +end + +# Represents the use of the `||=` operator on a call. +# +# foo.bar ||= value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#2451 +class Prism::CallOrWriteNode < ::Prism::Node + # def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, flags: Integer, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [CallOrWriteNode] a new instance of CallOrWriteNode + # + # source://prism//lib/prism/node.rb#2477 + sig do + params( + receiver: T.nilable(Node), + call_operator_loc: T.nilable(Location), + message_loc: T.nilable(Location), + flags: Integer, + read_name: Symbol, + write_name: Symbol, + operator_loc: Location, + value: Node, + location: Location + ).void + end + def initialize(receiver, call_operator_loc, message_loc, flags, read_name, write_name, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#2490 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#2536 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#2456 + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2495 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#2508 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#2500 + def compact_child_nodes; end + + # def copy: (**params) -> CallOrWriteNode + # + # source://prism//lib/prism/node.rb#2513 + sig { params(params: T.untyped).returns(CallOrWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2495 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#2531 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#2560 + def inspect(inspector = T.unsafe(nil)); end + + # def message: () -> String? + # + # source://prism//lib/prism/node.rb#2541 + sig { returns(T.nilable(String)) } + def message; end + + # attr_reader message_loc: Location? + # + # source://prism//lib/prism/node.rb#2459 + def message_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#2556 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#2471 + def operator_loc; end + + # attr_reader read_name: Symbol + # + # source://prism//lib/prism/node.rb#2465 + def read_name; end + + # attr_reader receiver: Node? + # + # source://prism//lib/prism/node.rb#2453 + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2546 + 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#2594 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#2474 + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2551 + sig { returns(T::Boolean) } + def variable_call?; end + + # attr_reader write_name: Symbol + # + # source://prism//lib/prism/node.rb#2468 + def write_name; end + + private + + # Returns the value of attribute flags. + # + # source://prism//lib/prism/node.rb#2462 + 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#2604 + def type; end + end +end + +# Represents assigning to a local variable in pattern matching. +# +# foo => [bar => baz] +# ^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#2613 +class Prism::CapturePatternNode < ::Prism::Node + # def initialize: (value: Node, target: Node, operator_loc: Location, location: Location) -> void + # + # @return [CapturePatternNode] a new instance of CapturePatternNode + # + # source://prism//lib/prism/node.rb#2624 + sig { params(value: Node, target: Node, operator_loc: Location, location: Location).void } + def initialize(value, target, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#2632 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2637 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#2647 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#2642 + def compact_child_nodes; end + + # def copy: (**params) -> CapturePatternNode + # + # source://prism//lib/prism/node.rb#2652 + sig { params(params: T.untyped).returns(CapturePatternNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2637 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#2665 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#2674 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#2670 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#2621 + def operator_loc; end + + # attr_reader target: Node + # + # source://prism//lib/prism/node.rb#2618 + 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#2698 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#2615 + 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#2708 + def type; end + end +end + +# Represents the use of a case statement. +# +# case true +# ^^^^^^^^^ +# when false +# end +# +# source://prism//lib/prism/node.rb#2719 +class Prism::CaseNode < ::Prism::Node + # def initialize: (predicate: Node?, conditions: Array[Node], consequent: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location, location: Location) -> void + # + # @return [CaseNode] a new instance of CaseNode + # + # source://prism//lib/prism/node.rb#2736 + sig do + params( + predicate: T.nilable(Node), + conditions: T::Array[Node], + consequent: T.nilable(ElseNode), + case_keyword_loc: Location, + end_keyword_loc: Location, + location: Location + ).void + end + def initialize(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#2746 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def case_keyword: () -> String + # + # source://prism//lib/prism/node.rb#2790 + sig { returns(String) } + def case_keyword; end + + # attr_reader case_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#2730 + def case_keyword_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2751 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#2765 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#2756 + def compact_child_nodes; end + + # attr_reader conditions: Array[Node] + # + # source://prism//lib/prism/node.rb#2724 + def conditions; end + + # attr_reader consequent: ElseNode? + # + # source://prism//lib/prism/node.rb#2727 + def consequent; end + + # def copy: (**params) -> CaseNode + # + # source://prism//lib/prism/node.rb#2770 + sig { params(params: T.untyped).returns(CaseNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2751 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#2785 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#2795 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#2733 + def end_keyword_loc; end + + # source://prism//lib/prism/node.rb#2799 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader predicate: Node? + # + # source://prism//lib/prism/node.rb#2721 + 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#2833 + 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#2843 + def type; end + end +end + +# Represents a class declaration involving the `class` keyword. +# +# class Foo end +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#2852 +class Prism::ClassNode < ::Prism::Node + # def initialize: (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) -> void + # + # @return [ClassNode] a new instance of ClassNode + # + # source://prism//lib/prism/node.rb#2878 + sig do + params( + locals: T::Array[Symbol], + class_keyword_loc: Location, + constant_path: Node, + inheritance_operator_loc: T.nilable(Location), + superclass: T.nilable(Node), + body: T.nilable(Node), + end_keyword_loc: Location, + name: Symbol, + location: Location + ).void + end + def initialize(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#2891 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # attr_reader body: Node? + # + # source://prism//lib/prism/node.rb#2869 + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2896 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def class_keyword: () -> String + # + # source://prism//lib/prism/node.rb#2938 + sig { returns(String) } + def class_keyword; end + + # attr_reader class_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#2857 + def class_keyword_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#2910 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#2901 + def compact_child_nodes; end + + # attr_reader constant_path: Node + # + # source://prism//lib/prism/node.rb#2860 + def constant_path; end + + # def copy: (**params) -> ClassNode + # + # source://prism//lib/prism/node.rb#2915 + sig { params(params: T.untyped).returns(ClassNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2896 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#2933 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#2948 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#2872 + def end_keyword_loc; end + + # def inheritance_operator: () -> String? + # + # source://prism//lib/prism/node.rb#2943 + sig { returns(T.nilable(String)) } + def inheritance_operator; end + + # attr_reader inheritance_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#2863 + def inheritance_operator_loc; end + + # source://prism//lib/prism/node.rb#2952 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#2854 + def locals; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#2875 + def name; end + + # attr_reader superclass: Node? + # + # source://prism//lib/prism/node.rb#2866 + 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#2990 + 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#3000 + 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#3009 +class Prism::ClassVariableAndWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [ClassVariableAndWriteNode] a new instance of ClassVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#3023 + sig { params(name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location).void } + def initialize(name, name_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#3032 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3037 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3047 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3042 + def compact_child_nodes; end + + # def copy: (**params) -> ClassVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#3052 + sig { params(params: T.untyped).returns(ClassVariableAndWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3037 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#3066 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#3075 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#3011 + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#3014 + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#3071 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#3017 + 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#3099 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#3020 + 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#3109 + 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#3118 +class Prism::ClassVariableOperatorWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void + # + # @return [ClassVariableOperatorWriteNode] a new instance of ClassVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#3135 + sig do + params( + name: Symbol, + name_loc: Location, + operator_loc: Location, + value: Node, + operator: Symbol, + location: Location + ).void + end + def initialize(name, name_loc, operator_loc, value, operator, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#3145 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3150 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3160 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3155 + def compact_child_nodes; end + + # def copy: (**params) -> ClassVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#3165 + sig { params(params: T.untyped).returns(ClassVariableOperatorWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3150 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#3180 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#3184 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#3120 + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#3123 + def name_loc; end + + # attr_reader operator: Symbol + # + # source://prism//lib/prism/node.rb#3132 + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#3126 + 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#3209 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#3129 + 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#3219 + 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#3228 +class Prism::ClassVariableOrWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [ClassVariableOrWriteNode] a new instance of ClassVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#3242 + sig { params(name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location).void } + def initialize(name, name_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#3251 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3256 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3266 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3261 + def compact_child_nodes; end + + # def copy: (**params) -> ClassVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#3271 + sig { params(params: T.untyped).returns(ClassVariableOrWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3256 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#3285 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#3294 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#3230 + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#3233 + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#3290 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#3236 + 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#3318 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#3239 + 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#3328 + def type; end + end +end + +# Represents referencing a class variable. +# +# @@foo +# ^^^^^ +# +# source://prism//lib/prism/node.rb#3337 +class Prism::ClassVariableReadNode < ::Prism::Node + # def initialize: (name: Symbol, location: Location) -> void + # + # @return [ClassVariableReadNode] a new instance of ClassVariableReadNode + # + # source://prism//lib/prism/node.rb#3342 + sig { params(name: Symbol, location: Location).void } + def initialize(name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#3348 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3353 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3363 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3358 + def compact_child_nodes; end + + # def copy: (**params) -> ClassVariableReadNode + # + # source://prism//lib/prism/node.rb#3368 + sig { params(params: T.untyped).returns(ClassVariableReadNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3353 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#3379 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#3383 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#3339 + 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#3403 + 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#3413 + 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#3422 +class Prism::ClassVariableTargetNode < ::Prism::Node + # def initialize: (name: Symbol, location: Location) -> void + # + # @return [ClassVariableTargetNode] a new instance of ClassVariableTargetNode + # + # source://prism//lib/prism/node.rb#3427 + sig { params(name: Symbol, location: Location).void } + def initialize(name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#3433 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3438 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3448 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3443 + def compact_child_nodes; end + + # def copy: (**params) -> ClassVariableTargetNode + # + # source://prism//lib/prism/node.rb#3453 + sig { params(params: T.untyped).returns(ClassVariableTargetNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3438 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#3464 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#3468 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#3424 + 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#3488 + 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#3498 + def type; end + end +end + +# Represents writing to a class variable. +# +# @@foo = 1 +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3507 +class Prism::ClassVariableWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location?, location: Location) -> void + # + # @return [ClassVariableWriteNode] a new instance of ClassVariableWriteNode + # + # source://prism//lib/prism/node.rb#3521 + sig do + params( + name: Symbol, + name_loc: Location, + value: Node, + operator_loc: T.nilable(Location), + location: Location + ).void + end + def initialize(name, name_loc, value, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#3530 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3535 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3545 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3540 + def compact_child_nodes; end + + # def copy: (**params) -> ClassVariableWriteNode + # + # source://prism//lib/prism/node.rb#3550 + sig { params(params: T.untyped).returns(ClassVariableWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3535 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#3564 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#3573 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#3509 + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#3512 + def name_loc; end + + # def operator: () -> String? + # + # source://prism//lib/prism/node.rb#3569 + sig { returns(T.nilable(String)) } + def operator; end + + # attr_reader operator_loc: Location? + # + # source://prism//lib/prism/node.rb#3518 + 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#3597 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#3515 + 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#3607 + def type; end + end +end + +# This represents a comment that was encountered during parsing. +# +# source://prism//lib/prism/parse_result.rb#161 +class Prism::Comment + # @return [Comment] a new instance of Comment + # + # source://prism//lib/prism/parse_result.rb#166 + def initialize(type, location); end + + # source://prism//lib/prism/parse_result.rb#171 + def deconstruct_keys(keys); end + + # source://prism//lib/prism/parse_result.rb#180 + def inspect; end + + # Returns the value of attribute location. + # + # source://prism//lib/prism/parse_result.rb#164 + sig { returns(Location) } + def location; end + + # Returns true if the 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#176 + def trailing?; end + + # Returns the value of attribute type. + # + # source://prism//lib/prism/parse_result.rb#164 + def type; end +end + +# source://prism//lib/prism/parse_result.rb#162 +Prism::Comment::TYPES = T.let(T.unsafe(nil), Array) + +# 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 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 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 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 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 KeywordParameterNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_keyword_parameter_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 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 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 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 StringConcatNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_string_concat_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#3616 +class Prism::ConstantAndWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [ConstantAndWriteNode] a new instance of ConstantAndWriteNode + # + # source://prism//lib/prism/node.rb#3630 + sig { params(name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location).void } + def initialize(name, name_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#3639 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3644 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3654 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3649 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantAndWriteNode + # + # source://prism//lib/prism/node.rb#3659 + sig { params(params: T.untyped).returns(ConstantAndWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3644 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#3673 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#3682 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#3618 + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#3621 + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#3678 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#3624 + 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#3706 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#3627 + 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#3716 + def type; end + end +end + +# Represents assigning to a constant using an operator that isn't `=`. +# +# Target += value +# ^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3725 +class Prism::ConstantOperatorWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void + # + # @return [ConstantOperatorWriteNode] a new instance of ConstantOperatorWriteNode + # + # source://prism//lib/prism/node.rb#3742 + sig do + params( + name: Symbol, + name_loc: Location, + operator_loc: Location, + value: Node, + operator: Symbol, + location: Location + ).void + end + def initialize(name, name_loc, operator_loc, value, operator, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#3752 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3757 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3767 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3762 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantOperatorWriteNode + # + # source://prism//lib/prism/node.rb#3772 + sig { params(params: T.untyped).returns(ConstantOperatorWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3757 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#3787 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#3791 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#3727 + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#3730 + def name_loc; end + + # attr_reader operator: Symbol + # + # source://prism//lib/prism/node.rb#3739 + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#3733 + 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#3816 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#3736 + 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#3826 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to a constant. +# +# Target ||= value +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3835 +class Prism::ConstantOrWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [ConstantOrWriteNode] a new instance of ConstantOrWriteNode + # + # source://prism//lib/prism/node.rb#3849 + sig { params(name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location).void } + def initialize(name, name_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#3858 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3863 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3873 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3868 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantOrWriteNode + # + # source://prism//lib/prism/node.rb#3878 + sig { params(params: T.untyped).returns(ConstantOrWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3863 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#3892 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#3901 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#3837 + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#3840 + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#3897 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#3843 + 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#3925 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#3846 + 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#3935 + 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#3944 +class Prism::ConstantPathAndWriteNode < ::Prism::Node + # def initialize: (target: ConstantPathNode, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [ConstantPathAndWriteNode] a new instance of ConstantPathAndWriteNode + # + # source://prism//lib/prism/node.rb#3955 + sig { params(target: ConstantPathNode, operator_loc: Location, value: Node, location: Location).void } + def initialize(target, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#3963 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3968 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3978 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3973 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantPathAndWriteNode + # + # source://prism//lib/prism/node.rb#3983 + sig { params(params: T.untyped).returns(ConstantPathAndWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3968 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#3996 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#4005 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#4001 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#3949 + def operator_loc; end + + # attr_reader target: ConstantPathNode + # + # source://prism//lib/prism/node.rb#3946 + 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#4029 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#3952 + 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#4039 + def type; end + end +end + +# Represents accessing a constant through a path of `::` operators. +# +# Foo::Bar +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4048 +class Prism::ConstantPathNode < ::Prism::Node + # def initialize: (parent: Node?, child: Node, delimiter_loc: Location, location: Location) -> void + # + # @return [ConstantPathNode] a new instance of ConstantPathNode + # + # source://prism//lib/prism/node.rb#4059 + sig { params(parent: T.nilable(Node), child: Node, delimiter_loc: Location, location: Location).void } + def initialize(parent, child, delimiter_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#4067 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # attr_reader child: Node + # + # source://prism//lib/prism/node.rb#4053 + def child; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4072 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4085 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4077 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantPathNode + # + # source://prism//lib/prism/node.rb#4090 + sig { params(params: T.untyped).returns(ConstantPathNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4072 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#4103 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # def delimiter: () -> String + # + # source://prism//lib/prism/node.rb#4108 + sig { returns(String) } + def delimiter; end + + # attr_reader delimiter_loc: Location + # + # source://prism//lib/prism/node.rb#4056 + def delimiter_loc; end + + # Returns the full name of this constant path. For example: "Foo::Bar" + # + # source://prism//lib/prism/node_ext.rb#90 + 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#77 + def full_name_parts; end + + # source://prism//lib/prism/node.rb#4112 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader parent: Node? + # + # source://prism//lib/prism/node.rb#4050 + 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#4140 + 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#4150 + def type; end + end +end + +# Represents assigning to a constant path using an operator that isn't `=`. +# +# Parent::Child += value +# ^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4159 +class Prism::ConstantPathOperatorWriteNode < ::Prism::Node + # def initialize: (target: ConstantPathNode, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void + # + # @return [ConstantPathOperatorWriteNode] a new instance of ConstantPathOperatorWriteNode + # + # source://prism//lib/prism/node.rb#4173 + sig do + params( + target: ConstantPathNode, + operator_loc: Location, + value: Node, + operator: Symbol, + location: Location + ).void + end + def initialize(target, operator_loc, value, operator, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#4182 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4187 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4197 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4192 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantPathOperatorWriteNode + # + # source://prism//lib/prism/node.rb#4202 + sig { params(params: T.untyped).returns(ConstantPathOperatorWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4187 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#4216 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#4220 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader operator: Symbol + # + # source://prism//lib/prism/node.rb#4170 + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#4164 + def operator_loc; end + + # attr_reader target: ConstantPathNode + # + # source://prism//lib/prism/node.rb#4161 + 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#4245 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#4167 + 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#4255 + 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#4264 +class Prism::ConstantPathOrWriteNode < ::Prism::Node + # def initialize: (target: ConstantPathNode, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [ConstantPathOrWriteNode] a new instance of ConstantPathOrWriteNode + # + # source://prism//lib/prism/node.rb#4275 + sig { params(target: ConstantPathNode, operator_loc: Location, value: Node, location: Location).void } + def initialize(target, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#4283 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4288 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4298 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4293 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantPathOrWriteNode + # + # source://prism//lib/prism/node.rb#4303 + sig { params(params: T.untyped).returns(ConstantPathOrWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4288 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#4316 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#4325 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#4321 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#4269 + def operator_loc; end + + # attr_reader target: ConstantPathNode + # + # source://prism//lib/prism/node.rb#4266 + 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#4349 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#4272 + 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#4359 + 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#4368 +class Prism::ConstantPathTargetNode < ::Prism::Node + # def initialize: (parent: Node?, child: Node, delimiter_loc: Location, location: Location) -> void + # + # @return [ConstantPathTargetNode] a new instance of ConstantPathTargetNode + # + # source://prism//lib/prism/node.rb#4379 + sig { params(parent: T.nilable(Node), child: Node, delimiter_loc: Location, location: Location).void } + def initialize(parent, child, delimiter_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#4387 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # attr_reader child: Node + # + # source://prism//lib/prism/node.rb#4373 + def child; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4392 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4405 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4397 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantPathTargetNode + # + # source://prism//lib/prism/node.rb#4410 + sig { params(params: T.untyped).returns(ConstantPathTargetNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4392 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#4423 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # def delimiter: () -> String + # + # source://prism//lib/prism/node.rb#4428 + sig { returns(String) } + def delimiter; end + + # attr_reader delimiter_loc: Location + # + # source://prism//lib/prism/node.rb#4376 + def delimiter_loc; end + + # Returns the full name of this constant path. For example: "Foo::Bar" + # + # source://prism//lib/prism/node_ext.rb#102 + 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#97 + def full_name_parts; end + + # source://prism//lib/prism/node.rb#4432 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader parent: Node? + # + # source://prism//lib/prism/node.rb#4370 + 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#4460 + 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#4470 + 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#4485 +class Prism::ConstantPathWriteNode < ::Prism::Node + # def initialize: (target: ConstantPathNode, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [ConstantPathWriteNode] a new instance of ConstantPathWriteNode + # + # source://prism//lib/prism/node.rb#4496 + sig { params(target: ConstantPathNode, operator_loc: Location, value: Node, location: Location).void } + def initialize(target, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#4504 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4509 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4519 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4514 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantPathWriteNode + # + # source://prism//lib/prism/node.rb#4524 + sig { params(params: T.untyped).returns(ConstantPathWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4509 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#4537 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#4546 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#4542 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#4490 + def operator_loc; end + + # attr_reader target: ConstantPathNode + # + # source://prism//lib/prism/node.rb#4487 + 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#4570 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#4493 + 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#4580 + def type; end + end +end + +# Represents referencing a constant. +# +# Foo +# ^^^ +# +# source://prism//lib/prism/node.rb#4589 +class Prism::ConstantReadNode < ::Prism::Node + # def initialize: (name: Symbol, location: Location) -> void + # + # @return [ConstantReadNode] a new instance of ConstantReadNode + # + # source://prism//lib/prism/node.rb#4594 + sig { params(name: Symbol, location: Location).void } + def initialize(name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#4600 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4605 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4615 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4610 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantReadNode + # + # source://prism//lib/prism/node.rb#4620 + sig { params(params: T.untyped).returns(ConstantReadNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4605 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#4631 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # Returns the full name of this constant. For example: "Foo" + # + # source://prism//lib/prism/node_ext.rb#70 + 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#65 + def full_name_parts; end + + # source://prism//lib/prism/node.rb#4635 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#4591 + 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#4655 + 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#4665 + 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#4674 +class Prism::ConstantTargetNode < ::Prism::Node + # def initialize: (name: Symbol, location: Location) -> void + # + # @return [ConstantTargetNode] a new instance of ConstantTargetNode + # + # source://prism//lib/prism/node.rb#4679 + sig { params(name: Symbol, location: Location).void } + def initialize(name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#4685 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4690 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4700 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4695 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantTargetNode + # + # source://prism//lib/prism/node.rb#4705 + sig { params(params: T.untyped).returns(ConstantTargetNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4690 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#4716 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#4720 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#4676 + 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#4740 + 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#4750 + def type; end + end +end + +# Represents writing to a constant. +# +# Foo = 1 +# ^^^^^^^ +# +# source://prism//lib/prism/node.rb#4759 +class Prism::ConstantWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> void + # + # @return [ConstantWriteNode] a new instance of ConstantWriteNode + # + # source://prism//lib/prism/node.rb#4773 + sig { params(name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location).void } + def initialize(name, name_loc, value, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#4782 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4787 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4797 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4792 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantWriteNode + # + # source://prism//lib/prism/node.rb#4802 + sig { params(params: T.untyped).returns(ConstantWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4787 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#4816 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#4825 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#4761 + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#4764 + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#4821 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#4770 + 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#4849 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#4767 + 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#4859 + def type; end + end +end + +# The DSL module provides a set of methods that can be used to create prism +# nodes in a more concise manner. For example, instead of writing: +# +# source = Prism::Source.new("[1]") +# +# Prism::ArrayNode.new( +# [ +# Prism::IntegerNode.new( +# Prism::IntegerBaseFlags::DECIMAL, +# Prism::Location.new(source, 1, 1), +# ) +# ], +# Prism::Location.new(source, 0, 1), +# Prism::Location.new(source, 2, 1) +# ) +# +# you could instead write: +# +# source = Prism::Source.new("[1]") +# +# ArrayNode( +# IntegerNode(Prism::IntegerBaseFlags::DECIMAL, Location(source, 1, 1))), +# Location(source, 0, 1), +# Location(source, 2, 1) +# ) +# +# 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#37 +module Prism::DSL + private + + # Create a new AliasGlobalVariableNode node + # + # source://prism//lib/prism/dsl.rb#46 + def AliasGlobalVariableNode(new_name, old_name, keyword_loc, location = T.unsafe(nil)); end + + # Create a new AliasMethodNode node + # + # source://prism//lib/prism/dsl.rb#51 + def AliasMethodNode(new_name, old_name, keyword_loc, location = T.unsafe(nil)); end + + # Create a new AlternationPatternNode node + # + # source://prism//lib/prism/dsl.rb#56 + def AlternationPatternNode(left, right, operator_loc, location = T.unsafe(nil)); end + + # Create a new AndNode node + # + # source://prism//lib/prism/dsl.rb#61 + def AndNode(left, right, operator_loc, location = T.unsafe(nil)); end + + # Create a new ArgumentsNode node + # + # source://prism//lib/prism/dsl.rb#66 + def ArgumentsNode(arguments, flags, location = T.unsafe(nil)); end + + # Create a new ArrayNode node + # + # source://prism//lib/prism/dsl.rb#71 + def ArrayNode(elements, opening_loc, closing_loc, location = T.unsafe(nil)); end + + # Create a new ArrayPatternNode node + # + # source://prism//lib/prism/dsl.rb#76 + def ArrayPatternNode(constant, requireds, rest, posts, opening_loc, closing_loc, location = T.unsafe(nil)); end + + # Create a new AssocNode node + # + # source://prism//lib/prism/dsl.rb#81 + def AssocNode(key, value, operator_loc, location = T.unsafe(nil)); end + + # Create a new AssocSplatNode node + # + # source://prism//lib/prism/dsl.rb#86 + def AssocSplatNode(value, operator_loc, location = T.unsafe(nil)); end + + # Create a new BackReferenceReadNode node + # + # source://prism//lib/prism/dsl.rb#91 + def BackReferenceReadNode(name, location = T.unsafe(nil)); end + + # Create a new BeginNode node + # + # source://prism//lib/prism/dsl.rb#96 + def BeginNode(begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc, location = T.unsafe(nil)); end + + # Create a new BlockArgumentNode node + # + # source://prism//lib/prism/dsl.rb#101 + def BlockArgumentNode(expression, operator_loc, location = T.unsafe(nil)); end + + # Create a new BlockLocalVariableNode node + # + # source://prism//lib/prism/dsl.rb#106 + def BlockLocalVariableNode(name, location = T.unsafe(nil)); end + + # Create a new BlockNode node + # + # source://prism//lib/prism/dsl.rb#111 + def BlockNode(locals, parameters, body, opening_loc, closing_loc, location = T.unsafe(nil)); end + + # Create a new BlockParameterNode node + # + # source://prism//lib/prism/dsl.rb#116 + def BlockParameterNode(name, name_loc, operator_loc, location = T.unsafe(nil)); end + + # Create a new BlockParametersNode node + # + # source://prism//lib/prism/dsl.rb#121 + def BlockParametersNode(parameters, locals, opening_loc, closing_loc, location = T.unsafe(nil)); end + + # Create a new BreakNode node + # + # source://prism//lib/prism/dsl.rb#126 + def BreakNode(arguments, keyword_loc, location = T.unsafe(nil)); end + + # Create a new CallAndWriteNode node + # + # source://prism//lib/prism/dsl.rb#131 + def CallAndWriteNode(receiver, call_operator_loc, message_loc, flags, read_name, write_name, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new CallNode node + # + # source://prism//lib/prism/dsl.rb#136 + def CallNode(receiver, call_operator_loc, message_loc, opening_loc, arguments, closing_loc, block, flags, name, location = T.unsafe(nil)); end + + # Create a new CallOperatorWriteNode node + # + # source://prism//lib/prism/dsl.rb#141 + def CallOperatorWriteNode(receiver, call_operator_loc, message_loc, flags, read_name, write_name, operator, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new CallOrWriteNode node + # + # source://prism//lib/prism/dsl.rb#146 + def CallOrWriteNode(receiver, call_operator_loc, message_loc, flags, read_name, write_name, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new CapturePatternNode node + # + # source://prism//lib/prism/dsl.rb#151 + def CapturePatternNode(value, target, operator_loc, location = T.unsafe(nil)); end + + # Create a new CaseNode node + # + # source://prism//lib/prism/dsl.rb#156 + def CaseNode(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location = T.unsafe(nil)); end + + # Create a new ClassNode node + # + # source://prism//lib/prism/dsl.rb#161 + def ClassNode(locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, name, location = T.unsafe(nil)); end + + # Create a new ClassVariableAndWriteNode node + # + # source://prism//lib/prism/dsl.rb#166 + def ClassVariableAndWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new ClassVariableOperatorWriteNode node + # + # source://prism//lib/prism/dsl.rb#171 + def ClassVariableOperatorWriteNode(name, name_loc, operator_loc, value, operator, location = T.unsafe(nil)); end + + # Create a new ClassVariableOrWriteNode node + # + # source://prism//lib/prism/dsl.rb#176 + def ClassVariableOrWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new ClassVariableReadNode node + # + # source://prism//lib/prism/dsl.rb#181 + def ClassVariableReadNode(name, location = T.unsafe(nil)); end + + # Create a new ClassVariableTargetNode node + # + # source://prism//lib/prism/dsl.rb#186 + def ClassVariableTargetNode(name, location = T.unsafe(nil)); end + + # Create a new ClassVariableWriteNode node + # + # source://prism//lib/prism/dsl.rb#191 + def ClassVariableWriteNode(name, name_loc, value, operator_loc, location = T.unsafe(nil)); end + + # Create a new ConstantAndWriteNode node + # + # source://prism//lib/prism/dsl.rb#196 + def ConstantAndWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new ConstantOperatorWriteNode node + # + # source://prism//lib/prism/dsl.rb#201 + def ConstantOperatorWriteNode(name, name_loc, operator_loc, value, operator, location = T.unsafe(nil)); end + + # Create a new ConstantOrWriteNode node + # + # source://prism//lib/prism/dsl.rb#206 + def ConstantOrWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new ConstantPathAndWriteNode node + # + # source://prism//lib/prism/dsl.rb#211 + def ConstantPathAndWriteNode(target, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new ConstantPathNode node + # + # source://prism//lib/prism/dsl.rb#216 + def ConstantPathNode(parent, child, delimiter_loc, location = T.unsafe(nil)); end + + # Create a new ConstantPathOperatorWriteNode node + # + # source://prism//lib/prism/dsl.rb#221 + def ConstantPathOperatorWriteNode(target, operator_loc, value, operator, location = T.unsafe(nil)); end + + # Create a new ConstantPathOrWriteNode node + # + # source://prism//lib/prism/dsl.rb#226 + def ConstantPathOrWriteNode(target, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new ConstantPathTargetNode node + # + # source://prism//lib/prism/dsl.rb#231 + def ConstantPathTargetNode(parent, child, delimiter_loc, location = T.unsafe(nil)); end + + # Create a new ConstantPathWriteNode node + # + # source://prism//lib/prism/dsl.rb#236 + def ConstantPathWriteNode(target, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new ConstantReadNode node + # + # source://prism//lib/prism/dsl.rb#241 + def ConstantReadNode(name, location = T.unsafe(nil)); end + + # Create a new ConstantTargetNode node + # + # source://prism//lib/prism/dsl.rb#246 + def ConstantTargetNode(name, location = T.unsafe(nil)); end + + # Create a new ConstantWriteNode node + # + # source://prism//lib/prism/dsl.rb#251 + def ConstantWriteNode(name, name_loc, value, operator_loc, location = T.unsafe(nil)); end + + # Create a new DefNode node + # + # source://prism//lib/prism/dsl.rb#256 + def DefNode(name, name_loc, receiver, parameters, body, locals, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc, location = T.unsafe(nil)); end + + # Create a new DefinedNode node + # + # source://prism//lib/prism/dsl.rb#261 + def DefinedNode(lparen_loc, value, rparen_loc, keyword_loc, location = T.unsafe(nil)); end + + # Create a new ElseNode node + # + # source://prism//lib/prism/dsl.rb#266 + def ElseNode(else_keyword_loc, statements, end_keyword_loc, location = T.unsafe(nil)); end + + # Create a new EmbeddedStatementsNode node + # + # source://prism//lib/prism/dsl.rb#271 + def EmbeddedStatementsNode(opening_loc, statements, closing_loc, location = T.unsafe(nil)); end + + # Create a new EmbeddedVariableNode node + # + # source://prism//lib/prism/dsl.rb#276 + def EmbeddedVariableNode(operator_loc, variable, location = T.unsafe(nil)); end + + # Create a new EnsureNode node + # + # source://prism//lib/prism/dsl.rb#281 + def EnsureNode(ensure_keyword_loc, statements, end_keyword_loc, location = T.unsafe(nil)); end + + # Create a new FalseNode node + # + # source://prism//lib/prism/dsl.rb#286 + def FalseNode(location = T.unsafe(nil)); end + + # Create a new FindPatternNode node + # + # source://prism//lib/prism/dsl.rb#291 + def FindPatternNode(constant, left, requireds, right, opening_loc, closing_loc, location = T.unsafe(nil)); end + + # Create a new FlipFlopNode node + # + # source://prism//lib/prism/dsl.rb#296 + def FlipFlopNode(left, right, operator_loc, flags, location = T.unsafe(nil)); end + + # Create a new FloatNode node + # + # source://prism//lib/prism/dsl.rb#301 + def FloatNode(location = T.unsafe(nil)); end + + # Create a new ForNode node + # + # source://prism//lib/prism/dsl.rb#306 + def ForNode(index, collection, statements, for_keyword_loc, in_keyword_loc, do_keyword_loc, end_keyword_loc, location = T.unsafe(nil)); end + + # Create a new ForwardingArgumentsNode node + # + # source://prism//lib/prism/dsl.rb#311 + def ForwardingArgumentsNode(location = T.unsafe(nil)); end + + # Create a new ForwardingParameterNode node + # + # source://prism//lib/prism/dsl.rb#316 + def ForwardingParameterNode(location = T.unsafe(nil)); end + + # Create a new ForwardingSuperNode node + # + # source://prism//lib/prism/dsl.rb#321 + def ForwardingSuperNode(block, location = T.unsafe(nil)); end + + # Create a new GlobalVariableAndWriteNode node + # + # source://prism//lib/prism/dsl.rb#326 + def GlobalVariableAndWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new GlobalVariableOperatorWriteNode node + # + # source://prism//lib/prism/dsl.rb#331 + def GlobalVariableOperatorWriteNode(name, name_loc, operator_loc, value, operator, location = T.unsafe(nil)); end + + # Create a new GlobalVariableOrWriteNode node + # + # source://prism//lib/prism/dsl.rb#336 + def GlobalVariableOrWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new GlobalVariableReadNode node + # + # source://prism//lib/prism/dsl.rb#341 + def GlobalVariableReadNode(name, location = T.unsafe(nil)); end + + # Create a new GlobalVariableTargetNode node + # + # source://prism//lib/prism/dsl.rb#346 + def GlobalVariableTargetNode(name, location = T.unsafe(nil)); end + + # Create a new GlobalVariableWriteNode node + # + # source://prism//lib/prism/dsl.rb#351 + def GlobalVariableWriteNode(name, name_loc, value, operator_loc, location = T.unsafe(nil)); end + + # Create a new HashNode node + # + # source://prism//lib/prism/dsl.rb#356 + def HashNode(opening_loc, elements, closing_loc, location = T.unsafe(nil)); end + + # Create a new HashPatternNode node + # + # source://prism//lib/prism/dsl.rb#361 + def HashPatternNode(constant, elements, rest, opening_loc, closing_loc, location = T.unsafe(nil)); end + + # Create a new IfNode node + # + # source://prism//lib/prism/dsl.rb#366 + def IfNode(if_keyword_loc, predicate, statements, consequent, end_keyword_loc, location = T.unsafe(nil)); end + + # Create a new ImaginaryNode node + # + # source://prism//lib/prism/dsl.rb#371 + def ImaginaryNode(numeric, location = T.unsafe(nil)); end + + # Create a new ImplicitNode node + # + # source://prism//lib/prism/dsl.rb#376 + def ImplicitNode(value, location = T.unsafe(nil)); end + + # Create a new InNode node + # + # source://prism//lib/prism/dsl.rb#381 + def InNode(pattern, statements, in_loc, then_loc, location = T.unsafe(nil)); end + + # Create a new IndexAndWriteNode node + # + # source://prism//lib/prism/dsl.rb#386 + def IndexAndWriteNode(receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, flags, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new IndexOperatorWriteNode node + # + # source://prism//lib/prism/dsl.rb#391 + def IndexOperatorWriteNode(receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, flags, operator, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new IndexOrWriteNode node + # + # source://prism//lib/prism/dsl.rb#396 + def IndexOrWriteNode(receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, flags, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new InstanceVariableAndWriteNode node + # + # source://prism//lib/prism/dsl.rb#401 + def InstanceVariableAndWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new InstanceVariableOperatorWriteNode node + # + # source://prism//lib/prism/dsl.rb#406 + def InstanceVariableOperatorWriteNode(name, name_loc, operator_loc, value, operator, location = T.unsafe(nil)); end + + # Create a new InstanceVariableOrWriteNode node + # + # source://prism//lib/prism/dsl.rb#411 + def InstanceVariableOrWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new InstanceVariableReadNode node + # + # source://prism//lib/prism/dsl.rb#416 + def InstanceVariableReadNode(name, location = T.unsafe(nil)); end + + # Create a new InstanceVariableTargetNode node + # + # source://prism//lib/prism/dsl.rb#421 + def InstanceVariableTargetNode(name, location = T.unsafe(nil)); end + + # Create a new InstanceVariableWriteNode node + # + # source://prism//lib/prism/dsl.rb#426 + def InstanceVariableWriteNode(name, name_loc, value, operator_loc, location = T.unsafe(nil)); end + + # Create a new IntegerNode node + # + # source://prism//lib/prism/dsl.rb#431 + def IntegerNode(flags, location = T.unsafe(nil)); end + + # Create a new InterpolatedMatchLastLineNode node + # + # source://prism//lib/prism/dsl.rb#436 + def InterpolatedMatchLastLineNode(opening_loc, parts, closing_loc, flags, location = T.unsafe(nil)); end + + # Create a new InterpolatedRegularExpressionNode node + # + # source://prism//lib/prism/dsl.rb#441 + def InterpolatedRegularExpressionNode(opening_loc, parts, closing_loc, flags, location = T.unsafe(nil)); end + + # Create a new InterpolatedStringNode node + # + # source://prism//lib/prism/dsl.rb#446 + def InterpolatedStringNode(opening_loc, parts, closing_loc, location = T.unsafe(nil)); end + + # Create a new InterpolatedSymbolNode node + # + # source://prism//lib/prism/dsl.rb#451 + def InterpolatedSymbolNode(opening_loc, parts, closing_loc, location = T.unsafe(nil)); end + + # Create a new InterpolatedXStringNode node + # + # source://prism//lib/prism/dsl.rb#456 + def InterpolatedXStringNode(opening_loc, parts, closing_loc, location = T.unsafe(nil)); end + + # Create a new KeywordHashNode node + # + # source://prism//lib/prism/dsl.rb#461 + def KeywordHashNode(elements, location = T.unsafe(nil)); end + + # Create a new KeywordParameterNode node + # + # source://prism//lib/prism/dsl.rb#466 + def KeywordParameterNode(name, name_loc, value, location = T.unsafe(nil)); end + + # Create a new KeywordRestParameterNode node + # + # source://prism//lib/prism/dsl.rb#471 + def KeywordRestParameterNode(name, name_loc, operator_loc, location = T.unsafe(nil)); end + + # Create a new LambdaNode node + # + # source://prism//lib/prism/dsl.rb#476 + def LambdaNode(locals, operator_loc, opening_loc, closing_loc, parameters, body, location = T.unsafe(nil)); end + + # Create a new LocalVariableAndWriteNode node + # + # source://prism//lib/prism/dsl.rb#481 + def LocalVariableAndWriteNode(name_loc, operator_loc, value, name, depth, location = T.unsafe(nil)); end + + # Create a new LocalVariableOperatorWriteNode node + # + # source://prism//lib/prism/dsl.rb#486 + def LocalVariableOperatorWriteNode(name_loc, operator_loc, value, name, operator, depth, location = T.unsafe(nil)); end + + # Create a new LocalVariableOrWriteNode node + # + # source://prism//lib/prism/dsl.rb#491 + def LocalVariableOrWriteNode(name_loc, operator_loc, value, name, depth, location = T.unsafe(nil)); end + + # Create a new LocalVariableReadNode node + # + # source://prism//lib/prism/dsl.rb#496 + def LocalVariableReadNode(name, depth, location = T.unsafe(nil)); end + + # Create a new LocalVariableTargetNode node + # + # source://prism//lib/prism/dsl.rb#501 + def LocalVariableTargetNode(name, depth, location = T.unsafe(nil)); end + + # Create a new LocalVariableWriteNode node + # + # source://prism//lib/prism/dsl.rb#506 + def LocalVariableWriteNode(name, depth, name_loc, value, operator_loc, location = T.unsafe(nil)); end + + # Create a new Location object + # + # source://prism//lib/prism/dsl.rb#41 + 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#511 + def MatchLastLineNode(opening_loc, content_loc, closing_loc, unescaped, flags, location = T.unsafe(nil)); end + + # Create a new MatchPredicateNode node + # + # source://prism//lib/prism/dsl.rb#516 + def MatchPredicateNode(value, pattern, operator_loc, location = T.unsafe(nil)); end + + # Create a new MatchRequiredNode node + # + # source://prism//lib/prism/dsl.rb#521 + def MatchRequiredNode(value, pattern, operator_loc, location = T.unsafe(nil)); end + + # Create a new MatchWriteNode node + # + # source://prism//lib/prism/dsl.rb#526 + def MatchWriteNode(call, locals, location = T.unsafe(nil)); end + + # Create a new MissingNode node + # + # source://prism//lib/prism/dsl.rb#531 + def MissingNode(location = T.unsafe(nil)); end + + # Create a new ModuleNode node + # + # source://prism//lib/prism/dsl.rb#536 + def ModuleNode(locals, module_keyword_loc, constant_path, body, end_keyword_loc, name, location = T.unsafe(nil)); end + + # Create a new MultiTargetNode node + # + # source://prism//lib/prism/dsl.rb#541 + def MultiTargetNode(lefts, rest, rights, lparen_loc, rparen_loc, location = T.unsafe(nil)); end + + # Create a new MultiWriteNode node + # + # source://prism//lib/prism/dsl.rb#546 + def MultiWriteNode(lefts, rest, rights, lparen_loc, rparen_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new NextNode node + # + # source://prism//lib/prism/dsl.rb#551 + def NextNode(arguments, keyword_loc, location = T.unsafe(nil)); end + + # Create a new NilNode node + # + # source://prism//lib/prism/dsl.rb#556 + def NilNode(location = T.unsafe(nil)); end + + # Create a new NoKeywordsParameterNode node + # + # source://prism//lib/prism/dsl.rb#561 + def NoKeywordsParameterNode(operator_loc, keyword_loc, location = T.unsafe(nil)); end + + # Create a new NumberedReferenceReadNode node + # + # source://prism//lib/prism/dsl.rb#566 + def NumberedReferenceReadNode(number, location = T.unsafe(nil)); end + + # Create a new OptionalParameterNode node + # + # source://prism//lib/prism/dsl.rb#571 + def OptionalParameterNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new OrNode node + # + # source://prism//lib/prism/dsl.rb#576 + def OrNode(left, right, operator_loc, location = T.unsafe(nil)); end + + # Create a new ParametersNode node + # + # source://prism//lib/prism/dsl.rb#581 + def ParametersNode(requireds, optionals, rest, posts, keywords, keyword_rest, block, location = T.unsafe(nil)); end + + # Create a new ParenthesesNode node + # + # source://prism//lib/prism/dsl.rb#586 + def ParenthesesNode(body, opening_loc, closing_loc, location = T.unsafe(nil)); end + + # Create a new PinnedExpressionNode node + # + # source://prism//lib/prism/dsl.rb#591 + def PinnedExpressionNode(expression, operator_loc, lparen_loc, rparen_loc, location = T.unsafe(nil)); end + + # Create a new PinnedVariableNode node + # + # source://prism//lib/prism/dsl.rb#596 + def PinnedVariableNode(variable, operator_loc, location = T.unsafe(nil)); end + + # Create a new PostExecutionNode node + # + # source://prism//lib/prism/dsl.rb#601 + def PostExecutionNode(statements, keyword_loc, opening_loc, closing_loc, location = T.unsafe(nil)); end + + # Create a new PreExecutionNode node + # + # source://prism//lib/prism/dsl.rb#606 + def PreExecutionNode(statements, keyword_loc, opening_loc, closing_loc, location = T.unsafe(nil)); end + + # Create a new ProgramNode node + # + # source://prism//lib/prism/dsl.rb#611 + def ProgramNode(locals, statements, location = T.unsafe(nil)); end + + # Create a new RangeNode node + # + # source://prism//lib/prism/dsl.rb#616 + def RangeNode(left, right, operator_loc, flags, location = T.unsafe(nil)); end + + # Create a new RationalNode node + # + # source://prism//lib/prism/dsl.rb#621 + def RationalNode(numeric, location = T.unsafe(nil)); end + + # Create a new RedoNode node + # + # source://prism//lib/prism/dsl.rb#626 + def RedoNode(location = T.unsafe(nil)); end + + # Create a new RegularExpressionNode node + # + # source://prism//lib/prism/dsl.rb#631 + def RegularExpressionNode(opening_loc, content_loc, closing_loc, unescaped, flags, location = T.unsafe(nil)); end + + # Create a new RequiredParameterNode node + # + # source://prism//lib/prism/dsl.rb#636 + def RequiredParameterNode(name, location = T.unsafe(nil)); end + + # Create a new RescueModifierNode node + # + # source://prism//lib/prism/dsl.rb#641 + def RescueModifierNode(expression, keyword_loc, rescue_expression, location = T.unsafe(nil)); end + + # Create a new RescueNode node + # + # source://prism//lib/prism/dsl.rb#646 + def RescueNode(keyword_loc, exceptions, operator_loc, reference, statements, consequent, location = T.unsafe(nil)); end + + # Create a new RestParameterNode node + # + # source://prism//lib/prism/dsl.rb#651 + def RestParameterNode(name, name_loc, operator_loc, location = T.unsafe(nil)); end + + # Create a new RetryNode node + # + # source://prism//lib/prism/dsl.rb#656 + def RetryNode(location = T.unsafe(nil)); end + + # Create a new ReturnNode node + # + # source://prism//lib/prism/dsl.rb#661 + def ReturnNode(keyword_loc, arguments, location = T.unsafe(nil)); end + + # Create a new SelfNode node + # + # source://prism//lib/prism/dsl.rb#666 + def SelfNode(location = T.unsafe(nil)); end + + # Create a new SingletonClassNode node + # + # source://prism//lib/prism/dsl.rb#671 + def SingletonClassNode(locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc, location = T.unsafe(nil)); end + + # Create a new SourceEncodingNode node + # + # source://prism//lib/prism/dsl.rb#676 + def SourceEncodingNode(location = T.unsafe(nil)); end + + # Create a new SourceFileNode node + # + # source://prism//lib/prism/dsl.rb#681 + def SourceFileNode(filepath, location = T.unsafe(nil)); end + + # Create a new SourceLineNode node + # + # source://prism//lib/prism/dsl.rb#686 + def SourceLineNode(location = T.unsafe(nil)); end + + # Create a new SplatNode node + # + # source://prism//lib/prism/dsl.rb#691 + def SplatNode(operator_loc, expression, location = T.unsafe(nil)); end + + # Create a new StatementsNode node + # + # source://prism//lib/prism/dsl.rb#696 + def StatementsNode(body, location = T.unsafe(nil)); end + + # Create a new StringConcatNode node + # + # source://prism//lib/prism/dsl.rb#701 + def StringConcatNode(left, right, location = T.unsafe(nil)); end + + # Create a new StringNode node + # + # source://prism//lib/prism/dsl.rb#706 + def StringNode(flags, opening_loc, content_loc, closing_loc, unescaped, location = T.unsafe(nil)); end + + # Create a new SuperNode node + # + # source://prism//lib/prism/dsl.rb#711 + def SuperNode(keyword_loc, lparen_loc, arguments, rparen_loc, block, location = T.unsafe(nil)); end + + # Create a new SymbolNode node + # + # source://prism//lib/prism/dsl.rb#716 + def SymbolNode(opening_loc, value_loc, closing_loc, unescaped, location = T.unsafe(nil)); end + + # Create a new TrueNode node + # + # source://prism//lib/prism/dsl.rb#721 + def TrueNode(location = T.unsafe(nil)); end + + # Create a new UndefNode node + # + # source://prism//lib/prism/dsl.rb#726 + def UndefNode(names, keyword_loc, location = T.unsafe(nil)); end + + # Create a new UnlessNode node + # + # source://prism//lib/prism/dsl.rb#731 + def UnlessNode(keyword_loc, predicate, statements, consequent, end_keyword_loc, location = T.unsafe(nil)); end + + # Create a new UntilNode node + # + # source://prism//lib/prism/dsl.rb#736 + def UntilNode(keyword_loc, closing_loc, predicate, statements, flags, location = T.unsafe(nil)); end + + # Create a new WhenNode node + # + # source://prism//lib/prism/dsl.rb#741 + def WhenNode(keyword_loc, conditions, statements, location = T.unsafe(nil)); end + + # Create a new WhileNode node + # + # source://prism//lib/prism/dsl.rb#746 + def WhileNode(keyword_loc, closing_loc, predicate, statements, flags, location = T.unsafe(nil)); end + + # Create a new XStringNode node + # + # source://prism//lib/prism/dsl.rb#751 + def XStringNode(opening_loc, content_loc, closing_loc, unescaped, location = T.unsafe(nil)); end + + # Create a new YieldNode node + # + # source://prism//lib/prism/dsl.rb#756 + def YieldNode(keyword_loc, lparen_loc, arguments, rparen_loc, 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 + # 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#47 + def cruby_locals(source); end + + def inspect_node(_arg0); end + def memsize(_arg0); end + def named_captures(_arg0); end + + # source://prism//lib/prism/debug.rb#167 + def newlines(source); end + + # source://prism//lib/prism/debug.rb#171 + def parse_serialize_file(filepath); end + + def parse_serialize_file_metadata(_arg0, _arg1); end + + # 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#83 + def prism_locals(source); end + + def profile_file(_arg0); end + end +end + +# source://prism//lib/prism/debug.rb#79 +Prism::Debug::AnonymousLocal = T.let(T.unsafe(nil), Object) + +# source://prism//lib/prism/debug.rb#7 +class Prism::Debug::ISeq + # @return [ISeq] a new instance of ISeq + # + # source://prism//lib/prism/debug.rb#10 + def initialize(parts); end + + # source://prism//lib/prism/debug.rb#26 + def each_child; end + + # source://prism//lib/prism/debug.rb#22 + def instructions; end + + # source://prism//lib/prism/debug.rb#18 + def local_table; end + + # Returns the value of attribute parts. + # + # source://prism//lib/prism/debug.rb#8 + def parts; end + + # source://prism//lib/prism/debug.rb#14 + def type; end +end + +# Represents a method definition. +# +# def method +# end +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4869 +class Prism::DefNode < ::Prism::Node + # def initialize: (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) -> void + # + # @return [DefNode] a new instance of DefNode + # + # source://prism//lib/prism/node.rb#4907 + sig do + params( + name: Symbol, + name_loc: Location, + receiver: T.nilable(Node), + parameters: T.nilable(ParametersNode), + body: T.nilable(Node), + locals: T::Array[Symbol], + def_keyword_loc: Location, + operator_loc: T.nilable(Location), + lparen_loc: T.nilable(Location), + rparen_loc: T.nilable(Location), + equal_loc: T.nilable(Location), + end_keyword_loc: T.nilable(Location), + location: Location + ).void + end + def initialize(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#4924 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # attr_reader body: Node? + # + # source://prism//lib/prism/node.rb#4883 + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4929 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4943 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4934 + def compact_child_nodes; end + + # def copy: (**params) -> DefNode + # + # source://prism//lib/prism/node.rb#4948 + sig { params(params: T.untyped).returns(DefNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4929 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#4970 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # def def_keyword: () -> String + # + # source://prism//lib/prism/node.rb#4975 + sig { returns(String) } + def def_keyword; end + + # attr_reader def_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#4889 + def def_keyword_loc; end + + # def end_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#5000 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#4904 + def end_keyword_loc; end + + # def equal: () -> String? + # + # source://prism//lib/prism/node.rb#4995 + sig { returns(T.nilable(String)) } + def equal; end + + # attr_reader equal_loc: Location? + # + # source://prism//lib/prism/node.rb#4901 + def equal_loc; end + + # source://prism//lib/prism/node.rb#5004 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#4886 + def locals; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#4985 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://prism//lib/prism/node.rb#4895 + def lparen_loc; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#4871 + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#4874 + def name_loc; end + + # def operator: () -> String? + # + # source://prism//lib/prism/node.rb#4980 + sig { returns(T.nilable(String)) } + def operator; end + + # attr_reader operator_loc: Location? + # + # source://prism//lib/prism/node.rb#4892 + def operator_loc; end + + # attr_reader parameters: ParametersNode? + # + # source://prism//lib/prism/node.rb#4880 + def parameters; end + + # attr_reader receiver: Node? + # + # source://prism//lib/prism/node.rb#4877 + def receiver; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#4990 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://prism//lib/prism/node.rb#4898 + 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#5050 + 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#5060 + def type; end + end +end + +# Represents the use of the `defined?` keyword. +# +# defined?(a) +# ^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#5069 +class Prism::DefinedNode < ::Prism::Node + # def initialize: (lparen_loc: Location?, value: Node, rparen_loc: Location?, keyword_loc: Location, location: Location) -> void + # + # @return [DefinedNode] a new instance of DefinedNode + # + # source://prism//lib/prism/node.rb#5083 + sig do + params( + lparen_loc: T.nilable(Location), + value: Node, + rparen_loc: T.nilable(Location), + keyword_loc: Location, + location: Location + ).void + end + def initialize(lparen_loc, value, rparen_loc, keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#5092 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5097 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5107 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5102 + def compact_child_nodes; end + + # def copy: (**params) -> DefinedNode + # + # source://prism//lib/prism/node.rb#5112 + sig { params(params: T.untyped).returns(DefinedNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5097 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#5126 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#5145 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#5141 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#5080 + def keyword_loc; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#5131 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://prism//lib/prism/node.rb#5071 + def lparen_loc; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#5136 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://prism//lib/prism/node.rb#5077 + 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#5169 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#5074 + 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#5179 + def type; end + 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#6 +class Prism::DesugarCompiler < ::Prism::MutationCompiler + # @@foo &&= bar + # + # becomes + # + # @@foo && @@foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#12 + def visit_class_variable_and_write_node(node); end + + # @@foo += bar + # + # becomes + # + # @@foo = @@foo + bar + # + # source://prism//lib/prism/desugar_compiler.rb#30 + def visit_class_variable_operator_write_node(node); end + + # @@foo ||= bar + # + # becomes + # + # defined?(@@foo) ? @@foo : @@foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#21 + def visit_class_variable_or_write_node(node); end + + # Foo &&= bar + # + # becomes + # + # Foo && Foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#39 + def visit_constant_and_write_node(node); end + + # Foo += bar + # + # becomes + # + # Foo = Foo + bar + # + # source://prism//lib/prism/desugar_compiler.rb#57 + def visit_constant_operator_write_node(node); end + + # Foo ||= bar + # + # becomes + # + # defined?(Foo) ? Foo : Foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#48 + def visit_constant_or_write_node(node); end + + # $foo &&= bar + # + # becomes + # + # $foo && $foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#66 + def visit_global_variable_and_write_node(node); end + + # $foo += bar + # + # becomes + # + # $foo = $foo + bar + # + # source://prism//lib/prism/desugar_compiler.rb#84 + def visit_global_variable_operator_write_node(node); end + + # $foo ||= bar + # + # becomes + # + # defined?($foo) ? $foo : $foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#75 + def visit_global_variable_or_write_node(node); end + + # becomes + # + # source://prism//lib/prism/desugar_compiler.rb#93 + def visit_instance_variable_and_write_node(node); end + + # becomes + # + # source://prism//lib/prism/desugar_compiler.rb#111 + def visit_instance_variable_operator_write_node(node); end + + # becomes + # + # source://prism//lib/prism/desugar_compiler.rb#102 + def visit_instance_variable_or_write_node(node); end + + # foo &&= bar + # + # becomes + # + # foo && foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#120 + def visit_local_variable_and_write_node(node); end + + # foo += bar + # + # becomes + # + # foo = foo + bar + # + # source://prism//lib/prism/desugar_compiler.rb#138 + def visit_local_variable_operator_write_node(node); end + + # foo ||= bar + # + # becomes + # + # foo || foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#129 + def visit_local_variable_or_write_node(node); end + + private + + # Desugar `x &&= y` to `x && x = y` + # + # source://prism//lib/prism/desugar_compiler.rb#145 + def desugar_and_write_node(node, read_class, write_class, *arguments); end + + # Desugar `x += y` to `x = x + y` + # + # source://prism//lib/prism/desugar_compiler.rb#155 + def desugar_operator_write_node(node, read_class, write_class, *arguments); end + + # Desugar `x ||= y` to `defined?(x) ? x : x = y` + # + # source://prism//lib/prism/desugar_compiler.rb#187 + def desugar_or_write_defined_node(node, read_class, write_class, *arguments); end + + # Desugar `x ||= y` to `x || x = y` + # + # source://prism//lib/prism/desugar_compiler.rb#177 + def desugar_or_write_node(node, read_class, write_class, *arguments); 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 + # @return [Dispatcher] a new instance of Dispatcher + # + # source://prism//lib/prism/dispatcher.rb#44 + def initialize; end + + # Walks `root` dispatching events to all registered listeners + # + # def dispatch: (Node) -> void + # + # source://prism//lib/prism/visitor.rb#14 + 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#63 + 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#51 + def register(listener, *events); end + + # Dispatch enter and leave events for AliasGlobalVariableNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#69 + 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#77 + 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#85 + 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#93 + 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#101 + 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#109 + 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#117 + 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#125 + 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#133 + 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#141 + 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#149 + 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#157 + 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#165 + 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#173 + 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#181 + 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#189 + 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#197 + 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#205 + 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#213 + 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#221 + 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#229 + def visit_call_or_write_node(node); end + + # Dispatch enter and leave events for CapturePatternNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#237 + def visit_capture_pattern_node(node); end + + # Dispatch enter and leave events for CaseNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#245 + 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#253 + 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#261 + 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#269 + 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#277 + 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#285 + 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#293 + 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#301 + 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#309 + 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#317 + 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#325 + 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#333 + 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#341 + 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#349 + 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#357 + 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#365 + 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#373 + 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#381 + 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#389 + 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#397 + 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#405 + 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#413 + 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#421 + 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#429 + 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#437 + 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#445 + 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#453 + 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#461 + 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#469 + 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#477 + 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#485 + 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#493 + 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#501 + 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#509 + 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#517 + 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#525 + 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#533 + 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#541 + 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#549 + 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#557 + 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#565 + 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#573 + 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#581 + 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#589 + 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#597 + def visit_implicit_node(node); end + + # Dispatch enter and leave events for InNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#605 + 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#613 + 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#621 + 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#629 + def visit_index_or_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableAndWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#637 + 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#645 + 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#653 + 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#661 + 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#669 + 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#677 + 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#685 + 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#693 + 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#701 + 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#709 + 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#717 + 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#725 + 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#733 + def visit_keyword_hash_node(node); end + + # Dispatch enter and leave events for KeywordParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#741 + def visit_keyword_parameter_node(node); end + + # Dispatch enter and leave events for KeywordRestParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#749 + 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#757 + 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#765 + 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#773 + 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#781 + 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#789 + 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#797 + 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#805 + 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#813 + 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#821 + 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#829 + 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#837 + 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#845 + 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#853 + 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#861 + 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#869 + 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#877 + 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#885 + 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#893 + def visit_no_keywords_parameter_node(node); end + + # Dispatch enter and leave events for NumberedReferenceReadNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#901 + def visit_numbered_reference_read_node(node); end + + # Dispatch enter and leave events for OptionalParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#909 + 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#917 + 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#925 + 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#933 + 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#941 + 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#949 + 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#957 + 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#965 + 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#973 + 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#981 + 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#989 + 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#997 + 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#1005 + def visit_regular_expression_node(node); end + + # Dispatch enter and leave events for RequiredParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1013 + 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#1021 + 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#1029 + 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#1037 + 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#1045 + 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#1053 + 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#1061 + 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#1069 + 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#1077 + 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#1085 + 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#1093 + 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#1101 + 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#1109 + def visit_statements_node(node); end + + # Dispatch enter and leave events for StringConcatNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1117 + def visit_string_concat_node(node); end + + # Dispatch enter and leave events for StringNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1125 + 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#1133 + 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#1141 + 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#1149 + 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#1157 + 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#1165 + 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#1173 + 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#1181 + 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#1189 + 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#1197 + 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#1205 + def visit_yield_node(node); end +end + +# source://prism//lib/prism/dispatcher.rb#1211 +class Prism::Dispatcher::DispatchOnce < ::Prism::Visitor + # @return [DispatchOnce] a new instance of DispatchOnce + # + # source://prism//lib/prism/dispatcher.rb#1214 + def initialize(listeners); end + + # Returns the value of attribute listeners. + # + # source://prism//lib/prism/dispatcher.rb#1212 + def listeners; end + + # Dispatch enter and leave events for AliasGlobalVariableNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1219 + def visit_alias_global_variable_node(node); end + + # Dispatch enter and leave events for AliasMethodNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1225 + def visit_alias_method_node(node); end + + # Dispatch enter and leave events for AlternationPatternNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1231 + def visit_alternation_pattern_node(node); end + + # Dispatch enter and leave events for AndNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1237 + def visit_and_node(node); end + + # Dispatch enter and leave events for ArgumentsNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1243 + def visit_arguments_node(node); end + + # Dispatch enter and leave events for ArrayNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1249 + def visit_array_node(node); end + + # Dispatch enter and leave events for ArrayPatternNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1255 + def visit_array_pattern_node(node); end + + # Dispatch enter and leave events for AssocNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1261 + def visit_assoc_node(node); end + + # Dispatch enter and leave events for AssocSplatNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1267 + def visit_assoc_splat_node(node); end + + # Dispatch enter and leave events for BackReferenceReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1273 + def visit_back_reference_read_node(node); end + + # Dispatch enter and leave events for BeginNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1279 + def visit_begin_node(node); end + + # Dispatch enter and leave events for BlockArgumentNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1285 + def visit_block_argument_node(node); end + + # Dispatch enter and leave events for BlockLocalVariableNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1291 + def visit_block_local_variable_node(node); end + + # Dispatch enter and leave events for BlockNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1297 + def visit_block_node(node); end + + # Dispatch enter and leave events for BlockParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1303 + def visit_block_parameter_node(node); end + + # Dispatch enter and leave events for BlockParametersNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1309 + def visit_block_parameters_node(node); end + + # Dispatch enter and leave events for BreakNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1315 + def visit_break_node(node); end + + # Dispatch enter and leave events for CallAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1321 + def visit_call_and_write_node(node); end + + # Dispatch enter and leave events for CallNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1327 + def visit_call_node(node); end + + # Dispatch enter and leave events for CallOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1333 + def visit_call_operator_write_node(node); end + + # Dispatch enter and leave events for CallOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1339 + def visit_call_or_write_node(node); end + + # Dispatch enter and leave events for CapturePatternNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1345 + def visit_capture_pattern_node(node); end + + # Dispatch enter and leave events for CaseNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1351 + def visit_case_node(node); end + + # Dispatch enter and leave events for ClassNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1357 + def visit_class_node(node); end + + # Dispatch enter and leave events for ClassVariableAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1363 + def visit_class_variable_and_write_node(node); end + + # Dispatch enter and leave events for ClassVariableOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1369 + def visit_class_variable_operator_write_node(node); end + + # Dispatch enter and leave events for ClassVariableOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1375 + def visit_class_variable_or_write_node(node); end + + # Dispatch enter and leave events for ClassVariableReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1381 + def visit_class_variable_read_node(node); end + + # Dispatch enter and leave events for ClassVariableTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1387 + def visit_class_variable_target_node(node); end + + # Dispatch enter and leave events for ClassVariableWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1393 + def visit_class_variable_write_node(node); end + + # Dispatch enter and leave events for ConstantAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1399 + def visit_constant_and_write_node(node); end + + # Dispatch enter and leave events for ConstantOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1405 + def visit_constant_operator_write_node(node); end + + # Dispatch enter and leave events for ConstantOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1411 + def visit_constant_or_write_node(node); end + + # Dispatch enter and leave events for ConstantPathAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1417 + def visit_constant_path_and_write_node(node); end + + # Dispatch enter and leave events for ConstantPathNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1423 + def visit_constant_path_node(node); end + + # Dispatch enter and leave events for ConstantPathOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1429 + def visit_constant_path_operator_write_node(node); end + + # Dispatch enter and leave events for ConstantPathOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1435 + def visit_constant_path_or_write_node(node); end + + # Dispatch enter and leave events for ConstantPathTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1441 + def visit_constant_path_target_node(node); end + + # Dispatch enter and leave events for ConstantPathWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1447 + def visit_constant_path_write_node(node); end + + # Dispatch enter and leave events for ConstantReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1453 + def visit_constant_read_node(node); end + + # Dispatch enter and leave events for ConstantTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1459 + def visit_constant_target_node(node); end + + # Dispatch enter and leave events for ConstantWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1465 + def visit_constant_write_node(node); end + + # Dispatch enter and leave events for DefNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1471 + def visit_def_node(node); end + + # Dispatch enter and leave events for DefinedNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1477 + def visit_defined_node(node); end + + # Dispatch enter and leave events for ElseNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1483 + def visit_else_node(node); end + + # Dispatch enter and leave events for EmbeddedStatementsNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1489 + def visit_embedded_statements_node(node); end + + # Dispatch enter and leave events for EmbeddedVariableNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1495 + def visit_embedded_variable_node(node); end + + # Dispatch enter and leave events for EnsureNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1501 + def visit_ensure_node(node); end + + # Dispatch enter and leave events for FalseNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1507 + def visit_false_node(node); end + + # Dispatch enter and leave events for FindPatternNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1513 + def visit_find_pattern_node(node); end + + # Dispatch enter and leave events for FlipFlopNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1519 + def visit_flip_flop_node(node); end + + # Dispatch enter and leave events for FloatNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1525 + def visit_float_node(node); end + + # Dispatch enter and leave events for ForNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1531 + def visit_for_node(node); end + + # Dispatch enter and leave events for ForwardingArgumentsNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1537 + def visit_forwarding_arguments_node(node); end + + # Dispatch enter and leave events for ForwardingParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1543 + def visit_forwarding_parameter_node(node); end + + # Dispatch enter and leave events for ForwardingSuperNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1549 + def visit_forwarding_super_node(node); end + + # Dispatch enter and leave events for GlobalVariableAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1555 + def visit_global_variable_and_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1561 + def visit_global_variable_operator_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1567 + def visit_global_variable_or_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1573 + def visit_global_variable_read_node(node); end + + # Dispatch enter and leave events for GlobalVariableTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1579 + def visit_global_variable_target_node(node); end + + # Dispatch enter and leave events for GlobalVariableWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1585 + def visit_global_variable_write_node(node); end + + # Dispatch enter and leave events for HashNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1591 + def visit_hash_node(node); end + + # Dispatch enter and leave events for HashPatternNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1597 + def visit_hash_pattern_node(node); end + + # Dispatch enter and leave events for IfNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1603 + def visit_if_node(node); end + + # Dispatch enter and leave events for ImaginaryNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1609 + def visit_imaginary_node(node); end + + # Dispatch enter and leave events for ImplicitNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1615 + def visit_implicit_node(node); end + + # Dispatch enter and leave events for InNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1621 + def visit_in_node(node); end + + # Dispatch enter and leave events for IndexAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1627 + def visit_index_and_write_node(node); end + + # Dispatch enter and leave events for IndexOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1633 + def visit_index_operator_write_node(node); end + + # Dispatch enter and leave events for IndexOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1639 + def visit_index_or_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1645 + def visit_instance_variable_and_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1651 + def visit_instance_variable_operator_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1657 + def visit_instance_variable_or_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1663 + def visit_instance_variable_read_node(node); end + + # Dispatch enter and leave events for InstanceVariableTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1669 + def visit_instance_variable_target_node(node); end + + # Dispatch enter and leave events for InstanceVariableWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1675 + def visit_instance_variable_write_node(node); end + + # Dispatch enter and leave events for IntegerNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1681 + def visit_integer_node(node); end + + # Dispatch enter and leave events for InterpolatedMatchLastLineNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1687 + def visit_interpolated_match_last_line_node(node); end + + # Dispatch enter and leave events for InterpolatedRegularExpressionNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1693 + def visit_interpolated_regular_expression_node(node); end + + # Dispatch enter and leave events for InterpolatedStringNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1699 + def visit_interpolated_string_node(node); end + + # Dispatch enter and leave events for InterpolatedSymbolNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1705 + def visit_interpolated_symbol_node(node); end + + # Dispatch enter and leave events for InterpolatedXStringNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1711 + def visit_interpolated_x_string_node(node); end + + # Dispatch enter and leave events for KeywordHashNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1717 + def visit_keyword_hash_node(node); end + + # Dispatch enter and leave events for KeywordParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1723 + def visit_keyword_parameter_node(node); end + + # Dispatch enter and leave events for KeywordRestParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1729 + def visit_keyword_rest_parameter_node(node); end + + # Dispatch enter and leave events for LambdaNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1735 + def visit_lambda_node(node); end + + # Dispatch enter and leave events for LocalVariableAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1741 + def visit_local_variable_and_write_node(node); end + + # Dispatch enter and leave events for LocalVariableOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1747 + def visit_local_variable_operator_write_node(node); end + + # Dispatch enter and leave events for LocalVariableOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1753 + def visit_local_variable_or_write_node(node); end + + # Dispatch enter and leave events for LocalVariableReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1759 + def visit_local_variable_read_node(node); end + + # Dispatch enter and leave events for LocalVariableTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1765 + def visit_local_variable_target_node(node); end + + # Dispatch enter and leave events for LocalVariableWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1771 + def visit_local_variable_write_node(node); end + + # Dispatch enter and leave events for MatchLastLineNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1777 + def visit_match_last_line_node(node); end + + # Dispatch enter and leave events for MatchPredicateNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1783 + def visit_match_predicate_node(node); end + + # Dispatch enter and leave events for MatchRequiredNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1789 + def visit_match_required_node(node); end + + # Dispatch enter and leave events for MatchWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1795 + def visit_match_write_node(node); end + + # Dispatch enter and leave events for MissingNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1801 + def visit_missing_node(node); end + + # Dispatch enter and leave events for ModuleNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1807 + def visit_module_node(node); end + + # Dispatch enter and leave events for MultiTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1813 + def visit_multi_target_node(node); end + + # Dispatch enter and leave events for MultiWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1819 + def visit_multi_write_node(node); end + + # Dispatch enter and leave events for NextNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1825 + def visit_next_node(node); end + + # Dispatch enter and leave events for NilNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1831 + def visit_nil_node(node); end + + # Dispatch enter and leave events for NoKeywordsParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1837 + def visit_no_keywords_parameter_node(node); end + + # Dispatch enter and leave events for NumberedReferenceReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1843 + def visit_numbered_reference_read_node(node); end + + # Dispatch enter and leave events for OptionalParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1849 + def visit_optional_parameter_node(node); end + + # Dispatch enter and leave events for OrNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1855 + def visit_or_node(node); end + + # Dispatch enter and leave events for ParametersNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1861 + def visit_parameters_node(node); end + + # Dispatch enter and leave events for ParenthesesNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1867 + def visit_parentheses_node(node); end + + # Dispatch enter and leave events for PinnedExpressionNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1873 + def visit_pinned_expression_node(node); end + + # Dispatch enter and leave events for PinnedVariableNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1879 + def visit_pinned_variable_node(node); end + + # Dispatch enter and leave events for PostExecutionNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1885 + def visit_post_execution_node(node); end + + # Dispatch enter and leave events for PreExecutionNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1891 + def visit_pre_execution_node(node); end + + # Dispatch enter and leave events for ProgramNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1897 + def visit_program_node(node); end + + # Dispatch enter and leave events for RangeNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1903 + def visit_range_node(node); end + + # Dispatch enter and leave events for RationalNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1909 + def visit_rational_node(node); end + + # Dispatch enter and leave events for RedoNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1915 + def visit_redo_node(node); end + + # Dispatch enter and leave events for RegularExpressionNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1921 + def visit_regular_expression_node(node); end + + # Dispatch enter and leave events for RequiredParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1927 + def visit_required_parameter_node(node); end + + # Dispatch enter and leave events for RescueModifierNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1933 + def visit_rescue_modifier_node(node); end + + # Dispatch enter and leave events for RescueNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1939 + def visit_rescue_node(node); end + + # Dispatch enter and leave events for RestParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1945 + def visit_rest_parameter_node(node); end + + # Dispatch enter and leave events for RetryNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1951 + def visit_retry_node(node); end + + # Dispatch enter and leave events for ReturnNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1957 + def visit_return_node(node); end + + # Dispatch enter and leave events for SelfNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1963 + def visit_self_node(node); end + + # Dispatch enter and leave events for SingletonClassNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1969 + def visit_singleton_class_node(node); end + + # Dispatch enter and leave events for SourceEncodingNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1975 + def visit_source_encoding_node(node); end + + # Dispatch enter and leave events for SourceFileNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1981 + def visit_source_file_node(node); end + + # Dispatch enter and leave events for SourceLineNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1987 + def visit_source_line_node(node); end + + # Dispatch enter and leave events for SplatNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1993 + def visit_splat_node(node); end + + # Dispatch enter and leave events for StatementsNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1999 + def visit_statements_node(node); end + + # Dispatch enter and leave events for StringConcatNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2005 + def visit_string_concat_node(node); end + + # Dispatch enter and leave events for StringNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2011 + def visit_string_node(node); end + + # Dispatch enter and leave events for SuperNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2017 + def visit_super_node(node); end + + # Dispatch enter and leave events for SymbolNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2023 + def visit_symbol_node(node); end + + # Dispatch enter and leave events for TrueNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2029 + def visit_true_node(node); end + + # Dispatch enter and leave events for UndefNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2035 + def visit_undef_node(node); end + + # Dispatch enter and leave events for UnlessNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2041 + def visit_unless_node(node); end + + # Dispatch enter and leave events for UntilNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2047 + def visit_until_node(node); end + + # Dispatch enter and leave events for WhenNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2053 + def visit_when_node(node); end + + # Dispatch enter and leave events for WhileNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2059 + def visit_while_node(node); end + + # Dispatch enter and leave events for XStringNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2065 + def visit_x_string_node(node); end + + # Dispatch enter and leave events for YieldNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2071 + def visit_yield_node(node); 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#5188 +class Prism::ElseNode < ::Prism::Node + # def initialize: (else_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location?, location: Location) -> void + # + # @return [ElseNode] a new instance of ElseNode + # + # source://prism//lib/prism/node.rb#5199 + sig do + params( + else_keyword_loc: Location, + statements: T.nilable(StatementsNode), + end_keyword_loc: T.nilable(Location), + location: Location + ).void + end + def initialize(else_keyword_loc, statements, end_keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#5207 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5212 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5224 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5217 + def compact_child_nodes; end + + # def copy: (**params) -> ElseNode + # + # source://prism//lib/prism/node.rb#5229 + sig { params(params: T.untyped).returns(ElseNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5212 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#5242 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # def else_keyword: () -> String + # + # source://prism//lib/prism/node.rb#5247 + sig { returns(String) } + def else_keyword; end + + # attr_reader else_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#5190 + def else_keyword_loc; end + + # def end_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#5252 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#5196 + def end_keyword_loc; end + + # source://prism//lib/prism/node.rb#5256 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#5193 + 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#5283 + 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#5293 + def type; end + end +end + +# Represents an interpolated set of statements. +# +# "foo #{bar}" +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#5302 +class Prism::EmbeddedStatementsNode < ::Prism::Node + # def initialize: (opening_loc: Location, statements: StatementsNode?, closing_loc: Location, location: Location) -> void + # + # @return [EmbeddedStatementsNode] a new instance of EmbeddedStatementsNode + # + # source://prism//lib/prism/node.rb#5313 + sig do + params( + opening_loc: Location, + statements: T.nilable(StatementsNode), + closing_loc: Location, + location: Location + ).void + end + def initialize(opening_loc, statements, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#5321 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5326 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#5366 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#5310 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5338 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5331 + def compact_child_nodes; end + + # def copy: (**params) -> EmbeddedStatementsNode + # + # source://prism//lib/prism/node.rb#5343 + sig { params(params: T.untyped).returns(EmbeddedStatementsNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5326 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#5356 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#5370 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#5361 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#5304 + def opening_loc; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#5307 + 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#5397 + 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#5407 + def type; end + end +end + +# Represents an interpolated variable. +# +# "foo #@bar" +# ^^^^^ +# +# source://prism//lib/prism/node.rb#5416 +class Prism::EmbeddedVariableNode < ::Prism::Node + # def initialize: (operator_loc: Location, variable: Node, location: Location) -> void + # + # @return [EmbeddedVariableNode] a new instance of EmbeddedVariableNode + # + # source://prism//lib/prism/node.rb#5424 + sig { params(operator_loc: Location, variable: Node, location: Location).void } + def initialize(operator_loc, variable, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#5431 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5436 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5446 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5441 + def compact_child_nodes; end + + # def copy: (**params) -> EmbeddedVariableNode + # + # source://prism//lib/prism/node.rb#5451 + sig { params(params: T.untyped).returns(EmbeddedVariableNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5436 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#5463 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#5472 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#5468 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#5418 + 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#5494 + def type; end + + # attr_reader variable: Node + # + # source://prism//lib/prism/node.rb#5421 + 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#5504 + def type; end + end +end + +# Represents an `ensure` clause in a `begin` statement. +# +# begin +# foo +# ensure +# ^^^^^^ +# bar +# end +# +# source://prism//lib/prism/node.rb#5517 +class Prism::EnsureNode < ::Prism::Node + # def initialize: (ensure_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location, location: Location) -> void + # + # @return [EnsureNode] a new instance of EnsureNode + # + # source://prism//lib/prism/node.rb#5528 + sig do + params( + ensure_keyword_loc: Location, + statements: T.nilable(StatementsNode), + end_keyword_loc: Location, + location: Location + ).void + end + def initialize(ensure_keyword_loc, statements, end_keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#5536 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5541 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5553 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5546 + def compact_child_nodes; end + + # def copy: (**params) -> EnsureNode + # + # source://prism//lib/prism/node.rb#5558 + sig { params(params: T.untyped).returns(EnsureNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5541 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#5571 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#5581 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#5525 + def end_keyword_loc; end + + # def ensure_keyword: () -> String + # + # source://prism//lib/prism/node.rb#5576 + sig { returns(String) } + def ensure_keyword; end + + # attr_reader ensure_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#5519 + def ensure_keyword_loc; end + + # source://prism//lib/prism/node.rb#5585 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#5522 + 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#5612 + 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#5622 + def type; end + end +end + +# Represents the use of the literal `false` keyword. +# +# false +# ^^^^^ +# +# source://prism//lib/prism/node.rb#5631 +class Prism::FalseNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [FalseNode] a new instance of FalseNode + # + # source://prism//lib/prism/node.rb#5633 + sig { params(location: Location).void } + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#5638 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5643 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5653 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5648 + def compact_child_nodes; end + + # def copy: (**params) -> FalseNode + # + # source://prism//lib/prism/node.rb#5658 + sig { params(params: T.untyped).returns(FalseNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5643 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#5668 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#5672 + 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#5691 + 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#5701 + 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#5716 +class Prism::FindPatternNode < ::Prism::Node + # def initialize: (constant: Node?, left: Node, requireds: Array[Node], right: Node, opening_loc: Location?, closing_loc: Location?, location: Location) -> void + # + # @return [FindPatternNode] a new instance of FindPatternNode + # + # source://prism//lib/prism/node.rb#5736 + sig do + params( + constant: T.nilable(Node), + left: Node, + requireds: T::Array[Node], + right: Node, + opening_loc: T.nilable(Location), + closing_loc: T.nilable(Location), + location: Location + ).void + end + def initialize(constant, left, requireds, right, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#5747 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5752 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#5798 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#5733 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5767 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5757 + def compact_child_nodes; end + + # attr_reader constant: Node? + # + # source://prism//lib/prism/node.rb#5718 + def constant; end + + # def copy: (**params) -> FindPatternNode + # + # source://prism//lib/prism/node.rb#5772 + sig { params(params: T.untyped).returns(FindPatternNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5752 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#5788 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#5802 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader left: Node + # + # source://prism//lib/prism/node.rb#5721 + def left; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#5793 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#5730 + def opening_loc; end + + # attr_reader requireds: Array[Node] + # + # source://prism//lib/prism/node.rb#5724 + def requireds; end + + # attr_reader right: Node + # + # source://prism//lib/prism/node.rb#5727 + 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#5834 + 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#5844 + 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#5853 +class Prism::FlipFlopNode < ::Prism::Node + # def initialize: (left: Node?, right: Node?, operator_loc: Location, flags: Integer, location: Location) -> void + # + # @return [FlipFlopNode] a new instance of FlipFlopNode + # + # source://prism//lib/prism/node.rb#5867 + sig do + params( + left: T.nilable(Node), + right: T.nilable(Node), + operator_loc: Location, + flags: Integer, + location: Location + ).void + end + def initialize(left, right, operator_loc, flags, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#5876 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5881 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5894 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5886 + def compact_child_nodes; end + + # def copy: (**params) -> FlipFlopNode + # + # source://prism//lib/prism/node.rb#5899 + sig { params(params: T.untyped).returns(FlipFlopNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5881 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#5913 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # def exclude_end?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#5923 + sig { returns(T::Boolean) } + def exclude_end?; end + + # source://prism//lib/prism/node.rb#5927 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader left: Node? + # + # source://prism//lib/prism/node.rb#5855 + def left; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#5918 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#5861 + def operator_loc; end + + # attr_reader right: Node? + # + # source://prism//lib/prism/node.rb#5858 + 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#5961 + def type; end + + private + + # Returns the value of attribute flags. + # + # source://prism//lib/prism/node.rb#5864 + 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#5971 + def type; end + end +end + +# Represents a floating point number literal. +# +# 1.0 +# ^^^ +# +# source://prism//lib/prism/node.rb#5980 +class Prism::FloatNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [FloatNode] a new instance of FloatNode + # + # source://prism//lib/prism/node.rb#5982 + sig { params(location: Location).void } + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#5987 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5992 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6002 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5997 + def compact_child_nodes; end + + # def copy: (**params) -> FloatNode + # + # source://prism//lib/prism/node.rb#6007 + sig { params(params: T.untyped).returns(FloatNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5992 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#6017 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#6021 + 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#6040 + def type; end + + # Returns the value of the node as a Ruby Float. + # + # source://prism//lib/prism/node_ext.rb#21 + 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#6050 + def type; end + end +end + +# Represents the use of the `for` keyword. +# +# for i in a end +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#6059 +class Prism::ForNode < ::Prism::Node + # def initialize: (index: Node, collection: Node, statements: StatementsNode?, for_keyword_loc: Location, in_keyword_loc: Location, do_keyword_loc: Location?, end_keyword_loc: Location, location: Location) -> void + # + # @return [ForNode] a new instance of ForNode + # + # source://prism//lib/prism/node.rb#6082 + sig do + params( + index: Node, + collection: Node, + statements: T.nilable(StatementsNode), + for_keyword_loc: Location, + in_keyword_loc: Location, + do_keyword_loc: T.nilable(Location), + end_keyword_loc: Location, + location: Location + ).void + end + def initialize(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#6094 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6099 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # attr_reader collection: Node + # + # source://prism//lib/prism/node.rb#6064 + def collection; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6113 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6104 + def compact_child_nodes; end + + # def copy: (**params) -> ForNode + # + # source://prism//lib/prism/node.rb#6118 + sig { params(params: T.untyped).returns(ForNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6099 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#6135 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # def do_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#6150 + sig { returns(T.nilable(String)) } + def do_keyword; end + + # attr_reader do_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#6076 + def do_keyword_loc; end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#6155 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#6079 + def end_keyword_loc; end + + # def for_keyword: () -> String + # + # source://prism//lib/prism/node.rb#6140 + sig { returns(String) } + def for_keyword; end + + # attr_reader for_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#6070 + def for_keyword_loc; end + + # def in_keyword: () -> String + # + # source://prism//lib/prism/node.rb#6145 + sig { returns(String) } + def in_keyword; end + + # attr_reader in_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#6073 + def in_keyword_loc; end + + # attr_reader index: Node + # + # source://prism//lib/prism/node.rb#6061 + def index; end + + # source://prism//lib/prism/node.rb#6159 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#6067 + 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#6192 + 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#6202 + 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#6213 +class Prism::ForwardingArgumentsNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [ForwardingArgumentsNode] a new instance of ForwardingArgumentsNode + # + # source://prism//lib/prism/node.rb#6215 + sig { params(location: Location).void } + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#6220 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6225 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6235 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6230 + def compact_child_nodes; end + + # def copy: (**params) -> ForwardingArgumentsNode + # + # source://prism//lib/prism/node.rb#6240 + sig { params(params: T.untyped).returns(ForwardingArgumentsNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6225 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#6250 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#6254 + 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#6273 + 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#6283 + 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#6293 +class Prism::ForwardingParameterNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [ForwardingParameterNode] a new instance of ForwardingParameterNode + # + # source://prism//lib/prism/node.rb#6295 + sig { params(location: Location).void } + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#6300 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6305 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6315 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6310 + def compact_child_nodes; end + + # def copy: (**params) -> ForwardingParameterNode + # + # source://prism//lib/prism/node.rb#6320 + sig { params(params: T.untyped).returns(ForwardingParameterNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6305 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#6330 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#6334 + 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#6353 + 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#6363 + def type; end + end +end + +# Represents the use of the `super` keyword without parentheses or arguments. +# +# super +# ^^^^^ +# +# source://prism//lib/prism/node.rb#6372 +class Prism::ForwardingSuperNode < ::Prism::Node + # def initialize: (block: BlockNode?, location: Location) -> void + # + # @return [ForwardingSuperNode] a new instance of ForwardingSuperNode + # + # source://prism//lib/prism/node.rb#6377 + sig { params(block: T.nilable(BlockNode), location: Location).void } + def initialize(block, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#6383 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # attr_reader block: BlockNode? + # + # source://prism//lib/prism/node.rb#6374 + def block; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6388 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6400 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6393 + def compact_child_nodes; end + + # def copy: (**params) -> ForwardingSuperNode + # + # source://prism//lib/prism/node.rb#6405 + sig { params(params: T.untyped).returns(ForwardingSuperNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6388 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#6416 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#6420 + 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#6445 + 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#6455 + 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#6464 +class Prism::GlobalVariableAndWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [GlobalVariableAndWriteNode] a new instance of GlobalVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#6478 + sig { params(name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location).void } + def initialize(name, name_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#6487 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6492 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6502 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6497 + def compact_child_nodes; end + + # def copy: (**params) -> GlobalVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#6507 + sig { params(params: T.untyped).returns(GlobalVariableAndWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6492 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#6521 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#6530 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#6466 + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#6469 + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#6526 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#6472 + 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#6554 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#6475 + 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#6564 + 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#6573 +class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void + # + # @return [GlobalVariableOperatorWriteNode] a new instance of GlobalVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#6590 + sig do + params( + name: Symbol, + name_loc: Location, + operator_loc: Location, + value: Node, + operator: Symbol, + location: Location + ).void + end + def initialize(name, name_loc, operator_loc, value, operator, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#6600 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6605 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6615 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6610 + def compact_child_nodes; end + + # def copy: (**params) -> GlobalVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#6620 + sig { params(params: T.untyped).returns(GlobalVariableOperatorWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6605 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#6635 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#6639 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#6575 + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#6578 + def name_loc; end + + # attr_reader operator: Symbol + # + # source://prism//lib/prism/node.rb#6587 + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#6581 + 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#6664 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#6584 + 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#6674 + 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#6683 +class Prism::GlobalVariableOrWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [GlobalVariableOrWriteNode] a new instance of GlobalVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#6697 + sig { params(name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location).void } + def initialize(name, name_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#6706 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6711 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6721 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6716 + def compact_child_nodes; end + + # def copy: (**params) -> GlobalVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#6726 + sig { params(params: T.untyped).returns(GlobalVariableOrWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6711 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#6740 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#6749 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#6685 + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#6688 + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#6745 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#6691 + 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#6773 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#6694 + 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#6783 + def type; end + end +end + +# Represents referencing a global variable. +# +# $foo +# ^^^^ +# +# source://prism//lib/prism/node.rb#6792 +class Prism::GlobalVariableReadNode < ::Prism::Node + # def initialize: (name: Symbol, location: Location) -> void + # + # @return [GlobalVariableReadNode] a new instance of GlobalVariableReadNode + # + # source://prism//lib/prism/node.rb#6797 + sig { params(name: Symbol, location: Location).void } + def initialize(name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#6803 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6808 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6818 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6813 + def compact_child_nodes; end + + # def copy: (**params) -> GlobalVariableReadNode + # + # source://prism//lib/prism/node.rb#6823 + sig { params(params: T.untyped).returns(GlobalVariableReadNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6808 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#6834 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#6838 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#6794 + 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#6858 + 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#6868 + 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#6877 +class Prism::GlobalVariableTargetNode < ::Prism::Node + # def initialize: (name: Symbol, location: Location) -> void + # + # @return [GlobalVariableTargetNode] a new instance of GlobalVariableTargetNode + # + # source://prism//lib/prism/node.rb#6882 + sig { params(name: Symbol, location: Location).void } + def initialize(name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#6888 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6893 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6903 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6898 + def compact_child_nodes; end + + # def copy: (**params) -> GlobalVariableTargetNode + # + # source://prism//lib/prism/node.rb#6908 + sig { params(params: T.untyped).returns(GlobalVariableTargetNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6893 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#6919 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#6923 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#6879 + 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#6943 + 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#6953 + def type; end + end +end + +# Represents writing to a global variable. +# +# $foo = 1 +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#6962 +class Prism::GlobalVariableWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> void + # + # @return [GlobalVariableWriteNode] a new instance of GlobalVariableWriteNode + # + # source://prism//lib/prism/node.rb#6976 + sig { params(name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location).void } + def initialize(name, name_loc, value, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#6985 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6990 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7000 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6995 + def compact_child_nodes; end + + # def copy: (**params) -> GlobalVariableWriteNode + # + # source://prism//lib/prism/node.rb#7005 + sig { params(params: T.untyped).returns(GlobalVariableWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6990 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#7019 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#7028 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#6964 + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#6967 + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#7024 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#6973 + 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#7052 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#6970 + 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#7062 + def type; end + end +end + +# Represents a hash literal. +# +# { a => b } +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#7071 +class Prism::HashNode < ::Prism::Node + # def initialize: (opening_loc: Location, elements: Array[Node], closing_loc: Location, location: Location) -> void + # + # @return [HashNode] a new instance of HashNode + # + # source://prism//lib/prism/node.rb#7082 + sig { params(opening_loc: Location, elements: T::Array[Node], closing_loc: Location, location: Location).void } + def initialize(opening_loc, elements, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#7090 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7095 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#7133 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#7079 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7105 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7100 + def compact_child_nodes; end + + # def copy: (**params) -> HashNode + # + # source://prism//lib/prism/node.rb#7110 + sig { params(params: T.untyped).returns(HashNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7095 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#7123 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader elements: Array[Node] + # + # source://prism//lib/prism/node.rb#7076 + def elements; end + + # source://prism//lib/prism/node.rb#7137 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#7128 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#7073 + 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#7159 + 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#7169 + 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#7181 +class Prism::HashPatternNode < ::Prism::Node + # def initialize: (constant: Node?, elements: Array[Node], rest: Node?, opening_loc: Location?, closing_loc: Location?, location: Location) -> void + # + # @return [HashPatternNode] a new instance of HashPatternNode + # + # source://prism//lib/prism/node.rb#7198 + sig do + params( + constant: T.nilable(Node), + elements: T::Array[Node], + rest: T.nilable(Node), + opening_loc: T.nilable(Location), + closing_loc: T.nilable(Location), + location: Location + ).void + end + def initialize(constant, elements, rest, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#7208 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7213 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#7257 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#7195 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7227 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7218 + def compact_child_nodes; end + + # attr_reader constant: Node? + # + # source://prism//lib/prism/node.rb#7183 + def constant; end + + # def copy: (**params) -> HashPatternNode + # + # source://prism//lib/prism/node.rb#7232 + sig { params(params: T.untyped).returns(HashPatternNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7213 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#7247 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader elements: Array[Node] + # + # source://prism//lib/prism/node.rb#7186 + def elements; end + + # source://prism//lib/prism/node.rb#7261 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#7252 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#7192 + def opening_loc; end + + # attr_reader rest: Node? + # + # source://prism//lib/prism/node.rb#7189 + 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#7295 + 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#7305 + def type; end + 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#7317 +class Prism::IfNode < ::Prism::Node + # def initialize: (if_keyword_loc: Location?, predicate: Node, statements: StatementsNode?, consequent: Node?, end_keyword_loc: Location?, location: Location) -> void + # + # @return [IfNode] a new instance of IfNode + # + # source://prism//lib/prism/node.rb#7334 + sig do + params( + if_keyword_loc: T.nilable(Location), + predicate: Node, + statements: T.nilable(StatementsNode), + consequent: T.nilable(Node), + end_keyword_loc: T.nilable(Location), + location: Location + ).void + end + def initialize(if_keyword_loc, predicate, statements, consequent, end_keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#7344 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7353 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7367 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7358 + def compact_child_nodes; end + + # attr_reader consequent: Node? + # + # source://prism//lib/prism/node.rb#7328 + def consequent; end + + # def copy: (**params) -> IfNode + # + # source://prism//lib/prism/node.rb#7372 + sig { params(params: T.untyped).returns(IfNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7353 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#7387 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # def end_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#7397 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#7331 + def end_keyword_loc; end + + # def if_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#7392 + sig { returns(T.nilable(String)) } + def if_keyword; end + + # attr_reader if_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#7319 + def if_keyword_loc; end + + # source://prism//lib/prism/node.rb#7401 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader predicate: Node + # + # source://prism//lib/prism/node.rb#7322 + def predicate; end + + # source://prism//lib/prism/node.rb#7348 + def set_newline_flag(newline_marked); end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#7325 + 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#7436 + 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#7446 + def type; end + end +end + +# Represents an imaginary number literal. +# +# 1.0i +# ^^^^ +# +# source://prism//lib/prism/node.rb#7455 +class Prism::ImaginaryNode < ::Prism::Node + # def initialize: (numeric: Node, location: Location) -> void + # + # @return [ImaginaryNode] a new instance of ImaginaryNode + # + # source://prism//lib/prism/node.rb#7460 + sig { params(numeric: Node, location: Location).void } + def initialize(numeric, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#7466 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7471 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7481 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7476 + def compact_child_nodes; end + + # def copy: (**params) -> ImaginaryNode + # + # source://prism//lib/prism/node.rb#7486 + sig { params(params: T.untyped).returns(ImaginaryNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7471 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#7497 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#7501 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader numeric: Node + # + # source://prism//lib/prism/node.rb#7457 + 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#7522 + def type; end + + # Returns the value of the node as a Ruby Complex. + # + # source://prism//lib/prism/node_ext.rb#28 + 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#7532 + 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: } +# ^^^^ +# +# source://prism//lib/prism/node.rb#7545 +class Prism::ImplicitNode < ::Prism::Node + # def initialize: (value: Node, location: Location) -> void + # + # @return [ImplicitNode] a new instance of ImplicitNode + # + # source://prism//lib/prism/node.rb#7550 + sig { params(value: Node, location: Location).void } + def initialize(value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#7556 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7561 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7571 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7566 + def compact_child_nodes; end + + # def copy: (**params) -> ImplicitNode + # + # source://prism//lib/prism/node.rb#7576 + sig { params(params: T.untyped).returns(ImplicitNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7561 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#7587 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#7591 + 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#7612 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#7547 + 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#7622 + 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#7631 +class Prism::InNode < ::Prism::Node + # def initialize: (pattern: Node, statements: StatementsNode?, in_loc: Location, then_loc: Location?, location: Location) -> void + # + # @return [InNode] a new instance of InNode + # + # source://prism//lib/prism/node.rb#7645 + sig do + params( + pattern: Node, + statements: T.nilable(StatementsNode), + in_loc: Location, + then_loc: T.nilable(Location), + location: Location + ).void + end + def initialize(pattern, statements, in_loc, then_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#7654 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7659 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7672 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7664 + def compact_child_nodes; end + + # def copy: (**params) -> InNode + # + # source://prism//lib/prism/node.rb#7677 + sig { params(params: T.untyped).returns(InNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7659 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#7691 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # def in: () -> String + # + # source://prism//lib/prism/node.rb#7696 + sig { returns(String) } + def in; end + + # attr_reader in_loc: Location + # + # source://prism//lib/prism/node.rb#7639 + def in_loc; end + + # source://prism//lib/prism/node.rb#7705 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader pattern: Node + # + # source://prism//lib/prism/node.rb#7633 + def pattern; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#7636 + def statements; end + + # def then: () -> String? + # + # source://prism//lib/prism/node.rb#7701 + sig { returns(T.nilable(String)) } + def then; end + + # attr_reader then_loc: Location? + # + # source://prism//lib/prism/node.rb#7642 + 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#7734 + 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#7744 + 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#7753 +class Prism::IndexAndWriteNode < ::Prism::Node + # def initialize: (receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, flags: Integer, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [IndexAndWriteNode] a new instance of IndexAndWriteNode + # + # source://prism//lib/prism/node.rb#7782 + sig do + params( + receiver: T.nilable(Node), + call_operator_loc: T.nilable(Location), + opening_loc: Location, + arguments: T.nilable(ArgumentsNode), + closing_loc: Location, + block: T.nilable(Node), + flags: Integer, + operator_loc: Location, + value: Node, + location: Location + ).void + end + def initialize(receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, flags, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#7796 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#7764 + def arguments; end + + # attr_reader block: Node? + # + # source://prism//lib/prism/node.rb#7770 + def block; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#7845 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#7758 + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7801 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#7855 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#7767 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7816 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7806 + def compact_child_nodes; end + + # def copy: (**params) -> IndexAndWriteNode + # + # source://prism//lib/prism/node.rb#7821 + sig { params(params: T.untyped).returns(IndexAndWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7801 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#7840 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#7874 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#7850 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#7761 + def opening_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#7870 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#7776 + def operator_loc; end + + # attr_reader receiver: Node? + # + # source://prism//lib/prism/node.rb#7755 + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#7860 + 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#7919 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#7779 + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#7865 + sig { returns(T::Boolean) } + def variable_call?; end + + private + + # Returns the value of attribute flags. + # + # source://prism//lib/prism/node.rb#7773 + 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#7929 + 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#7938 +class Prism::IndexOperatorWriteNode < ::Prism::Node + # def initialize: (receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, flags: Integer, operator: Symbol, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [IndexOperatorWriteNode] a new instance of IndexOperatorWriteNode + # + # source://prism//lib/prism/node.rb#7970 + sig do + params( + receiver: T.nilable(Node), + call_operator_loc: T.nilable(Location), + opening_loc: Location, + arguments: T.nilable(ArgumentsNode), + closing_loc: Location, + block: T.nilable(Node), + flags: Integer, + operator: Symbol, + operator_loc: Location, + value: Node, + location: Location + ).void + end + def initialize(receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, flags, operator, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#7985 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#7949 + def arguments; end + + # attr_reader block: Node? + # + # source://prism//lib/prism/node.rb#7955 + def block; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#8035 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#7943 + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7990 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#8045 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#7952 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8005 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7995 + def compact_child_nodes; end + + # def copy: (**params) -> IndexOperatorWriteNode + # + # source://prism//lib/prism/node.rb#8010 + sig { params(params: T.untyped).returns(IndexOperatorWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7990 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#8030 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#8059 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#8040 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#7946 + def opening_loc; end + + # attr_reader operator: Symbol + # + # source://prism//lib/prism/node.rb#7961 + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#7964 + def operator_loc; end + + # attr_reader receiver: Node? + # + # source://prism//lib/prism/node.rb#7940 + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8050 + 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#8105 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#7967 + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8055 + sig { returns(T::Boolean) } + def variable_call?; end + + private + + # Returns the value of attribute flags. + # + # source://prism//lib/prism/node.rb#7958 + 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#8115 + 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#8124 +class Prism::IndexOrWriteNode < ::Prism::Node + # def initialize: (receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, flags: Integer, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [IndexOrWriteNode] a new instance of IndexOrWriteNode + # + # source://prism//lib/prism/node.rb#8153 + sig do + params( + receiver: T.nilable(Node), + call_operator_loc: T.nilable(Location), + opening_loc: Location, + arguments: T.nilable(ArgumentsNode), + closing_loc: Location, + block: T.nilable(Node), + flags: Integer, + operator_loc: Location, + value: Node, + location: Location + ).void + end + def initialize(receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, flags, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#8167 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#8135 + def arguments; end + + # attr_reader block: Node? + # + # source://prism//lib/prism/node.rb#8141 + def block; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#8216 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#8129 + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8172 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#8226 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#8138 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8187 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8177 + def compact_child_nodes; end + + # def copy: (**params) -> IndexOrWriteNode + # + # source://prism//lib/prism/node.rb#8192 + sig { params(params: T.untyped).returns(IndexOrWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8172 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#8211 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#8245 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#8221 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#8132 + def opening_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#8241 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#8147 + def operator_loc; end + + # attr_reader receiver: Node? + # + # source://prism//lib/prism/node.rb#8126 + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8231 + 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#8290 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#8150 + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8236 + sig { returns(T::Boolean) } + def variable_call?; end + + private + + # Returns the value of attribute flags. + # + # source://prism//lib/prism/node.rb#8144 + 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#8300 + 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#8309 +class Prism::InstanceVariableAndWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [InstanceVariableAndWriteNode] a new instance of InstanceVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#8323 + sig { params(name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location).void } + def initialize(name, name_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#8332 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8337 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8347 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8342 + def compact_child_nodes; end + + # def copy: (**params) -> InstanceVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#8352 + sig { params(params: T.untyped).returns(InstanceVariableAndWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8337 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#8366 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#8375 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#8311 + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#8314 + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#8371 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#8317 + 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#8399 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#8320 + 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#8409 + 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#8418 +class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void + # + # @return [InstanceVariableOperatorWriteNode] a new instance of InstanceVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#8435 + sig do + params( + name: Symbol, + name_loc: Location, + operator_loc: Location, + value: Node, + operator: Symbol, + location: Location + ).void + end + def initialize(name, name_loc, operator_loc, value, operator, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#8445 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8450 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8460 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8455 + def compact_child_nodes; end + + # def copy: (**params) -> InstanceVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#8465 + sig { params(params: T.untyped).returns(InstanceVariableOperatorWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8450 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#8480 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#8484 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#8420 + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#8423 + def name_loc; end + + # attr_reader operator: Symbol + # + # source://prism//lib/prism/node.rb#8432 + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#8426 + 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#8509 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#8429 + 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#8519 + 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#8528 +class Prism::InstanceVariableOrWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [InstanceVariableOrWriteNode] a new instance of InstanceVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#8542 + sig { params(name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location).void } + def initialize(name, name_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#8551 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8556 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8566 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8561 + def compact_child_nodes; end + + # def copy: (**params) -> InstanceVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#8571 + sig { params(params: T.untyped).returns(InstanceVariableOrWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8556 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#8585 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#8594 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#8530 + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#8533 + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#8590 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#8536 + 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#8618 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#8539 + 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#8628 + def type; end + end +end + +# Represents referencing an instance variable. +# +# @foo +# ^^^^ +# +# source://prism//lib/prism/node.rb#8637 +class Prism::InstanceVariableReadNode < ::Prism::Node + # def initialize: (name: Symbol, location: Location) -> void + # + # @return [InstanceVariableReadNode] a new instance of InstanceVariableReadNode + # + # source://prism//lib/prism/node.rb#8642 + sig { params(name: Symbol, location: Location).void } + def initialize(name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#8648 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8653 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8663 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8658 + def compact_child_nodes; end + + # def copy: (**params) -> InstanceVariableReadNode + # + # source://prism//lib/prism/node.rb#8668 + sig { params(params: T.untyped).returns(InstanceVariableReadNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8653 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#8679 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#8683 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#8639 + 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#8703 + 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#8713 + 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#8722 +class Prism::InstanceVariableTargetNode < ::Prism::Node + # def initialize: (name: Symbol, location: Location) -> void + # + # @return [InstanceVariableTargetNode] a new instance of InstanceVariableTargetNode + # + # source://prism//lib/prism/node.rb#8727 + sig { params(name: Symbol, location: Location).void } + def initialize(name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#8733 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8738 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8748 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8743 + def compact_child_nodes; end + + # def copy: (**params) -> InstanceVariableTargetNode + # + # source://prism//lib/prism/node.rb#8753 + sig { params(params: T.untyped).returns(InstanceVariableTargetNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8738 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#8764 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#8768 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#8724 + 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#8788 + 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#8798 + def type; end + end +end + +# Represents writing to an instance variable. +# +# @foo = 1 +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#8807 +class Prism::InstanceVariableWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> void + # + # @return [InstanceVariableWriteNode] a new instance of InstanceVariableWriteNode + # + # source://prism//lib/prism/node.rb#8821 + sig { params(name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location).void } + def initialize(name, name_loc, value, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#8830 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8835 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8845 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8840 + def compact_child_nodes; end + + # def copy: (**params) -> InstanceVariableWriteNode + # + # source://prism//lib/prism/node.rb#8850 + sig { params(params: T.untyped).returns(InstanceVariableWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8835 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#8864 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#8873 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#8809 + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#8812 + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#8869 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#8818 + 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#8897 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#8815 + 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#8907 + def type; end + end +end + +# source://prism//lib/prism/node.rb#16320 +module Prism::IntegerBaseFlags; end + +# 0b prefix +# +# source://prism//lib/prism/node.rb#16322 +Prism::IntegerBaseFlags::BINARY = T.let(T.unsafe(nil), Integer) + +# 0d or no prefix +# +# source://prism//lib/prism/node.rb#16328 +Prism::IntegerBaseFlags::DECIMAL = T.let(T.unsafe(nil), Integer) + +# 0x prefix +# +# source://prism//lib/prism/node.rb#16331 +Prism::IntegerBaseFlags::HEXADECIMAL = T.let(T.unsafe(nil), Integer) + +# 0o or 0 prefix +# +# source://prism//lib/prism/node.rb#16325 +Prism::IntegerBaseFlags::OCTAL = T.let(T.unsafe(nil), Integer) + +# Represents an integer number literal. +# +# 1 +# ^ +# +# source://prism//lib/prism/node.rb#8916 +class Prism::IntegerNode < ::Prism::Node + # def initialize: (flags: Integer, location: Location) -> void + # + # @return [IntegerNode] a new instance of IntegerNode + # + # source://prism//lib/prism/node.rb#8921 + sig { params(flags: Integer, location: Location).void } + def initialize(flags, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#8927 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def binary?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8963 + sig { returns(T::Boolean) } + def binary?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8932 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8942 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8937 + def compact_child_nodes; end + + # def copy: (**params) -> IntegerNode + # + # source://prism//lib/prism/node.rb#8947 + sig { params(params: T.untyped).returns(IntegerNode) } + def copy(**params); end + + # def decimal?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8973 + sig { returns(T::Boolean) } + def decimal?; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8932 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#8958 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # def hexadecimal?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8978 + sig { returns(T::Boolean) } + def hexadecimal?; end + + # source://prism//lib/prism/node.rb#8982 + def inspect(inspector = T.unsafe(nil)); end + + # def octal?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8968 + 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#9003 + def type; end + + # Returns the value of the node as a Ruby Integer. + # + # source://prism//lib/prism/node_ext.rb#35 + def value; end + + private + + # Returns the value of attribute flags. + # + # source://prism//lib/prism/node.rb#8918 + 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#9013 + 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#9024 +class Prism::InterpolatedMatchLastLineNode < ::Prism::Node + include ::Prism::RegularExpressionOptions + + # def initialize: (opening_loc: Location, parts: Array[Node], closing_loc: Location, flags: Integer, location: Location) -> void + # + # @return [InterpolatedMatchLastLineNode] a new instance of InterpolatedMatchLastLineNode + # + # source://prism//lib/prism/node.rb#9038 + sig do + params( + opening_loc: Location, + parts: T::Array[Node], + closing_loc: Location, + flags: Integer, + location: Location + ).void + end + def initialize(opening_loc, parts, closing_loc, flags, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#9047 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def ascii_8bit?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9126 + sig { returns(T::Boolean) } + def ascii_8bit?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9057 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#9096 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#9032 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9067 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9062 + def compact_child_nodes; end + + # def copy: (**params) -> InterpolatedMatchLastLineNode + # + # source://prism//lib/prism/node.rb#9072 + sig { params(params: T.untyped).returns(InterpolatedMatchLastLineNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9057 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#9086 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # def euc_jp?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9121 + sig { returns(T::Boolean) } + def euc_jp?; end + + # def extended?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9106 + sig { returns(T::Boolean) } + def extended?; end + + # def ignore_case?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9101 + sig { returns(T::Boolean) } + def ignore_case?; end + + # source://prism//lib/prism/node.rb#9140 + def inspect(inspector = T.unsafe(nil)); end + + # def multi_line?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9111 + sig { returns(T::Boolean) } + def multi_line?; end + + # def once?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9116 + sig { returns(T::Boolean) } + def once?; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#9091 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#9026 + def opening_loc; end + + # attr_reader parts: Array[Node] + # + # source://prism//lib/prism/node.rb#9029 + def parts; end + + # source://prism//lib/prism/node.rb#9051 + 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#9164 + def type; end + + # def utf_8?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9136 + sig { returns(T::Boolean) } + def utf_8?; end + + # def windows_31j?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9131 + sig { returns(T::Boolean) } + def windows_31j?; end + + private + + # Returns the value of attribute flags. + # + # source://prism//lib/prism/node.rb#9035 + 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#9174 + def type; end + end +end + +# Represents a regular expression literal that contains interpolation. +# +# /foo #{bar} baz/ +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9183 +class Prism::InterpolatedRegularExpressionNode < ::Prism::Node + include ::Prism::RegularExpressionOptions + + # def initialize: (opening_loc: Location, parts: Array[Node], closing_loc: Location, flags: Integer, location: Location) -> void + # + # @return [InterpolatedRegularExpressionNode] a new instance of InterpolatedRegularExpressionNode + # + # source://prism//lib/prism/node.rb#9197 + sig do + params( + opening_loc: Location, + parts: T::Array[Node], + closing_loc: Location, + flags: Integer, + location: Location + ).void + end + def initialize(opening_loc, parts, closing_loc, flags, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#9206 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def ascii_8bit?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9285 + sig { returns(T::Boolean) } + def ascii_8bit?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9216 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#9255 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#9191 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9226 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9221 + def compact_child_nodes; end + + # def copy: (**params) -> InterpolatedRegularExpressionNode + # + # source://prism//lib/prism/node.rb#9231 + sig { params(params: T.untyped).returns(InterpolatedRegularExpressionNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9216 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#9245 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # def euc_jp?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9280 + sig { returns(T::Boolean) } + def euc_jp?; end + + # def extended?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9265 + sig { returns(T::Boolean) } + def extended?; end + + # def ignore_case?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9260 + sig { returns(T::Boolean) } + def ignore_case?; end + + # source://prism//lib/prism/node.rb#9299 + def inspect(inspector = T.unsafe(nil)); end + + # def multi_line?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9270 + sig { returns(T::Boolean) } + def multi_line?; end + + # def once?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9275 + sig { returns(T::Boolean) } + def once?; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#9250 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#9185 + def opening_loc; end + + # attr_reader parts: Array[Node] + # + # source://prism//lib/prism/node.rb#9188 + def parts; end + + # source://prism//lib/prism/node.rb#9210 + 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#9323 + def type; end + + # def utf_8?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9295 + sig { returns(T::Boolean) } + def utf_8?; end + + # def windows_31j?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9290 + sig { returns(T::Boolean) } + def windows_31j?; end + + private + + # Returns the value of attribute flags. + # + # source://prism//lib/prism/node.rb#9194 + 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#9333 + def type; end + end +end + +# Represents a string literal that contains interpolation. +# +# "foo #{bar} baz" +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9342 +class Prism::InterpolatedStringNode < ::Prism::Node + # def initialize: (opening_loc: Location?, parts: Array[Node], closing_loc: Location?, location: Location) -> void + # + # @return [InterpolatedStringNode] a new instance of InterpolatedStringNode + # + # source://prism//lib/prism/node.rb#9353 + sig do + params( + opening_loc: T.nilable(Location), + parts: T::Array[Node], + closing_loc: T.nilable(Location), + location: Location + ).void + end + def initialize(opening_loc, parts, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#9361 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9371 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#9409 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#9350 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9381 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9376 + def compact_child_nodes; end + + # def copy: (**params) -> InterpolatedStringNode + # + # source://prism//lib/prism/node.rb#9386 + sig { params(params: T.untyped).returns(InterpolatedStringNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9371 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#9399 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#9413 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#9404 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#9344 + def opening_loc; end + + # attr_reader parts: Array[Node] + # + # source://prism//lib/prism/node.rb#9347 + def parts; end + + # source://prism//lib/prism/node.rb#9365 + 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#9435 + 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#9445 + def type; end + end +end + +# Represents a symbol literal that contains interpolation. +# +# :"foo #{bar} baz" +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9454 +class Prism::InterpolatedSymbolNode < ::Prism::Node + # def initialize: (opening_loc: Location?, parts: Array[Node], closing_loc: Location?, location: Location) -> void + # + # @return [InterpolatedSymbolNode] a new instance of InterpolatedSymbolNode + # + # source://prism//lib/prism/node.rb#9465 + sig do + params( + opening_loc: T.nilable(Location), + parts: T::Array[Node], + closing_loc: T.nilable(Location), + location: Location + ).void + end + def initialize(opening_loc, parts, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#9473 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9483 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#9521 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#9462 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9493 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9488 + def compact_child_nodes; end + + # def copy: (**params) -> InterpolatedSymbolNode + # + # source://prism//lib/prism/node.rb#9498 + sig { params(params: T.untyped).returns(InterpolatedSymbolNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9483 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#9511 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#9525 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#9516 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#9456 + def opening_loc; end + + # attr_reader parts: Array[Node] + # + # source://prism//lib/prism/node.rb#9459 + def parts; end + + # source://prism//lib/prism/node.rb#9477 + 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#9547 + 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#9557 + def type; end + end +end + +# Represents an xstring literal that contains interpolation. +# +# `foo #{bar} baz` +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9566 +class Prism::InterpolatedXStringNode < ::Prism::Node + # def initialize: (opening_loc: Location, parts: Array[Node], closing_loc: Location, location: Location) -> void + # + # @return [InterpolatedXStringNode] a new instance of InterpolatedXStringNode + # + # source://prism//lib/prism/node.rb#9577 + sig { params(opening_loc: Location, parts: T::Array[Node], closing_loc: Location, location: Location).void } + def initialize(opening_loc, parts, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#9585 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9595 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#9633 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#9574 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9605 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9600 + def compact_child_nodes; end + + # def copy: (**params) -> InterpolatedXStringNode + # + # source://prism//lib/prism/node.rb#9610 + sig { params(params: T.untyped).returns(InterpolatedXStringNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9595 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#9623 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#9637 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#9628 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#9568 + def opening_loc; end + + # attr_reader parts: Array[Node] + # + # source://prism//lib/prism/node.rb#9571 + def parts; end + + # source://prism//lib/prism/node.rb#9589 + 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#9659 + 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#9669 + def type; end + end +end + +# Represents a hash literal without opening and closing braces. +# +# foo(a: b) +# ^^^^ +# +# source://prism//lib/prism/node.rb#9678 +class Prism::KeywordHashNode < ::Prism::Node + # def initialize: (elements: Array[Node], location: Location) -> void + # + # @return [KeywordHashNode] a new instance of KeywordHashNode + # + # source://prism//lib/prism/node.rb#9683 + sig { params(elements: T::Array[Node], location: Location).void } + def initialize(elements, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#9689 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9694 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9704 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9699 + def compact_child_nodes; end + + # def copy: (**params) -> KeywordHashNode + # + # source://prism//lib/prism/node.rb#9709 + sig { params(params: T.untyped).returns(KeywordHashNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9694 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#9720 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader elements: Array[Node] + # + # source://prism//lib/prism/node.rb#9680 + def elements; end + + # source://prism//lib/prism/node.rb#9724 + 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#9744 + 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#9754 + def type; end + end +end + +# Represents a keyword parameter to a method, block, or lambda definition. +# +# def a(b:) +# ^^ +# end +# +# def a(b: 1) +# ^^^^ +# end +# +# source://prism//lib/prism/node.rb#9768 +class Prism::KeywordParameterNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, value: Node?, location: Location) -> void + # + # @return [KeywordParameterNode] a new instance of KeywordParameterNode + # + # source://prism//lib/prism/node.rb#9779 + sig { params(name: Symbol, name_loc: Location, value: T.nilable(Node), location: Location).void } + def initialize(name, name_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#9787 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9792 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9804 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9797 + def compact_child_nodes; end + + # def copy: (**params) -> KeywordParameterNode + # + # source://prism//lib/prism/node.rb#9809 + sig { params(params: T.untyped).returns(KeywordParameterNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9792 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#9822 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#9826 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#9770 + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#9773 + def name_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#9853 + def type; end + + # attr_reader value: Node? + # + # source://prism//lib/prism/node.rb#9776 + 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#9863 + def type; end + end +end + +# Represents a keyword rest parameter to a method, block, or lambda definition. +# +# def a(**b) +# ^^^ +# end +# +# source://prism//lib/prism/node.rb#9873 +class Prism::KeywordRestParameterNode < ::Prism::Node + # def initialize: (name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location) -> void + # + # @return [KeywordRestParameterNode] a new instance of KeywordRestParameterNode + # + # source://prism//lib/prism/node.rb#9884 + sig do + params( + name: T.nilable(Symbol), + name_loc: T.nilable(Location), + operator_loc: Location, + location: Location + ).void + end + def initialize(name, name_loc, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#9892 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9897 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9907 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9902 + def compact_child_nodes; end + + # def copy: (**params) -> KeywordRestParameterNode + # + # source://prism//lib/prism/node.rb#9912 + sig { params(params: T.untyped).returns(KeywordRestParameterNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9897 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#9925 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#9934 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol? + # + # source://prism//lib/prism/node.rb#9875 + def name; end + + # attr_reader name_loc: Location? + # + # source://prism//lib/prism/node.rb#9878 + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#9930 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#9881 + 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#9960 + 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#9970 + def type; end + end +end + +# Represents using a lambda literal (not the lambda method call). +# +# ->(value) { value * 2 } +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9979 +class Prism::LambdaNode < ::Prism::Node + # def initialize: (locals: Array[Symbol], operator_loc: Location, opening_loc: Location, closing_loc: Location, parameters: BlockParametersNode?, body: Node?, location: Location) -> void + # + # @return [LambdaNode] a new instance of LambdaNode + # + # source://prism//lib/prism/node.rb#9999 + sig do + params( + locals: T::Array[Symbol], + operator_loc: Location, + opening_loc: Location, + closing_loc: Location, + parameters: T.nilable(BlockParametersNode), + body: T.nilable(Node), + location: Location + ).void + end + def initialize(locals, operator_loc, opening_loc, closing_loc, parameters, body, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#10010 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # attr_reader body: Node? + # + # source://prism//lib/prism/node.rb#9996 + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10015 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#10064 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#9990 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10028 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10020 + def compact_child_nodes; end + + # def copy: (**params) -> LambdaNode + # + # source://prism//lib/prism/node.rb#10033 + sig { params(params: T.untyped).returns(LambdaNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10015 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#10049 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#10068 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#9981 + def locals; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#10059 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#9987 + def opening_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#10054 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#9984 + def operator_loc; end + + # attr_reader parameters: BlockParametersNode? + # + # source://prism//lib/prism/node.rb#9993 + 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#10103 + 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#10113 + 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#11 +class Prism::LexCompat + # @return [LexCompat] a new instance of LexCompat + # + # source://prism//lib/prism/lex_compat.rb#593 + def initialize(source, filepath = T.unsafe(nil)); end + + # Returns the value of attribute filepath. + # + # source://prism//lib/prism/lex_compat.rb#591 + def filepath; end + + # source://prism//lib/prism/lex_compat.rb#598 + def result; end + + # Returns the value of attribute source. + # + # source://prism//lib/prism/lex_compat.rb#591 + 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#206 +class Prism::LexCompat::EndContentToken < ::Prism::LexCompat::Token + # source://prism//lib/prism/lex_compat.rb#207 + 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#267 +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#579 + 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#291 +class Prism::LexCompat::Heredoc::DashHeredoc + # @return [DashHeredoc] a new instance of DashHeredoc + # + # source://prism//lib/prism/lex_compat.rb#294 + def initialize(split); end + + # source://prism//lib/prism/lex_compat.rb#299 + def <<(token); end + + # Returns the value of attribute split. + # + # source://prism//lib/prism/lex_compat.rb#292 + def split; end + + # source://prism//lib/prism/lex_compat.rb#303 + def to_a; end + + # Returns the value of attribute tokens. + # + # source://prism//lib/prism/lex_compat.rb#292 + 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#350 +class Prism::LexCompat::Heredoc::DedentingHeredoc + # @return [DedentingHeredoc] a new instance of DedentingHeredoc + # + # source://prism//lib/prism/lex_compat.rb#355 + 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#366 + def <<(token); end + + # Returns the value of attribute dedent. + # + # source://prism//lib/prism/lex_compat.rb#353 + def dedent; end + + # Returns the value of attribute dedent_next. + # + # source://prism//lib/prism/lex_compat.rb#353 + def dedent_next; end + + # Returns the value of attribute embexpr_balance. + # + # source://prism//lib/prism/lex_compat.rb#353 + def embexpr_balance; end + + # source://prism//lib/prism/lex_compat.rb#403 + def to_a; end + + # Returns the value of attribute tokens. + # + # source://prism//lib/prism/lex_compat.rb#353 + def tokens; end +end + +# source://prism//lib/prism/lex_compat.rb#351 +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#272 +class Prism::LexCompat::Heredoc::PlainHeredoc + # @return [PlainHeredoc] a new instance of PlainHeredoc + # + # source://prism//lib/prism/lex_compat.rb#275 + def initialize; end + + # source://prism//lib/prism/lex_compat.rb#279 + def <<(token); end + + # source://prism//lib/prism/lex_compat.rb#283 + def to_a; end + + # Returns the value of attribute tokens. + # + # source://prism//lib/prism/lex_compat.rb#273 + 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#224 +class Prism::LexCompat::IdentToken < ::Prism::LexCompat::Token + # source://prism//lib/prism/lex_compat.rb#225 + 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#214 +class Prism::LexCompat::IgnoreStateToken < ::Prism::LexCompat::Token + # source://prism//lib/prism/lex_compat.rb#215 + 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#235 +class Prism::LexCompat::IgnoredNewlineToken < ::Prism::LexCompat::Token + # source://prism//lib/prism/lex_compat.rb#236 + 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#255 +class Prism::LexCompat::ParamToken < ::Prism::LexCompat::Token + # source://prism//lib/prism/lex_compat.rb#256 + 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#15 +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#186 +class Prism::LexCompat::Token < ::SimpleDelegator + # source://prism//lib/prism/lex_compat.rb#191 + def event; end + + # source://prism//lib/prism/lex_compat.rb#187 + def location; end + + # source://prism//lib/prism/lex_compat.rb#199 + def state; end + + # source://prism//lib/prism/lex_compat.rb#195 + 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#834 +class Prism::LexRipper + # @return [LexRipper] a new instance of LexRipper + # + # source://prism//lib/prism/lex_compat.rb#837 + def initialize(source); end + + # source://prism//lib/prism/lex_compat.rb#841 + def result; end + + # Returns the value of attribute source. + # + # source://prism//lib/prism/lex_compat.rb#835 + def source; end +end + +# Represents the use of the `&&=` operator for assignment to a local variable. +# +# target &&= value +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#10122 +class Prism::LocalVariableAndWriteNode < ::Prism::Node + # def initialize: (name_loc: Location, operator_loc: Location, value: Node, name: Symbol, depth: Integer, location: Location) -> void + # + # @return [LocalVariableAndWriteNode] a new instance of LocalVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#10139 + sig do + params( + name_loc: Location, + operator_loc: Location, + value: Node, + name: Symbol, + depth: Integer, + location: Location + ).void + end + def initialize(name_loc, operator_loc, value, name, depth, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#10149 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10154 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10164 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10159 + def compact_child_nodes; end + + # def copy: (**params) -> LocalVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#10169 + sig { params(params: T.untyped).returns(LocalVariableAndWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10154 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#10184 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://prism//lib/prism/node.rb#10136 + def depth; end + + # source://prism//lib/prism/node.rb#10193 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#10133 + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#10124 + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#10189 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#10127 + 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#10218 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#10130 + 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#10228 + 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#10237 +class Prism::LocalVariableOperatorWriteNode < ::Prism::Node + # def initialize: (name_loc: Location, operator_loc: Location, value: Node, name: Symbol, operator: Symbol, depth: Integer, location: Location) -> void + # + # @return [LocalVariableOperatorWriteNode] a new instance of LocalVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#10257 + sig do + params( + name_loc: Location, + operator_loc: Location, + value: Node, + name: Symbol, + operator: Symbol, + depth: Integer, + location: Location + ).void + end + def initialize(name_loc, operator_loc, value, name, operator, depth, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#10268 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10273 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10283 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10278 + def compact_child_nodes; end + + # def copy: (**params) -> LocalVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#10288 + sig { params(params: T.untyped).returns(LocalVariableOperatorWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10273 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#10304 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://prism//lib/prism/node.rb#10254 + def depth; end + + # source://prism//lib/prism/node.rb#10308 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#10248 + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#10239 + def name_loc; end + + # attr_reader operator: Symbol + # + # source://prism//lib/prism/node.rb#10251 + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#10242 + 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#10334 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#10245 + 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#10344 + 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#10353 +class Prism::LocalVariableOrWriteNode < ::Prism::Node + # def initialize: (name_loc: Location, operator_loc: Location, value: Node, name: Symbol, depth: Integer, location: Location) -> void + # + # @return [LocalVariableOrWriteNode] a new instance of LocalVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#10370 + sig do + params( + name_loc: Location, + operator_loc: Location, + value: Node, + name: Symbol, + depth: Integer, + location: Location + ).void + end + def initialize(name_loc, operator_loc, value, name, depth, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#10380 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10385 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10395 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10390 + def compact_child_nodes; end + + # def copy: (**params) -> LocalVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#10400 + sig { params(params: T.untyped).returns(LocalVariableOrWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10385 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#10415 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://prism//lib/prism/node.rb#10367 + def depth; end + + # source://prism//lib/prism/node.rb#10424 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#10364 + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#10355 + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#10420 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#10358 + 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#10449 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#10361 + 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#10459 + 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#10470 +class Prism::LocalVariableReadNode < ::Prism::Node + # def initialize: (name: Symbol, depth: Integer, location: Location) -> void + # + # @return [LocalVariableReadNode] a new instance of LocalVariableReadNode + # + # source://prism//lib/prism/node.rb#10478 + sig { params(name: Symbol, depth: Integer, location: Location).void } + def initialize(name, depth, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#10485 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10490 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10500 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10495 + def compact_child_nodes; end + + # def copy: (**params) -> LocalVariableReadNode + # + # source://prism//lib/prism/node.rb#10505 + sig { params(params: T.untyped).returns(LocalVariableReadNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10490 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#10517 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://prism//lib/prism/node.rb#10475 + def depth; end + + # source://prism//lib/prism/node.rb#10521 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#10472 + 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#10542 + 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#10552 + 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#10561 +class Prism::LocalVariableTargetNode < ::Prism::Node + # def initialize: (name: Symbol, depth: Integer, location: Location) -> void + # + # @return [LocalVariableTargetNode] a new instance of LocalVariableTargetNode + # + # source://prism//lib/prism/node.rb#10569 + sig { params(name: Symbol, depth: Integer, location: Location).void } + def initialize(name, depth, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#10576 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10581 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10591 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10586 + def compact_child_nodes; end + + # def copy: (**params) -> LocalVariableTargetNode + # + # source://prism//lib/prism/node.rb#10596 + sig { params(params: T.untyped).returns(LocalVariableTargetNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10581 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#10608 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://prism//lib/prism/node.rb#10566 + def depth; end + + # source://prism//lib/prism/node.rb#10612 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#10563 + 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#10633 + 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#10643 + def type; end + end +end + +# Represents writing to a local variable. +# +# foo = 1 +# ^^^^^^^ +# +# source://prism//lib/prism/node.rb#10652 +class Prism::LocalVariableWriteNode < ::Prism::Node + # def initialize: (name: Symbol, depth: Integer, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> void + # + # @return [LocalVariableWriteNode] a new instance of LocalVariableWriteNode + # + # source://prism//lib/prism/node.rb#10669 + sig do + params( + name: Symbol, + depth: Integer, + name_loc: Location, + value: Node, + operator_loc: Location, + location: Location + ).void + end + def initialize(name, depth, name_loc, value, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#10679 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10684 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10694 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10689 + def compact_child_nodes; end + + # def copy: (**params) -> LocalVariableWriteNode + # + # source://prism//lib/prism/node.rb#10699 + sig { params(params: T.untyped).returns(LocalVariableWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10684 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#10714 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://prism//lib/prism/node.rb#10657 + def depth; end + + # source://prism//lib/prism/node.rb#10723 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#10654 + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#10660 + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#10719 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#10666 + 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#10748 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#10663 + 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#10758 + def type; end + end +end + +# This represents a location in the source. +# +# source://prism//lib/prism/parse_result.rb#57 +class Prism::Location + # @return [Location] a new instance of Location + # + # source://prism//lib/prism/parse_result.rb#72 + sig { params(source: Source, start_offset: Integer, length: Integer).void } + def initialize(source, start_offset, length); end + + # source://prism//lib/prism/parse_result.rb#139 + def ==(other); end + + # The list of comments attached to this location + # + # source://prism//lib/prism/parse_result.rb#70 + sig { returns(T::Array[Comment]) } + def comments; end + + # Create a new location object with the given options. + # + # source://prism//lib/prism/parse_result.rb#80 + sig { params(options: T.untyped).returns(Location) } + def copy(**options); end + + # source://prism//lib/prism/parse_result.rb#131 + def deconstruct_keys(keys); end + + # The column number in bytes where this location ends from the start of the + # line. + # + # source://prism//lib/prism/parse_result.rb#127 + sig { returns(Integer) } + def end_column; end + + # The line number where this location ends. + # + # source://prism//lib/prism/parse_result.rb#115 + 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#99 + sig { returns(Integer) } + def end_offset; end + + # Returns a string representation of this location. + # + # source://prism//lib/prism/parse_result.rb#89 + 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#148 + def join(other); end + + # The length of this location in bytes. + # + # source://prism//lib/prism/parse_result.rb#67 + def length; end + + # source://prism//lib/prism/parse_result.rb#135 + def pretty_print(q); end + + # The source code that this location represents. + # + # source://prism//lib/prism/parse_result.rb#94 + sig { returns(String) } + def slice; end + + # The column number in bytes where this location starts from the start of + # the line. + # + # source://prism//lib/prism/parse_result.rb#121 + sig { returns(Integer) } + def start_column; end + + # The line number where this location starts. + # + # source://prism//lib/prism/parse_result.rb#104 + 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#109 + 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#64 + sig { returns(Integer) } + def start_offset; end + + protected + + # Returns the value of attribute source. + # + # source://prism//lib/prism/parse_result.rb#60 + def source; end + + class << self + # source://prism//lib/prism/parse_result.rb#155 + def null; end + end +end + +# source://prism//lib/prism/node.rb#16334 +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#16336 +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#186 +class Prism::MagicComment + # @return [MagicComment] a new instance of MagicComment + # + # source://prism//lib/prism/parse_result.rb#189 + def initialize(key_loc, value_loc); end + + # source://prism//lib/prism/parse_result.rb#202 + def deconstruct_keys(keys); end + + # source://prism//lib/prism/parse_result.rb#206 + def inspect; end + + # source://prism//lib/prism/parse_result.rb#194 + def key; end + + # Returns the value of attribute key_loc. + # + # source://prism//lib/prism/parse_result.rb#187 + def key_loc; end + + # source://prism//lib/prism/parse_result.rb#198 + def value; end + + # Returns the value of attribute value_loc. + # + # source://prism//lib/prism/parse_result.rb#187 + 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#10769 +class Prism::MatchLastLineNode < ::Prism::Node + include ::Prism::RegularExpressionOptions + + # def initialize: (opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, flags: Integer, location: Location) -> void + # + # @return [MatchLastLineNode] a new instance of MatchLastLineNode + # + # source://prism//lib/prism/node.rb#10786 + sig do + params( + opening_loc: Location, + content_loc: Location, + closing_loc: Location, + unescaped: String, + flags: Integer, + location: Location + ).void + end + def initialize(opening_loc, content_loc, closing_loc, unescaped, flags, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#10796 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def ascii_8bit?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10876 + sig { returns(T::Boolean) } + def ascii_8bit?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10801 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#10846 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#10777 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10811 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10806 + def compact_child_nodes; end + + # def content: () -> String + # + # source://prism//lib/prism/node.rb#10841 + sig { returns(String) } + def content; end + + # attr_reader content_loc: Location + # + # source://prism//lib/prism/node.rb#10774 + def content_loc; end + + # def copy: (**params) -> MatchLastLineNode + # + # source://prism//lib/prism/node.rb#10816 + sig { params(params: T.untyped).returns(MatchLastLineNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10801 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#10831 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # def euc_jp?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10871 + sig { returns(T::Boolean) } + def euc_jp?; end + + # def extended?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10856 + sig { returns(T::Boolean) } + def extended?; end + + # def ignore_case?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10851 + sig { returns(T::Boolean) } + def ignore_case?; end + + # source://prism//lib/prism/node.rb#10890 + def inspect(inspector = T.unsafe(nil)); end + + # def multi_line?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10861 + sig { returns(T::Boolean) } + def multi_line?; end + + # def once?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10866 + sig { returns(T::Boolean) } + def once?; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#10836 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#10771 + 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#10915 + def type; end + + # attr_reader unescaped: String + # + # source://prism//lib/prism/node.rb#10780 + def unescaped; end + + # def utf_8?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10886 + sig { returns(T::Boolean) } + def utf_8?; end + + # def windows_31j?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10881 + sig { returns(T::Boolean) } + def windows_31j?; end + + private + + # Returns the value of attribute flags. + # + # source://prism//lib/prism/node.rb#10783 + 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#10925 + def type; end + end +end + +# Represents the use of the modifier `in` operator. +# +# foo in bar +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#10934 +class Prism::MatchPredicateNode < ::Prism::Node + # def initialize: (value: Node, pattern: Node, operator_loc: Location, location: Location) -> void + # + # @return [MatchPredicateNode] a new instance of MatchPredicateNode + # + # source://prism//lib/prism/node.rb#10945 + sig { params(value: Node, pattern: Node, operator_loc: Location, location: Location).void } + def initialize(value, pattern, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#10953 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10958 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10968 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10963 + def compact_child_nodes; end + + # def copy: (**params) -> MatchPredicateNode + # + # source://prism//lib/prism/node.rb#10973 + sig { params(params: T.untyped).returns(MatchPredicateNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10958 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#10986 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#10995 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#10991 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#10942 + def operator_loc; end + + # attr_reader pattern: Node + # + # source://prism//lib/prism/node.rb#10939 + 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#11019 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#10936 + 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#11029 + def type; end + end +end + +# Represents the use of the `=>` operator. +# +# foo => bar +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#11038 +class Prism::MatchRequiredNode < ::Prism::Node + # def initialize: (value: Node, pattern: Node, operator_loc: Location, location: Location) -> void + # + # @return [MatchRequiredNode] a new instance of MatchRequiredNode + # + # source://prism//lib/prism/node.rb#11049 + sig { params(value: Node, pattern: Node, operator_loc: Location, location: Location).void } + def initialize(value, pattern, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#11057 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11062 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11072 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11067 + def compact_child_nodes; end + + # def copy: (**params) -> MatchRequiredNode + # + # source://prism//lib/prism/node.rb#11077 + sig { params(params: T.untyped).returns(MatchRequiredNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11062 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#11090 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#11099 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#11095 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#11046 + def operator_loc; end + + # attr_reader pattern: Node + # + # source://prism//lib/prism/node.rb#11043 + 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#11123 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#11040 + 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#11133 + 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#11143 +class Prism::MatchWriteNode < ::Prism::Node + # def initialize: (call: CallNode, locals: Array[Symbol], location: Location) -> void + # + # @return [MatchWriteNode] a new instance of MatchWriteNode + # + # source://prism//lib/prism/node.rb#11151 + sig { params(call: CallNode, locals: T::Array[Symbol], location: Location).void } + def initialize(call, locals, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#11158 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # attr_reader call: CallNode + # + # source://prism//lib/prism/node.rb#11145 + def call; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11163 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11173 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11168 + def compact_child_nodes; end + + # def copy: (**params) -> MatchWriteNode + # + # source://prism//lib/prism/node.rb#11178 + sig { params(params: T.untyped).returns(MatchWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11163 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#11190 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#11194 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#11148 + def locals; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case 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#11216 + 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#11226 + 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#11233 +class Prism::MissingNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [MissingNode] a new instance of MissingNode + # + # source://prism//lib/prism/node.rb#11235 + sig { params(location: Location).void } + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#11240 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11245 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11255 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11250 + def compact_child_nodes; end + + # def copy: (**params) -> MissingNode + # + # source://prism//lib/prism/node.rb#11260 + sig { params(params: T.untyped).returns(MissingNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11245 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#11270 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#11274 + 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#11293 + 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#11303 + def type; end + end +end + +# Represents a module declaration involving the `module` keyword. +# +# module Foo end +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#11312 +class Prism::ModuleNode < ::Prism::Node + # def initialize: (locals: Array[Symbol], module_keyword_loc: Location, constant_path: Node, body: Node?, end_keyword_loc: Location, name: Symbol, location: Location) -> void + # + # @return [ModuleNode] a new instance of ModuleNode + # + # source://prism//lib/prism/node.rb#11332 + sig do + params( + locals: T::Array[Symbol], + module_keyword_loc: Location, + constant_path: Node, + body: T.nilable(Node), + end_keyword_loc: Location, + name: Symbol, + location: Location + ).void + end + def initialize(locals, module_keyword_loc, constant_path, body, end_keyword_loc, name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#11343 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # attr_reader body: Node? + # + # source://prism//lib/prism/node.rb#11323 + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11348 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11361 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11353 + def compact_child_nodes; end + + # attr_reader constant_path: Node + # + # source://prism//lib/prism/node.rb#11320 + def constant_path; end + + # def copy: (**params) -> ModuleNode + # + # source://prism//lib/prism/node.rb#11366 + sig { params(params: T.untyped).returns(ModuleNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11348 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#11382 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#11392 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#11326 + def end_keyword_loc; end + + # source://prism//lib/prism/node.rb#11396 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#11314 + def locals; end + + # def module_keyword: () -> String + # + # source://prism//lib/prism/node.rb#11387 + sig { returns(String) } + def module_keyword; end + + # attr_reader module_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#11317 + def module_keyword_loc; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#11329 + 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#11427 + 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#11437 + def type; end + end +end + +# Represents a multi-target expression. +# +# a, (b, c) = 1, 2, 3 +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#11446 +class Prism::MultiTargetNode < ::Prism::Node + # def initialize: (lefts: Array[Node], rest: Node?, rights: Array[Node], lparen_loc: Location?, rparen_loc: Location?, location: Location) -> void + # + # @return [MultiTargetNode] a new instance of MultiTargetNode + # + # source://prism//lib/prism/node.rb#11463 + sig do + params( + lefts: T::Array[Node], + rest: T.nilable(Node), + rights: T::Array[Node], + lparen_loc: T.nilable(Location), + rparen_loc: T.nilable(Location), + location: Location + ).void + end + def initialize(lefts, rest, rights, lparen_loc, rparen_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#11473 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11478 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11492 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11483 + def compact_child_nodes; end + + # def copy: (**params) -> MultiTargetNode + # + # source://prism//lib/prism/node.rb#11497 + sig { params(params: T.untyped).returns(MultiTargetNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11478 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#11512 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#11526 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader lefts: Array[Node] + # + # source://prism//lib/prism/node.rb#11448 + def lefts; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#11517 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://prism//lib/prism/node.rb#11457 + def lparen_loc; end + + # attr_reader rest: Node? + # + # source://prism//lib/prism/node.rb#11451 + def rest; end + + # attr_reader rights: Array[Node] + # + # source://prism//lib/prism/node.rb#11454 + def rights; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#11522 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://prism//lib/prism/node.rb#11460 + 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#11555 + 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#11565 + 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#11574 +class Prism::MultiWriteNode < ::Prism::Node + # def initialize: (lefts: Array[Node], rest: Node?, rights: Array[Node], lparen_loc: Location?, rparen_loc: Location?, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [MultiWriteNode] a new instance of MultiWriteNode + # + # source://prism//lib/prism/node.rb#11597 + sig do + params( + lefts: T::Array[Node], + rest: T.nilable(Node), + rights: T::Array[Node], + lparen_loc: T.nilable(Location), + rparen_loc: T.nilable(Location), + operator_loc: Location, + value: Node, + location: Location + ).void + end + def initialize(lefts, rest, rights, lparen_loc, rparen_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#11609 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11614 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11629 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11619 + def compact_child_nodes; end + + # def copy: (**params) -> MultiWriteNode + # + # source://prism//lib/prism/node.rb#11634 + sig { params(params: T.untyped).returns(MultiWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11614 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#11651 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#11670 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader lefts: Array[Node] + # + # source://prism//lib/prism/node.rb#11576 + def lefts; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#11656 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://prism//lib/prism/node.rb#11585 + def lparen_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#11666 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#11591 + def operator_loc; end + + # attr_reader rest: Node? + # + # source://prism//lib/prism/node.rb#11579 + def rest; end + + # attr_reader rights: Array[Node] + # + # source://prism//lib/prism/node.rb#11582 + def rights; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#11661 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://prism//lib/prism/node.rb#11588 + 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#11702 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#11594 + 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#11712 + 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 CapturePatternNode node + # + # source://prism//lib/prism/mutation_compiler.rb#119 + def visit_capture_pattern_node(node); end + + # Copy a CaseNode node + # + # source://prism//lib/prism/mutation_compiler.rb#124 + def visit_case_node(node); end + + # Copy a ClassNode node + # + # source://prism//lib/prism/mutation_compiler.rb#129 + def visit_class_node(node); end + + # Copy a ClassVariableAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#134 + def visit_class_variable_and_write_node(node); end + + # Copy a ClassVariableOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#139 + def visit_class_variable_operator_write_node(node); end + + # Copy a ClassVariableOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#144 + def visit_class_variable_or_write_node(node); end + + # Copy a ClassVariableReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#149 + def visit_class_variable_read_node(node); end + + # Copy a ClassVariableTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#154 + def visit_class_variable_target_node(node); end + + # Copy a ClassVariableWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#159 + def visit_class_variable_write_node(node); end + + # Copy a ConstantAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#164 + def visit_constant_and_write_node(node); end + + # Copy a ConstantOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#169 + def visit_constant_operator_write_node(node); end + + # Copy a ConstantOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#174 + def visit_constant_or_write_node(node); end + + # Copy a ConstantPathAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#179 + def visit_constant_path_and_write_node(node); end + + # Copy a ConstantPathNode node + # + # source://prism//lib/prism/mutation_compiler.rb#184 + def visit_constant_path_node(node); end + + # Copy a ConstantPathOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#189 + def visit_constant_path_operator_write_node(node); end + + # Copy a ConstantPathOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#194 + def visit_constant_path_or_write_node(node); end + + # Copy a ConstantPathTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#199 + def visit_constant_path_target_node(node); end + + # Copy a ConstantPathWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#204 + def visit_constant_path_write_node(node); end + + # Copy a ConstantReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#209 + def visit_constant_read_node(node); end + + # Copy a ConstantTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#214 + def visit_constant_target_node(node); end + + # Copy a ConstantWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#219 + def visit_constant_write_node(node); end + + # Copy a DefNode node + # + # source://prism//lib/prism/mutation_compiler.rb#224 + def visit_def_node(node); end + + # Copy a DefinedNode node + # + # source://prism//lib/prism/mutation_compiler.rb#229 + def visit_defined_node(node); end + + # Copy a ElseNode node + # + # source://prism//lib/prism/mutation_compiler.rb#234 + def visit_else_node(node); end + + # Copy a EmbeddedStatementsNode node + # + # source://prism//lib/prism/mutation_compiler.rb#239 + def visit_embedded_statements_node(node); end + + # Copy a EmbeddedVariableNode node + # + # source://prism//lib/prism/mutation_compiler.rb#244 + def visit_embedded_variable_node(node); end + + # Copy a EnsureNode node + # + # source://prism//lib/prism/mutation_compiler.rb#249 + def visit_ensure_node(node); end + + # Copy a FalseNode node + # + # source://prism//lib/prism/mutation_compiler.rb#254 + def visit_false_node(node); end + + # Copy a FindPatternNode node + # + # source://prism//lib/prism/mutation_compiler.rb#259 + def visit_find_pattern_node(node); end + + # Copy a FlipFlopNode node + # + # source://prism//lib/prism/mutation_compiler.rb#264 + def visit_flip_flop_node(node); end + + # Copy a FloatNode node + # + # source://prism//lib/prism/mutation_compiler.rb#269 + def visit_float_node(node); end + + # Copy a ForNode node + # + # source://prism//lib/prism/mutation_compiler.rb#274 + def visit_for_node(node); end + + # Copy a ForwardingArgumentsNode node + # + # source://prism//lib/prism/mutation_compiler.rb#279 + def visit_forwarding_arguments_node(node); end + + # Copy a ForwardingParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#284 + def visit_forwarding_parameter_node(node); end + + # Copy a ForwardingSuperNode node + # + # source://prism//lib/prism/mutation_compiler.rb#289 + def visit_forwarding_super_node(node); end + + # Copy a GlobalVariableAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#294 + def visit_global_variable_and_write_node(node); end + + # Copy a GlobalVariableOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#299 + def visit_global_variable_operator_write_node(node); end + + # Copy a GlobalVariableOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#304 + def visit_global_variable_or_write_node(node); end + + # Copy a GlobalVariableReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#309 + def visit_global_variable_read_node(node); end + + # Copy a GlobalVariableTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#314 + def visit_global_variable_target_node(node); end + + # Copy a GlobalVariableWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#319 + def visit_global_variable_write_node(node); end + + # Copy a HashNode node + # + # source://prism//lib/prism/mutation_compiler.rb#324 + def visit_hash_node(node); end + + # Copy a HashPatternNode node + # + # source://prism//lib/prism/mutation_compiler.rb#329 + def visit_hash_pattern_node(node); end + + # Copy a IfNode node + # + # source://prism//lib/prism/mutation_compiler.rb#334 + def visit_if_node(node); end + + # Copy a ImaginaryNode node + # + # source://prism//lib/prism/mutation_compiler.rb#339 + def visit_imaginary_node(node); end + + # Copy a ImplicitNode node + # + # source://prism//lib/prism/mutation_compiler.rb#344 + def visit_implicit_node(node); end + + # Copy a InNode node + # + # source://prism//lib/prism/mutation_compiler.rb#349 + def visit_in_node(node); end + + # Copy a IndexAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#354 + def visit_index_and_write_node(node); end + + # Copy a IndexOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#359 + def visit_index_operator_write_node(node); end + + # Copy a IndexOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#364 + def visit_index_or_write_node(node); end + + # Copy a InstanceVariableAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#369 + def visit_instance_variable_and_write_node(node); end + + # Copy a InstanceVariableOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#374 + def visit_instance_variable_operator_write_node(node); end + + # Copy a InstanceVariableOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#379 + def visit_instance_variable_or_write_node(node); end + + # Copy a InstanceVariableReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#384 + def visit_instance_variable_read_node(node); end + + # Copy a InstanceVariableTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#389 + def visit_instance_variable_target_node(node); end + + # Copy a InstanceVariableWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#394 + def visit_instance_variable_write_node(node); end + + # Copy a IntegerNode node + # + # source://prism//lib/prism/mutation_compiler.rb#399 + def visit_integer_node(node); end + + # Copy a InterpolatedMatchLastLineNode node + # + # source://prism//lib/prism/mutation_compiler.rb#404 + def visit_interpolated_match_last_line_node(node); end + + # Copy a InterpolatedRegularExpressionNode node + # + # source://prism//lib/prism/mutation_compiler.rb#409 + def visit_interpolated_regular_expression_node(node); end + + # Copy a InterpolatedStringNode node + # + # source://prism//lib/prism/mutation_compiler.rb#414 + def visit_interpolated_string_node(node); end + + # Copy a InterpolatedSymbolNode node + # + # source://prism//lib/prism/mutation_compiler.rb#419 + def visit_interpolated_symbol_node(node); end + + # Copy a InterpolatedXStringNode node + # + # source://prism//lib/prism/mutation_compiler.rb#424 + def visit_interpolated_x_string_node(node); end + + # Copy a KeywordHashNode node + # + # source://prism//lib/prism/mutation_compiler.rb#429 + def visit_keyword_hash_node(node); end + + # Copy a KeywordParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#434 + def visit_keyword_parameter_node(node); end + + # Copy a KeywordRestParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#439 + def visit_keyword_rest_parameter_node(node); end + + # Copy a LambdaNode node + # + # source://prism//lib/prism/mutation_compiler.rb#444 + def visit_lambda_node(node); end + + # Copy a LocalVariableAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#449 + def visit_local_variable_and_write_node(node); end + + # Copy a LocalVariableOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#454 + def visit_local_variable_operator_write_node(node); end + + # Copy a LocalVariableOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#459 + def visit_local_variable_or_write_node(node); end + + # Copy a LocalVariableReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#464 + def visit_local_variable_read_node(node); end + + # Copy a LocalVariableTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#469 + def visit_local_variable_target_node(node); end + + # Copy a LocalVariableWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#474 + def visit_local_variable_write_node(node); end + + # Copy a MatchLastLineNode node + # + # source://prism//lib/prism/mutation_compiler.rb#479 + def visit_match_last_line_node(node); end + + # Copy a MatchPredicateNode node + # + # source://prism//lib/prism/mutation_compiler.rb#484 + def visit_match_predicate_node(node); end + + # Copy a MatchRequiredNode node + # + # source://prism//lib/prism/mutation_compiler.rb#489 + def visit_match_required_node(node); end + + # Copy a MatchWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#494 + def visit_match_write_node(node); end + + # Copy a MissingNode node + # + # source://prism//lib/prism/mutation_compiler.rb#499 + def visit_missing_node(node); end + + # Copy a ModuleNode node + # + # source://prism//lib/prism/mutation_compiler.rb#504 + def visit_module_node(node); end + + # Copy a MultiTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#509 + def visit_multi_target_node(node); end + + # Copy a MultiWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#514 + def visit_multi_write_node(node); end + + # Copy a NextNode node + # + # source://prism//lib/prism/mutation_compiler.rb#519 + def visit_next_node(node); end + + # Copy a NilNode node + # + # source://prism//lib/prism/mutation_compiler.rb#524 + def visit_nil_node(node); end + + # Copy a NoKeywordsParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#529 + def visit_no_keywords_parameter_node(node); end + + # Copy a NumberedReferenceReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#534 + def visit_numbered_reference_read_node(node); end + + # Copy a OptionalParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#539 + def visit_optional_parameter_node(node); end + + # Copy a OrNode node + # + # source://prism//lib/prism/mutation_compiler.rb#544 + def visit_or_node(node); end + + # Copy a ParametersNode node + # + # source://prism//lib/prism/mutation_compiler.rb#549 + def visit_parameters_node(node); end + + # Copy a ParenthesesNode node + # + # source://prism//lib/prism/mutation_compiler.rb#554 + def visit_parentheses_node(node); end + + # Copy a PinnedExpressionNode node + # + # source://prism//lib/prism/mutation_compiler.rb#559 + def visit_pinned_expression_node(node); end + + # Copy a PinnedVariableNode node + # + # source://prism//lib/prism/mutation_compiler.rb#564 + def visit_pinned_variable_node(node); end + + # Copy a PostExecutionNode node + # + # source://prism//lib/prism/mutation_compiler.rb#569 + def visit_post_execution_node(node); end + + # Copy a PreExecutionNode node + # + # source://prism//lib/prism/mutation_compiler.rb#574 + def visit_pre_execution_node(node); end + + # Copy a ProgramNode node + # + # source://prism//lib/prism/mutation_compiler.rb#579 + def visit_program_node(node); end + + # Copy a RangeNode node + # + # source://prism//lib/prism/mutation_compiler.rb#584 + def visit_range_node(node); end + + # Copy a RationalNode node + # + # source://prism//lib/prism/mutation_compiler.rb#589 + def visit_rational_node(node); end + + # Copy a RedoNode node + # + # source://prism//lib/prism/mutation_compiler.rb#594 + def visit_redo_node(node); end + + # Copy a RegularExpressionNode node + # + # source://prism//lib/prism/mutation_compiler.rb#599 + def visit_regular_expression_node(node); end + + # Copy a RequiredParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#604 + def visit_required_parameter_node(node); end + + # Copy a RescueModifierNode node + # + # source://prism//lib/prism/mutation_compiler.rb#609 + def visit_rescue_modifier_node(node); end + + # Copy a RescueNode node + # + # source://prism//lib/prism/mutation_compiler.rb#614 + def visit_rescue_node(node); end + + # Copy a RestParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#619 + def visit_rest_parameter_node(node); end + + # Copy a RetryNode node + # + # source://prism//lib/prism/mutation_compiler.rb#624 + def visit_retry_node(node); end + + # Copy a ReturnNode node + # + # source://prism//lib/prism/mutation_compiler.rb#629 + def visit_return_node(node); end + + # Copy a SelfNode node + # + # source://prism//lib/prism/mutation_compiler.rb#634 + def visit_self_node(node); end + + # Copy a SingletonClassNode node + # + # source://prism//lib/prism/mutation_compiler.rb#639 + def visit_singleton_class_node(node); end + + # Copy a SourceEncodingNode node + # + # source://prism//lib/prism/mutation_compiler.rb#644 + def visit_source_encoding_node(node); end + + # Copy a SourceFileNode node + # + # source://prism//lib/prism/mutation_compiler.rb#649 + def visit_source_file_node(node); end + + # Copy a SourceLineNode node + # + # source://prism//lib/prism/mutation_compiler.rb#654 + def visit_source_line_node(node); end + + # Copy a SplatNode node + # + # source://prism//lib/prism/mutation_compiler.rb#659 + def visit_splat_node(node); end + + # Copy a StatementsNode node + # + # source://prism//lib/prism/mutation_compiler.rb#664 + def visit_statements_node(node); end + + # Copy a StringConcatNode node + # + # source://prism//lib/prism/mutation_compiler.rb#669 + def visit_string_concat_node(node); end + + # Copy a StringNode node + # + # source://prism//lib/prism/mutation_compiler.rb#674 + def visit_string_node(node); end + + # Copy a SuperNode node + # + # source://prism//lib/prism/mutation_compiler.rb#679 + def visit_super_node(node); end + + # Copy a SymbolNode node + # + # source://prism//lib/prism/mutation_compiler.rb#684 + def visit_symbol_node(node); end + + # Copy a TrueNode node + # + # source://prism//lib/prism/mutation_compiler.rb#689 + def visit_true_node(node); end + + # Copy a UndefNode node + # + # source://prism//lib/prism/mutation_compiler.rb#694 + def visit_undef_node(node); end + + # Copy a UnlessNode node + # + # source://prism//lib/prism/mutation_compiler.rb#699 + def visit_unless_node(node); end + + # Copy a UntilNode node + # + # source://prism//lib/prism/mutation_compiler.rb#704 + def visit_until_node(node); end + + # Copy a WhenNode node + # + # source://prism//lib/prism/mutation_compiler.rb#709 + def visit_when_node(node); end + + # Copy a WhileNode node + # + # source://prism//lib/prism/mutation_compiler.rb#714 + def visit_while_node(node); end + + # Copy a XStringNode node + # + # source://prism//lib/prism/mutation_compiler.rb#719 + def visit_x_string_node(node); end + + # Copy a YieldNode node + # + # source://prism//lib/prism/mutation_compiler.rb#724 + def visit_yield_node(node); end +end + +# Represents the use of the `next` keyword. +# +# next 1 +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#11721 +class Prism::NextNode < ::Prism::Node + # def initialize: (arguments: ArgumentsNode?, keyword_loc: Location, location: Location) -> void + # + # @return [NextNode] a new instance of NextNode + # + # source://prism//lib/prism/node.rb#11729 + sig { params(arguments: T.nilable(ArgumentsNode), keyword_loc: Location, location: Location).void } + def initialize(arguments, keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#11736 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#11723 + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11741 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11753 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11746 + def compact_child_nodes; end + + # def copy: (**params) -> NextNode + # + # source://prism//lib/prism/node.rb#11758 + sig { params(params: T.untyped).returns(NextNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11741 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#11770 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#11779 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#11775 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#11726 + 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#11805 + 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#11815 + def type; end + end +end + +# Represents the use of the `nil` keyword. +# +# nil +# ^^^ +# +# source://prism//lib/prism/node.rb#11824 +class Prism::NilNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [NilNode] a new instance of NilNode + # + # source://prism//lib/prism/node.rb#11826 + sig { params(location: Location).void } + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#11831 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11836 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11846 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11841 + def compact_child_nodes; end + + # def copy: (**params) -> NilNode + # + # source://prism//lib/prism/node.rb#11851 + sig { params(params: T.untyped).returns(NilNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11836 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#11861 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#11865 + 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#11884 + 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#11894 + def type; end + end +end + +# Represents the use of `**nil` inside method arguments. +# +# def a(**nil) +# ^^^^^ +# end +# +# source://prism//lib/prism/node.rb#11904 +class Prism::NoKeywordsParameterNode < ::Prism::Node + # def initialize: (operator_loc: Location, keyword_loc: Location, location: Location) -> void + # + # @return [NoKeywordsParameterNode] a new instance of NoKeywordsParameterNode + # + # source://prism//lib/prism/node.rb#11912 + sig { params(operator_loc: Location, keyword_loc: Location, location: Location).void } + def initialize(operator_loc, keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#11919 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11924 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11934 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11929 + def compact_child_nodes; end + + # def copy: (**params) -> NoKeywordsParameterNode + # + # source://prism//lib/prism/node.rb#11939 + sig { params(params: T.untyped).returns(NoKeywordsParameterNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11924 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#11951 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#11965 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#11961 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#11909 + def keyword_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#11956 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#11906 + 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#11986 + 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#11996 + 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 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # Returns the value of attribute location. + # + # source://prism//lib/prism/node.rb#12 + sig { returns(Location) } + def location; end + + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#14 + 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#33 + def pretty_print(q); end + + # source://prism//lib/prism/node.rb#18 + def set_newline_flag(newline_marked); end + + # Slice the location of the node from the source. + # + # source://prism//lib/prism/node.rb#27 + sig { returns(String) } + def slice; 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(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: 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: 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[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: Location).returns(String) } + def location(value); end + + # Returns the value of attribute output. + # + # source://prism//lib/prism/node_inspector.rb#7 + sig { returns(String) } + def output; end + + # Returns the value of attribute prefix. + # + # 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 reading a numbered reference to a capture in the previous match. +# +# $1 +# ^^ +# +# source://prism//lib/prism/node.rb#12005 +class Prism::NumberedReferenceReadNode < ::Prism::Node + # def initialize: (number: Integer, location: Location) -> void + # + # @return [NumberedReferenceReadNode] a new instance of NumberedReferenceReadNode + # + # source://prism//lib/prism/node.rb#12010 + sig { params(number: Integer, location: Location).void } + def initialize(number, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#12016 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12021 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12031 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12026 + def compact_child_nodes; end + + # def copy: (**params) -> NumberedReferenceReadNode + # + # source://prism//lib/prism/node.rb#12036 + sig { params(params: T.untyped).returns(NumberedReferenceReadNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12021 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#12047 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#12051 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader number: Integer + # + # source://prism//lib/prism/node.rb#12007 + 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#12071 + 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#12081 + 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#12091 +class Prism::OptionalParameterNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [OptionalParameterNode] a new instance of OptionalParameterNode + # + # source://prism//lib/prism/node.rb#12105 + sig { params(name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location).void } + def initialize(name, name_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#12114 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12119 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12129 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12124 + def compact_child_nodes; end + + # def copy: (**params) -> OptionalParameterNode + # + # source://prism//lib/prism/node.rb#12134 + sig { params(params: T.untyped).returns(OptionalParameterNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12119 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#12148 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#12157 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#12093 + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#12096 + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#12153 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#12099 + 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#12181 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#12102 + 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#12191 + def type; end + end +end + +# Represents the use of the `||` operator or the `or` keyword. +# +# left or right +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#12200 +class Prism::OrNode < ::Prism::Node + # def initialize: (left: Node, right: Node, operator_loc: Location, location: Location) -> void + # + # @return [OrNode] a new instance of OrNode + # + # source://prism//lib/prism/node.rb#12211 + sig { params(left: Node, right: Node, operator_loc: Location, location: Location).void } + def initialize(left, right, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#12219 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12224 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12234 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12229 + def compact_child_nodes; end + + # def copy: (**params) -> OrNode + # + # source://prism//lib/prism/node.rb#12239 + sig { params(params: T.untyped).returns(OrNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12224 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#12252 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#12261 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader left: Node + # + # source://prism//lib/prism/node.rb#12202 + def left; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#12257 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#12208 + def operator_loc; end + + # attr_reader right: Node + # + # source://prism//lib/prism/node.rb#12205 + 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#12285 + 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#12295 + def type; end + end +end + +# source://prism//lib/prism/pack.rb#4 +module Prism::Pack + class << self + def parse(_arg0, _arg1, _arg2); end + end +end + +# source://prism//lib/prism/pack.rb#54 +Prism::Pack::AGNOSTIC_ENDIAN = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#54 +Prism::Pack::BACK = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#54 +Prism::Pack::BER = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#54 +Prism::Pack::BIG_ENDIAN = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#54 +Prism::Pack::COMMENT = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#57 +class Prism::Pack::Directive + # @return [Directive] a new instance of Directive + # + # source://prism//lib/prism/pack.rb#60 + def initialize(version, variant, source, type, signed, endian, size, length_type, length); end + + # source://prism//lib/prism/pack.rb#98 + def describe; end + + # Returns the value of attribute endian. + # + # source://prism//lib/prism/pack.rb#58 + def endian; end + + # Returns the value of attribute length. + # + # source://prism//lib/prism/pack.rb#58 + def length; end + + # Returns the value of attribute length_type. + # + # source://prism//lib/prism/pack.rb#58 + def length_type; end + + # Returns the value of attribute signed. + # + # source://prism//lib/prism/pack.rb#58 + def signed; end + + # Returns the value of attribute size. + # + # source://prism//lib/prism/pack.rb#58 + def size; end + + # Returns the value of attribute source. + # + # source://prism//lib/prism/pack.rb#58 + def source; end + + # Returns the value of attribute type. + # + # source://prism//lib/prism/pack.rb#58 + def type; end + + # Returns the value of attribute variant. + # + # source://prism//lib/prism/pack.rb#58 + def variant; end + + # Returns the value of attribute version. + # + # source://prism//lib/prism/pack.rb#58 + def version; end +end + +# source://prism//lib/prism/pack.rb#72 +Prism::Pack::Directive::ENDIAN_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) + +# source://prism//lib/prism/pack.rb#80 +Prism::Pack::Directive::SIGNED_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) + +# source://prism//lib/prism/pack.rb#86 +Prism::Pack::Directive::SIZE_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) + +# source://prism//lib/prism/pack.rb#54 +Prism::Pack::ENDIAN_NA = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#54 +Prism::Pack::FLOAT = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#162 +class Prism::Pack::Format + # @return [Format] a new instance of Format + # + # source://prism//lib/prism/pack.rb#165 + def initialize(directives, encoding); end + + # source://prism//lib/prism/pack.rb#170 + def describe; end + + # Returns the value of attribute directives. + # + # source://prism//lib/prism/pack.rb#163 + def directives; end + + # Returns the value of attribute encoding. + # + # source://prism//lib/prism/pack.rb#163 + def encoding; end +end + +# source://prism//lib/prism/pack.rb#54 +Prism::Pack::INTEGER = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#54 +Prism::Pack::LENGTH_FIXED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#54 +Prism::Pack::LENGTH_MAX = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#54 +Prism::Pack::LENGTH_NA = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#54 +Prism::Pack::LENGTH_RELATIVE = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#54 +Prism::Pack::LITTLE_ENDIAN = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#54 +Prism::Pack::MOVE = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#54 +Prism::Pack::NATIVE_ENDIAN = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#54 +Prism::Pack::NULL = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#54 +Prism::Pack::SIGNED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#54 +Prism::Pack::SIGNED_NA = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#54 +Prism::Pack::SIZE_16 = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#54 +Prism::Pack::SIZE_32 = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#54 +Prism::Pack::SIZE_64 = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#54 +Prism::Pack::SIZE_8 = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#54 +Prism::Pack::SIZE_INT = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#54 +Prism::Pack::SIZE_LONG = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#54 +Prism::Pack::SIZE_LONG_LONG = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#54 +Prism::Pack::SIZE_NA = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#54 +Prism::Pack::SIZE_P = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#54 +Prism::Pack::SIZE_SHORT = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#54 +Prism::Pack::SPACE = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#54 +Prism::Pack::STRING_BASE64 = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#54 +Prism::Pack::STRING_FIXED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#54 +Prism::Pack::STRING_HEX_HIGH = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#54 +Prism::Pack::STRING_HEX_LOW = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#54 +Prism::Pack::STRING_LSB = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#54 +Prism::Pack::STRING_MIME = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#54 +Prism::Pack::STRING_MSB = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#54 +Prism::Pack::STRING_NULL_PADDED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#54 +Prism::Pack::STRING_NULL_TERMINATED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#54 +Prism::Pack::STRING_POINTER = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#54 +Prism::Pack::STRING_SPACE_PADDED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#54 +Prism::Pack::STRING_UU = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#54 +Prism::Pack::UNSIGNED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#54 +Prism::Pack::UTF8 = T.let(T.unsafe(nil), Symbol) + +# Represents the list of parameters on a method, block, or lambda definition. +# +# def a(b, c, d) +# ^^^^^^^ +# end +# +# source://prism//lib/prism/node.rb#12305 +class Prism::ParametersNode < ::Prism::Node + # def initialize: (requireds: Array[Node], optionals: Array[Node], rest: RestParameterNode?, posts: Array[Node], keywords: Array[Node], keyword_rest: Node?, block: BlockParameterNode?, location: Location) -> void + # + # @return [ParametersNode] a new instance of ParametersNode + # + # source://prism//lib/prism/node.rb#12328 + sig do + params( + requireds: T::Array[Node], + optionals: T::Array[Node], + rest: T.nilable(RestParameterNode), + posts: T::Array[Node], + keywords: T::Array[Node], + keyword_rest: T.nilable(Node), + block: T.nilable(BlockParameterNode), + location: Location + ).void + end + def initialize(requireds, optionals, rest, posts, keywords, keyword_rest, block, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#12340 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # attr_reader block: BlockParameterNode? + # + # source://prism//lib/prism/node.rb#12325 + def block; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12345 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12363 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12350 + def compact_child_nodes; end + + # def copy: (**params) -> ParametersNode + # + # source://prism//lib/prism/node.rb#12368 + sig { params(params: T.untyped).returns(ParametersNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12345 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#12385 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#12389 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader keyword_rest: Node? + # + # source://prism//lib/prism/node.rb#12322 + def keyword_rest; end + + # attr_reader keywords: Array[Node] + # + # source://prism//lib/prism/node.rb#12319 + def keywords; end + + # attr_reader optionals: Array[Node] + # + # source://prism//lib/prism/node.rb#12310 + def optionals; end + + # attr_reader posts: Array[Node] + # + # source://prism//lib/prism/node.rb#12316 + def posts; end + + # attr_reader requireds: Array[Node] + # + # source://prism//lib/prism/node.rb#12307 + def requireds; end + + # attr_reader rest: RestParameterNode? + # + # source://prism//lib/prism/node.rb#12313 + 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#12430 + 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#12440 + def type; end + end +end + +# Represents a parenthesized expression +# +# (10 + 34) +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#12449 +class Prism::ParenthesesNode < ::Prism::Node + # def initialize: (body: Node?, opening_loc: Location, closing_loc: Location, location: Location) -> void + # + # @return [ParenthesesNode] a new instance of ParenthesesNode + # + # source://prism//lib/prism/node.rb#12460 + sig { params(body: T.nilable(Node), opening_loc: Location, closing_loc: Location, location: Location).void } + def initialize(body, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#12468 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # attr_reader body: Node? + # + # source://prism//lib/prism/node.rb#12451 + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12477 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#12517 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#12457 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12489 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12482 + def compact_child_nodes; end + + # def copy: (**params) -> ParenthesesNode + # + # source://prism//lib/prism/node.rb#12494 + sig { params(params: T.untyped).returns(ParenthesesNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12477 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#12507 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#12521 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#12512 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#12454 + def opening_loc; end + + # source://prism//lib/prism/node.rb#12472 + 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#12548 + 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#12558 + def type; end + end +end + +# This represents an error that was encountered during parsing. +# +# source://prism//lib/prism/parse_result.rb#212 +class Prism::ParseError + # @return [ParseError] a new instance of ParseError + # + # source://prism//lib/prism/parse_result.rb#215 + def initialize(message, location); end + + # source://prism//lib/prism/parse_result.rb#220 + def deconstruct_keys(keys); end + + # source://prism//lib/prism/parse_result.rb#224 + def inspect; end + + # Returns the value of attribute location. + # + # source://prism//lib/prism/parse_result.rb#213 + sig { returns(Location) } + def location; end + + # Returns the value of attribute message. + # + # source://prism//lib/prism/parse_result.rb#213 + 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#250 +class Prism::ParseResult + # @return [ParseResult] a new instance of ParseResult + # + # source://prism//lib/prism/parse_result.rb#253 + def initialize(value, comments, magic_comments, errors, warnings, source); end + + # Attach the list of comments to their respective locations in the tree. + # + # source://prism//lib/prism/parse_result/comments.rb#168 + def attach_comments!; end + + # Returns the value of attribute comments. + # + # source://prism//lib/prism/parse_result.rb#251 + sig { returns(T::Array[Comment]) } + def comments; end + + # source://prism//lib/prism/parse_result.rb#262 + def deconstruct_keys(keys); end + + # Returns the value of attribute errors. + # + # source://prism//lib/prism/parse_result.rb#251 + sig { returns(T::Array[ParseError]) } + def errors; end + + # @return [Boolean] + # + # source://prism//lib/prism/parse_result.rb#270 + def failure?; end + + # Returns the value of attribute magic_comments. + # + # source://prism//lib/prism/parse_result.rb#251 + def magic_comments; end + + # Walk the tree and mark nodes that are on a new line. + # + # source://prism//lib/prism/parse_result/newlines.rb#56 + def mark_newlines!; end + + # Returns the value of attribute source. + # + # source://prism//lib/prism/parse_result.rb#251 + sig { returns(Source) } + def source; end + + # @return [Boolean] + # + # source://prism//lib/prism/parse_result.rb#266 + def success?; end + + # Returns the value of attribute value. + # + # source://prism//lib/prism/parse_result.rb#251 + sig { returns(ProgramNode) } + def value; end + + # Returns the value of attribute warnings. + # + # source://prism//lib/prism/parse_result.rb#251 + sig { returns(T::Array[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 + # @return [Comments] a new instance of Comments + # + # source://prism//lib/prism/parse_result/comments.rb#75 + def initialize(parse_result); end + + # source://prism//lib/prism/parse_result/comments.rb#79 + def attach!; end + + # Returns the value of attribute parse_result. + # + # source://prism//lib/prism/parse_result/comments.rb#73 + 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#98 + 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 + + # Returns the value of attribute location. + # + # 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 + + # Returns the value of attribute node. + # + # 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 + # @return [Newlines] a new instance of Newlines + # + # source://prism//lib/prism/parse_result/newlines.rb#21 + def initialize(newline_marked); end + + # source://prism//lib/prism/parse_result/newlines.rb#25 + def visit_block_node(node); end + + # source://prism//lib/prism/parse_result/newlines.rb#38 + def visit_if_node(node); end + + # source://prism//lib/prism/parse_result/newlines.rb#25 + def visit_lambda_node(node); end + + # source://prism//lib/prism/parse_result/newlines.rb#45 + def visit_statements_node(node); end + + # source://prism//lib/prism/parse_result/newlines.rb#38 + def visit_unless_node(node); end +end + +# This represents a warning that was encountered during parsing. +# +# source://prism//lib/prism/parse_result.rb#230 +class Prism::ParseWarning + # @return [ParseWarning] a new instance of ParseWarning + # + # source://prism//lib/prism/parse_result.rb#233 + def initialize(message, location); end + + # source://prism//lib/prism/parse_result.rb#238 + def deconstruct_keys(keys); end + + # source://prism//lib/prism/parse_result.rb#242 + def inspect; end + + # Returns the value of attribute location. + # + # source://prism//lib/prism/parse_result.rb#231 + sig { returns(Location) } + def location; end + + # Returns the value of attribute message. + # + # source://prism//lib/prism/parse_result.rb#231 + 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 + # @return [Pattern] a new instance of Pattern + # + # source://prism//lib/prism/pattern.rb#58 + def initialize(query); end + + # source://prism//lib/prism/pattern.rb#63 + def compile; end + + # Returns the value of attribute query. + # + # source://prism//lib/prism/pattern.rb#56 + def query; end + + # source://prism//lib/prism/pattern.rb#68 + 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#84 + 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#90 + def combine_or(left, right); end + + # in foo | bar + # + # source://prism//lib/prism/pattern.rb#125 + def compile_alternation_pattern_node(node); end + + # in [foo, bar, baz] + # + # source://prism//lib/prism/pattern.rb#100 + def compile_array_pattern_node(node); end + + # in Prism::ConstantReadNode + # + # source://prism//lib/prism/pattern.rb#130 + def compile_constant_path_node(node); end + + # in ConstantReadNode + # in String + # + # source://prism//lib/prism/pattern.rb#142 + 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#95 + def compile_error(node); end + + # in InstanceVariableReadNode[name: Symbol] + # in { name: Symbol } + # + # source://prism//lib/prism/pattern.rb#160 + def compile_hash_pattern_node(node); end + + # in nil + # + # source://prism//lib/prism/pattern.rb#185 + 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#214 + def compile_node(node); end + + # in /foo/ + # + # source://prism//lib/prism/pattern.rb#190 + def compile_regular_expression_node(node); end + + # in "" + # in "foo" + # + # source://prism//lib/prism/pattern.rb#198 + def compile_string_node(node); end + + # in :+ + # in :foo + # + # source://prism//lib/prism/pattern.rb#206 + 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 + # @return [CompilationError] a new instance of CompilationError + # + # source://prism//lib/prism/pattern.rb#41 + 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#12568 +class Prism::PinnedExpressionNode < ::Prism::Node + # def initialize: (expression: Node, operator_loc: Location, lparen_loc: Location, rparen_loc: Location, location: Location) -> void + # + # @return [PinnedExpressionNode] a new instance of PinnedExpressionNode + # + # source://prism//lib/prism/node.rb#12582 + sig do + params( + expression: Node, + operator_loc: Location, + lparen_loc: Location, + rparen_loc: Location, + location: Location + ).void + end + def initialize(expression, operator_loc, lparen_loc, rparen_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#12591 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12596 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12606 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12601 + def compact_child_nodes; end + + # def copy: (**params) -> PinnedExpressionNode + # + # source://prism//lib/prism/node.rb#12611 + sig { params(params: T.untyped).returns(PinnedExpressionNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12596 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#12625 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader expression: Node + # + # source://prism//lib/prism/node.rb#12570 + def expression; end + + # source://prism//lib/prism/node.rb#12644 + def inspect(inspector = T.unsafe(nil)); end + + # def lparen: () -> String + # + # source://prism//lib/prism/node.rb#12635 + sig { returns(String) } + def lparen; end + + # attr_reader lparen_loc: Location + # + # source://prism//lib/prism/node.rb#12576 + def lparen_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#12630 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#12573 + def operator_loc; end + + # def rparen: () -> String + # + # source://prism//lib/prism/node.rb#12640 + sig { returns(String) } + def rparen; end + + # attr_reader rparen_loc: Location + # + # source://prism//lib/prism/node.rb#12579 + 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#12668 + 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#12678 + 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#12688 +class Prism::PinnedVariableNode < ::Prism::Node + # def initialize: (variable: Node, operator_loc: Location, location: Location) -> void + # + # @return [PinnedVariableNode] a new instance of PinnedVariableNode + # + # source://prism//lib/prism/node.rb#12696 + sig { params(variable: Node, operator_loc: Location, location: Location).void } + def initialize(variable, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#12703 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12708 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12718 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12713 + def compact_child_nodes; end + + # def copy: (**params) -> PinnedVariableNode + # + # source://prism//lib/prism/node.rb#12723 + sig { params(params: T.untyped).returns(PinnedVariableNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12708 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#12735 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#12744 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#12740 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#12693 + 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#12766 + def type; end + + # attr_reader variable: Node + # + # source://prism//lib/prism/node.rb#12690 + 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#12776 + def type; end + end +end + +# Represents the use of the `END` keyword. +# +# END { foo } +# ^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#12785 +class Prism::PostExecutionNode < ::Prism::Node + # def initialize: (statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location, location: Location) -> void + # + # @return [PostExecutionNode] a new instance of PostExecutionNode + # + # source://prism//lib/prism/node.rb#12799 + sig do + params( + statements: T.nilable(StatementsNode), + keyword_loc: Location, + opening_loc: Location, + closing_loc: Location, + location: Location + ).void + end + def initialize(statements, keyword_loc, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#12808 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12813 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#12859 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#12796 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12825 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12818 + def compact_child_nodes; end + + # def copy: (**params) -> PostExecutionNode + # + # source://prism//lib/prism/node.rb#12830 + sig { params(params: T.untyped).returns(PostExecutionNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12813 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#12844 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#12863 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#12849 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#12790 + def keyword_loc; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#12854 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#12793 + def opening_loc; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#12787 + 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#12891 + 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#12901 + def type; end + end +end + +# Represents the use of the `BEGIN` keyword. +# +# BEGIN { foo } +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#12910 +class Prism::PreExecutionNode < ::Prism::Node + # def initialize: (statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location, location: Location) -> void + # + # @return [PreExecutionNode] a new instance of PreExecutionNode + # + # source://prism//lib/prism/node.rb#12924 + sig do + params( + statements: T.nilable(StatementsNode), + keyword_loc: Location, + opening_loc: Location, + closing_loc: Location, + location: Location + ).void + end + def initialize(statements, keyword_loc, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#12933 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12938 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#12984 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#12921 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12950 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12943 + def compact_child_nodes; end + + # def copy: (**params) -> PreExecutionNode + # + # source://prism//lib/prism/node.rb#12955 + sig { params(params: T.untyped).returns(PreExecutionNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12938 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#12969 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#12988 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#12974 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#12915 + def keyword_loc; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#12979 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#12918 + def opening_loc; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#12912 + 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#13016 + 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#13026 + def type; end + end +end + +# The top level node of any parse tree. +# +# source://prism//lib/prism/node.rb#13032 +class Prism::ProgramNode < ::Prism::Node + # def initialize: (locals: Array[Symbol], statements: StatementsNode, location: Location) -> void + # + # @return [ProgramNode] a new instance of ProgramNode + # + # source://prism//lib/prism/node.rb#13040 + sig { params(locals: T::Array[Symbol], statements: StatementsNode, location: Location).void } + def initialize(locals, statements, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#13047 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13052 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13062 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13057 + def compact_child_nodes; end + + # def copy: (**params) -> ProgramNode + # + # source://prism//lib/prism/node.rb#13067 + sig { params(params: T.untyped).returns(ProgramNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13052 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#13079 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#13083 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#13034 + def locals; end + + # attr_reader statements: StatementsNode + # + # source://prism//lib/prism/node.rb#13037 + 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#13105 + 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#13115 + def type; end + end +end + +# source://prism//lib/prism/node.rb#16339 +module Prism::RangeFlags; end + +# ... operator +# +# source://prism//lib/prism/node.rb#16341 +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#13127 +class Prism::RangeNode < ::Prism::Node + # def initialize: (left: Node?, right: Node?, operator_loc: Location, flags: Integer, location: Location) -> void + # + # @return [RangeNode] a new instance of RangeNode + # + # source://prism//lib/prism/node.rb#13141 + sig do + params( + left: T.nilable(Node), + right: T.nilable(Node), + operator_loc: Location, + flags: Integer, + location: Location + ).void + end + def initialize(left, right, operator_loc, flags, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#13150 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13155 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13168 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13160 + def compact_child_nodes; end + + # def copy: (**params) -> RangeNode + # + # source://prism//lib/prism/node.rb#13173 + sig { params(params: T.untyped).returns(RangeNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13155 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#13187 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # def exclude_end?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13197 + sig { returns(T::Boolean) } + def exclude_end?; end + + # source://prism//lib/prism/node.rb#13201 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader left: Node? + # + # source://prism//lib/prism/node.rb#13129 + def left; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#13192 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#13135 + def operator_loc; end + + # attr_reader right: Node? + # + # source://prism//lib/prism/node.rb#13132 + 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#13235 + def type; end + + private + + # Returns the value of attribute flags. + # + # source://prism//lib/prism/node.rb#13138 + 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#13245 + def type; end + end +end + +# Represents a rational number literal. +# +# 1.0r +# ^^^^ +# +# source://prism//lib/prism/node.rb#13254 +class Prism::RationalNode < ::Prism::Node + # def initialize: (numeric: Node, location: Location) -> void + # + # @return [RationalNode] a new instance of RationalNode + # + # source://prism//lib/prism/node.rb#13259 + sig { params(numeric: Node, location: Location).void } + def initialize(numeric, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#13265 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13270 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13280 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13275 + def compact_child_nodes; end + + # def copy: (**params) -> RationalNode + # + # source://prism//lib/prism/node.rb#13285 + sig { params(params: T.untyped).returns(RationalNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13270 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#13296 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#13300 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader numeric: Node + # + # source://prism//lib/prism/node.rb#13256 + 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#13321 + def type; end + + # Returns the value of the node as a Ruby Rational. + # + # source://prism//lib/prism/node_ext.rb#54 + 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#13331 + def type; end + end +end + +# Represents the use of the `redo` keyword. +# +# redo +# ^^^^ +# +# source://prism//lib/prism/node.rb#13340 +class Prism::RedoNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [RedoNode] a new instance of RedoNode + # + # source://prism//lib/prism/node.rb#13342 + sig { params(location: Location).void } + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#13347 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13352 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13362 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13357 + def compact_child_nodes; end + + # def copy: (**params) -> RedoNode + # + # source://prism//lib/prism/node.rb#13367 + sig { params(params: T.untyped).returns(RedoNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13352 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#13377 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#13381 + 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#13400 + 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#13410 + def type; end + end +end + +# source://prism//lib/prism/node.rb#16344 +module Prism::RegularExpressionFlags; end + +# n - forces the ASCII-8BIT encoding +# +# source://prism//lib/prism/node.rb#16361 +Prism::RegularExpressionFlags::ASCII_8BIT = T.let(T.unsafe(nil), Integer) + +# e - forces the EUC-JP encoding +# +# source://prism//lib/prism/node.rb#16358 +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#16349 +Prism::RegularExpressionFlags::EXTENDED = T.let(T.unsafe(nil), Integer) + +# i - ignores the case of characters when matching +# +# source://prism//lib/prism/node.rb#16346 +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#16352 +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#16355 +Prism::RegularExpressionFlags::ONCE = T.let(T.unsafe(nil), Integer) + +# u - forces the UTF-8 encoding +# +# source://prism//lib/prism/node.rb#16367 +Prism::RegularExpressionFlags::UTF_8 = T.let(T.unsafe(nil), Integer) + +# s - forces the Windows-31J encoding +# +# source://prism//lib/prism/node.rb#16364 +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#13419 +class Prism::RegularExpressionNode < ::Prism::Node + include ::Prism::RegularExpressionOptions + + # def initialize: (opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, flags: Integer, location: Location) -> void + # + # @return [RegularExpressionNode] a new instance of RegularExpressionNode + # + # source://prism//lib/prism/node.rb#13436 + sig do + params( + opening_loc: Location, + content_loc: Location, + closing_loc: Location, + unescaped: String, + flags: Integer, + location: Location + ).void + end + def initialize(opening_loc, content_loc, closing_loc, unescaped, flags, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#13446 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def ascii_8bit?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13526 + sig { returns(T::Boolean) } + def ascii_8bit?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13451 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#13496 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#13427 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13461 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13456 + def compact_child_nodes; end + + # def content: () -> String + # + # source://prism//lib/prism/node.rb#13491 + sig { returns(String) } + def content; end + + # attr_reader content_loc: Location + # + # source://prism//lib/prism/node.rb#13424 + def content_loc; end + + # def copy: (**params) -> RegularExpressionNode + # + # source://prism//lib/prism/node.rb#13466 + sig { params(params: T.untyped).returns(RegularExpressionNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13451 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#13481 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # def euc_jp?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13521 + sig { returns(T::Boolean) } + def euc_jp?; end + + # def extended?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13506 + sig { returns(T::Boolean) } + def extended?; end + + # def ignore_case?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13501 + sig { returns(T::Boolean) } + def ignore_case?; end + + # source://prism//lib/prism/node.rb#13540 + def inspect(inspector = T.unsafe(nil)); end + + # def multi_line?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13511 + sig { returns(T::Boolean) } + def multi_line?; end + + # def once?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13516 + sig { returns(T::Boolean) } + def once?; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#13486 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#13421 + 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#13565 + def type; end + + # attr_reader unescaped: String + # + # source://prism//lib/prism/node.rb#13430 + def unescaped; end + + # def utf_8?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13536 + sig { returns(T::Boolean) } + def utf_8?; end + + # def windows_31j?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13531 + sig { returns(T::Boolean) } + def windows_31j?; end + + private + + # Returns the value of attribute flags. + # + # source://prism//lib/prism/node.rb#13433 + 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#13575 + 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 parameter to a method, block, or lambda definition. +# +# def a(b) +# ^ +# end +# +# source://prism//lib/prism/node.rb#13585 +class Prism::RequiredParameterNode < ::Prism::Node + # def initialize: (name: Symbol, location: Location) -> void + # + # @return [RequiredParameterNode] a new instance of RequiredParameterNode + # + # source://prism//lib/prism/node.rb#13590 + sig { params(name: Symbol, location: Location).void } + def initialize(name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#13596 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13601 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13611 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13606 + def compact_child_nodes; end + + # def copy: (**params) -> RequiredParameterNode + # + # source://prism//lib/prism/node.rb#13616 + sig { params(params: T.untyped).returns(RequiredParameterNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13601 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#13627 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#13631 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#13587 + 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#13651 + 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#13661 + def type; end + end +end + +# Represents an expression modified with a rescue. +# +# foo rescue nil +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#13670 +class Prism::RescueModifierNode < ::Prism::Node + # def initialize: (expression: Node, keyword_loc: Location, rescue_expression: Node, location: Location) -> void + # + # @return [RescueModifierNode] a new instance of RescueModifierNode + # + # source://prism//lib/prism/node.rb#13681 + sig { params(expression: Node, keyword_loc: Location, rescue_expression: Node, location: Location).void } + def initialize(expression, keyword_loc, rescue_expression, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#13689 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13698 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13708 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13703 + def compact_child_nodes; end + + # def copy: (**params) -> RescueModifierNode + # + # source://prism//lib/prism/node.rb#13713 + sig { params(params: T.untyped).returns(RescueModifierNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13698 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#13726 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader expression: Node + # + # source://prism//lib/prism/node.rb#13672 + def expression; end + + # source://prism//lib/prism/node.rb#13735 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#13731 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#13675 + def keyword_loc; end + + # attr_reader rescue_expression: Node + # + # source://prism//lib/prism/node.rb#13678 + def rescue_expression; end + + # source://prism//lib/prism/node.rb#13693 + 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#13759 + 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#13769 + 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#13784 +class Prism::RescueNode < ::Prism::Node + # def initialize: (keyword_loc: Location, exceptions: Array[Node], operator_loc: Location?, reference: Node?, statements: StatementsNode?, consequent: RescueNode?, location: Location) -> void + # + # @return [RescueNode] a new instance of RescueNode + # + # source://prism//lib/prism/node.rb#13804 + sig do + params( + keyword_loc: Location, + exceptions: T::Array[Node], + operator_loc: T.nilable(Location), + reference: T.nilable(Node), + statements: T.nilable(StatementsNode), + consequent: T.nilable(RescueNode), + location: Location + ).void + end + def initialize(keyword_loc, exceptions, operator_loc, reference, statements, consequent, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#13815 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13820 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13835 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13825 + def compact_child_nodes; end + + # attr_reader consequent: RescueNode? + # + # source://prism//lib/prism/node.rb#13801 + def consequent; end + + # def copy: (**params) -> RescueNode + # + # source://prism//lib/prism/node.rb#13840 + sig { params(params: T.untyped).returns(RescueNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13820 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#13856 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader exceptions: Array[Node] + # + # source://prism//lib/prism/node.rb#13789 + def exceptions; end + + # source://prism//lib/prism/node.rb#13870 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#13861 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#13786 + def keyword_loc; end + + # def operator: () -> String? + # + # source://prism//lib/prism/node.rb#13866 + sig { returns(T.nilable(String)) } + def operator; end + + # attr_reader operator_loc: Location? + # + # source://prism//lib/prism/node.rb#13792 + def operator_loc; end + + # attr_reader reference: Node? + # + # source://prism//lib/prism/node.rb#13795 + def reference; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#13798 + 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#13910 + 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#13920 + 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#13930 +class Prism::RestParameterNode < ::Prism::Node + # def initialize: (name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location) -> void + # + # @return [RestParameterNode] a new instance of RestParameterNode + # + # source://prism//lib/prism/node.rb#13941 + sig do + params( + name: T.nilable(Symbol), + name_loc: T.nilable(Location), + operator_loc: Location, + location: Location + ).void + end + def initialize(name, name_loc, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#13949 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13954 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13964 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13959 + def compact_child_nodes; end + + # def copy: (**params) -> RestParameterNode + # + # source://prism//lib/prism/node.rb#13969 + sig { params(params: T.untyped).returns(RestParameterNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13954 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#13982 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#13991 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol? + # + # source://prism//lib/prism/node.rb#13932 + def name; end + + # attr_reader name_loc: Location? + # + # source://prism//lib/prism/node.rb#13935 + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#13987 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#13938 + 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#14017 + 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#14027 + def type; end + end +end + +# Represents the use of the `retry` keyword. +# +# retry +# ^^^^^ +# +# source://prism//lib/prism/node.rb#14036 +class Prism::RetryNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [RetryNode] a new instance of RetryNode + # + # source://prism//lib/prism/node.rb#14038 + sig { params(location: Location).void } + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#14043 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14048 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14058 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14053 + def compact_child_nodes; end + + # def copy: (**params) -> RetryNode + # + # source://prism//lib/prism/node.rb#14063 + sig { params(params: T.untyped).returns(RetryNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14048 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#14073 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#14077 + 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#14096 + 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#14106 + def type; end + end +end + +# Represents the use of the `return` keyword. +# +# return 1 +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#14115 +class Prism::ReturnNode < ::Prism::Node + # def initialize: (keyword_loc: Location, arguments: ArgumentsNode?, location: Location) -> void + # + # @return [ReturnNode] a new instance of ReturnNode + # + # source://prism//lib/prism/node.rb#14123 + sig { params(keyword_loc: Location, arguments: T.nilable(ArgumentsNode), location: Location).void } + def initialize(keyword_loc, arguments, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#14130 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#14120 + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14135 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14147 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14140 + def compact_child_nodes; end + + # def copy: (**params) -> ReturnNode + # + # source://prism//lib/prism/node.rb#14152 + sig { params(params: T.untyped).returns(ReturnNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14135 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#14164 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#14173 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#14169 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#14117 + 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#14199 + 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#14209 + def type; end + end +end + +# 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. +# +# source://prism//lib/prism/ripper_compat.rb#13 +class Prism::RipperCompat + # @return [RipperCompat] a new instance of RipperCompat + # + # source://prism//lib/prism/ripper_compat.rb#59 + def initialize(source); end + + # Returns the value of attribute column. + # + # source://prism//lib/prism/ripper_compat.rb#57 + def column; end + + # Public interface + # + # @return [Boolean] + # + # source://prism//lib/prism/ripper_compat.rb#70 + def error?; end + + # Returns the value of attribute lineno. + # + # source://prism//lib/prism/ripper_compat.rb#57 + def lineno; end + + # source://prism//lib/prism/ripper_compat.rb#74 + def parse; end + + # Returns the value of attribute source. + # + # source://prism//lib/prism/ripper_compat.rb#57 + def source; end + + # Visitor methods + # + # source://prism//lib/prism/ripper_compat.rb#82 + def visit(node); end + + # source://prism//lib/prism/ripper_compat.rb#86 + def visit_call_node(node); end + + # source://prism//lib/prism/ripper_compat.rb#100 + def visit_integer_node(node); end + + # source://prism//lib/prism/ripper_compat.rb#125 + def visit_program_node(node); end + + # source://prism//lib/prism/ripper_compat.rb#105 + def visit_statements_node(node); end + + # source://prism//lib/prism/ripper_compat.rb#112 + def visit_token(node); end + + private + + # source://prism//lib/prism/ripper_compat.rb#162 + def _dispatch0; end + + # source://prism//lib/prism/ripper_compat.rb#163 + def _dispatch1(_); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def _dispatch2(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#165 + def _dispatch3(_, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#166 + def _dispatch4(_, _, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#167 + def _dispatch5(_, _, _, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#168 + 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/ripper_compat.rb#151 + def bounds(location); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_BEGIN(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_CHAR(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_END(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on___end__(_); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_alias(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_alias_error(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_aref(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_aref_field(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_arg_ambiguous(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_arg_paren(_); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_args_add(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_args_add_block(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_args_add_star(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#162 + def on_args_forward; end + + # source://prism//lib/prism/ripper_compat.rb#162 + def on_args_new; end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_array(_); end + + # source://prism//lib/prism/ripper_compat.rb#166 + def on_aryptn(_, _, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_assign(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_assign_error(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_assoc_new(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_assoc_splat(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_assoclist_from_args(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_backref(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_backtick(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_bare_assoc_hash(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_begin(_); end + + # source://prism//lib/prism/ripper_compat.rb#165 + def on_binary(_, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_block_var(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_blockarg(_); end + + # source://prism//lib/prism/ripper_compat.rb#166 + def on_bodystmt(_, _, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_brace_block(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_break(_); end + + # source://prism//lib/prism/ripper_compat.rb#165 + def on_call(_, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_case(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#165 + def on_class(_, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_class_name_error(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_comma(_); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_command(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#166 + def on_command_call(_, _, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_comment(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_const(_); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_const_path_field(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_const_path_ref(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_const_ref(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_cvar(_); end + + # source://prism//lib/prism/ripper_compat.rb#165 + def on_def(_, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_defined(_); end + + # source://prism//lib/prism/ripper_compat.rb#167 + def on_defs(_, _, _, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_do_block(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_dot2(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_dot3(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_dyna_symbol(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_else(_); end + + # source://prism//lib/prism/ripper_compat.rb#165 + def on_elsif(_, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_embdoc(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_embdoc_beg(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_embdoc_end(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_embexpr_beg(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_embexpr_end(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_embvar(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_ensure(_); end + + # source://prism//lib/prism/ripper_compat.rb#162 + def on_excessed_comma; end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_fcall(_); end + + # source://prism//lib/prism/ripper_compat.rb#165 + def on_field(_, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_float(_); end + + # source://prism//lib/prism/ripper_compat.rb#166 + def on_fndptn(_, _, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#165 + def on_for(_, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_gvar(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_hash(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_heredoc_beg(_); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_heredoc_dedent(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_heredoc_end(_); end + + # source://prism//lib/prism/ripper_compat.rb#165 + def on_hshptn(_, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_ident(_); end + + # source://prism//lib/prism/ripper_compat.rb#165 + def on_if(_, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_if_mod(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#165 + def on_ifop(_, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_ignored_nl(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_ignored_sp(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_imaginary(_); end + + # source://prism//lib/prism/ripper_compat.rb#165 + def on_in(_, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_int(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_ivar(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_kw(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_kwrest_param(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_label(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_label_end(_); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_lambda(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_lbrace(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_lbracket(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_lparen(_); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_magic_comment(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_massign(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_method_add_arg(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_method_add_block(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_mlhs_add(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_mlhs_add_post(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_mlhs_add_star(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#162 + def on_mlhs_new; end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_mlhs_paren(_); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_module(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_mrhs_add(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_mrhs_add_star(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#162 + def on_mrhs_new; end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_mrhs_new_from_args(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_next(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_nl(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_nokw_param(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_op(_); end + + # source://prism//lib/prism/ripper_compat.rb#165 + def on_opassign(_, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_operator_ambiguous(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_param_error(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#168 + def on_params(_, _, _, _, _, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_paren(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_parse_error(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_period(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_program(_); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_qsymbols_add(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_qsymbols_beg(_); end + + # source://prism//lib/prism/ripper_compat.rb#162 + def on_qsymbols_new; end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_qwords_add(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_qwords_beg(_); end + + # source://prism//lib/prism/ripper_compat.rb#162 + def on_qwords_new; end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_rational(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_rbrace(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_rbracket(_); end + + # source://prism//lib/prism/ripper_compat.rb#162 + def on_redo; end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_regexp_add(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_regexp_beg(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_regexp_end(_); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_regexp_literal(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#162 + def on_regexp_new; end + + # source://prism//lib/prism/ripper_compat.rb#166 + def on_rescue(_, _, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_rescue_mod(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_rest_param(_); end + + # source://prism//lib/prism/ripper_compat.rb#162 + def on_retry; end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_return(_); end + + # source://prism//lib/prism/ripper_compat.rb#162 + def on_return0; end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_rparen(_); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_sclass(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_semicolon(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_sp(_); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_stmts_add(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#162 + def on_stmts_new; end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_string_add(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_string_concat(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#162 + def on_string_content; end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_string_dvar(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_string_embexpr(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_string_literal(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_super(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_symbeg(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_symbol(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_symbol_literal(_); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_symbols_add(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_symbols_beg(_); end + + # source://prism//lib/prism/ripper_compat.rb#162 + def on_symbols_new; end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_tlambda(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_tlambeg(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_top_const_field(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_top_const_ref(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_tstring_beg(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_tstring_content(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_tstring_end(_); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_unary(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_undef(_); end + + # source://prism//lib/prism/ripper_compat.rb#165 + def on_unless(_, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_unless_mod(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_until(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_until_mod(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_var_alias(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_var_field(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_var_ref(_); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_vcall(_); end + + # source://prism//lib/prism/ripper_compat.rb#162 + def on_void_stmt; end + + # source://prism//lib/prism/ripper_compat.rb#165 + def on_when(_, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_while(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_while_mod(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_word_add(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#162 + def on_word_new; end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_words_add(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_words_beg(_); end + + # source://prism//lib/prism/ripper_compat.rb#162 + def on_words_new; end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_words_sep(_); end + + # source://prism//lib/prism/ripper_compat.rb#164 + def on_xstring_add(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_xstring_literal(_); end + + # source://prism//lib/prism/ripper_compat.rb#162 + def on_xstring_new; end + + # source://prism//lib/prism/ripper_compat.rb#163 + def on_yield(_); end + + # source://prism//lib/prism/ripper_compat.rb#162 + def on_yield0; end + + # source://prism//lib/prism/ripper_compat.rb#162 + def on_zsuper; end + + # source://prism//lib/prism/ripper_compat.rb#158 + def result; end + + class << self + # This is a convenience method that runs the SexpBuilderPP subclass parser. + # + # source://prism//lib/prism/ripper_compat.rb#140 + def sexp(source); end + + # This is a convenience method that runs the SexpBuilder subclass parser. + # + # source://prism//lib/prism/ripper_compat.rb#135 + def sexp_raw(source); end + end +end + +# This class mirrors the ::Ripper::SexpBuilder subclass of ::Ripper that +# returns the arrays of [type, *children]. +# +# source://prism//lib/prism/ripper_compat.rb#16 +class Prism::RipperCompat::SexpBuilder < ::Prism::RipperCompat + private + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_BEGIN(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_CHAR(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_END(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on___end__(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_alias(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_alias_error(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_aref(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_aref_field(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_arg_ambiguous(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_arg_paren(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_args_add(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_args_add_block(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_args_add_star(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_args_forward(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_args_new(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_array(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_aryptn(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_assign(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_assign_error(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_assoc_new(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_assoc_splat(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_assoclist_from_args(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_backref(value); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_backtick(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_bare_assoc_hash(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_begin(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_binary(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_block_var(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_blockarg(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_bodystmt(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_brace_block(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_break(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_call(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_case(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_class(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_class_name_error(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_comma(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_command(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_command_call(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_comment(value); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_const(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_const_path_field(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_const_path_ref(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_const_ref(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_cvar(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_def(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_defined(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_defs(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_do_block(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_dot2(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_dot3(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_dyna_symbol(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_else(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_elsif(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_embdoc(value); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_embdoc_beg(value); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_embdoc_end(value); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_embexpr_beg(value); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_embexpr_end(value); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_embvar(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_ensure(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_excessed_comma(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_fcall(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_field(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_float(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_fndptn(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_for(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_gvar(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_hash(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_heredoc_beg(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_heredoc_dedent(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_heredoc_end(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_hshptn(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_ident(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_if(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_if_mod(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_ifop(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_ignored_nl(value); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_ignored_sp(value); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_imaginary(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_in(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_int(value); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_ivar(value); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_kw(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_kwrest_param(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_label(value); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_label_end(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_lambda(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_lbrace(value); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_lbracket(value); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_lparen(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_magic_comment(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_massign(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_method_add_arg(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_method_add_block(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_mlhs_add(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_mlhs_add_post(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_mlhs_add_star(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_mlhs_new(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_mlhs_paren(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_module(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_mrhs_add(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_mrhs_add_star(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_mrhs_new(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_mrhs_new_from_args(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_next(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_nl(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_nokw_param(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_op(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_opassign(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_operator_ambiguous(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_param_error(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_params(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_paren(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_parse_error(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_period(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_program(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_qsymbols_add(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_qsymbols_beg(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_qsymbols_new(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_qwords_add(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_qwords_beg(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_qwords_new(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_rational(value); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_rbrace(value); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_rbracket(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_redo(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_regexp_add(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_regexp_beg(value); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_regexp_end(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_regexp_literal(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_regexp_new(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_rescue(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_rescue_mod(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_rest_param(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_retry(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_return(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_return0(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_rparen(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_sclass(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_semicolon(value); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_sp(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_stmts_add(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_stmts_new(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_string_add(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_string_concat(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_string_content(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_string_dvar(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_string_embexpr(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_string_literal(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_super(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_symbeg(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_symbol(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_symbol_literal(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_symbols_add(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_symbols_beg(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_symbols_new(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_tlambda(value); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_tlambeg(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_top_const_field(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_top_const_ref(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_tstring_beg(value); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_tstring_content(value); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_tstring_end(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_unary(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_undef(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_unless(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_unless_mod(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_until(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_until_mod(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_var_alias(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_var_field(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_var_ref(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_vcall(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_void_stmt(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_when(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_while(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_while_mod(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_word_add(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_word_new(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_words_add(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_words_beg(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_words_new(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_words_sep(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_xstring_add(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_xstring_literal(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_xstring_new(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_yield(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_yield0(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + 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/ripper_compat.rb#35 +class Prism::RipperCompat::SexpBuilderPP < ::Prism::RipperCompat::SexpBuilder + private + + # source://prism//lib/prism/ripper_compat.rb#38 + def _dispatch_event_new; end + + # source://prism//lib/prism/ripper_compat.rb#42 + def _dispatch_event_push(list, item); end + + # source://prism//lib/prism/ripper_compat.rb#42 + def on_args_add(list, item); end + + # source://prism//lib/prism/ripper_compat.rb#38 + def on_args_new; end + + # source://prism//lib/prism/ripper_compat.rb#42 + def on_mlhs_add(list, item); end + + # source://prism//lib/prism/ripper_compat.rb#38 + def on_mlhs_new; end + + # source://prism//lib/prism/ripper_compat.rb#42 + def on_mrhs_add(list, item); end + + # source://prism//lib/prism/ripper_compat.rb#38 + def on_mrhs_new; end + + # source://prism//lib/prism/ripper_compat.rb#42 + def on_qsymbols_add(list, item); end + + # source://prism//lib/prism/ripper_compat.rb#38 + def on_qsymbols_new; end + + # source://prism//lib/prism/ripper_compat.rb#42 + def on_qwords_add(list, item); end + + # source://prism//lib/prism/ripper_compat.rb#38 + def on_qwords_new; end + + # source://prism//lib/prism/ripper_compat.rb#42 + def on_regexp_add(list, item); end + + # source://prism//lib/prism/ripper_compat.rb#38 + def on_regexp_new; end + + # source://prism//lib/prism/ripper_compat.rb#42 + def on_stmts_add(list, item); end + + # source://prism//lib/prism/ripper_compat.rb#38 + def on_stmts_new; end + + # source://prism//lib/prism/ripper_compat.rb#42 + def on_string_add(list, item); end + + # source://prism//lib/prism/ripper_compat.rb#42 + def on_symbols_add(list, item); end + + # source://prism//lib/prism/ripper_compat.rb#38 + def on_symbols_new; end + + # source://prism//lib/prism/ripper_compat.rb#42 + def on_word_add(list, item); end + + # source://prism//lib/prism/ripper_compat.rb#38 + def on_word_new; end + + # source://prism//lib/prism/ripper_compat.rb#42 + def on_words_add(list, item); end + + # source://prism//lib/prism/ripper_compat.rb#38 + def on_words_new; end + + # source://prism//lib/prism/ripper_compat.rb#42 + def on_xstring_add(list, item); end + + # source://prism//lib/prism/ripper_compat.rb#38 + def on_xstring_new; end +end + +# Represents the `self` keyword. +# +# self +# ^^^^ +# +# source://prism//lib/prism/node.rb#14218 +class Prism::SelfNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [SelfNode] a new instance of SelfNode + # + # source://prism//lib/prism/node.rb#14220 + sig { params(location: Location).void } + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#14225 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14230 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14240 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14235 + def compact_child_nodes; end + + # def copy: (**params) -> SelfNode + # + # source://prism//lib/prism/node.rb#14245 + sig { params(params: T.untyped).returns(SelfNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14230 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#14255 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#14259 + 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#14278 + 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#14288 + def type; end + end +end + +# source://prism//lib/prism/serialize.rb#22 +module Prism::Serialize + class << self + # source://prism//lib/prism/serialize.rb#27 + def load(input, serialized); end + + # source://prism//lib/prism/serialize.rb#37 + def load_tokens(source, serialized); end + end +end + +# source://prism//lib/prism/serialize.rb#41 +class Prism::Serialize::Loader + # @return [Loader] a new instance of Loader + # + # source://prism//lib/prism/serialize.rb#45 + def initialize(source, serialized); end + + # Returns the value of attribute constant_pool. + # + # source://prism//lib/prism/serialize.rb#43 + def constant_pool; end + + # Returns the value of attribute constant_pool_offset. + # + # source://prism//lib/prism/serialize.rb#43 + def constant_pool_offset; end + + # Returns the value of attribute encoding. + # + # source://prism//lib/prism/serialize.rb#42 + def encoding; end + + # Returns the value of attribute input. + # + # source://prism//lib/prism/serialize.rb#42 + def input; end + + # Returns the value of attribute io. + # + # source://prism//lib/prism/serialize.rb#42 + def io; end + + # source://prism//lib/prism/serialize.rb#78 + def load_comments; end + + # source://prism//lib/prism/serialize.rb#69 + def load_encoding; end + + # source://prism//lib/prism/serialize.rb#73 + def load_force_encoding; end + + # source://prism//lib/prism/serialize.rb#60 + def load_header; end + + # source://prism//lib/prism/serialize.rb#82 + def load_metadata; end + + # source://prism//lib/prism/serialize.rb#116 + def load_nodes; end + + # source://prism//lib/prism/serialize.rb#128 + def load_result; end + + # source://prism//lib/prism/serialize.rb#90 + def load_tokens; end + + # source://prism//lib/prism/serialize.rb#103 + def load_tokens_result; end + + # Returns the value of attribute serialized. + # + # source://prism//lib/prism/serialize.rb#42 + def serialized; end + + # Returns the value of attribute source. + # + # source://prism//lib/prism/serialize.rb#43 + def source; end + + private + + # source://prism//lib/prism/serialize.rb#186 + def load_constant(index); end + + # source://prism//lib/prism/serialize.rb#162 + def load_embedded_string; end + + # source://prism//lib/prism/serialize.rb#178 + def load_location; end + + # source://prism//lib/prism/serialize.rb#217 + def load_node; end + + # source://prism//lib/prism/serialize.rb#211 + def load_optional_constant; end + + # source://prism//lib/prism/serialize.rb#182 + def load_optional_location; end + + # source://prism//lib/prism/serialize.rb#155 + def load_optional_node; end + + # source://prism//lib/prism/serialize.rb#207 + def load_required_constant; end + + # source://prism//lib/prism/serialize.rb#151 + def load_serialized_length; end + + # source://prism//lib/prism/serialize.rb#166 + def load_string; 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#137 + def load_varint; end +end + +# source://prism//lib/prism/serialize.rb#23 +Prism::Serialize::MAJOR_VERSION = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/serialize.rb#24 +Prism::Serialize::MINOR_VERSION = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/serialize.rb#25 +Prism::Serialize::PATCH_VERSION = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/serialize.rb#1098 +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#14297 +class Prism::SingletonClassNode < ::Prism::Node + # def initialize: (locals: Array[Symbol], class_keyword_loc: Location, operator_loc: Location, expression: Node, body: Node?, end_keyword_loc: Location, location: Location) -> void + # + # @return [SingletonClassNode] a new instance of SingletonClassNode + # + # source://prism//lib/prism/node.rb#14317 + sig do + params( + locals: T::Array[Symbol], + class_keyword_loc: Location, + operator_loc: Location, + expression: Node, + body: T.nilable(Node), + end_keyword_loc: Location, + location: Location + ).void + end + def initialize(locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#14328 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # attr_reader body: Node? + # + # source://prism//lib/prism/node.rb#14311 + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14333 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def class_keyword: () -> String + # + # source://prism//lib/prism/node.rb#14372 + sig { returns(String) } + def class_keyword; end + + # attr_reader class_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#14302 + def class_keyword_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14346 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14338 + def compact_child_nodes; end + + # def copy: (**params) -> SingletonClassNode + # + # source://prism//lib/prism/node.rb#14351 + sig { params(params: T.untyped).returns(SingletonClassNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14333 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#14367 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#14382 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#14314 + def end_keyword_loc; end + + # attr_reader expression: Node + # + # source://prism//lib/prism/node.rb#14308 + def expression; end + + # source://prism//lib/prism/node.rb#14386 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#14299 + def locals; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#14377 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#14305 + 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#14417 + 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#14427 + 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 + # @return [Source] a new instance of Source + # + # source://prism//lib/prism/parse_result.rb#10 + def initialize(source, offsets = T.unsafe(nil)); end + + # source://prism//lib/prism/parse_result.rb#43 + sig { params(value: Integer).returns(Integer) } + def column(value); end + + # Binary search through the offsets to find the line number for the given + # offset. + # + # source://prism//lib/prism/parse_result.rb#21 + sig { params(value: Integer).returns(Integer) } + def line(value); end + + # source://prism//lib/prism/parse_result.rb#39 + sig { params(value: Integer).returns(Integer) } + def line_offset(value); end + + # Returns the value of attribute offsets. + # + # source://prism//lib/prism/parse_result.rb#8 + sig { returns(T::Array[Integer]) } + def offsets; end + + # source://prism//lib/prism/parse_result.rb#15 + sig { params(offset: Integer, length: Integer).returns(String) } + def slice(offset, length); end + + # Returns the value of attribute source. + # + # source://prism//lib/prism/parse_result.rb#8 + sig { returns(String) } + def source; end + + private + + # source://prism//lib/prism/parse_result.rb#49 + def compute_offsets(code); end +end + +# Represents the use of the `__ENCODING__` keyword. +# +# __ENCODING__ +# ^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#14436 +class Prism::SourceEncodingNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [SourceEncodingNode] a new instance of SourceEncodingNode + # + # source://prism//lib/prism/node.rb#14438 + sig { params(location: Location).void } + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#14443 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14448 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14458 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14453 + def compact_child_nodes; end + + # def copy: (**params) -> SourceEncodingNode + # + # source://prism//lib/prism/node.rb#14463 + sig { params(params: T.untyped).returns(SourceEncodingNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14448 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#14473 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#14477 + 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#14496 + 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#14506 + def type; end + end +end + +# Represents the use of the `__FILE__` keyword. +# +# __FILE__ +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#14515 +class Prism::SourceFileNode < ::Prism::Node + # def initialize: (filepath: String, location: Location) -> void + # + # @return [SourceFileNode] a new instance of SourceFileNode + # + # source://prism//lib/prism/node.rb#14520 + sig { params(filepath: String, location: Location).void } + def initialize(filepath, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#14526 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14531 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14541 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14536 + def compact_child_nodes; end + + # def copy: (**params) -> SourceFileNode + # + # source://prism//lib/prism/node.rb#14546 + sig { params(params: T.untyped).returns(SourceFileNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14531 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#14557 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader filepath: String + # + # source://prism//lib/prism/node.rb#14517 + def filepath; end + + # source://prism//lib/prism/node.rb#14561 + 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#14581 + 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#14591 + def type; end + end +end + +# Represents the use of the `__LINE__` keyword. +# +# __LINE__ +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#14600 +class Prism::SourceLineNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [SourceLineNode] a new instance of SourceLineNode + # + # source://prism//lib/prism/node.rb#14602 + sig { params(location: Location).void } + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#14607 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14612 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14622 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14617 + def compact_child_nodes; end + + # def copy: (**params) -> SourceLineNode + # + # source://prism//lib/prism/node.rb#14627 + sig { params(params: T.untyped).returns(SourceLineNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14612 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#14637 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#14641 + 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#14660 + 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#14670 + def type; end + end +end + +# Represents the use of the splat operator. +# +# [*a] +# ^^ +# +# source://prism//lib/prism/node.rb#14679 +class Prism::SplatNode < ::Prism::Node + # def initialize: (operator_loc: Location, expression: Node?, location: Location) -> void + # + # @return [SplatNode] a new instance of SplatNode + # + # source://prism//lib/prism/node.rb#14687 + sig { params(operator_loc: Location, expression: T.nilable(Node), location: Location).void } + def initialize(operator_loc, expression, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#14694 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14699 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14711 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14704 + def compact_child_nodes; end + + # def copy: (**params) -> SplatNode + # + # source://prism//lib/prism/node.rb#14716 + sig { params(params: T.untyped).returns(SplatNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14699 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#14728 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader expression: Node? + # + # source://prism//lib/prism/node.rb#14684 + def expression; end + + # source://prism//lib/prism/node.rb#14737 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#14733 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#14681 + 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#14763 + 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#14773 + def type; end + end +end + +# Represents a set of statements contained within some scope. +# +# foo; bar; baz +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#14782 +class Prism::StatementsNode < ::Prism::Node + # def initialize: (body: Array[Node], location: Location) -> void + # + # @return [StatementsNode] a new instance of StatementsNode + # + # source://prism//lib/prism/node.rb#14787 + sig { params(body: T::Array[Node], location: Location).void } + def initialize(body, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#14793 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # attr_reader body: Array[Node] + # + # source://prism//lib/prism/node.rb#14784 + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14798 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14808 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14803 + def compact_child_nodes; end + + # def copy: (**params) -> StatementsNode + # + # source://prism//lib/prism/node.rb#14813 + sig { params(params: T.untyped).returns(StatementsNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14798 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#14824 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#14828 + 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#14848 + 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#14858 + def type; end + end +end + +# Represents the use of compile-time string concatenation. +# +# "foo" "bar" +# ^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#14867 +class Prism::StringConcatNode < ::Prism::Node + # def initialize: (left: Node, right: Node, location: Location) -> void + # + # @return [StringConcatNode] a new instance of StringConcatNode + # + # source://prism//lib/prism/node.rb#14875 + sig { params(left: Node, right: Node, location: Location).void } + def initialize(left, right, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#14882 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14887 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14897 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14892 + def compact_child_nodes; end + + # def copy: (**params) -> StringConcatNode + # + # source://prism//lib/prism/node.rb#14902 + sig { params(params: T.untyped).returns(StringConcatNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14887 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#14914 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#14918 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader left: Node + # + # source://prism//lib/prism/node.rb#14869 + def left; end + + # attr_reader right: Node + # + # source://prism//lib/prism/node.rb#14872 + 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#14941 + 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#14951 + def type; end + end +end + +# source://prism//lib/prism/node.rb#16370 +module Prism::StringFlags; end + +# frozen by virtue of a `frozen_string_literal` comment +# +# source://prism//lib/prism/node.rb#16372 +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#14967 +class Prism::StringNode < ::Prism::Node + # def initialize: (flags: Integer, opening_loc: Location?, content_loc: Location, closing_loc: Location?, unescaped: String, location: Location) -> void + # + # @return [StringNode] a new instance of StringNode + # + # source://prism//lib/prism/node.rb#14984 + sig do + params( + flags: Integer, + opening_loc: T.nilable(Location), + content_loc: Location, + closing_loc: T.nilable(Location), + unescaped: String, + location: Location + ).void + end + def initialize(flags, opening_loc, content_loc, closing_loc, unescaped, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#14994 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14999 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#15049 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#14978 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15009 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15004 + def compact_child_nodes; end + + # def content: () -> String + # + # source://prism//lib/prism/node.rb#15044 + sig { returns(String) } + def content; end + + # attr_reader content_loc: Location + # + # source://prism//lib/prism/node.rb#14975 + def content_loc; end + + # def copy: (**params) -> StringNode + # + # source://prism//lib/prism/node.rb#15014 + sig { params(params: T.untyped).returns(StringNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14999 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#15029 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # def frozen?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15034 + sig { returns(T::Boolean) } + def frozen?; end + + # source://prism//lib/prism/node.rb#15053 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#15039 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#14972 + 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#15078 + def type; end + + # attr_reader unescaped: String + # + # source://prism//lib/prism/node.rb#14981 + def unescaped; end + + private + + # Returns the value of attribute flags. + # + # source://prism//lib/prism/node.rb#14969 + 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#15088 + 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#15100 +class Prism::SuperNode < ::Prism::Node + # def initialize: (keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, block: Node?, location: Location) -> void + # + # @return [SuperNode] a new instance of SuperNode + # + # source://prism//lib/prism/node.rb#15117 + sig do + params( + keyword_loc: Location, + lparen_loc: T.nilable(Location), + arguments: T.nilable(ArgumentsNode), + rparen_loc: T.nilable(Location), + block: T.nilable(Node), + location: Location + ).void + end + def initialize(keyword_loc, lparen_loc, arguments, rparen_loc, block, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#15127 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#15108 + def arguments; end + + # attr_reader block: Node? + # + # source://prism//lib/prism/node.rb#15114 + def block; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15132 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15145 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15137 + def compact_child_nodes; end + + # def copy: (**params) -> SuperNode + # + # source://prism//lib/prism/node.rb#15150 + sig { params(params: T.untyped).returns(SuperNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15132 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#15165 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#15184 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#15170 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#15102 + def keyword_loc; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#15175 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://prism//lib/prism/node.rb#15105 + def lparen_loc; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#15180 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://prism//lib/prism/node.rb#15111 + 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#15218 + 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#15228 + def type; end + end +end + +# Represents a symbol literal or a symbol contained within a `%i` list. +# +# :foo +# ^^^^ +# +# %i[foo] +# ^^^ +# +# source://prism//lib/prism/node.rb#15240 +class Prism::SymbolNode < ::Prism::Node + # def initialize: (opening_loc: Location?, value_loc: Location?, closing_loc: Location?, unescaped: String, location: Location) -> void + # + # @return [SymbolNode] a new instance of SymbolNode + # + # source://prism//lib/prism/node.rb#15254 + sig do + params( + opening_loc: T.nilable(Location), + value_loc: T.nilable(Location), + closing_loc: T.nilable(Location), + unescaped: String, + location: Location + ).void + end + def initialize(opening_loc, value_loc, closing_loc, unescaped, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#15263 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15268 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#15312 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#15248 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15278 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15273 + def compact_child_nodes; end + + # def copy: (**params) -> SymbolNode + # + # source://prism//lib/prism/node.rb#15283 + sig { params(params: T.untyped).returns(SymbolNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15268 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#15297 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#15316 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#15302 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#15242 + 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#15339 + def type; end + + # attr_reader unescaped: String + # + # source://prism//lib/prism/node.rb#15251 + def unescaped; end + + # def value: () -> String? + # + # source://prism//lib/prism/node.rb#15307 + sig { returns(T.nilable(String)) } + def value; end + + # attr_reader value_loc: Location? + # + # source://prism//lib/prism/node.rb#15245 + def value_loc; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #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#15349 + def type; end + end +end + +# This represents a token from the Ruby source. +# +# source://prism//lib/prism/parse_result.rb#276 +class Prism::Token + # @return [Token] a new instance of Token + # + # source://prism//lib/prism/parse_result.rb#279 + sig { params(type: T.untyped, value: String, location: Location).void } + def initialize(type, value, location); end + + # source://prism//lib/prism/parse_result.rb#303 + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other); end + + # source://prism//lib/prism/parse_result.rb#285 + sig { params(keys: T.untyped).returns(T.untyped) } + def deconstruct_keys(keys); end + + # Returns the value of attribute location. + # + # source://prism//lib/prism/parse_result.rb#277 + sig { returns(Location) } + def location; end + + # source://prism//lib/prism/parse_result.rb#289 + sig { params(q: T.untyped).returns(T.untyped) } + def pretty_print(q); end + + # Returns the value of attribute type. + # + # source://prism//lib/prism/parse_result.rb#277 + sig { returns(T.untyped) } + def type; end + + # Returns the value of attribute value. + # + # source://prism//lib/prism/parse_result.rb#277 + sig { returns(String) } + def value; end +end + +# Represents the use of the literal `true` keyword. +# +# true +# ^^^^ +# +# source://prism//lib/prism/node.rb#15358 +class Prism::TrueNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [TrueNode] a new instance of TrueNode + # + # source://prism//lib/prism/node.rb#15360 + sig { params(location: Location).void } + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#15365 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15370 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15380 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15375 + def compact_child_nodes; end + + # def copy: (**params) -> TrueNode + # + # source://prism//lib/prism/node.rb#15385 + sig { params(params: T.untyped).returns(TrueNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15370 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#15395 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#15399 + 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#15418 + 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#15428 + def type; end + end +end + +# Represents the use of the `undef` keyword. +# +# undef :foo, :bar, :baz +# ^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#15437 +class Prism::UndefNode < ::Prism::Node + # def initialize: (names: Array[Node], keyword_loc: Location, location: Location) -> void + # + # @return [UndefNode] a new instance of UndefNode + # + # source://prism//lib/prism/node.rb#15445 + sig { params(names: T::Array[Node], keyword_loc: Location, location: Location).void } + def initialize(names, keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#15452 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15457 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15467 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15462 + def compact_child_nodes; end + + # def copy: (**params) -> UndefNode + # + # source://prism//lib/prism/node.rb#15472 + sig { params(params: T.untyped).returns(UndefNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15457 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#15484 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#15493 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#15489 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#15442 + def keyword_loc; end + + # attr_reader names: Array[Node] + # + # source://prism//lib/prism/node.rb#15439 + 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#15514 + 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#15524 + 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#15536 +class Prism::UnlessNode < ::Prism::Node + # def initialize: (keyword_loc: Location, predicate: Node, statements: StatementsNode?, consequent: ElseNode?, end_keyword_loc: Location?, location: Location) -> void + # + # @return [UnlessNode] a new instance of UnlessNode + # + # source://prism//lib/prism/node.rb#15553 + sig do + params( + keyword_loc: Location, + predicate: Node, + statements: T.nilable(StatementsNode), + consequent: T.nilable(ElseNode), + end_keyword_loc: T.nilable(Location), + location: Location + ).void + end + def initialize(keyword_loc, predicate, statements, consequent, end_keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#15563 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15572 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15586 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15577 + def compact_child_nodes; end + + # attr_reader consequent: ElseNode? + # + # source://prism//lib/prism/node.rb#15547 + def consequent; end + + # def copy: (**params) -> UnlessNode + # + # source://prism//lib/prism/node.rb#15591 + sig { params(params: T.untyped).returns(UnlessNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15572 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#15606 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # def end_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#15616 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#15550 + def end_keyword_loc; end + + # source://prism//lib/prism/node.rb#15620 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#15611 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#15538 + def keyword_loc; end + + # attr_reader predicate: Node + # + # source://prism//lib/prism/node.rb#15541 + def predicate; end + + # source://prism//lib/prism/node.rb#15567 + def set_newline_flag(newline_marked); end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#15544 + 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#15655 + 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#15665 + 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#15677 +class Prism::UntilNode < ::Prism::Node + # def initialize: (keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?, flags: Integer, location: Location) -> void + # + # @return [UntilNode] a new instance of UntilNode + # + # source://prism//lib/prism/node.rb#15694 + sig do + params( + keyword_loc: Location, + closing_loc: T.nilable(Location), + predicate: Node, + statements: T.nilable(StatementsNode), + flags: Integer, + location: Location + ).void + end + def initialize(keyword_loc, closing_loc, predicate, statements, flags, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#15704 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def begin_modifier?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15761 + sig { returns(T::Boolean) } + def begin_modifier?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15713 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#15756 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#15682 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15726 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15718 + def compact_child_nodes; end + + # def copy: (**params) -> UntilNode + # + # source://prism//lib/prism/node.rb#15731 + sig { params(params: T.untyped).returns(UntilNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15713 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#15746 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#15765 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#15751 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#15679 + def keyword_loc; end + + # attr_reader predicate: Node + # + # source://prism//lib/prism/node.rb#15685 + def predicate; end + + # source://prism//lib/prism/node.rb#15708 + def set_newline_flag(newline_marked); end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#15688 + 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#15796 + def type; end + + private + + # Returns the value of attribute flags. + # + # source://prism//lib/prism/node.rb#15691 + 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#15806 + 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#46 +class Prism::Visitor < ::Prism::BasicVisitor + # Visit a AliasGlobalVariableNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: AliasGlobalVariableNode).void } + def visit_alias_global_variable_node(node); end + + # Visit a AliasMethodNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: AliasMethodNode).void } + def visit_alias_method_node(node); end + + # Visit a AlternationPatternNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: AlternationPatternNode).void } + def visit_alternation_pattern_node(node); end + + # Visit a AndNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: AndNode).void } + def visit_and_node(node); end + + # Visit a ArgumentsNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: ArgumentsNode).void } + def visit_arguments_node(node); end + + # Visit a ArrayNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: ArrayNode).void } + def visit_array_node(node); end + + # Visit a ArrayPatternNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: ArrayPatternNode).void } + def visit_array_pattern_node(node); end + + # Visit a AssocNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: AssocNode).void } + def visit_assoc_node(node); end + + # Visit a AssocSplatNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: AssocSplatNode).void } + def visit_assoc_splat_node(node); end + + # Visit a BackReferenceReadNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: BackReferenceReadNode).void } + def visit_back_reference_read_node(node); end + + # Visit a BeginNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: BeginNode).void } + def visit_begin_node(node); end + + # Visit a BlockArgumentNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: BlockArgumentNode).void } + def visit_block_argument_node(node); end + + # Visit a BlockLocalVariableNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: BlockLocalVariableNode).void } + def visit_block_local_variable_node(node); end + + # Visit a BlockNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: BlockNode).void } + def visit_block_node(node); end + + # Visit a BlockParameterNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: BlockParameterNode).void } + def visit_block_parameter_node(node); end + + # Visit a BlockParametersNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: BlockParametersNode).void } + def visit_block_parameters_node(node); end + + # Visit a BreakNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: BreakNode).void } + def visit_break_node(node); end + + # Visit a CallAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: CallAndWriteNode).void } + def visit_call_and_write_node(node); end + + # Visit a CallNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: CallNode).void } + def visit_call_node(node); end + + # Visit a CallOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: CallOperatorWriteNode).void } + def visit_call_operator_write_node(node); end + + # Visit a CallOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: CallOrWriteNode).void } + def visit_call_or_write_node(node); end + + # Visit a CapturePatternNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: CapturePatternNode).void } + def visit_capture_pattern_node(node); end + + # Visit a CaseNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: CaseNode).void } + def visit_case_node(node); end + + # Visit a ClassNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: ClassNode).void } + def visit_class_node(node); end + + # Visit a ClassVariableAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: ClassVariableAndWriteNode).void } + def visit_class_variable_and_write_node(node); end + + # Visit a ClassVariableOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: ClassVariableOperatorWriteNode).void } + def visit_class_variable_operator_write_node(node); end + + # Visit a ClassVariableOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: ClassVariableOrWriteNode).void } + def visit_class_variable_or_write_node(node); end + + # Visit a ClassVariableReadNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: ClassVariableReadNode).void } + def visit_class_variable_read_node(node); end + + # Visit a ClassVariableTargetNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: ClassVariableTargetNode).void } + def visit_class_variable_target_node(node); end + + # Visit a ClassVariableWriteNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: ClassVariableWriteNode).void } + def visit_class_variable_write_node(node); end + + # Visit a ConstantAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: ConstantAndWriteNode).void } + def visit_constant_and_write_node(node); end + + # Visit a ConstantOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: ConstantOperatorWriteNode).void } + def visit_constant_operator_write_node(node); end + + # Visit a ConstantOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: ConstantOrWriteNode).void } + def visit_constant_or_write_node(node); end + + # Visit a ConstantPathAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: ConstantPathAndWriteNode).void } + def visit_constant_path_and_write_node(node); end + + # Visit a ConstantPathNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: ConstantPathNode).void } + def visit_constant_path_node(node); end + + # Visit a ConstantPathOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: ConstantPathOperatorWriteNode).void } + def visit_constant_path_operator_write_node(node); end + + # Visit a ConstantPathOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: ConstantPathOrWriteNode).void } + def visit_constant_path_or_write_node(node); end + + # Visit a ConstantPathTargetNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: ConstantPathTargetNode).void } + def visit_constant_path_target_node(node); end + + # Visit a ConstantPathWriteNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: ConstantPathWriteNode).void } + def visit_constant_path_write_node(node); end + + # Visit a ConstantReadNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: ConstantReadNode).void } + def visit_constant_read_node(node); end + + # Visit a ConstantTargetNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: ConstantTargetNode).void } + def visit_constant_target_node(node); end + + # Visit a ConstantWriteNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: ConstantWriteNode).void } + def visit_constant_write_node(node); end + + # Visit a DefNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: DefNode).void } + def visit_def_node(node); end + + # Visit a DefinedNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: DefinedNode).void } + def visit_defined_node(node); end + + # Visit a ElseNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: ElseNode).void } + def visit_else_node(node); end + + # Visit a EmbeddedStatementsNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: EmbeddedStatementsNode).void } + def visit_embedded_statements_node(node); end + + # Visit a EmbeddedVariableNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: EmbeddedVariableNode).void } + def visit_embedded_variable_node(node); end + + # Visit a EnsureNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: EnsureNode).void } + def visit_ensure_node(node); end + + # Visit a FalseNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: FalseNode).void } + def visit_false_node(node); end + + # Visit a FindPatternNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: FindPatternNode).void } + def visit_find_pattern_node(node); end + + # Visit a FlipFlopNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: FlipFlopNode).void } + def visit_flip_flop_node(node); end + + # Visit a FloatNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: FloatNode).void } + def visit_float_node(node); end + + # Visit a ForNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: ForNode).void } + def visit_for_node(node); end + + # Visit a ForwardingArgumentsNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: ForwardingArgumentsNode).void } + def visit_forwarding_arguments_node(node); end + + # Visit a ForwardingParameterNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: ForwardingParameterNode).void } + def visit_forwarding_parameter_node(node); end + + # Visit a ForwardingSuperNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: ForwardingSuperNode).void } + def visit_forwarding_super_node(node); end + + # Visit a GlobalVariableAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: GlobalVariableAndWriteNode).void } + def visit_global_variable_and_write_node(node); end + + # Visit a GlobalVariableOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: GlobalVariableOperatorWriteNode).void } + def visit_global_variable_operator_write_node(node); end + + # Visit a GlobalVariableOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: GlobalVariableOrWriteNode).void } + def visit_global_variable_or_write_node(node); end + + # Visit a GlobalVariableReadNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: GlobalVariableReadNode).void } + def visit_global_variable_read_node(node); end + + # Visit a GlobalVariableTargetNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: GlobalVariableTargetNode).void } + def visit_global_variable_target_node(node); end + + # Visit a GlobalVariableWriteNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: GlobalVariableWriteNode).void } + def visit_global_variable_write_node(node); end + + # Visit a HashNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: HashNode).void } + def visit_hash_node(node); end + + # Visit a HashPatternNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: HashPatternNode).void } + def visit_hash_pattern_node(node); end + + # Visit a IfNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: IfNode).void } + def visit_if_node(node); end + + # Visit a ImaginaryNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: ImaginaryNode).void } + def visit_imaginary_node(node); end + + # Visit a ImplicitNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: ImplicitNode).void } + def visit_implicit_node(node); end + + # Visit a InNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: InNode).void } + def visit_in_node(node); end + + # Visit a IndexAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: IndexAndWriteNode).void } + def visit_index_and_write_node(node); end + + # Visit a IndexOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: IndexOperatorWriteNode).void } + def visit_index_operator_write_node(node); end + + # Visit a IndexOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: IndexOrWriteNode).void } + def visit_index_or_write_node(node); end + + # Visit a InstanceVariableAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: InstanceVariableAndWriteNode).void } + def visit_instance_variable_and_write_node(node); end + + # Visit a InstanceVariableOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: InstanceVariableOperatorWriteNode).void } + def visit_instance_variable_operator_write_node(node); end + + # Visit a InstanceVariableOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: InstanceVariableOrWriteNode).void } + def visit_instance_variable_or_write_node(node); end + + # Visit a InstanceVariableReadNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: InstanceVariableReadNode).void } + def visit_instance_variable_read_node(node); end + + # Visit a InstanceVariableTargetNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: InstanceVariableTargetNode).void } + def visit_instance_variable_target_node(node); end + + # Visit a InstanceVariableWriteNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: InstanceVariableWriteNode).void } + def visit_instance_variable_write_node(node); end + + # Visit a IntegerNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: IntegerNode).void } + def visit_integer_node(node); end + + # Visit a InterpolatedMatchLastLineNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: InterpolatedMatchLastLineNode).void } + def visit_interpolated_match_last_line_node(node); end + + # Visit a InterpolatedRegularExpressionNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: InterpolatedRegularExpressionNode).void } + def visit_interpolated_regular_expression_node(node); end + + # Visit a InterpolatedStringNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: InterpolatedStringNode).void } + def visit_interpolated_string_node(node); end + + # Visit a InterpolatedSymbolNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: InterpolatedSymbolNode).void } + def visit_interpolated_symbol_node(node); end + + # Visit a InterpolatedXStringNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: InterpolatedXStringNode).void } + def visit_interpolated_x_string_node(node); end + + # Visit a KeywordHashNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: KeywordHashNode).void } + def visit_keyword_hash_node(node); end + + # Visit a KeywordParameterNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: KeywordParameterNode).void } + def visit_keyword_parameter_node(node); end + + # Visit a KeywordRestParameterNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: KeywordRestParameterNode).void } + def visit_keyword_rest_parameter_node(node); end + + # Visit a LambdaNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: LambdaNode).void } + def visit_lambda_node(node); end + + # Visit a LocalVariableAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: LocalVariableAndWriteNode).void } + def visit_local_variable_and_write_node(node); end + + # Visit a LocalVariableOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: LocalVariableOperatorWriteNode).void } + def visit_local_variable_operator_write_node(node); end + + # Visit a LocalVariableOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: LocalVariableOrWriteNode).void } + def visit_local_variable_or_write_node(node); end + + # Visit a LocalVariableReadNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: LocalVariableReadNode).void } + def visit_local_variable_read_node(node); end + + # Visit a LocalVariableTargetNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: LocalVariableTargetNode).void } + def visit_local_variable_target_node(node); end + + # Visit a LocalVariableWriteNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: LocalVariableWriteNode).void } + def visit_local_variable_write_node(node); end + + # Visit a MatchLastLineNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: MatchLastLineNode).void } + def visit_match_last_line_node(node); end + + # Visit a MatchPredicateNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: MatchPredicateNode).void } + def visit_match_predicate_node(node); end + + # Visit a MatchRequiredNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: MatchRequiredNode).void } + def visit_match_required_node(node); end + + # Visit a MatchWriteNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: MatchWriteNode).void } + def visit_match_write_node(node); end + + # Visit a MissingNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: MissingNode).void } + def visit_missing_node(node); end + + # Visit a ModuleNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: ModuleNode).void } + def visit_module_node(node); end + + # Visit a MultiTargetNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: MultiTargetNode).void } + def visit_multi_target_node(node); end + + # Visit a MultiWriteNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: MultiWriteNode).void } + def visit_multi_write_node(node); end + + # Visit a NextNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: NextNode).void } + def visit_next_node(node); end + + # Visit a NilNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: NilNode).void } + def visit_nil_node(node); end + + # Visit a NoKeywordsParameterNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: NoKeywordsParameterNode).void } + def visit_no_keywords_parameter_node(node); end + + # Visit a NumberedReferenceReadNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: NumberedReferenceReadNode).void } + def visit_numbered_reference_read_node(node); end + + # Visit a OptionalParameterNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: OptionalParameterNode).void } + def visit_optional_parameter_node(node); end + + # Visit a OrNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: OrNode).void } + def visit_or_node(node); end + + # Visit a ParametersNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: ParametersNode).void } + def visit_parameters_node(node); end + + # Visit a ParenthesesNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: ParenthesesNode).void } + def visit_parentheses_node(node); end + + # Visit a PinnedExpressionNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: PinnedExpressionNode).void } + def visit_pinned_expression_node(node); end + + # Visit a PinnedVariableNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: PinnedVariableNode).void } + def visit_pinned_variable_node(node); end + + # Visit a PostExecutionNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: PostExecutionNode).void } + def visit_post_execution_node(node); end + + # Visit a PreExecutionNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: PreExecutionNode).void } + def visit_pre_execution_node(node); end + + # Visit a ProgramNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: ProgramNode).void } + def visit_program_node(node); end + + # Visit a RangeNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: RangeNode).void } + def visit_range_node(node); end + + # Visit a RationalNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: RationalNode).void } + def visit_rational_node(node); end + + # Visit a RedoNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: RedoNode).void } + def visit_redo_node(node); end + + # Visit a RegularExpressionNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: RegularExpressionNode).void } + def visit_regular_expression_node(node); end + + # Visit a RequiredParameterNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: RequiredParameterNode).void } + def visit_required_parameter_node(node); end + + # Visit a RescueModifierNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: RescueModifierNode).void } + def visit_rescue_modifier_node(node); end + + # Visit a RescueNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: RescueNode).void } + def visit_rescue_node(node); end + + # Visit a RestParameterNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: RestParameterNode).void } + def visit_rest_parameter_node(node); end + + # Visit a RetryNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: RetryNode).void } + def visit_retry_node(node); end + + # Visit a ReturnNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: ReturnNode).void } + def visit_return_node(node); end + + # Visit a SelfNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: SelfNode).void } + def visit_self_node(node); end + + # Visit a SingletonClassNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: SingletonClassNode).void } + def visit_singleton_class_node(node); end + + # Visit a SourceEncodingNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: SourceEncodingNode).void } + def visit_source_encoding_node(node); end + + # Visit a SourceFileNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: SourceFileNode).void } + def visit_source_file_node(node); end + + # Visit a SourceLineNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: SourceLineNode).void } + def visit_source_line_node(node); end + + # Visit a SplatNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: SplatNode).void } + def visit_splat_node(node); end + + # Visit a StatementsNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: StatementsNode).void } + def visit_statements_node(node); end + + # Visit a StringConcatNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: StringConcatNode).void } + def visit_string_concat_node(node); end + + # Visit a StringNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: StringNode).void } + def visit_string_node(node); end + + # Visit a SuperNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: SuperNode).void } + def visit_super_node(node); end + + # Visit a SymbolNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: SymbolNode).void } + def visit_symbol_node(node); end + + # Visit a TrueNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: TrueNode).void } + def visit_true_node(node); end + + # Visit a UndefNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: UndefNode).void } + def visit_undef_node(node); end + + # Visit a UnlessNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: UnlessNode).void } + def visit_unless_node(node); end + + # Visit a UntilNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: UntilNode).void } + def visit_until_node(node); end + + # Visit a WhenNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: WhenNode).void } + def visit_when_node(node); end + + # Visit a WhileNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: WhileNode).void } + def visit_while_node(node); end + + # Visit a XStringNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: XStringNode).void } + def visit_x_string_node(node); end + + # Visit a YieldNode node + # + # source://prism//lib/prism/visitor.rb#22 + sig { params(node: 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#15817 +class Prism::WhenNode < ::Prism::Node + # def initialize: (keyword_loc: Location, conditions: Array[Node], statements: StatementsNode?, location: Location) -> void + # + # @return [WhenNode] a new instance of WhenNode + # + # source://prism//lib/prism/node.rb#15828 + sig do + params( + keyword_loc: Location, + conditions: T::Array[Node], + statements: T.nilable(StatementsNode), + location: Location + ).void + end + def initialize(keyword_loc, conditions, statements, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#15836 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15841 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15854 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15846 + def compact_child_nodes; end + + # attr_reader conditions: Array[Node] + # + # source://prism//lib/prism/node.rb#15822 + def conditions; end + + # def copy: (**params) -> WhenNode + # + # source://prism//lib/prism/node.rb#15859 + sig { params(params: T.untyped).returns(WhenNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15841 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#15872 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#15881 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#15877 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#15819 + def keyword_loc; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#15825 + 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#15908 + 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#15918 + 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#15930 +class Prism::WhileNode < ::Prism::Node + # def initialize: (keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?, flags: Integer, location: Location) -> void + # + # @return [WhileNode] a new instance of WhileNode + # + # source://prism//lib/prism/node.rb#15947 + sig do + params( + keyword_loc: Location, + closing_loc: T.nilable(Location), + predicate: Node, + statements: T.nilable(StatementsNode), + flags: Integer, + location: Location + ).void + end + def initialize(keyword_loc, closing_loc, predicate, statements, flags, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#15957 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def begin_modifier?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16014 + sig { returns(T::Boolean) } + def begin_modifier?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15966 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#16009 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#15935 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15979 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15971 + def compact_child_nodes; end + + # def copy: (**params) -> WhileNode + # + # source://prism//lib/prism/node.rb#15984 + sig { params(params: T.untyped).returns(WhileNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15966 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#15999 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#16018 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#16004 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#15932 + def keyword_loc; end + + # attr_reader predicate: Node + # + # source://prism//lib/prism/node.rb#15938 + def predicate; end + + # source://prism//lib/prism/node.rb#15961 + def set_newline_flag(newline_marked); end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#15941 + 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#16049 + def type; end + + private + + # Returns the value of attribute flags. + # + # source://prism//lib/prism/node.rb#15944 + 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#16059 + def type; end + end +end + +# Represents an xstring literal with no interpolation. +# +# `foo` +# ^^^^^ +# +# source://prism//lib/prism/node.rb#16068 +class Prism::XStringNode < ::Prism::Node + # def initialize: (opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location) -> void + # + # @return [XStringNode] a new instance of XStringNode + # + # source://prism//lib/prism/node.rb#16082 + sig do + params( + opening_loc: Location, + content_loc: Location, + closing_loc: Location, + unescaped: String, + location: Location + ).void + end + def initialize(opening_loc, content_loc, closing_loc, unescaped, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#16091 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16096 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#16140 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#16076 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16106 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16101 + def compact_child_nodes; end + + # def content: () -> String + # + # source://prism//lib/prism/node.rb#16135 + sig { returns(String) } + def content; end + + # attr_reader content_loc: Location + # + # source://prism//lib/prism/node.rb#16073 + def content_loc; end + + # def copy: (**params) -> XStringNode + # + # source://prism//lib/prism/node.rb#16111 + sig { params(params: T.untyped).returns(XStringNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16096 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#16125 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#16144 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#16130 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#16070 + 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#16167 + def type; end + + # attr_reader unescaped: String + # + # source://prism//lib/prism/node.rb#16079 + def unescaped; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #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#16177 + def type; end + end +end + +# Represents the use of the `yield` keyword. +# +# yield 1 +# ^^^^^^^ +# +# source://prism//lib/prism/node.rb#16186 +class Prism::YieldNode < ::Prism::Node + # def initialize: (keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, location: Location) -> void + # + # @return [YieldNode] a new instance of YieldNode + # + # source://prism//lib/prism/node.rb#16200 + sig do + params( + keyword_loc: Location, + lparen_loc: T.nilable(Location), + arguments: T.nilable(ArgumentsNode), + rparen_loc: T.nilable(Location), + location: Location + ).void + end + def initialize(keyword_loc, lparen_loc, arguments, rparen_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#16209 + sig { params(visitor: Visitor).void } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#16194 + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16214 + sig { returns(T::Array[T.nilable(Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16226 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16219 + def compact_child_nodes; end + + # def copy: (**params) -> YieldNode + # + # source://prism//lib/prism/node.rb#16231 + sig { params(params: T.untyped).returns(YieldNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16214 + sig { returns(T::Array[T.nilable(Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#16245 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Node, T::Array[Node], String, Token, T::Array[Token], Location))]) + end + def deconstruct_keys(keys); end + + # source://prism//lib/prism/node.rb#16264 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#16250 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#16188 + def keyword_loc; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#16255 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://prism//lib/prism/node.rb#16191 + def lparen_loc; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#16260 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://prism//lib/prism/node.rb#16197 + 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#16292 + 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#16302 + def type; end + end +end diff --git a/sorbet/rbi/gems/protocol-http1@0.15.0.rbi b/sorbet/rbi/gems/protocol-http1@0.16.0.rbi similarity index 87% rename from sorbet/rbi/gems/protocol-http1@0.15.0.rbi rename to sorbet/rbi/gems/protocol-http1@0.16.0.rbi index 2af1e6984..1f6506601 100644 --- a/sorbet/rbi/gems/protocol-http1@0.15.0.rbi +++ b/sorbet/rbi/gems/protocol-http1@0.16.0.rbi @@ -39,31 +39,34 @@ class Protocol::HTTP1::Body::Chunked < ::Protocol::HTTP::Body::Readable # source://protocol-http1//lib/protocol/http1/body/chunked.rb#24 def empty?; end - # source://protocol-http1//lib/protocol/http1/body/chunked.rb#65 + # source://protocol-http1//lib/protocol/http1/body/chunked.rb#73 def inspect; end # Follows the procedure outlined in https://tools.ietf.org/html/rfc7230#section-4.1.3 # - # source://protocol-http1//lib/protocol/http1/body/chunked.rb#39 + # source://protocol-http1//lib/protocol/http1/body/chunked.rb#41 def read; end private - # source://protocol-http1//lib/protocol/http1/body/chunked.rb#75 + # source://protocol-http1//lib/protocol/http1/body/chunked.rb#83 def read_line; end # @return [Boolean] # - # source://protocol-http1//lib/protocol/http1/body/chunked.rb#71 + # source://protocol-http1//lib/protocol/http1/body/chunked.rb#79 def read_line?; end - # source://protocol-http1//lib/protocol/http1/body/chunked.rb#79 + # source://protocol-http1//lib/protocol/http1/body/chunked.rb#87 def read_trailer; end end # source://protocol-http1//lib/protocol/http1/body/chunked.rb#12 Protocol::HTTP1::Body::Chunked::CRLF = T.let(T.unsafe(nil), String) +# source://protocol-http1//lib/protocol/http1/body/chunked.rb#38 +Protocol::HTTP1::Body::Chunked::VALID_CHUNK_LENGTH = T.let(T.unsafe(nil), Regexp) + # source://protocol-http1//lib/protocol/http1/body/fixed.rb#11 class Protocol::HTTP1::Body::Fixed < ::Protocol::HTTP::Body::Readable # @return [Fixed] a new instance of Fixed @@ -163,7 +166,7 @@ class Protocol::HTTP1::Connection # source://protocol-http1//lib/protocol/http1/connection.rb#65 def count; end - # source://protocol-http1//lib/protocol/http1/connection.rb#401 + # source://protocol-http1//lib/protocol/http1/connection.rb#412 def extract_content_length(headers); end # Effectively close the connection and return the underlying IO. @@ -183,45 +186,45 @@ class Protocol::HTTP1::Connection # source://protocol-http1//lib/protocol/http1/connection.rb#67 def persistent?(version, method, headers); end - # source://protocol-http1//lib/protocol/http1/connection.rb#462 + # source://protocol-http1//lib/protocol/http1/connection.rb#473 def read_body(headers, remainder = T.unsafe(nil)); end - # source://protocol-http1//lib/protocol/http1/connection.rb#378 + # source://protocol-http1//lib/protocol/http1/connection.rb#387 def read_chunked_body(headers); end - # source://protocol-http1//lib/protocol/http1/connection.rb#382 + # source://protocol-http1//lib/protocol/http1/connection.rb#391 def read_fixed_body(length); end - # source://protocol-http1//lib/protocol/http1/connection.rb#390 + # source://protocol-http1//lib/protocol/http1/connection.rb#399 def read_head_body(length); end - # source://protocol-http1//lib/protocol/http1/connection.rb#195 + # source://protocol-http1//lib/protocol/http1/connection.rb#204 def read_headers; end - # source://protocol-http1//lib/protocol/http1/connection.rb#155 + # source://protocol-http1//lib/protocol/http1/connection.rb#164 def read_line; end # @return [Boolean] # - # source://protocol-http1//lib/protocol/http1/connection.rb#151 + # source://protocol-http1//lib/protocol/http1/connection.rb#160 def read_line?; end - # source://protocol-http1//lib/protocol/http1/connection.rb#386 + # source://protocol-http1//lib/protocol/http1/connection.rb#395 def read_remainder_body; end - # source://protocol-http1//lib/protocol/http1/connection.rb#159 + # source://protocol-http1//lib/protocol/http1/connection.rb#168 def read_request; end - # source://protocol-http1//lib/protocol/http1/connection.rb#447 + # source://protocol-http1//lib/protocol/http1/connection.rb#458 def read_request_body(method, headers); end - # source://protocol-http1//lib/protocol/http1/connection.rb#179 + # source://protocol-http1//lib/protocol/http1/connection.rb#188 def read_response(method); end - # source://protocol-http1//lib/protocol/http1/connection.rb#411 + # source://protocol-http1//lib/protocol/http1/connection.rb#422 def read_response_body(method, status, headers); end - # source://protocol-http1//lib/protocol/http1/connection.rb#394 + # source://protocol-http1//lib/protocol/http1/connection.rb#403 def read_tunnel_body; end # Returns the value of attribute stream. @@ -229,13 +232,13 @@ class Protocol::HTTP1::Connection # source://protocol-http1//lib/protocol/http1/connection.rb#59 def stream; end - # source://protocol-http1//lib/protocol/http1/connection.rb#347 + # source://protocol-http1//lib/protocol/http1/connection.rb#356 def write_body(version, body, head = T.unsafe(nil), trailer = T.unsafe(nil)); end - # source://protocol-http1//lib/protocol/http1/connection.rb#327 + # source://protocol-http1//lib/protocol/http1/connection.rb#336 def write_body_and_close(body, head); end - # source://protocol-http1//lib/protocol/http1/connection.rb#293 + # source://protocol-http1//lib/protocol/http1/connection.rb#302 def write_chunked_body(body, head, trailer = T.unsafe(nil)); end # Write the appropriate header for connection persistence. @@ -243,40 +246,43 @@ class Protocol::HTTP1::Connection # source://protocol-http1//lib/protocol/http1/connection.rb#88 def write_connection_header(version); end - # source://protocol-http1//lib/protocol/http1/connection.rb#254 + # source://protocol-http1//lib/protocol/http1/connection.rb#263 def write_empty_body(body); end - # source://protocol-http1//lib/protocol/http1/connection.rb#261 + # source://protocol-http1//lib/protocol/http1/connection.rb#270 def write_fixed_length_body(body, length, head); end - # source://protocol-http1//lib/protocol/http1/connection.rb#131 + # source://protocol-http1//lib/protocol/http1/connection.rb#140 def write_headers(headers); end + # source://protocol-http1//lib/protocol/http1/connection.rb#131 + def write_interim_response(version, status, headers, reason = T.unsafe(nil)); end + # source://protocol-http1//lib/protocol/http1/connection.rb#117 def write_request(authority, method, path, version, headers); end # source://protocol-http1//lib/protocol/http1/connection.rb#124 def write_response(version, status, headers, reason = T.unsafe(nil)); end - # source://protocol-http1//lib/protocol/http1/connection.rb#234 + # source://protocol-http1//lib/protocol/http1/connection.rb#243 def write_tunnel_body(version, body = T.unsafe(nil)); end # @param protocol [String] the protocol to upgrade to. # - # source://protocol-http1//lib/protocol/http1/connection.rb#213 + # source://protocol-http1//lib/protocol/http1/connection.rb#222 def write_upgrade_body(protocol, body = T.unsafe(nil)); end # source://protocol-http1//lib/protocol/http1/connection.rb#96 def write_upgrade_header(upgrade); end end -# source://protocol-http1//lib/protocol/http1/connection.rb#399 +# source://protocol-http1//lib/protocol/http1/connection.rb#408 Protocol::HTTP1::Connection::CONNECT = T.let(T.unsafe(nil), String) # source://protocol-http1//lib/protocol/http1/connection.rb#47 Protocol::HTTP1::Connection::CRLF = T.let(T.unsafe(nil), String) -# source://protocol-http1//lib/protocol/http1/connection.rb#398 +# source://protocol-http1//lib/protocol/http1/connection.rb#407 Protocol::HTTP1::Connection::HEAD = T.let(T.unsafe(nil), String) # source://protocol-http1//lib/protocol/http1/connection.rb#48 @@ -285,6 +291,9 @@ Protocol::HTTP1::Connection::HTTP10 = T.let(T.unsafe(nil), String) # source://protocol-http1//lib/protocol/http1/connection.rb#49 Protocol::HTTP1::Connection::HTTP11 = T.let(T.unsafe(nil), String) +# source://protocol-http1//lib/protocol/http1/connection.rb#410 +Protocol::HTTP1::Connection::VALID_CONTENT_LENGTH = T.let(T.unsafe(nil), Regexp) + # The specified content length and the given content's length do not match. # # source://protocol-http1//lib/protocol/http1/error.rb#17 diff --git a/sorbet/rbi/gems/protocol-http@0.24.3.rbi b/sorbet/rbi/gems/protocol-http@0.25.0.rbi similarity index 73% rename from sorbet/rbi/gems/protocol-http@0.24.3.rbi rename to sorbet/rbi/gems/protocol-http@0.25.0.rbi index 98cab4248..8796340e3 100644 --- a/sorbet/rbi/gems/protocol-http@0.24.3.rbi +++ b/sorbet/rbi/gems/protocol-http@0.25.0.rbi @@ -4,13 +4,13 @@ # This is an autogenerated file for types exported from the `protocol-http` gem. # Please instead update this file by running `bin/tapioca gem protocol-http`. -# source://protocol-http//lib/protocol/http/body/readable.rb#6 +# source://protocol-http//lib/protocol/http/body/readable.rb#7 module Protocol; end -# source://protocol-http//lib/protocol/http/body/readable.rb#7 +# source://protocol-http//lib/protocol/http/body/readable.rb#8 module Protocol::HTTP; end -# source://protocol-http//lib/protocol/http/body/readable.rb#8 +# source://protocol-http//lib/protocol/http/body/readable.rb#9 module Protocol::HTTP::Body; end # A body which buffers all it's contents. @@ -121,21 +121,21 @@ end # def close(error = nil) -> close the stream immediately. # end # -# source://protocol-http//lib/protocol/http/body/readable.rb#18 +# source://protocol-http//lib/protocol/http/body/readable.rb#19 class Protocol::HTTP::Body::Readable # Write the body to the given stream. # - # source://protocol-http//lib/protocol/http/body/readable.rb#53 + # source://protocol-http//lib/protocol/http/body/readable.rb#54 def call(stream); end # The consumer can call stop to signal that the stream output has terminated. # - # source://protocol-http//lib/protocol/http/body/readable.rb#20 + # source://protocol-http//lib/protocol/http/body/readable.rb#21 def close(error = T.unsafe(nil)); end # Enumerate all chunks until finished, then invoke `#close`. # - # source://protocol-http//lib/protocol/http/body/readable.rb#68 + # source://protocol-http//lib/protocol/http/body/readable.rb#69 def each; end # Optimistically determine whether read (may) return any data. @@ -144,25 +144,25 @@ class Protocol::HTTP::Body::Readable # # @return [Boolean] # - # source://protocol-http//lib/protocol/http/body/readable.rb#26 + # source://protocol-http//lib/protocol/http/body/readable.rb#27 def empty?; end # Read all remaining chunks into a buffered body and close the underlying input. # - # source://protocol-http//lib/protocol/http/body/readable.rb#62 + # source://protocol-http//lib/protocol/http/body/readable.rb#63 def finish; end # Read all remaining chunks into a single binary string using `#each`. # - # source://protocol-http//lib/protocol/http/body/readable.rb#77 + # source://protocol-http//lib/protocol/http/body/readable.rb#82 def join; end - # source://protocol-http//lib/protocol/http/body/readable.rb#37 + # source://protocol-http//lib/protocol/http/body/readable.rb#38 def length; end # Read the next available chunk. # - # source://protocol-http//lib/protocol/http/body/readable.rb#42 + # source://protocol-http//lib/protocol/http/body/readable.rb#43 def read; end # Whether calling read will return a chunk of data without blocking. @@ -170,14 +170,14 @@ class Protocol::HTTP::Body::Readable # # @return [Boolean] # - # source://protocol-http//lib/protocol/http/body/readable.rb#33 + # source://protocol-http//lib/protocol/http/body/readable.rb#34 def ready?; end # Should the internal mechanism prefer to use {call}? # # @return [Boolean] # - # source://protocol-http//lib/protocol/http/body/readable.rb#48 + # source://protocol-http//lib/protocol/http/body/readable.rb#49 def stream?; end end @@ -226,74 +226,74 @@ end # The input stream is an IO-like object which contains the raw HTTP POST data. When applicable, its external encoding must be “ASCII-8BIT” and it must be opened in binary mode, for Ruby 1.9 compatibility. The input stream must respond to gets, each, read and rewind. # -# source://protocol-http//lib/protocol/http/body/stream.rb#12 +# source://protocol-http//lib/protocol/http/body/stream.rb#13 class Protocol::HTTP::Body::Stream include ::Protocol::HTTP::Body::Stream::Reader # @raise [ArgumentError] # @return [Stream] a new instance of Stream # - # source://protocol-http//lib/protocol/http/body/stream.rb#13 + # source://protocol-http//lib/protocol/http/body/stream.rb#14 def initialize(input = T.unsafe(nil), output = T.unsafe(nil)); end - # source://protocol-http//lib/protocol/http/body/stream.rb#142 + # source://protocol-http//lib/protocol/http/body/stream.rb#143 def <<(buffer); end # Close the input and output bodies. # - # source://protocol-http//lib/protocol/http/body/stream.rb#164 + # source://protocol-http//lib/protocol/http/body/stream.rb#165 def close(error = T.unsafe(nil)); end - # source://protocol-http//lib/protocol/http/body/stream.rb#149 + # source://protocol-http//lib/protocol/http/body/stream.rb#150 def close_read; end # close must never be called on the input stream. huh? # - # source://protocol-http//lib/protocol/http/body/stream.rb#158 + # source://protocol-http//lib/protocol/http/body/stream.rb#159 def close_write; end # Whether the stream has been closed. # # @return [Boolean] # - # source://protocol-http//lib/protocol/http/body/stream.rb#174 + # source://protocol-http//lib/protocol/http/body/stream.rb#175 def closed?; end # Whether there are any output chunks remaining? # # @return [Boolean] # - # source://protocol-http//lib/protocol/http/body/stream.rb#179 + # source://protocol-http//lib/protocol/http/body/stream.rb#180 def empty?; end - # source://protocol-http//lib/protocol/http/body/stream.rb#146 + # source://protocol-http//lib/protocol/http/body/stream.rb#147 def flush; end # Returns the value of attribute input. # - # source://protocol-http//lib/protocol/http/body/stream.rb#25 + # source://protocol-http//lib/protocol/http/body/stream.rb#26 def input; end # Returns the value of attribute output. # - # source://protocol-http//lib/protocol/http/body/stream.rb#26 + # source://protocol-http//lib/protocol/http/body/stream.rb#27 def output; end - # source://protocol-http//lib/protocol/http/body/stream.rb#129 + # source://protocol-http//lib/protocol/http/body/stream.rb#130 def write(buffer); end - # source://protocol-http//lib/protocol/http/body/stream.rb#138 + # source://protocol-http//lib/protocol/http/body/stream.rb#139 def write_nonblock(buffer); end private - # source://protocol-http//lib/protocol/http/body/stream.rb#185 + # source://protocol-http//lib/protocol/http/body/stream.rb#186 def read_next; end end # This provides a read-only interface for data, which is surprisingly tricky to implement correctly. # -# source://protocol-http//lib/protocol/http/body/stream.rb#29 +# source://protocol-http//lib/protocol/http/body/stream.rb#30 module Protocol::HTTP::Body::Stream::Reader # read behaves like IO#read. Its signature is read([length, [buffer]]). If given, length must be a non-negative Integer (>= 0) or nil, and buffer must be a String and may not be nil. If length is given and not nil, then this method reads at most length bytes from the input stream. If length is not given or nil, then this method reads all data until EOF. When EOF is reached, this method returns nil if length is given and not nil, or “” if length is not given or is nil. If buffer is given, then the read data will be placed into buffer instead of a newly created String object. # @@ -301,15 +301,15 @@ module Protocol::HTTP::Body::Stream::Reader # @param buffer [String] the buffer which will receive the data # @return a buffer containing the data # - # source://protocol-http//lib/protocol/http/body/stream.rb#37 + # source://protocol-http//lib/protocol/http/body/stream.rb#38 def read(length = T.unsafe(nil), buffer = T.unsafe(nil)); end - # source://protocol-http//lib/protocol/http/body/stream.rb#100 + # source://protocol-http//lib/protocol/http/body/stream.rb#101 def read_nonblock(length, buffer = T.unsafe(nil)); end # Read at most `length` bytes from the stream. Will avoid reading from the underlying stream if possible. # - # source://protocol-http//lib/protocol/http/body/stream.rb#79 + # source://protocol-http//lib/protocol/http/body/stream.rb#80 def read_partial(length = T.unsafe(nil)); end end @@ -441,79 +441,119 @@ class Protocol::HTTP::Header::Authorization < ::String end end -# source://protocol-http//lib/protocol/http/header/cache_control.rb#11 +# source://protocol-http//lib/protocol/http/header/cache_control.rb#12 class Protocol::HTTP::Header::CacheControl < ::Protocol::HTTP::Header::Split # @return [CacheControl] a new instance of CacheControl # - # source://protocol-http//lib/protocol/http/header/cache_control.rb#22 + # source://protocol-http//lib/protocol/http/header/cache_control.rb#27 def initialize(value = T.unsafe(nil)); end - # source://protocol-http//lib/protocol/http/header/cache_control.rb#26 + # source://protocol-http//lib/protocol/http/header/cache_control.rb#31 def <<(value); end # @return [Boolean] # - # source://protocol-http//lib/protocol/http/header/cache_control.rb#34 + # source://protocol-http//lib/protocol/http/header/cache_control.rb#39 def dynamic?; end - # source://protocol-http//lib/protocol/http/header/cache_control.rb#58 + # The maximum time, in seconds, a response should be considered fresh. + # See https://www.rfc-editor.org/rfc/rfc9111.html#name-max-age-2 + # + # source://protocol-http//lib/protocol/http/header/cache_control.rb#77 def max_age; end + # Indicates that a response must not be used once it is stale. + # See https://www.rfc-editor.org/rfc/rfc9111.html#name-must-revalidate + # + # @return [Boolean] + # + # source://protocol-http//lib/protocol/http/header/cache_control.rb#65 + def must_revalidate?; end + # @return [Boolean] # - # source://protocol-http//lib/protocol/http/header/cache_control.rb#50 + # source://protocol-http//lib/protocol/http/header/cache_control.rb#55 def no_cache?; end # @return [Boolean] # - # source://protocol-http//lib/protocol/http/header/cache_control.rb#54 + # source://protocol-http//lib/protocol/http/header/cache_control.rb#59 def no_store?; end # @return [Boolean] # - # source://protocol-http//lib/protocol/http/header/cache_control.rb#42 + # source://protocol-http//lib/protocol/http/header/cache_control.rb#47 def private?; end + # Like must-revalidate, but for shared caches only. + # See https://www.rfc-editor.org/rfc/rfc9111.html#name-proxy-revalidate + # + # @return [Boolean] + # + # source://protocol-http//lib/protocol/http/header/cache_control.rb#71 + def proxy_revalidate?; end + # @return [Boolean] # - # source://protocol-http//lib/protocol/http/header/cache_control.rb#46 + # source://protocol-http//lib/protocol/http/header/cache_control.rb#51 def public?; end + # Like max-age, but for shared caches only, which should use it before + # max-age when present. + # See https://www.rfc-editor.org/rfc/rfc9111.html#name-s-maxage + # + # source://protocol-http//lib/protocol/http/header/cache_control.rb#84 + def s_maxage; end + # @return [Boolean] # - # source://protocol-http//lib/protocol/http/header/cache_control.rb#30 + # source://protocol-http//lib/protocol/http/header/cache_control.rb#35 def static?; end # @return [Boolean] # - # source://protocol-http//lib/protocol/http/header/cache_control.rb#38 + # source://protocol-http//lib/protocol/http/header/cache_control.rb#43 def streaming?; end + + private + + # source://protocol-http//lib/protocol/http/header/cache_control.rb#90 + def find_integer_value(value_name); end end -# source://protocol-http//lib/protocol/http/header/cache_control.rb#19 +# source://protocol-http//lib/protocol/http/header/cache_control.rb#21 Protocol::HTTP::Header::CacheControl::DYNAMIC = T.let(T.unsafe(nil), String) -# source://protocol-http//lib/protocol/http/header/cache_control.rb#16 +# source://protocol-http//lib/protocol/http/header/cache_control.rb#17 Protocol::HTTP::Header::CacheControl::MAX_AGE = T.let(T.unsafe(nil), String) -# source://protocol-http//lib/protocol/http/header/cache_control.rb#14 -Protocol::HTTP::Header::CacheControl::NO_CACHE = T.let(T.unsafe(nil), String) +# source://protocol-http//lib/protocol/http/header/cache_control.rb#24 +Protocol::HTTP::Header::CacheControl::MUST_REVALIDATE = T.let(T.unsafe(nil), String) # source://protocol-http//lib/protocol/http/header/cache_control.rb#15 +Protocol::HTTP::Header::CacheControl::NO_CACHE = T.let(T.unsafe(nil), String) + +# source://protocol-http//lib/protocol/http/header/cache_control.rb#16 Protocol::HTTP::Header::CacheControl::NO_STORE = T.let(T.unsafe(nil), String) -# source://protocol-http//lib/protocol/http/header/cache_control.rb#12 +# source://protocol-http//lib/protocol/http/header/cache_control.rb#13 Protocol::HTTP::Header::CacheControl::PRIVATE = T.let(T.unsafe(nil), String) -# source://protocol-http//lib/protocol/http/header/cache_control.rb#13 +# source://protocol-http//lib/protocol/http/header/cache_control.rb#25 +Protocol::HTTP::Header::CacheControl::PROXY_REVALIDATE = T.let(T.unsafe(nil), String) + +# source://protocol-http//lib/protocol/http/header/cache_control.rb#14 Protocol::HTTP::Header::CacheControl::PUBLIC = T.let(T.unsafe(nil), String) -# source://protocol-http//lib/protocol/http/header/cache_control.rb#18 +# source://protocol-http//lib/protocol/http/header/cache_control.rb#20 Protocol::HTTP::Header::CacheControl::STATIC = T.let(T.unsafe(nil), String) -# source://protocol-http//lib/protocol/http/header/cache_control.rb#20 +# source://protocol-http//lib/protocol/http/header/cache_control.rb#22 Protocol::HTTP::Header::CacheControl::STREAMING = T.let(T.unsafe(nil), String) +# source://protocol-http//lib/protocol/http/header/cache_control.rb#18 +Protocol::HTTP::Header::CacheControl::S_MAXAGE = T.let(T.unsafe(nil), String) + # source://protocol-http//lib/protocol/http/header/connection.rb#11 class Protocol::HTTP::Header::Connection < ::Protocol::HTTP::Header::Split # @return [Connection] a new instance of Connection @@ -557,6 +597,15 @@ class Protocol::HTTP::Header::Cookie < ::Protocol::HTTP::Header::Multiple def to_h; end end +# source://protocol-http//lib/protocol/http/header/date.rb#11 +class Protocol::HTTP::Header::Date < ::String + # source://protocol-http//lib/protocol/http/header/date.rb#12 + def <<(value); end + + # source://protocol-http//lib/protocol/http/header/date.rb#16 + def to_time; end +end + # source://protocol-http//lib/protocol/http/header/etag.rb#9 class Protocol::HTTP::Header::ETag < ::String # source://protocol-http//lib/protocol/http/header/etag.rb#10 @@ -568,19 +617,43 @@ class Protocol::HTTP::Header::ETag < ::String def weak?; end end -# This implementation is not strictly correct according to the RFC-specified format. -# # source://protocol-http//lib/protocol/http/header/etags.rb#12 class Protocol::HTTP::Header::ETags < ::Protocol::HTTP::Header::Split + # This implementation is not strictly correct according to the RFC-specified format. + # # @return [Boolean] # - # source://protocol-http//lib/protocol/http/header/etags.rb#17 + # source://protocol-http//lib/protocol/http/header/etags.rb#18 def match?(etag); end + # Useful with If-Match + # + # @return [Boolean] + # + # source://protocol-http//lib/protocol/http/header/etags.rb#23 + def strong_match?(etag); end + + # Useful with If-None-Match + # + # @return [Boolean] + # + # source://protocol-http//lib/protocol/http/header/etags.rb#28 + def weak_match?(etag); end + # @return [Boolean] # # source://protocol-http//lib/protocol/http/header/etags.rb#13 def wildcard?; end + + private + + # source://protocol-http//lib/protocol/http/header/etags.rb#34 + def opposite_tag(etag); end + + # @return [Boolean] + # + # source://protocol-http//lib/protocol/http/header/etags.rb#38 + def weak_tag?(tag); end end # Header value which is split by newline charaters (e.g. cookies). @@ -633,17 +706,17 @@ end # Headers are an array of key-value pairs. Some header keys represent multiple values. # -# source://protocol-http//lib/protocol/http/headers.rb#19 +# source://protocol-http//lib/protocol/http/headers.rb#20 class Protocol::HTTP::Headers # @return [Headers] a new instance of Headers # - # source://protocol-http//lib/protocol/http/headers.rb#49 + # source://protocol-http//lib/protocol/http/headers.rb#50 def initialize(fields = T.unsafe(nil), indexed = T.unsafe(nil)); end - # source://protocol-http//lib/protocol/http/headers.rb#299 + # source://protocol-http//lib/protocol/http/headers.rb#306 def ==(other); end - # source://protocol-http//lib/protocol/http/headers.rb#282 + # source://protocol-http//lib/protocol/http/headers.rb#289 def [](key); end # Append the value to the given key. Some values can be appended multiple times, others can only be set once. @@ -651,7 +724,7 @@ class Protocol::HTTP::Headers # @param key [String] The header key. # @param value The header value. # - # source://protocol-http//lib/protocol/http/headers.rb#195 + # source://protocol-http//lib/protocol/http/headers.rb#196 def []=(key, value); end # Add the specified header key value pair. @@ -659,64 +732,64 @@ class Protocol::HTTP::Headers # @param key [String] the header key. # @param value [String] the header value to assign. # - # source://protocol-http//lib/protocol/http/headers.rb#167 + # source://protocol-http//lib/protocol/http/headers.rb#168 def add(key, value); end - # source://protocol-http//lib/protocol/http/headers.rb#64 + # source://protocol-http//lib/protocol/http/headers.rb#65 def clear; end # Delete all headers with the given key, and return the merged value. # - # source://protocol-http//lib/protocol/http/headers.rb#245 + # source://protocol-http//lib/protocol/http/headers.rb#252 def delete(key); end - # source://protocol-http//lib/protocol/http/headers.rb#135 + # source://protocol-http//lib/protocol/http/headers.rb#136 def each(&block); end # @return [Boolean] # - # source://protocol-http//lib/protocol/http/headers.rb#131 + # source://protocol-http//lib/protocol/http/headers.rb#132 def empty?; end - # source://protocol-http//lib/protocol/http/headers.rb#149 + # source://protocol-http//lib/protocol/http/headers.rb#150 def extract(keys); end # An array of `[key, value]` pairs. # - # source://protocol-http//lib/protocol/http/headers.rb#85 + # source://protocol-http//lib/protocol/http/headers.rb#86 def fields; end - # source://protocol-http//lib/protocol/http/headers.rb#80 + # source://protocol-http//lib/protocol/http/headers.rb#81 def flatten; end # Flatten trailer into the headers. # - # source://protocol-http//lib/protocol/http/headers.rb#71 + # source://protocol-http//lib/protocol/http/headers.rb#72 def flatten!; end - # source://protocol-http//lib/protocol/http/headers.rb#119 + # source://protocol-http//lib/protocol/http/headers.rb#120 def freeze; end # @return [Boolean] # - # source://protocol-http//lib/protocol/http/headers.rb#139 + # source://protocol-http//lib/protocol/http/headers.rb#140 def include?(key); end - # source://protocol-http//lib/protocol/http/headers.rb#295 + # source://protocol-http//lib/protocol/http/headers.rb#302 def inspect; end # @return [Boolean] # - # source://protocol-http//lib/protocol/http/headers.rb#139 + # source://protocol-http//lib/protocol/http/headers.rb#140 def key?(key); end - # source://protocol-http//lib/protocol/http/headers.rb#145 + # source://protocol-http//lib/protocol/http/headers.rb#146 def keys; end - # source://protocol-http//lib/protocol/http/headers.rb#188 + # source://protocol-http//lib/protocol/http/headers.rb#189 def merge(headers); end - # source://protocol-http//lib/protocol/http/headers.rb#180 + # source://protocol-http//lib/protocol/http/headers.rb#181 def merge!(headers); end # Set the specified header key to the specified value, replacing any existing header keys with the same name. @@ -724,17 +797,17 @@ class Protocol::HTTP::Headers # @param key [String] the header key to replace. # @param value [String] the header value to assign. # - # source://protocol-http//lib/protocol/http/headers.rb#174 + # source://protocol-http//lib/protocol/http/headers.rb#175 def set(key, value); end # A hash table of `{key, policy[key].map(values)}` # - # source://protocol-http//lib/protocol/http/headers.rb#287 + # source://protocol-http//lib/protocol/http/headers.rb#294 def to_h; end # Enumerate all headers in the trailer, if there are any. # - # source://protocol-http//lib/protocol/http/headers.rb#111 + # source://protocol-http//lib/protocol/http/headers.rb#112 def trailer(&block); end # Record the current headers, and prepare to add trailers. @@ -746,22 +819,22 @@ class Protocol::HTTP::Headers # message should generate a trailer header field in the header section of # that message to indicate which fields might be present in the trailers. # - # source://protocol-http//lib/protocol/http/headers.rb#104 + # source://protocol-http//lib/protocol/http/headers.rb#105 def trailer!(&block); end # @return [Boolean] # - # source://protocol-http//lib/protocol/http/headers.rb#88 + # source://protocol-http//lib/protocol/http/headers.rb#89 def trailer?; end protected - # source://protocol-http//lib/protocol/http/headers.rb#269 + # source://protocol-http//lib/protocol/http/headers.rb#276 def merge_into(hash, key, value); end private - # source://protocol-http//lib/protocol/http/headers.rb#57 + # source://protocol-http//lib/protocol/http/headers.rb#58 def initialize_dup(other); end class << self @@ -769,131 +842,155 @@ class Protocol::HTTP::Headers # # @return [Headers] an instance of headers. # - # source://protocol-http//lib/protocol/http/headers.rb#27 + # source://protocol-http//lib/protocol/http/headers.rb#28 def [](headers); end end end # Used for merging objects into a sequential list of headers. Normalizes header keys and values. # -# source://protocol-http//lib/protocol/http/headers.rb#311 +# source://protocol-http//lib/protocol/http/headers.rb#318 class Protocol::HTTP::Headers::Merged include ::Enumerable # @return [Merged] a new instance of Merged # - # source://protocol-http//lib/protocol/http/headers.rb#314 + # source://protocol-http//lib/protocol/http/headers.rb#321 def initialize(*all); end - # source://protocol-http//lib/protocol/http/headers.rb#330 + # source://protocol-http//lib/protocol/http/headers.rb#337 def <<(headers); end - # source://protocol-http//lib/protocol/http/headers.rb#326 + # source://protocol-http//lib/protocol/http/headers.rb#333 def clear; end - # source://protocol-http//lib/protocol/http/headers.rb#337 + # source://protocol-http//lib/protocol/http/headers.rb#344 def each(&block); end - # source://protocol-http//lib/protocol/http/headers.rb#318 + # source://protocol-http//lib/protocol/http/headers.rb#325 def fields; end - # source://protocol-http//lib/protocol/http/headers.rb#322 + # source://protocol-http//lib/protocol/http/headers.rb#329 def flatten; end end -# source://protocol-http//lib/protocol/http/headers.rb#21 +# source://protocol-http//lib/protocol/http/headers.rb#22 Protocol::HTTP::Headers::Multiple = Protocol::HTTP::Header::Multiple -# source://protocol-http//lib/protocol/http/headers.rb#203 +# source://protocol-http//lib/protocol/http/headers.rb#204 Protocol::HTTP::Headers::POLICY = T.let(T.unsafe(nil), Hash) -# source://protocol-http//lib/protocol/http/headers.rb#20 +# source://protocol-http//lib/protocol/http/headers.rb#21 Protocol::HTTP::Headers::Split = Protocol::HTTP::Header::Split -# source://protocol-http//lib/protocol/http/headers.rb#23 +# source://protocol-http//lib/protocol/http/headers.rb#24 Protocol::HTTP::Headers::TRAILER = T.let(T.unsafe(nil), String) -# All supported HTTP methods +# Provides a convenient interface for commonly supported HTTP methods. +# +# | Method Name | Request Body | Response Body | Safe | Idempotent | Cacheable | +# | ----------- | ------------ | ------------- | ---- | ---------- | --------- | +# | GET | Optional | Yes | Yes | Yes | Yes | +# | HEAD | Optional | No | Yes | Yes | Yes | +# | POST | Yes | Yes | No | No | Yes | +# | PUT | Yes | Yes | No | Yes | No | +# | DELETE | Optional | Yes | No | Yes | No | +# | CONNECT | Optional | Yes | No | No | No | +# | OPTIONS | Optional | Yes | Yes | Yes | No | +# | TRACE | No | Yes | Yes | Yes | No | +# | PATCH | Yes | Yes | No | No | No | # -# source://protocol-http//lib/protocol/http/methods.rb#9 +# These methods are defined in this module using lower case names. They are for convenience only and you should not overload those methods. +# +# See for more details. +# +# source://protocol-http//lib/protocol/http/methods.rb#25 class Protocol::HTTP::Methods - # source://protocol-http//lib/protocol/http/methods.rb#37 + # source://protocol-http//lib/protocol/http/methods.rb#73 def connect(location, headers = T.unsafe(nil), body = T.unsafe(nil)); end - # source://protocol-http//lib/protocol/http/methods.rb#37 + # source://protocol-http//lib/protocol/http/methods.rb#73 def delete(location, headers = T.unsafe(nil), body = T.unsafe(nil)); end - # source://protocol-http//lib/protocol/http/methods.rb#37 + # source://protocol-http//lib/protocol/http/methods.rb#73 def get(location, headers = T.unsafe(nil), body = T.unsafe(nil)); end - # source://protocol-http//lib/protocol/http/methods.rb#37 + # source://protocol-http//lib/protocol/http/methods.rb#73 def head(location, headers = T.unsafe(nil), body = T.unsafe(nil)); end - # source://protocol-http//lib/protocol/http/methods.rb#37 - def link(location, headers = T.unsafe(nil), body = T.unsafe(nil)); end - - # source://protocol-http//lib/protocol/http/methods.rb#37 + # source://protocol-http//lib/protocol/http/methods.rb#73 def options(location, headers = T.unsafe(nil), body = T.unsafe(nil)); end - # source://protocol-http//lib/protocol/http/methods.rb#37 + # source://protocol-http//lib/protocol/http/methods.rb#73 def patch(location, headers = T.unsafe(nil), body = T.unsafe(nil)); end - # source://protocol-http//lib/protocol/http/methods.rb#37 + # source://protocol-http//lib/protocol/http/methods.rb#73 def post(location, headers = T.unsafe(nil), body = T.unsafe(nil)); end - # source://protocol-http//lib/protocol/http/methods.rb#37 + # source://protocol-http//lib/protocol/http/methods.rb#73 def put(location, headers = T.unsafe(nil), body = T.unsafe(nil)); end - # source://protocol-http//lib/protocol/http/methods.rb#37 + # source://protocol-http//lib/protocol/http/methods.rb#73 def trace(location, headers = T.unsafe(nil), body = T.unsafe(nil)); end - # source://protocol-http//lib/protocol/http/methods.rb#37 - def unlink(location, headers = T.unsafe(nil), body = T.unsafe(nil)); end - class << self - # source://protocol-http//lib/protocol/http/methods.rb#29 + # Enumerate all HTTP methods. + # + # source://protocol-http//lib/protocol/http/methods.rb#64 def each; end # @return [Boolean] # - # source://protocol-http//lib/protocol/http/methods.rb#22 + # source://protocol-http//lib/protocol/http/methods.rb#53 def valid?(name); end end end -# source://protocol-http//lib/protocol/http/methods.rb#20 +# The CONNECT method establishes a tunnel to the server identified by the target resource. +# +# source://protocol-http//lib/protocol/http/methods.rb#42 Protocol::HTTP::Methods::CONNECT = T.let(T.unsafe(nil), String) -# source://protocol-http//lib/protocol/http/methods.rb#14 +# The DELETE method deletes the specified resource. +# +# source://protocol-http//lib/protocol/http/methods.rb#39 Protocol::HTTP::Methods::DELETE = T.let(T.unsafe(nil), String) -# source://protocol-http//lib/protocol/http/methods.rb#10 +# The GET method requests a representation of the specified resource. Requests using GET should only retrieve data. +# +# source://protocol-http//lib/protocol/http/methods.rb#27 Protocol::HTTP::Methods::GET = T.let(T.unsafe(nil), String) -# source://protocol-http//lib/protocol/http/methods.rb#15 +# The HEAD method asks for a response identical to a GET request, but without the response body. +# +# source://protocol-http//lib/protocol/http/methods.rb#30 Protocol::HTTP::Methods::HEAD = T.let(T.unsafe(nil), String) -# source://protocol-http//lib/protocol/http/methods.rb#17 -Protocol::HTTP::Methods::LINK = T.let(T.unsafe(nil), String) - -# source://protocol-http//lib/protocol/http/methods.rb#16 +# The OPTIONS method describes the communication options for the target resource. +# +# source://protocol-http//lib/protocol/http/methods.rb#45 Protocol::HTTP::Methods::OPTIONS = T.let(T.unsafe(nil), String) -# source://protocol-http//lib/protocol/http/methods.rb#13 +# The PATCH method applies partial modifications to a resource. +# +# source://protocol-http//lib/protocol/http/methods.rb#51 Protocol::HTTP::Methods::PATCH = T.let(T.unsafe(nil), String) -# source://protocol-http//lib/protocol/http/methods.rb#11 +# The POST method submits an entity to the specified resource, often causing a change in state or side effects on the server. +# +# source://protocol-http//lib/protocol/http/methods.rb#33 Protocol::HTTP::Methods::POST = T.let(T.unsafe(nil), String) -# source://protocol-http//lib/protocol/http/methods.rb#12 +# The PUT method replaces all current representations of the target resource with the request payload. +# +# source://protocol-http//lib/protocol/http/methods.rb#36 Protocol::HTTP::Methods::PUT = T.let(T.unsafe(nil), String) -# source://protocol-http//lib/protocol/http/methods.rb#19 +# The TRACE method performs a message loop-back test along the path to the target resource. +# +# source://protocol-http//lib/protocol/http/methods.rb#48 Protocol::HTTP::Methods::TRACE = T.let(T.unsafe(nil), String) -# source://protocol-http//lib/protocol/http/methods.rb#18 -Protocol::HTTP::Methods::UNLINK = T.let(T.unsafe(nil), String) - # source://protocol-http//lib/protocol/http/request.rb#14 class Protocol::HTTP::Request include ::Protocol::HTTP::Body::Reader @@ -1021,9 +1118,11 @@ class Protocol::HTTP::Response # source://protocol-http//lib/protocol/http/response.rb#14 def initialize(version = T.unsafe(nil), status = T.unsafe(nil), headers = T.unsafe(nil), body = T.unsafe(nil), protocol = T.unsafe(nil)); end + # Whether the status is 400 (bad request). + # # @return [Boolean] # - # source://protocol-http//lib/protocol/http/response.rb#64 + # source://protocol-http//lib/protocol/http/response.rb#84 def bad_request?; end # Returns the value of attribute body. @@ -1038,16 +1137,27 @@ class Protocol::HTTP::Response # source://protocol-http//lib/protocol/http/response.rb#25 def body=(_arg0); end + # Whether the status is 100 (continue). + # # @return [Boolean] # - # source://protocol-http//lib/protocol/http/response.rb#32 + # source://protocol-http//lib/protocol/http/response.rb#33 def continue?; end + # Whether the status is considered a failure. + # # @return [Boolean] # - # source://protocol-http//lib/protocol/http/response.rb#60 + # source://protocol-http//lib/protocol/http/response.rb#79 def failure?; end + # Whether the status is considered final. Note that 101 is considered final. + # + # @return [Boolean] + # + # source://protocol-http//lib/protocol/http/response.rb#43 + def final?; end + # Returns the value of attribute headers. # # source://protocol-http//lib/protocol/http/response.rb#24 @@ -1065,29 +1175,46 @@ class Protocol::HTTP::Response # source://protocol-http//lib/protocol/http/response.rb#28 def hijack?; end + # Whether the status is considered informational. + # # @return [Boolean] # - # source://protocol-http//lib/protocol/http/response.rb#68 + # source://protocol-http//lib/protocol/http/response.rb#38 + def informational?; end + + # Whether the status is 500 (internal server error). + # + # @return [Boolean] + # + # source://protocol-http//lib/protocol/http/response.rb#89 def internal_server_error?; end + # Whether the status is 304 (not modified). + # # @return [Boolean] # - # source://protocol-http//lib/protocol/http/response.rb#52 + # source://protocol-http//lib/protocol/http/response.rb#69 def not_modified?; end + # Whether the status is 200 (ok). + # # @return [Boolean] # - # source://protocol-http//lib/protocol/http/response.rb#36 + # source://protocol-http//lib/protocol/http/response.rb#49 def ok?; end + # Whether the status is 206 (partial content). + # # @return [Boolean] # - # source://protocol-http//lib/protocol/http/response.rb#44 + # source://protocol-http//lib/protocol/http/response.rb#59 def partial?; end + # Whether the status is 307 (temporary redirect) and should preserve the method of the request when following the redirect. + # # @return [Boolean] # - # source://protocol-http//lib/protocol/http/response.rb#56 + # source://protocol-http//lib/protocol/http/response.rb#74 def preserve_method?; end # Returns the value of attribute protocol. @@ -1102,15 +1229,19 @@ class Protocol::HTTP::Response # source://protocol-http//lib/protocol/http/response.rb#26 def protocol=(_arg0); end + # Whether the status is considered a redirection. + # # @return [Boolean] # - # source://protocol-http//lib/protocol/http/response.rb#48 + # source://protocol-http//lib/protocol/http/response.rb#64 def redirection?; end + # Whether the status is 500 (internal server error). + # # @deprecated Use {#internal_server_error?} instead. # @return [Boolean] # - # source://protocol-http//lib/protocol/http/response.rb#68 + # source://protocol-http//lib/protocol/http/response.rb#89 def server_failure?; end # Returns the value of attribute status. @@ -1125,15 +1256,17 @@ class Protocol::HTTP::Response # source://protocol-http//lib/protocol/http/response.rb#23 def status=(_arg0); end + # Whether the status is considered successful. + # # @return [Boolean] # - # source://protocol-http//lib/protocol/http/response.rb#40 + # source://protocol-http//lib/protocol/http/response.rb#54 def success?; end - # source://protocol-http//lib/protocol/http/response.rb#90 + # source://protocol-http//lib/protocol/http/response.rb#111 def to_ary; end - # source://protocol-http//lib/protocol/http/response.rb#86 + # source://protocol-http//lib/protocol/http/response.rb#107 def to_s; end # Returns the value of attribute version. @@ -1149,10 +1282,10 @@ class Protocol::HTTP::Response def version=(_arg0); end class << self - # source://protocol-http//lib/protocol/http/response.rb#75 + # source://protocol-http//lib/protocol/http/response.rb#96 def [](status, headers = T.unsafe(nil), body = T.unsafe(nil), protocol = T.unsafe(nil)); end - # source://protocol-http//lib/protocol/http/response.rb#82 + # source://protocol-http//lib/protocol/http/response.rb#103 def for_exception(exception); end end end diff --git a/sorbet/rbi/gems/psych@5.1.1.1.rbi b/sorbet/rbi/gems/psych@5.1.1.1.rbi new file mode 100644 index 000000000..538118637 --- /dev/null +++ b/sorbet/rbi/gems/psych@5.1.1.1.rbi @@ -0,0 +1,1768 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `psych` gem. +# Please instead update this file by running `bin/tapioca gem psych`. + +# source://psych//lib/psych/core_ext.rb#2 +class Object < ::BasicObject + include ::Kernel + include ::PP::ObjectMixin + + # call-seq: to_yaml(options = {}) + # + # Convert an object to YAML. See Psych.dump for more information on the + # available +options+. + # + # source://psych//lib/psych/core_ext.rb#12 + def to_yaml(options = T.unsafe(nil)); end + + class << self + # source://psych//lib/psych/core_ext.rb#3 + def yaml_tag(url); end + end +end + +# = Overview +# +# Psych is a YAML parser and emitter. +# Psych leverages libyaml [Home page: https://pyyaml.org/wiki/LibYAML] +# or [git repo: https://github.com/yaml/libyaml] for its YAML parsing +# and emitting capabilities. In addition to wrapping libyaml, Psych also +# knows how to serialize and de-serialize most Ruby objects to and from +# the YAML format. +# +# = I NEED TO PARSE OR EMIT YAML RIGHT NOW! +# +# # Parse some YAML +# Psych.load("--- foo") # => "foo" +# +# # Emit some YAML +# Psych.dump("foo") # => "--- foo\n...\n" +# { :a => 'b'}.to_yaml # => "---\n:a: b\n" +# +# Got more time on your hands? Keep on reading! +# +# == YAML Parsing +# +# Psych provides a range of interfaces for parsing a YAML document ranging from +# low level to high level, depending on your parsing needs. At the lowest +# level, is an event based parser. Mid level is access to the raw YAML AST, +# and at the highest level is the ability to unmarshal YAML to Ruby objects. +# +# == YAML Emitting +# +# Psych provides a range of interfaces ranging from low to high level for +# producing YAML documents. Very similar to the YAML parsing interfaces, Psych +# provides at the lowest level, an event based system, mid-level is building +# a YAML AST, and the highest level is converting a Ruby object straight to +# a YAML document. +# +# == High-level API +# +# === Parsing +# +# The high level YAML parser provided by Psych simply takes YAML as input and +# returns a Ruby data structure. For information on using the high level parser +# see Psych.load +# +# ==== Reading from a string +# +# Psych.safe_load("--- a") # => 'a' +# Psych.safe_load("---\n - a\n - b") # => ['a', 'b'] +# # From a trusted string: +# Psych.load("--- !ruby/range\nbegin: 0\nend: 42\nexcl: false\n") # => 0..42 +# +# ==== Reading from a file +# +# Psych.safe_load_file("data.yml", permitted_classes: [Date]) +# Psych.load_file("trusted_database.yml") +# +# ==== Exception handling +# +# begin +# # The second argument changes only the exception contents +# Psych.parse("--- `", "file.txt") +# rescue Psych::SyntaxError => ex +# ex.file # => 'file.txt' +# ex.message # => "(file.txt): found character that cannot start any token" +# end +# +# === Emitting +# +# The high level emitter has the easiest interface. Psych simply takes a Ruby +# data structure and converts it to a YAML document. See Psych.dump for more +# information on dumping a Ruby data structure. +# +# ==== Writing to a string +# +# # Dump an array, get back a YAML string +# Psych.dump(['a', 'b']) # => "---\n- a\n- b\n" +# +# # Dump an array to an IO object +# Psych.dump(['a', 'b'], StringIO.new) # => # +# +# # Dump an array with indentation set +# Psych.dump(['a', ['b']], :indentation => 3) # => "---\n- a\n- - b\n" +# +# # Dump an array to an IO with indentation set +# Psych.dump(['a', ['b']], StringIO.new, :indentation => 3) +# +# ==== Writing to a file +# +# Currently there is no direct API for dumping Ruby structure to file: +# +# File.open('database.yml', 'w') do |file| +# file.write(Psych.dump(['a', 'b'])) +# end +# +# == Mid-level API +# +# === Parsing +# +# Psych provides access to an AST produced from parsing a YAML document. This +# tree is built using the Psych::Parser and Psych::TreeBuilder. The AST can +# be examined and manipulated freely. Please see Psych::parse_stream, +# Psych::Nodes, and Psych::Nodes::Node for more information on dealing with +# YAML syntax trees. +# +# ==== Reading from a string +# +# # Returns Psych::Nodes::Stream +# Psych.parse_stream("---\n - a\n - b") +# +# # Returns Psych::Nodes::Document +# Psych.parse("---\n - a\n - b") +# +# ==== Reading from a file +# +# # Returns Psych::Nodes::Stream +# Psych.parse_stream(File.read('database.yml')) +# +# # Returns Psych::Nodes::Document +# Psych.parse_file('database.yml') +# +# ==== Exception handling +# +# begin +# # The second argument changes only the exception contents +# Psych.parse("--- `", "file.txt") +# rescue Psych::SyntaxError => ex +# ex.file # => 'file.txt' +# ex.message # => "(file.txt): found character that cannot start any token" +# end +# +# === Emitting +# +# At the mid level is building an AST. This AST is exactly the same as the AST +# used when parsing a YAML document. Users can build an AST by hand and the +# AST knows how to emit itself as a YAML document. See Psych::Nodes, +# Psych::Nodes::Node, and Psych::TreeBuilder for more information on building +# a YAML AST. +# +# ==== Writing to a string +# +# # We need Psych::Nodes::Stream (not Psych::Nodes::Document) +# stream = Psych.parse_stream("---\n - a\n - b") +# +# stream.to_yaml # => "---\n- a\n- b\n" +# +# ==== Writing to a file +# +# # We need Psych::Nodes::Stream (not Psych::Nodes::Document) +# stream = Psych.parse_stream(File.read('database.yml')) +# +# File.open('database.yml', 'w') do |file| +# file.write(stream.to_yaml) +# end +# +# == Low-level API +# +# === Parsing +# +# The lowest level parser should be used when the YAML input is already known, +# and the developer does not want to pay the price of building an AST or +# automatic detection and conversion to Ruby objects. See Psych::Parser for +# more information on using the event based parser. +# +# ==== Reading to Psych::Nodes::Stream structure +# +# parser = Psych::Parser.new(TreeBuilder.new) # => # +# parser = Psych.parser # it's an alias for the above +# +# parser.parse("---\n - a\n - b") # => # +# parser.handler # => # +# parser.handler.root # => # +# +# ==== Receiving an events stream +# +# recorder = Psych::Handlers::Recorder.new +# parser = Psych::Parser.new(recorder) +# +# parser.parse("---\n - a\n - b") +# recorder.events # => [list of [event, args] lists] +# # event is one of: Psych::Handler::EVENTS +# # args are the arguments passed to the event +# +# === Emitting +# +# The lowest level emitter is an event based system. Events are sent to a +# Psych::Emitter object. That object knows how to convert the events to a YAML +# document. This interface should be used when document format is known in +# advance or speed is a concern. See Psych::Emitter for more information. +# +# ==== Writing to a Ruby structure +# +# Psych.parser.parse("--- a") # => # +# +# parser.handler.first # => # +# parser.handler.first.to_ruby # => ["a"] +# +# parser.handler.root.first # => # +# parser.handler.root.first.to_ruby # => "a" +# +# # You can instantiate an Emitter manually +# Psych::Visitors::ToRuby.new.accept(parser.handler.root.first) +# # => "a" +# +# source://psych//lib/psych/versions.rb#3 +module Psych + class << self + # source://psych//lib/psych.rb#682 + def add_builtin_type(type_tag, &block); end + + # :stopdoc: + # + # source://psych//lib/psych.rb#676 + def add_domain_type(domain, type_tag, &block); end + + # source://psych//lib/psych.rb#692 + def add_tag(tag, klass); end + + # source://psych//lib/psych.rb#708 + def config; end + + # source://psych//lib/psych.rb#720 + def domain_types; end + + # source://psych//lib/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//lib/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//lib/psych.rb#595 + def dump_stream(*objects); end + + # source://psych//lib/psych.rb#716 + def dump_tags; end + + # source://psych//lib/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//lib/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//lib/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//lib/psych.rb#626 + def load_stream(yaml, filename: T.unsafe(nil), fallback: T.unsafe(nil), **kwargs); end + + # source://psych//lib/psych.rb#712 + def load_tags; end + + # source://psych//lib/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//lib/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//lib/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//lib/psych.rb#452 + def parse_stream(yaml, filename: T.unsafe(nil), &block); end + + # Returns a default parser + # + # source://psych//lib/psych.rb#419 + def parser; end + + # source://psych//lib/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//lib/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//lib/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//lib/psych.rb#658 + def safe_load_file(filename, **kwargs); end + + # Dump Ruby +object+ to a JSON string. + # + # source://psych//lib/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//lib/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//lib/psych.rb#647 + def unsafe_load_file(filename, **kwargs); end + end +end + +# Subclasses `BadAlias` for backwards compatibility +# +# source://psych//lib/psych/exception.rb#10 +class Psych::AliasesNotEnabled < ::Psych::BadAlias + # @return [AliasesNotEnabled] a new instance of AliasesNotEnabled + # + # source://psych//lib/psych/exception.rb#11 + def initialize; end +end + +# Subclasses `BadAlias` for backwards compatibility +# +# source://psych//lib/psych/exception.rb#17 +class Psych::AnchorNotDefined < ::Psych::BadAlias + # @return [AnchorNotDefined] a new instance of AnchorNotDefined + # + # source://psych//lib/psych/exception.rb#18 + def initialize(anchor_name); end +end + +# source://psych//lib/psych/class_loader.rb#6 +class Psych::ClassLoader + # @return [ClassLoader] a new instance of ClassLoader + # + # source://psych//lib/psych/class_loader.rb#21 + def initialize; end + + # source://psych//lib/psych/class_loader.rb#39 + def big_decimal; end + + # source://psych//lib/psych/class_loader.rb#39 + def complex; end + + # source://psych//lib/psych/class_loader.rb#39 + def date; end + + # source://psych//lib/psych/class_loader.rb#39 + def date_time; end + + # source://psych//lib/psych/class_loader.rb#39 + def exception; end + + # source://psych//lib/psych/class_loader.rb#25 + def load(klassname); end + + # source://psych//lib/psych/class_loader.rb#39 + def object; end + + # source://psych//lib/psych/class_loader.rb#39 + def psych_omap; end + + # source://psych//lib/psych/class_loader.rb#39 + def psych_set; end + + # source://psych//lib/psych/class_loader.rb#39 + def range; end + + # source://psych//lib/psych/class_loader.rb#39 + def rational; end + + # source://psych//lib/psych/class_loader.rb#39 + def regexp; end + + # source://psych//lib/psych/class_loader.rb#39 + def struct; end + + # source://psych//lib/psych/class_loader.rb#39 + def symbol; end + + # source://psych//lib/psych/class_loader.rb#31 + def symbolize(sym); end + + private + + # source://psych//lib/psych/class_loader.rb#47 + def find(klassname); end + + # source://psych//lib/psych/class_loader.rb#51 + def resolve(klassname); end +end + +# source://psych//lib/psych/class_loader.rb#76 +class Psych::ClassLoader::Restricted < ::Psych::ClassLoader + # @return [Restricted] a new instance of Restricted + # + # source://psych//lib/psych/class_loader.rb#77 + def initialize(classes, symbols); end + + # source://psych//lib/psych/class_loader.rb#83 + def symbolize(sym); end + + private + + # source://psych//lib/psych/class_loader.rb#95 + def find(klassname); end +end + +# If an object defines +encode_with+, then an instance of Psych::Coder will +# be passed to the method when the object is being serialized. The Coder +# automatically assumes a Psych::Nodes::Mapping is being emitted. Other +# objects like Sequence and Scalar may be emitted if +seq=+ or +scalar=+ are +# called, respectively. +# +# source://psych//lib/psych/coder.rb#9 +class Psych::Coder + # @return [Coder] a new instance of Coder + # + # source://psych//lib/psych/coder.rb#13 + def initialize(tag); end + + # source://psych//lib/psych/coder.rb#84 + def [](k); end + + # source://psych//lib/psych/coder.rb#78 + def []=(k, v); end + + # source://psych//lib/psych/coder.rb#78 + def add(k, v); end + + # Returns the value of attribute implicit. + # + # source://psych//lib/psych/coder.rb#10 + def implicit; end + + # Sets the attribute implicit + # + # @param value the value to set the attribute implicit to. + # + # source://psych//lib/psych/coder.rb#10 + def implicit=(_arg0); end + + # Emit a map. The coder will be yielded to the block. + # + # @yield [_self] + # @yieldparam _self [Psych::Coder] the object that the method was called on + # + # source://psych//lib/psych/coder.rb#34 + def map(tag = T.unsafe(nil), style = T.unsafe(nil)); end + + # Emit a map with +value+ + # + # source://psych//lib/psych/coder.rb#73 + def map=(map); end + + # Returns the value of attribute object. + # + # source://psych//lib/psych/coder.rb#10 + def object; end + + # Sets the attribute object + # + # @param value the value to set the attribute object to. + # + # source://psych//lib/psych/coder.rb#10 + def object=(_arg0); end + + # Emit a sequence with +map+ and +tag+ + # + # source://psych//lib/psych/coder.rb#54 + def represent_map(tag, map); end + + # Emit an arbitrary object +obj+ and +tag+ + # + # source://psych//lib/psych/coder.rb#60 + def represent_object(tag, obj); end + + # Emit a scalar with +value+ and +tag+ + # + # source://psych//lib/psych/coder.rb#42 + def represent_scalar(tag, value); end + + # Emit a sequence with +list+ and +tag+ + # + # source://psych//lib/psych/coder.rb#48 + def represent_seq(tag, list); end + + # source://psych//lib/psych/coder.rb#24 + def scalar(*args); end + + # Emit a scalar with +value+ + # + # source://psych//lib/psych/coder.rb#67 + def scalar=(value); end + + # Returns the value of attribute seq. + # + # source://psych//lib/psych/coder.rb#11 + def seq; end + + # Emit a sequence of +list+ + # + # source://psych//lib/psych/coder.rb#90 + def seq=(list); end + + # Returns the value of attribute style. + # + # source://psych//lib/psych/coder.rb#10 + def style; end + + # Sets the attribute style + # + # @param value the value to set the attribute style to. + # + # source://psych//lib/psych/coder.rb#10 + def style=(_arg0); end + + # Returns the value of attribute tag. + # + # source://psych//lib/psych/coder.rb#10 + def tag; end + + # Sets the attribute tag + # + # @param value the value to set the attribute tag to. + # + # source://psych//lib/psych/coder.rb#10 + def tag=(_arg0); end + + # Returns the value of attribute type. + # + # source://psych//lib/psych/coder.rb#11 + def type; end +end + +# source://psych//lib/psych/exception.rb#23 +class Psych::DisallowedClass < ::Psych::Exception + # @return [DisallowedClass] a new instance of DisallowedClass + # + # source://psych//lib/psych/exception.rb#24 + def initialize(action, klass_name); end +end + +# Psych::Handler is an abstract base class that defines the events used +# when dealing with Psych::Parser. Clients who want to use Psych::Parser +# should implement a class that inherits from Psych::Handler and define +# events that they can handle. +# +# Psych::Handler defines all events that Psych::Parser can possibly send to +# event handlers. +# +# See Psych::Parser for more details +# +# source://psych//lib/psych/handler.rb#13 +class Psych::Handler + # Called when an alias is found to +anchor+. +anchor+ will be the name + # of the anchor found. + # + # === Example + # + # Here we have an example of an array that references itself in YAML: + # + # --- &ponies + # - first element + # - *ponies + # + # &ponies is the anchor, *ponies is the alias. In this case, alias is + # called with "ponies". + # + # source://psych//lib/psych/handler.rb#110 + def alias(anchor); end + + # Called when an empty event happens. (Which, as far as I can tell, is + # never). + # + # source://psych//lib/psych/handler.rb#236 + def empty; end + + # Called with the document ends. +implicit+ is a boolean value indicating + # whether or not the document has an implicit ending. + # + # === Example + # + # Given the following YAML: + # + # --- + # hello world + # + # +implicit+ will be true. Given this YAML: + # + # --- + # hello world + # ... + # + # +implicit+ will be false. + # + # source://psych//lib/psych/handler.rb#93 + def end_document(implicit); end + + # Called when a map ends + # + # source://psych//lib/psych/handler.rb#230 + def end_mapping; end + + # Called when a sequence ends. + # + # source://psych//lib/psych/handler.rb#191 + def end_sequence; end + + # Called when the YAML stream ends + # + # source://psych//lib/psych/handler.rb#241 + def end_stream; end + + # Called before each event with line/column information. + # + # source://psych//lib/psych/handler.rb#246 + def event_location(start_line, start_column, end_line, end_column); end + + # Called when a scalar +value+ is found. The scalar may have an + # +anchor+, a +tag+, be implicitly +plain+ or implicitly +quoted+ + # + # +value+ is the string value of the scalar + # +anchor+ is an associated anchor or nil + # +tag+ is an associated tag or nil + # +plain+ is a boolean value + # +quoted+ is a boolean value + # +style+ is an integer indicating the string style + # + # See the constants in Psych::Nodes::Scalar for the possible values of + # +style+ + # + # === Example + # + # Here is a YAML document that exercises most of the possible ways this + # method can be called: + # + # --- + # - !str "foo" + # - &anchor fun + # - many + # lines + # - | + # many + # newlines + # + # The above YAML document contains a list with four strings. Here are + # the parameters sent to this method in the same order: + # + # # value anchor tag plain quoted style + # ["foo", nil, "!str", false, false, 3 ] + # ["fun", "anchor", nil, true, false, 1 ] + # ["many lines", nil, nil, true, false, 1 ] + # ["many\nnewlines\n", nil, nil, false, true, 4 ] + # + # source://psych//lib/psych/handler.rb#150 + def scalar(value, anchor, tag, plain, quoted, style); end + + # Called when the document starts with the declared +version+, + # +tag_directives+, if the document is +implicit+. + # + # +version+ will be an array of integers indicating the YAML version being + # dealt with, +tag_directives+ is a list of tuples indicating the prefix + # and suffix of each tag, and +implicit+ is a boolean indicating whether + # the document is started implicitly. + # + # === Example + # + # Given the following YAML: + # + # %YAML 1.1 + # %TAG ! tag:tenderlovemaking.com,2009: + # --- !squee + # + # The parameters for start_document must be this: + # + # version # => [1, 1] + # tag_directives # => [["!", "tag:tenderlovemaking.com,2009:"]] + # implicit # => false + # + # source://psych//lib/psych/handler.rb#72 + def start_document(version, tag_directives, implicit); end + + # Called when a map starts. + # + # +anchor+ is the anchor associated with the map or +nil+. + # +tag+ is the tag associated with the map or +nil+. + # +implicit+ is a boolean indicating whether or not the map was implicitly + # started. + # +style+ is an integer indicating the mapping style. + # + # See the constants in Psych::Nodes::Mapping for the possible values of + # +style+. + # + # === Example + # + # Here is a YAML document that exercises most of the possible ways this + # method can be called: + # + # --- + # k: !!map { hello: world } + # v: &pewpew + # hello: world + # + # The above YAML document consists of three maps, an outer map that contains + # two inner maps. Below is a matrix of the parameters sent in order to + # represent these three maps: + # + # # anchor tag implicit style + # [nil, nil, true, 1 ] + # [nil, "tag:yaml.org,2002:map", false, 2 ] + # ["pewpew", nil, true, 1 ] + # + # source://psych//lib/psych/handler.rb#225 + def start_mapping(anchor, tag, implicit, style); end + + # Called when a sequence is started. + # + # +anchor+ is the anchor associated with the sequence or nil. + # +tag+ is the tag associated with the sequence or nil. + # +implicit+ a boolean indicating whether or not the sequence was implicitly + # started. + # +style+ is an integer indicating the list style. + # + # See the constants in Psych::Nodes::Sequence for the possible values of + # +style+. + # + # === Example + # + # Here is a YAML document that exercises most of the possible ways this + # method can be called: + # + # --- + # - !!seq [ + # a + # ] + # - &pewpew + # - b + # + # The above YAML document consists of three lists, an outer list that + # contains two inner lists. Here is a matrix of the parameters sent + # to represent these lists: + # + # # anchor tag implicit style + # [nil, nil, true, 1 ] + # [nil, "tag:yaml.org,2002:seq", false, 2 ] + # ["pewpew", nil, true, 1 ] + # + # source://psych//lib/psych/handler.rb#186 + def start_sequence(anchor, tag, implicit, style); end + + # Called with +encoding+ when the YAML stream starts. This method is + # called once per stream. A stream may contain multiple documents. + # + # See the constants in Psych::Parser for the possible values of +encoding+. + # + # source://psych//lib/psych/handler.rb#47 + def start_stream(encoding); end + + # Is this handler a streaming handler? + # + # @return [Boolean] + # + # source://psych//lib/psych/handler.rb#251 + def streaming?; end +end + +# Configuration options for dumping YAML. +# +# source://psych//lib/psych/handler.rb#16 +class Psych::Handler::DumperOptions + # @return [DumperOptions] a new instance of DumperOptions + # + # source://psych//lib/psych/handler.rb#19 + def initialize; end + + # Returns the value of attribute canonical. + # + # source://psych//lib/psych/handler.rb#17 + def canonical; end + + # Sets the attribute canonical + # + # @param value the value to set the attribute canonical to. + # + # source://psych//lib/psych/handler.rb#17 + def canonical=(_arg0); end + + # Returns the value of attribute indentation. + # + # source://psych//lib/psych/handler.rb#17 + def indentation; end + + # Sets the attribute indentation + # + # @param value the value to set the attribute indentation to. + # + # source://psych//lib/psych/handler.rb#17 + def indentation=(_arg0); end + + # Returns the value of attribute line_width. + # + # source://psych//lib/psych/handler.rb#17 + def line_width; end + + # Sets the attribute line_width + # + # @param value the value to set the attribute line_width to. + # + # source://psych//lib/psych/handler.rb#17 + def line_width=(_arg0); end +end + +# source://psych//lib/psych/json/stream.rb#7 +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. +# +# source://psych//lib/psych/parser.rb#33 +class Psych::Parser + # Creates a new Psych::Parser instance with +handler+. YAML events will + # be called on +handler+. See Psych::Parser for more details. + # + # @return [Parser] a new instance of Parser + # + # source://psych//lib/psych/parser.rb#47 + def initialize(handler = T.unsafe(nil)); end + + # Set the encoding for this parser to +encoding+ + # + # source://psych//lib/psych/parser.rb#41 + def external_encoding=(_arg0); end + + # The handler on which events will be called + # + # source://psych//lib/psych/parser.rb#38 + def handler; end + + # The handler on which events will be called + # + # source://psych//lib/psych/parser.rb#38 + def handler=(_arg0); end + + # call-seq: + # parser.parse(yaml) + # + # Parse the YAML document contained in +yaml+. Events will be called on + # the handler set on the parser instance. + # + # See Psych::Parser and Psych::Parser#handler + # + # source://psych//lib/psych/parser.rb#61 + def parse(yaml, path = T.unsafe(nil)); end +end + +# Scan scalars for built in types +# +# source://psych//lib/psych/scalar_scanner.rb#6 +class Psych::ScalarScanner + # Create a new scanner + # + # @return [ScalarScanner] a new instance of ScalarScanner + # + # source://psych//lib/psych/scalar_scanner.rb#30 + def initialize(class_loader, strict_integer: T.unsafe(nil)); end + + # Returns the value of attribute class_loader. + # + # source://psych//lib/psych/scalar_scanner.rb#27 + def class_loader; end + + # Parse and return an int from +string+ + # + # source://psych//lib/psych/scalar_scanner.rb#109 + def parse_int(string); end + + # Parse and return a Time from +string+ + # + # source://psych//lib/psych/scalar_scanner.rb#115 + def parse_time(string); end + + # Tokenize +string+ returning the Ruby object + # + # source://psych//lib/psych/scalar_scanner.rb#37 + def tokenize(string); end +end + +# Same as above, but allows commas. +# Not to YML spec, but kept for backwards compatibility +# +# source://psych//lib/psych/scalar_scanner.rb#22 +Psych::ScalarScanner::INTEGER_LEGACY = T.let(T.unsafe(nil), Regexp) + +# Taken from http://yaml.org/type/int.html +# +# source://psych//lib/psych/scalar_scanner.rb#15 +Psych::ScalarScanner::INTEGER_STRICT = T.let(T.unsafe(nil), Regexp) + +# Psych::Stream is a streaming YAML emitter. It will not buffer your YAML, +# but send it straight to an IO. +# +# Here is an example use: +# +# stream = Psych::Stream.new($stdout) +# stream.start +# stream.push({:foo => 'bar'}) +# stream.finish +# +# YAML will be immediately emitted to $stdout with no buffering. +# +# Psych::Stream#start will take a block and ensure that Psych::Stream#finish +# is called, so you can do this form: +# +# stream = Psych::Stream.new($stdout) +# stream.start do |em| +# em.push(:foo => 'bar') +# end +# +# source://psych//lib/psych/stream.rb#24 +class Psych::Stream < ::Psych::Visitors::YAMLTree + include ::Psych::Streaming + extend ::Psych::Streaming::ClassMethods +end + +# source://psych//lib/psych/stream.rb#25 +class Psych::Stream::Emitter < ::Psych::Emitter + # source://psych//lib/psych/stream.rb#26 + def end_document(implicit_end = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://psych//lib/psych/stream.rb#30 + def streaming?; end +end + +# source://psych//lib/psych/streaming.rb#3 +module Psych::Streaming + # Start streaming using +encoding+ + # + # source://psych//lib/psych/streaming.rb#18 + def start(encoding = T.unsafe(nil)); end + + private + + # source://psych//lib/psych/streaming.rb#25 + def register(target, obj); end +end + +# source://psych//lib/psych/streaming.rb#4 +module Psych::Streaming::ClassMethods + # Create a new streaming emitter. Emitter will print to +io+. See + # Psych::Stream for an example. + # + # source://psych//lib/psych/streaming.rb#8 + def new(io); end +end + +# source://psych//lib/psych/syntax_error.rb#5 +class Psych::SyntaxError < ::Psych::Exception + # @return [SyntaxError] a new instance of SyntaxError + # + # source://psych//lib/psych/syntax_error.rb#8 + def initialize(file, line, col, offset, problem, context); end + + # Returns the value of attribute column. + # + # source://psych//lib/psych/syntax_error.rb#6 + def column; end + + # Returns the value of attribute context. + # + # source://psych//lib/psych/syntax_error.rb#6 + def context; end + + # Returns the value of attribute file. + # + # source://psych//lib/psych/syntax_error.rb#6 + def file; end + + # Returns the value of attribute line. + # + # source://psych//lib/psych/syntax_error.rb#6 + def line; end + + # Returns the value of attribute offset. + # + # source://psych//lib/psych/syntax_error.rb#6 + def offset; end + + # Returns the value of attribute problem. + # + # source://psych//lib/psych/syntax_error.rb#6 + def problem; end +end + +# This class works in conjunction with Psych::Parser to build an in-memory +# parse tree that represents a YAML document. +# +# == Example +# +# parser = Psych::Parser.new Psych::TreeBuilder.new +# parser.parse('--- foo') +# tree = parser.handler.root +# +# See Psych::Handler for documentation on the event methods used in this +# class. +# +# source://psych//lib/psych/tree_builder.rb#17 +class Psych::TreeBuilder < ::Psych::Handler + # Create a new TreeBuilder instance + # + # @return [TreeBuilder] a new instance of TreeBuilder + # + # source://psych//lib/psych/tree_builder.rb#22 + def initialize; end + + # source://psych//lib/psych/tree_builder.rb#103 + def alias(anchor); end + + # Handles end_document events with +version+, +tag_directives+, + # and +implicit+ styling. + # + # See Psych::Handler#start_document + # + # source://psych//lib/psych/tree_builder.rb#77 + def end_document(implicit_end = T.unsafe(nil)); end + + # source://psych//lib/psych/tree_builder.rb#52 + def end_mapping; end + + # source://psych//lib/psych/tree_builder.rb#52 + def end_sequence; end + + # source://psych//lib/psych/tree_builder.rb#90 + def end_stream; end + + # source://psych//lib/psych/tree_builder.rb#33 + def event_location(start_line, start_column, end_line, end_column); end + + # Returns the root node for the built tree + # + # source://psych//lib/psych/tree_builder.rb#19 + def root; end + + # source://psych//lib/psych/tree_builder.rb#96 + def scalar(value, anchor, tag, plain, quoted, style); end + + # Handles start_document events with +version+, +tag_directives+, + # and +implicit+ styling. + # + # See Psych::Handler#start_document + # + # source://psych//lib/psych/tree_builder.rb#65 + def start_document(version, tag_directives, implicit); end + + # source://psych//lib/psych/tree_builder.rb#45 + def start_mapping(anchor, tag, implicit, style); end + + # source://psych//lib/psych/tree_builder.rb#45 + def start_sequence(anchor, tag, implicit, style); end + + # source://psych//lib/psych/tree_builder.rb#84 + def start_stream(encoding); end + + private + + # source://psych//lib/psych/tree_builder.rb#116 + def pop; end + + # source://psych//lib/psych/tree_builder.rb#111 + def push(value); end + + # source://psych//lib/psych/tree_builder.rb#132 + def set_end_location(node); end + + # source://psych//lib/psych/tree_builder.rb#122 + def set_location(node); end + + # source://psych//lib/psych/tree_builder.rb#127 + def set_start_location(node); end +end + +# The version of Psych you are using +# +# source://psych//lib/psych/versions.rb#5 +Psych::VERSION = T.let(T.unsafe(nil), String) + +# source://psych//lib/psych/visitors/depth_first.rb#4 +class Psych::Visitors::DepthFirst < ::Psych::Visitors::Visitor + # @return [DepthFirst] a new instance of DepthFirst + # + # source://psych//lib/psych/visitors/depth_first.rb#5 + def initialize(block); end + + private + + # source://psych//lib/psych/visitors/depth_first.rb#11 + def nary(o); end + + # source://psych//lib/psych/visitors/depth_first.rb#20 + def terminal(o); end + + # source://psych//lib/psych/visitors/depth_first.rb#20 + def visit_Psych_Nodes_Alias(o); end + + # source://psych//lib/psych/visitors/depth_first.rb#11 + def visit_Psych_Nodes_Document(o); end + + # source://psych//lib/psych/visitors/depth_first.rb#11 + def visit_Psych_Nodes_Mapping(o); end + + # source://psych//lib/psych/visitors/depth_first.rb#20 + def visit_Psych_Nodes_Scalar(o); end + + # source://psych//lib/psych/visitors/depth_first.rb#11 + def visit_Psych_Nodes_Sequence(o); end + + # source://psych//lib/psych/visitors/depth_first.rb#11 + def visit_Psych_Nodes_Stream(o); end +end + +# source://psych//lib/psych/visitors/yaml_tree.rb#541 +class Psych::Visitors::RestrictedYAMLTree < ::Psych::Visitors::YAMLTree + # @return [RestrictedYAMLTree] a new instance of RestrictedYAMLTree + # + # source://psych//lib/psych/visitors/yaml_tree.rb#553 + def initialize(emitter, ss, options); end + + # source://psych//lib/psych/visitors/yaml_tree.rb#566 + def accept(target); end + + # source://psych//lib/psych/visitors/yaml_tree.rb#578 + def visit_Symbol(sym); end +end + +# source://psych//lib/psych/visitors/yaml_tree.rb#542 +Psych::Visitors::RestrictedYAMLTree::DEFAULT_PERMITTED_CLASSES = T.let(T.unsafe(nil), Hash) + +# This class walks a YAML AST, converting each node to Ruby +# +# source://psych//lib/psych/visitors/to_ruby.rb#14 +class Psych::Visitors::ToRuby < ::Psych::Visitors::Visitor + # @return [ToRuby] a new instance of ToRuby + # + # source://psych//lib/psych/visitors/to_ruby.rb#23 + def initialize(ss, class_loader, symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil)); end + + # source://psych//lib/psych/visitors/to_ruby.rb#34 + def accept(target); end + + # Returns the value of attribute class_loader. + # + # source://psych//lib/psych/visitors/to_ruby.rb#21 + def class_loader; end + + # source://psych//lib/psych/visitors/to_ruby.rb#327 + def visit_Psych_Nodes_Alias(o); end + + # source://psych//lib/psych/visitors/to_ruby.rb#319 + def visit_Psych_Nodes_Document(o); end + + # source://psych//lib/psych/visitors/to_ruby.rb#165 + def visit_Psych_Nodes_Mapping(o); end + + # source://psych//lib/psych/visitors/to_ruby.rb#129 + def visit_Psych_Nodes_Scalar(o); end + + # source://psych//lib/psych/visitors/to_ruby.rb#133 + def visit_Psych_Nodes_Sequence(o); end + + # source://psych//lib/psych/visitors/to_ruby.rb#323 + def visit_Psych_Nodes_Stream(o); end + + private + + # source://psych//lib/psych/visitors/to_ruby.rb#395 + def deduplicate(key); end + + # source://psych//lib/psych/visitors/to_ruby.rb#51 + def deserialize(o); end + + # source://psych//lib/psych/visitors/to_ruby.rb#412 + def init_with(o, h, node); end + + # source://psych//lib/psych/visitors/to_ruby.rb#404 + def merge_key(hash, key, val); end + + # source://psych//lib/psych/visitors/to_ruby.rb#333 + def register(node, object); end + + # source://psych//lib/psych/visitors/to_ruby.rb#338 + def register_empty(object); end + + # Convert +klassname+ to a Class + # + # source://psych//lib/psych/visitors/to_ruby.rb#425 + def resolve_class(klassname); end + + # source://psych//lib/psych/visitors/to_ruby.rb#407 + def revive(klass, node); end + + # source://psych//lib/psych/visitors/to_ruby.rb#344 + def revive_hash(hash, o, tagged = T.unsafe(nil)); end + + class << self + # source://psych//lib/psych/visitors/to_ruby.rb#15 + def create(symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil), strict_integer: T.unsafe(nil)); end + end +end + +# source://psych//lib/psych/visitors/visitor.rb#4 +class Psych::Visitors::Visitor + # source://psych//lib/psych/visitors/visitor.rb#5 + def accept(target); end + + private + + # source://psych//lib/psych/visitors/visitor.rb#19 + def dispatch; end + + # source://psych//lib/psych/visitors/visitor.rb#29 + def visit(target); end + + class << self + # @api private + # + # source://psych//lib/psych/visitors/visitor.rb#12 + def dispatch_cache; end + end +end + +# YAMLTree builds a YAML ast given a Ruby object. For example: +# +# builder = Psych::Visitors::YAMLTree.new +# builder << { :foo => 'bar' } +# builder.tree # => # false flag # * you do not want script to be automatically appended for the current page. You can also call cancel_auto_inject # - # source://rack-mini-profiler//lib/mini_profiler.rb#757 + # source://rack-mini-profiler//lib/mini_profiler.rb#758 def get_profile_script(env); end # source://rack-mini-profiler//lib/mini_profiler.rb#671 def help(client_settings, env); end - # source://rack-mini-profiler//lib/mini_profiler.rb#738 + # source://rack-mini-profiler//lib/mini_profiler.rb#739 def ids(env); end - # source://rack-mini-profiler//lib/mini_profiler.rb#747 + # source://rack-mini-profiler//lib/mini_profiler.rb#748 def ids_comma_separated(env); end # source://rack-mini-profiler//lib/mini_profiler.rb#528 @@ -557,27 +557,30 @@ class Rack::MiniProfiler private - # source://rack-mini-profiler//lib/mini_profiler.rb#825 + # source://rack-mini-profiler//lib/mini_profiler.rb#826 def handle_snapshots_request(env); end - # source://rack-mini-profiler//lib/mini_profiler.rb#893 + # source://rack-mini-profiler//lib/mini_profiler.rb#950 + def public_base_path(env); end + + # source://rack-mini-profiler//lib/mini_profiler.rb#894 def rails_route_from_path(path, method); end - # source://rack-mini-profiler//lib/mini_profiler.rb#875 + # source://rack-mini-profiler//lib/mini_profiler.rb#876 def serve_flamegraph(env); end - # source://rack-mini-profiler//lib/mini_profiler.rb#920 + # source://rack-mini-profiler//lib/mini_profiler.rb#921 def take_snapshot(env, start); end # @return [Boolean] # - # source://rack-mini-profiler//lib/mini_profiler.rb#914 + # source://rack-mini-profiler//lib/mini_profiler.rb#915 def take_snapshot?(path); end - # source://rack-mini-profiler//lib/mini_profiler.rb#909 + # source://rack-mini-profiler//lib/mini_profiler.rb#910 def url_for_snapshot(id, group_name); end - # source://rack-mini-profiler//lib/mini_profiler.rb#904 + # source://rack-mini-profiler//lib/mini_profiler.rb#905 def url_for_snapshots_group(group_name); end class << self @@ -2227,10 +2230,10 @@ module Rack::MiniProfilerRails extend ::Rack::MiniProfilerRailsMethods class << self - # source://rack-mini-profiler//lib/mini_profiler_rails/railtie.rb#121 + # source://rack-mini-profiler//lib/mini_profiler_rails/railtie.rb#122 def create_engine; end - # source://rack-mini-profiler//lib/mini_profiler_rails/railtie.rb#142 + # source://rack-mini-profiler//lib/mini_profiler_rails/railtie.rb#143 def get_key(payload); end # call direct if needed to do a defer init @@ -2240,18 +2243,18 @@ module Rack::MiniProfilerRails # @return [Boolean] # - # source://rack-mini-profiler//lib/mini_profiler_rails/railtie.rb#150 + # source://rack-mini-profiler//lib/mini_profiler_rails/railtie.rb#151 def serves_static_assets?(app); end - # source://rack-mini-profiler//lib/mini_profiler_rails/railtie.rb#146 + # source://rack-mini-profiler//lib/mini_profiler_rails/railtie.rb#147 def shorten_identifier(identifier); end - # source://rack-mini-profiler//lib/mini_profiler_rails/railtie.rb#132 + # source://rack-mini-profiler//lib/mini_profiler_rails/railtie.rb#133 def subscribe(event, &blk); end end end -# source://rack-mini-profiler//lib/mini_profiler_rails/railtie.rb#166 +# source://rack-mini-profiler//lib/mini_profiler_rails/railtie.rb#167 class Rack::MiniProfilerRails::Railtie < ::Rails::Railtie; end # source://rack-mini-profiler//lib/mini_profiler_rails/railtie_methods.rb#3 diff --git a/sorbet/rbi/gems/rack-session@1.0.1.rbi b/sorbet/rbi/gems/rack-session@1.0.1.rbi new file mode 100644 index 000000000..ccb68ddbf --- /dev/null +++ b/sorbet/rbi/gems/rack-session@1.0.1.rbi @@ -0,0 +1,8 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rack-session` gem. +# Please instead update this file by running `bin/tapioca gem rack-session`. + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/rack-test@2.1.0.rbi b/sorbet/rbi/gems/rack-test@2.1.0.rbi index c02810af5..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.7/lib/rack/version.rb#26 + # source://rack/2.2.8/lib/rack/version.rb#26 def release; end - # source://rack/2.2.7/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@2.2.8.rbi similarity index 97% rename from sorbet/rbi/gems/rack@2.2.7.rbi rename to sorbet/rbi/gems/rack@2.2.8.rbi index fe1724884..ed5d0ae87 100644 --- a/sorbet/rbi/gems/rack@2.2.7.rbi +++ b/sorbet/rbi/gems/rack@2.2.8.rbi @@ -1629,6 +1629,8 @@ class Rack::Lint # source://rack//lib/rack/lint.rb#10 def initialize(app); end + # @raise [LintError] + # # source://rack//lib/rack/lint.rb#41 def _call(env); end @@ -1640,27 +1642,29 @@ class Rack::Lint # === The Content-Length # - # source://rack//lib/rack/lint.rb#719 + # source://rack//lib/rack/lint.rb#708 def check_content_length(status, headers); end # === The Content-Type # - # source://rack//lib/rack/lint.rb#705 + # source://rack//lib/rack/lint.rb#694 def check_content_type(status, headers); end # == The Environment # - # source://rack//lib/rack/lint.rb#77 + # @raise [LintError] + # + # source://rack//lib/rack/lint.rb#73 def check_env(env); end # === The Error Stream # - # source://rack//lib/rack/lint.rb#497 + # source://rack//lib/rack/lint.rb#483 def check_error(error); end # === The Headers # - # source://rack//lib/rack/lint.rb#668 + # source://rack//lib/rack/lint.rb#656 def check_headers(header); end # === Hijacking @@ -1671,14 +1675,14 @@ class Rack::Lint # # ==== Request (before status) # - # source://rack//lib/rack/lint.rb#562 + # source://rack//lib/rack/lint.rb#548 def check_hijack(env); end # ==== Response (after headers) # It is also possible to hijack a response after the status and headers # have been sent. # - # source://rack//lib/rack/lint.rb#609 + # source://rack//lib/rack/lint.rb#595 def check_hijack_response(headers, env); end # === The Input Stream @@ -1686,23 +1690,23 @@ 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#365 def check_input(input); end # === The Status # - # source://rack//lib/rack/lint.rb#661 + # source://rack//lib/rack/lint.rb#647 def check_status(status); end - # source://rack//lib/rack/lint.rb#792 + # source://rack//lib/rack/lint.rb#781 def close; end # === The Body # - # source://rack//lib/rack/lint.rb#745 + # source://rack//lib/rack/lint.rb#734 def each; end - # source://rack//lib/rack/lint.rb#732 + # source://rack//lib/rack/lint.rb#721 def verify_content_length(bytes); end end @@ -1712,45 +1716,49 @@ module Rack::Lint::Assertion def assert(message); end end -# source://rack//lib/rack/lint.rb#506 +# source://rack//lib/rack/lint.rb#492 class Rack::Lint::ErrorWrapper include ::Rack::Lint::Assertion # @return [ErrorWrapper] a new instance of ErrorWrapper # - # source://rack//lib/rack/lint.rb#509 + # source://rack//lib/rack/lint.rb#495 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#517 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#512 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#500 def puts(str); end # * +write+ must be called with a single argument that is a String. # - # source://rack//lib/rack/lint.rb#519 + # @raise [LintError] + # + # source://rack//lib/rack/lint.rb#505 def write(str); end end -# source://rack//lib/rack/lint.rb#536 +# source://rack//lib/rack/lint.rb#522 class Rack::Lint::HijackWrapper include ::Rack::Lint::Assertion extend ::Forwardable # @return [HijackWrapper] a new instance of HijackWrapper # - # source://rack//lib/rack/lint.rb#547 + # source://rack//lib/rack/lint.rb#533 def initialize(io); end # source://forwardable/1.3.3/forwardable.rb#231 @@ -1781,32 +1789,38 @@ class Rack::Lint::HijackWrapper def write_nonblock(*args, **_arg1, &block); end end -# source://rack//lib/rack/lint.rb#540 +# source://rack//lib/rack/lint.rb#526 Rack::Lint::HijackWrapper::REQUIRED_METHODS = T.let(T.unsafe(nil), Array) -# source://rack//lib/rack/lint.rb#395 +# source://rack//lib/rack/lint.rb#383 class Rack::Lint::InputWrapper include ::Rack::Lint::Assertion # @return [InputWrapper] a new instance of InputWrapper # - # source://rack//lib/rack/lint.rb#398 + # source://rack//lib/rack/lint.rb#386 def initialize(input); end # * +close+ must never be called on the input stream. # - # source://rack//lib/rack/lint.rb#491 + # @raise [LintError] + # + # source://rack//lib/rack/lint.rb#477 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#451 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#392 def gets(*args); end # * +read+ behaves like IO#read. @@ -1827,7 +1841,7 @@ 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#418 def read(*args); end # * +rewind+ must be called without arguments. It rewinds the input @@ -1836,7 +1850,9 @@ class Rack::Lint::InputWrapper # developers must buffer the input data into some rewindable object # if the underlying input stream is not rewindable. # - # source://rack//lib/rack/lint.rb#478 + # @raise [LintError] + # + # source://rack//lib/rack/lint.rb#466 def rewind(*args); end end @@ -2304,145 +2320,145 @@ class Rack::Multipart::MultipartTotalPartLimitError < ::StandardError; end 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#180 def initialize(boundary, tempfile, bufsize, query_parser); end - # source://rack//lib/rack/multipart/parser.rb#196 + # source://rack//lib/rack/multipart/parser.rb#198 def on_read(content); end - # source://rack//lib/rack/multipart/parser.rb#202 + # source://rack//lib/rack/multipart/parser.rb#204 def result; end # Returns the value of attribute state. # - # source://rack//lib/rack/multipart/parser.rb#176 + # source://rack//lib/rack/multipart/parser.rb#178 def state; end private - # source://rack//lib/rack/multipart/parser.rb#294 + # source://rack//lib/rack/multipart/parser.rb#296 def consume_boundary; end - # source://rack//lib/rack/multipart/parser.rb#292 + # source://rack//lib/rack/multipart/parser.rb#294 def full_boundary; end - # source://rack//lib/rack/multipart/parser.rb#304 + # source://rack//lib/rack/multipart/parser.rb#306 def get_filename(head); end - # source://rack//lib/rack/multipart/parser.rb#240 + # source://rack//lib/rack/multipart/parser.rb#242 def handle_consume_token; end - # source://rack//lib/rack/multipart/parser.rb#369 + # source://rack//lib/rack/multipart/parser.rb#371 def handle_empty_content!(content); end - # source://rack//lib/rack/multipart/parser.rb#231 + # source://rack//lib/rack/multipart/parser.rb#233 def handle_fast_forward; end - # source://rack//lib/rack/multipart/parser.rb#273 + # source://rack//lib/rack/multipart/parser.rb#275 def handle_mime_body; end - # source://rack//lib/rack/multipart/parser.rb#250 + # source://rack//lib/rack/multipart/parser.rb#252 def handle_mime_head; end - # source://rack//lib/rack/multipart/parser.rb#214 + # source://rack//lib/rack/multipart/parser.rb#216 def run_parser; end - # source://rack//lib/rack/multipart/parser.rb#341 + # source://rack//lib/rack/multipart/parser.rb#343 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#66 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#59 def parse_boundary(content_type); end end end -# source://rack//lib/rack/multipart/parser.rb#19 +# source://rack//lib/rack/multipart/parser.rb#21 Rack::Multipart::Parser::BOUNDARY_REGEX = T.let(T.unsafe(nil), Regexp) # source://rack//lib/rack/multipart/parser.rb#13 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#23 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#24 def initialize(io, content_length); end - # source://rack//lib/rack/multipart/parser.rb#28 + # source://rack//lib/rack/multipart/parser.rb#30 def read(size, outbuf = T.unsafe(nil)); end - # source://rack//lib/rack/multipart/parser.rb#49 + # source://rack//lib/rack/multipart/parser.rb#51 def rewind; end end -# source://rack//lib/rack/multipart/parser.rb#339 +# source://rack//lib/rack/multipart/parser.rb#341 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#87 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#123 def initialize(tempfile); end - # source://rack//lib/rack/multipart/parser.rb#127 + # source://rack//lib/rack/multipart/parser.rb#129 def each; end - # source://rack//lib/rack/multipart/parser.rb#147 + # source://rack//lib/rack/multipart/parser.rb#149 def on_mime_body(mime_index, content); end - # source://rack//lib/rack/multipart/parser.rb#151 + # source://rack//lib/rack/multipart/parser.rb#153 def on_mime_finish(mime_index); end - # source://rack//lib/rack/multipart/parser.rb#131 + # source://rack//lib/rack/multipart/parser.rb#133 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#158 def check_part_limits; end end -# source://rack//lib/rack/multipart/parser.rb#109 +# source://rack//lib/rack/multipart/parser.rb#111 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#113 def close; end # @return [Boolean] # - # source://rack//lib/rack/multipart/parser.rb#110 + # source://rack//lib/rack/multipart/parser.rb#112 def file?; end end -# source://rack//lib/rack/multipart/parser.rb#86 +# source://rack//lib/rack/multipart/parser.rb#88 class Rack::Multipart::Parser::Collector::MimePart < ::Struct # @yield [data] # - # source://rack//lib/rack/multipart/parser.rb#87 + # source://rack//lib/rack/multipart/parser.rb#89 def get_data; end end -# source://rack//lib/rack/multipart/parser.rb#114 +# source://rack//lib/rack/multipart/parser.rb#116 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#118 def close; end # @return [Boolean] # - # source://rack//lib/rack/multipart/parser.rb#115 + # source://rack//lib/rack/multipart/parser.rb#117 def file?; end end -# source://rack//lib/rack/multipart/parser.rb#55 +# source://rack//lib/rack/multipart/parser.rb#57 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#56 class Rack::Multipart::Parser::MultipartInfo < ::Struct # Returns the value of attribute params # @@ -4660,116 +4676,116 @@ Rack::Session::Abstract::SessionHash::Unspecified = T.let(T.unsafe(nil), Object) # }.new # }) # -# source://rack//lib/rack/session/cookie.rb#49 +# source://rack//lib/rack/session/cookie.rb#50 class Rack::Session::Cookie < ::Rack::Session::Abstract::PersistedSecure # @return [Cookie] a new instance of Cookie # - # source://rack//lib/rack/session/cookie.rb#107 + # source://rack//lib/rack/session/cookie.rb#108 def initialize(app, options = T.unsafe(nil)); end # Returns the value of attribute coder. # - # source://rack//lib/rack/session/cookie.rb#105 + # source://rack//lib/rack/session/cookie.rb#106 def coder; end private - # source://rack//lib/rack/session/cookie.rb#180 + # source://rack//lib/rack/session/cookie.rb#181 def delete_session(req, session_id, options); end # @return [Boolean] # - # source://rack//lib/rack/session/cookie.rb#185 + # source://rack//lib/rack/session/cookie.rb#186 def digest_match?(data, digest); end - # source://rack//lib/rack/session/cookie.rb#132 + # source://rack//lib/rack/session/cookie.rb#133 def extract_session_id(request); end - # source://rack//lib/rack/session/cookie.rb#126 + # source://rack//lib/rack/session/cookie.rb#127 def find_session(req, sid); end - # source://rack//lib/rack/session/cookie.rb#192 + # source://rack//lib/rack/session/cookie.rb#193 def generate_hmac(data, secret); end - # source://rack//lib/rack/session/cookie.rb#149 + # source://rack//lib/rack/session/cookie.rb#150 def persistent_session_id!(data, sid = T.unsafe(nil)); end # @return [Boolean] # - # source://rack//lib/rack/session/cookie.rb#196 + # source://rack//lib/rack/session/cookie.rb#197 def secure?(options); end - # source://rack//lib/rack/session/cookie.rb#136 + # source://rack//lib/rack/session/cookie.rb#137 def unpacked_cookie_data(request); end - # source://rack//lib/rack/session/cookie.rb#164 + # source://rack//lib/rack/session/cookie.rb#165 def write_session(req, session_id, session, options); end end # Encode session cookies as Base64 # -# source://rack//lib/rack/session/cookie.rb#51 +# source://rack//lib/rack/session/cookie.rb#52 class Rack::Session::Cookie::Base64 - # source://rack//lib/rack/session/cookie.rb#56 + # source://rack//lib/rack/session/cookie.rb#57 def decode(str); end - # source://rack//lib/rack/session/cookie.rb#52 + # source://rack//lib/rack/session/cookie.rb#53 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 +# source://rack//lib/rack/session/cookie.rb#75 class Rack::Session::Cookie::Base64::JSON < ::Rack::Session::Cookie::Base64 - # source://rack//lib/rack/session/cookie.rb#79 + # source://rack//lib/rack/session/cookie.rb#80 def decode(str); end - # source://rack//lib/rack/session/cookie.rb#75 + # source://rack//lib/rack/session/cookie.rb#76 def encode(obj); end end # Encode session cookies as Marshaled Base64 data # -# source://rack//lib/rack/session/cookie.rb#61 +# source://rack//lib/rack/session/cookie.rb#62 class Rack::Session::Cookie::Base64::Marshal < ::Rack::Session::Cookie::Base64 - # source://rack//lib/rack/session/cookie.rb#66 + # source://rack//lib/rack/session/cookie.rb#67 def decode(str); end - # source://rack//lib/rack/session/cookie.rb#62 + # source://rack//lib/rack/session/cookie.rb#63 def encode(str); end end -# source://rack//lib/rack/session/cookie.rb#85 +# source://rack//lib/rack/session/cookie.rb#86 class Rack::Session::Cookie::Base64::ZipJSON < ::Rack::Session::Cookie::Base64 - # source://rack//lib/rack/session/cookie.rb#90 + # source://rack//lib/rack/session/cookie.rb#91 def decode(str); end - # source://rack//lib/rack/session/cookie.rb#86 + # source://rack//lib/rack/session/cookie.rb#87 def encode(obj); end end # Use no encoding for session cookies # -# source://rack//lib/rack/session/cookie.rb#100 +# source://rack//lib/rack/session/cookie.rb#101 class Rack::Session::Cookie::Identity - # source://rack//lib/rack/session/cookie.rb#102 + # source://rack//lib/rack/session/cookie.rb#103 def decode(str); end - # source://rack//lib/rack/session/cookie.rb#101 + # source://rack//lib/rack/session/cookie.rb#102 def encode(str); end end -# source://rack//lib/rack/session/cookie.rb#155 +# source://rack//lib/rack/session/cookie.rb#156 class Rack::Session::Cookie::SessionId # @return [SessionId] a new instance of SessionId # - # source://rack//lib/rack/session/cookie.rb#158 + # source://rack//lib/rack/session/cookie.rb#159 def initialize(session_id, cookie_value); end # Returns the value of attribute cookie_value. # - # source://rack//lib/rack/session/cookie.rb#156 + # source://rack//lib/rack/session/cookie.rb#157 def cookie_value; end end diff --git a/sorbet/rbi/gems/rackup@1.0.0.rbi b/sorbet/rbi/gems/rackup@1.0.0.rbi new file mode 100644 index 000000000..b7e4955f1 --- /dev/null +++ b/sorbet/rbi/gems/rackup@1.0.0.rbi @@ -0,0 +1,8 @@ +# 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`. + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/rails-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..6a0cbbb48 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,213 @@ # 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.1.1/lib/rails.rb#42 def app_class; end - # source://railties/7.0.6/lib/rails.rb#38 + # source://railties/7.1.1/lib/rails.rb#42 def app_class=(_arg0); end - # source://railties/7.0.6/lib/rails.rb#39 + # source://railties/7.1.1/lib/rails.rb#43 def application; end - # source://railties/7.0.6/lib/rails.rb#37 + # source://railties/7.1.1/lib/rails.rb#41 def application=(_arg0); end - # source://railties/7.0.6/lib/rails.rb#123 + # source://railties/7.1.1/lib/rails.rb#123 def autoloaders; end - # source://railties/7.0.6/lib/rails.rb#50 + # source://railties/7.1.1/lib/rails.rb#54 def backtrace_cleaner; end - # source://railties/7.0.6/lib/rails.rb#38 + # source://railties/7.1.1/lib/rails.rb#42 def cache; end - # source://railties/7.0.6/lib/rails.rb#38 + # source://railties/7.1.1/lib/rails.rb#42 def cache=(_arg0); end - # source://railties/7.0.6/lib/rails.rb#46 + # source://railties/7.1.1/lib/rails.rb#50 def configuration; end - # source://railties/7.0.6/lib/rails.rb#72 + # source://railties/7.1.1/lib/rails/deprecator.rb#4 + def deprecator; end + + # source://railties/7.1.1/lib/rails.rb#72 def env; end - # source://railties/7.0.6/lib/rails.rb#79 + # source://railties/7.1.1/lib/rails.rb#79 def env=(environment); end - # source://railties/7.0.6/lib/rails.rb#90 + # source://railties/7.1.1/lib/rails.rb#90 def error; end - # source://railties/7.0.6/lib/rails/gem_version.rb#5 + # source://railties/7.1.1/lib/rails/gem_version.rb#5 def gem_version; end - # source://railties/7.0.6/lib/rails.rb#103 + # source://railties/7.1.1/lib/rails.rb#103 def groups(*groups); end - # source://railties/7.0.6/lib/rails.rb#43 + # source://railties/7.1.1/lib/rails.rb#47 def initialize!(*_arg0, **_arg1, &_arg2); end - # source://railties/7.0.6/lib/rails.rb#43 + # source://railties/7.1.1/lib/rails.rb#47 def initialized?(*_arg0, **_arg1, &_arg2); end - # source://railties/7.0.6/lib/rails.rb#38 + # source://railties/7.1.1/lib/rails.rb#42 def logger; end - # source://railties/7.0.6/lib/rails.rb#38 + # source://railties/7.1.1/lib/rails.rb#42 def logger=(_arg0); end - # source://railties/7.0.6/lib/rails.rb#119 + # source://railties/7.1.1/lib/rails.rb#119 def public_path; end - # source://railties/7.0.6/lib/rails.rb#63 + # source://railties/7.1.1/lib/rails.rb#63 def root; end - # source://railties/7.0.6/lib/rails/version.rb#7 + # source://railties/7.1.1/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 +226,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 +334,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 + # assert_dom_email do + # items = assert_dom "ol>li" + # items.each do + # # Work with items here... + # end + # end # - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#251 - def assert_dom_email(&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_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 +396,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 +522,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 +584,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 +650,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 044d292e2..713bcfb28 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,16 @@ # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#14 module ActionView class << self - # source://actionview/7.0.6/lib/action_view.rb#90 + # source://actionview/7.1.1/lib/action_view/deprecator.rb#4 + def deprecator; end + + # source://actionview/7.1.1/lib/action_view.rb#93 def eager_load!; end - # source://actionview/7.0.6/lib/action_view/gem_version.rb#5 + # source://actionview/7.1.1/lib/action_view/gem_version.rb#5 def gem_version; end - # source://actionview/7.0.6/lib/action_view/version.rb#7 + # source://actionview/7.1.1/lib/action_view/version.rb#7 def version; end end end @@ -33,7 +36,7 @@ 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.1/lib/action_view/helpers.rb#35 def eager_load!; end end end @@ -42,40 +45,54 @@ end module ActionView::Helpers::SanitizeHelper mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods - # source://actionview/7.0.6/lib/action_view/helpers/sanitize_helper.rb#81 + # source://actionview/7.1.1/lib/action_view/helpers/sanitize_helper.rb#100 def sanitize(html, options = T.unsafe(nil)); end - # source://actionview/7.0.6/lib/action_view/helpers/sanitize_helper.rb#86 + # source://actionview/7.1.1/lib/action_view/helpers/sanitize_helper.rb#105 def sanitize_css(style); end - # source://actionview/7.0.6/lib/action_view/helpers/sanitize_helper.rb#120 + # source://actionview/7.1.1/lib/action_view/helpers/sanitize_helper.rb#12 + def sanitizer_vendor; end + + # source://actionview/7.1.1/lib/action_view/helpers/sanitize_helper.rb#12 + def sanitizer_vendor=(val); end + + # source://actionview/7.1.1/lib/action_view/helpers/sanitize_helper.rb#139 def strip_links(html); end - # source://actionview/7.0.6/lib/action_view/helpers/sanitize_helper.rb#103 + # source://actionview/7.1.1/lib/action_view/helpers/sanitize_helper.rb#122 def strip_tags(html); end + + class << self + # source://actionview/7.1.1/lib/action_view/helpers/sanitize_helper.rb#12 + def sanitizer_vendor; end + + # source://actionview/7.1.1/lib/action_view/helpers/sanitize_helper.rb#12 + def sanitizer_vendor=(val); end + end end # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#17 module ActionView::Helpers::SanitizeHelper::ClassMethods - # source://actionview/7.0.6/lib/action_view/helpers/sanitize_helper.rb#145 + # source://actionview/7.1.1/lib/action_view/helpers/sanitize_helper.rb#164 def full_sanitizer; end - # source://actionview/7.0.6/lib/action_view/helpers/sanitize_helper.rb#125 + # source://actionview/7.1.1/lib/action_view/helpers/sanitize_helper.rb#144 def full_sanitizer=(_arg0); end - # source://actionview/7.0.6/lib/action_view/helpers/sanitize_helper.rb#155 + # source://actionview/7.1.1/lib/action_view/helpers/sanitize_helper.rb#174 def link_sanitizer; end - # source://actionview/7.0.6/lib/action_view/helpers/sanitize_helper.rb#125 + # source://actionview/7.1.1/lib/action_view/helpers/sanitize_helper.rb#144 def link_sanitizer=(_arg0); end - # source://actionview/7.0.6/lib/action_view/helpers/sanitize_helper.rb#165 + # source://actionview/7.1.1/lib/action_view/helpers/sanitize_helper.rb#184 def safe_list_sanitizer; end - # source://actionview/7.0.6/lib/action_view/helpers/sanitize_helper.rb#125 + # source://actionview/7.1.1/lib/action_view/helpers/sanitize_helper.rb#144 def safe_list_sanitizer=(_arg0); end - # source://actionview/7.0.6/lib/action_view/helpers/sanitize_helper.rb#135 + # source://actionview/7.1.1/lib/action_view/helpers/sanitize_helper.rb#154 def sanitized_allowed_attributes; end # Replaces the allowed HTML attributes for the +sanitize+ helper. @@ -105,7 +122,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.6/lib/action_view/helpers/sanitize_helper.rb#131 + # source://actionview/7.1.1/lib/action_view/helpers/sanitize_helper.rb#150 def sanitized_allowed_tags; end # Replaces the allowed tags for the +sanitize+ helper. @@ -141,7 +158,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.6/lib/action_view/helpers/sanitize_helper.rb#127 + # source://actionview/7.1.1/lib/action_view/helpers/sanitize_helper.rb#146 def sanitizer_vendor; end private @@ -153,67 +170,70 @@ end # source://rails-html-sanitizer//lib/rails/html/sanitizer/version.rb#3 module Rails class << self - # source://railties/7.0.6/lib/rails.rb#38 + # source://railties/7.1.1/lib/rails.rb#42 def app_class; end - # source://railties/7.0.6/lib/rails.rb#38 + # source://railties/7.1.1/lib/rails.rb#42 def app_class=(_arg0); end - # source://railties/7.0.6/lib/rails.rb#39 + # source://railties/7.1.1/lib/rails.rb#43 def application; end - # source://railties/7.0.6/lib/rails.rb#37 + # source://railties/7.1.1/lib/rails.rb#41 def application=(_arg0); end - # source://railties/7.0.6/lib/rails.rb#123 + # source://railties/7.1.1/lib/rails.rb#123 def autoloaders; end - # source://railties/7.0.6/lib/rails.rb#50 + # source://railties/7.1.1/lib/rails.rb#54 def backtrace_cleaner; end - # source://railties/7.0.6/lib/rails.rb#38 + # source://railties/7.1.1/lib/rails.rb#42 def cache; end - # source://railties/7.0.6/lib/rails.rb#38 + # source://railties/7.1.1/lib/rails.rb#42 def cache=(_arg0); end - # source://railties/7.0.6/lib/rails.rb#46 + # source://railties/7.1.1/lib/rails.rb#50 def configuration; end - # source://railties/7.0.6/lib/rails.rb#72 + # source://railties/7.1.1/lib/rails/deprecator.rb#4 + def deprecator; end + + # source://railties/7.1.1/lib/rails.rb#72 def env; end - # source://railties/7.0.6/lib/rails.rb#79 + # source://railties/7.1.1/lib/rails.rb#79 def env=(environment); end - # source://railties/7.0.6/lib/rails.rb#90 + # source://railties/7.1.1/lib/rails.rb#90 def error; end - # source://railties/7.0.6/lib/rails/gem_version.rb#5 + # source://railties/7.1.1/lib/rails/gem_version.rb#5 def gem_version; end - # source://railties/7.0.6/lib/rails.rb#103 + # source://railties/7.1.1/lib/rails.rb#103 def groups(*groups); end - # source://railties/7.0.6/lib/rails.rb#43 + # source://railties/7.1.1/lib/rails.rb#47 def initialize!(*_arg0, **_arg1, &_arg2); end - # source://railties/7.0.6/lib/rails.rb#43 + # source://railties/7.1.1/lib/rails.rb#47 def initialized?(*_arg0, **_arg1, &_arg2); end - # source://railties/7.0.6/lib/rails.rb#38 + # source://railties/7.1.1/lib/rails.rb#42 def logger; end - # source://railties/7.0.6/lib/rails.rb#38 + # source://railties/7.1.1/lib/rails.rb#42 def logger=(_arg0); end - # source://railties/7.0.6/lib/rails.rb#119 + # source://railties/7.1.1/lib/rails.rb#119 def public_path; end - # source://railties/7.0.6/lib/rails.rb#63 + # source://railties/7.1.1/lib/rails.rb#63 def root; end - # source://railties/7.0.6/lib/rails/version.rb#7 + # source://railties/7.1.1/lib/rails/version.rb#7 def version; end end end diff --git a/sorbet/rbi/gems/rails-i18n@7.0.7.rbi b/sorbet/rbi/gems/rails-i18n@7.0.8.rbi similarity index 100% rename from sorbet/rbi/gems/rails-i18n@7.0.7.rbi rename to sorbet/rbi/gems/rails-i18n@7.0.8.rbi diff --git a/sorbet/rbi/gems/rails@7.0.6.rbi b/sorbet/rbi/gems/rails@7.1.1.rbi similarity index 100% rename from sorbet/rbi/gems/rails@7.0.6.rbi rename to sorbet/rbi/gems/rails@7.1.1.rbi diff --git a/sorbet/rbi/gems/railties@7.0.6.rbi b/sorbet/rbi/gems/railties@7.1.1.rbi similarity index 73% rename from sorbet/rbi/gems/railties@7.0.6.rbi rename to sorbet/rbi/gems/railties@7.1.1.rbi index dbba92387..e5696f1e8 100644 --- a/sorbet/rbi/gems/railties@7.0.6.rbi +++ b/sorbet/rbi/gems/railties@7.1.1.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,44 +194,44 @@ 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#510 def build_middleware_stack; end - # source://railties//lib/rails/application.rb#383 + # source://railties//lib/rails/application.rb#434 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#438 def config=(_arg0); end - # Convenience for loading config/foo.yml for the current Rails env. + # Convenience for loading config/foo.yml for the current \Rails env. # # Examples: # @@ -262,13 +267,13 @@ class Rails::Application < ::Rails::Engine # Rails.application.config_for(:example)[:foo][:bar] # # => { baz: 1, qux: 2 } # - # source://railties//lib/rails/application.rb#221 + # source://railties//lib/rails/application.rb#271 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#354 def console(&blk); end # Returns an ActiveSupport::EncryptedConfiguration instance for the @@ -286,25 +291,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#499 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#457 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#557 def eager_load!; end # Returns an ActiveSupport::EncryptedConfiguration instance for an encrypted @@ -323,61 +336,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#518 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#300 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#360 def generators(&blk); end - # source://railties//lib/rails/application.rb#471 + # source://railties//lib/rails/application.rb#531 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#421 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#342 def initializer(name, opts = T.unsafe(nil), &block); end - # source://railties//lib/rails/application.rb#377 + # source://railties//lib/rails/application.rb#428 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#371 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#551 + def load_generators(app = T.unsafe(nil)); end # Returns a message verifier object. # @@ -398,9 +417,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 +458,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#547 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#335 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#397 def require_environment!; end - # source://railties//lib/rails/application.rb#351 + # source://railties//lib/rails/application.rb#402 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#348 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 +519,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#475 def secret_key_base; end - # source://railties//lib/rails/application.rb#389 + # source://railties//lib/rails/application.rb#440 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#457 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#366 def server(&blk); end - # source://railties//lib/rails/application.rb#467 + # source://railties//lib/rails/application.rb#527 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#409 def watchable_args; end protected - # source://railties//lib/rails/application.rb#565 + # source://railties//lib/rails/application.rb#630 def default_middleware_stack; end + # source://railties//lib/rails/application.rb#645 + 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#596 def ordered_railties; end - # source://railties//lib/rails/application.rb#553 + # source://railties//lib/rails/application.rb#618 def railties_initializers(current); end - # source://railties//lib/rails/application.rb#520 + # source://railties//lib/rails/application.rb#585 def run_console_blocks(app); end - # source://railties//lib/rails/application.rb#510 + # source://railties//lib/rails/application.rb#575 def run_generators_blocks(app); end - # source://railties//lib/rails/application.rb#515 + # source://railties//lib/rails/application.rb#580 def run_runner_blocks(app); end - # source://railties//lib/rails/application.rb#525 + # source://railties//lib/rails/application.rb#590 def run_server_blocks(app); end - # source://railties//lib/rails/application.rb#499 + # source://railties//lib/rails/application.rb#564 def run_tasks_blocks(app); end - # source://railties//lib/rails/application.rb#570 + # source://railties//lib/rails/application.rb#635 def validate_secret_key_base(secret_key_base); end private - # source://railties//lib/rails/application.rb#604 + # source://railties//lib/rails/application.rb#683 def build_middleware; end - # source://railties//lib/rails/application.rb#597 + # source://railties//lib/rails/application.rb#676 def build_request(env); end - # source://railties//lib/rails/application.rb#608 + # source://railties//lib/rails/application.rb#687 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#691 + def filter_parameters; end + + # source://railties//lib/rails/application.rb#651 + def generate_local_secret; end + + # source://railties//lib/rails/application.rb#670 + def secrets_secret_key_base; end class << self # This method is called just after an application inherits from Rails::Application, @@ -564,580 +629,653 @@ 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#390 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#532 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#464 + def autoload_lib(ignore:); end + + # source://railties//lib/rails/application/configuration.rb#476 + 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 # 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#488 def colorize_logging; end - # source://railties//lib/rails/application/configuration.rb#365 + # source://railties//lib/rails/application/configuration.rb#492 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#537 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#427 def database_configuration; end - # source://railties//lib/rails/application/configuration.rb#283 + # source://railties//lib/rails/application/configuration.rb#382 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#386 def debug_exception_response_format=(_arg0); end - # source://railties//lib/rails/application/configuration.rb#437 + # source://railties//lib/rails/application/configuration.rb#554 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#566 + 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#409 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#14 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 + # source://railties//lib/rails/application/configuration.rb#14 def log_level=(_arg0); 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#388 def paths; end # Configures the ActionDispatch::PermissionsPolicy. # - # source://railties//lib/rails/application/configuration.rb#429 + # source://railties//lib/rails/application/configuration.rb#546 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 +1288,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#512 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#528 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#591 + def credentials_defaults; end end -# source://railties//lib/rails/application/configuration.rb#449 +# source://railties//lib/rails/application/configuration.rb#570 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#571 def initialize; end - # source://railties//lib/rails/application/configuration.rb#454 + # source://railties//lib/rails/application/configuration.rb#575 def method_missing(method, *args); end private # @return [Boolean] # - # source://railties//lib/rails/application/configuration.rb#464 + # source://railties//lib/rails/application/configuration.rb#585 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 +1386,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 +1438,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.1/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.1/lib/active_support/callbacks.rb#70 def __callbacks?; end # Returns the value of attribute eager_load. @@ -1374,13 +1507,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.1/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.1/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.1/lib/active_support/callbacks.rb#70 def __callbacks?; end end end @@ -1389,7 +1522,7 @@ end class Rails::ApplicationController < ::ActionController::Base private - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 + # source://actionview/7.1.1/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end # source://railties//lib/rails/application_controller.rb#25 @@ -1404,16 +1537,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.1/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://actionview/7.0.6/lib/action_view/layouts.rb#209 + # source://actionview/7.1.1/lib/action_view/layouts.rb#211 def _layout; end - # source://actionview/7.0.6/lib/action_view/layouts.rb#210 + # source://actionview/7.1.1/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.1/lib/action_controller/metal.rb#262 def middleware_stack; end end end @@ -1465,14 +1598,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 +1636,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 +1707,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.0/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 +1731,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 +1756,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 + def namespaced_name(name); end - # @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 - - # 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 +1860,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 +1999,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 +2026,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,12 +2091,12 @@ 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 +# Any +Rails::Engine+ is also a Rails::Railtie, so the same # methods (like rake_tasks and +generators+) and configuration # options that are available in railties can also be used in engines. # @@ -2083,7 +2263,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 @@ -2133,14 +2313,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 +2334,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 @@ -2259,31 +2439,31 @@ class Rails::Engine < ::Rails::Railtie # source://railties//lib/rails/engine.rb#432 def initialize; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.1/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.1/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + # source://activesupport/7.1.1/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.1/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#510 def app; end # Define the Rack API for this engine. # - # source://railties//lib/rails/engine.rb#528 + # source://railties//lib/rails/engine.rb#527 def call(env); end # Define the configuration object for the engine. # - # source://railties//lib/rails/engine.rb#547 + # source://railties//lib/rails/engine.rb#546 def config; end # source://railties//lib/rails/engine.rb#484 @@ -2292,7 +2472,7 @@ class Rails::Engine < ::Rails::Railtie # 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#522 def endpoint; end # source://railties//lib/rails/engine.rb#430 @@ -2300,7 +2480,7 @@ class Rails::Engine < ::Rails::Railtie # Defines additional Rack env configuration that is added on each call. # - # source://railties//lib/rails/engine.rb#534 + # source://railties//lib/rails/engine.rb#533 def env_config; end # Returns a module with all the helpers defined for the engine. @@ -2310,11 +2490,11 @@ class Rails::Engine < ::Rails::Railtie # Returns all registered helpers paths. # - # source://railties//lib/rails/engine.rb#506 + # source://railties//lib/rails/engine.rb#505 def helpers_paths; end # source://railties//lib/rails/engine.rb#430 - def isolated?(*_arg0, **_arg1, &_arg2); end + def isolated?(&block); end # Load console and invoke the registered hooks. # Check Rails::Railtie.console for more info. @@ -2322,13 +2502,13 @@ class Rails::Engine < ::Rails::Railtie # source://railties//lib/rails/engine.rb#446 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 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 @@ -2339,7 +2519,7 @@ class Rails::Engine < ::Rails::Railtie # # Blog::Engine.load_seed # - # source://railties//lib/rails/engine.rb#555 + # source://railties//lib/rails/engine.rb#554 def load_seed; end # Invoke the server registered hooks. @@ -2369,61 +2549,66 @@ class Rails::Engine < ::Rails::Railtie # 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#539 def routes(&block); end # @return [Boolean] # - # source://railties//lib/rails/engine.rb#654 + # source://railties//lib/rails/engine.rb#670 def routes?; end protected - # source://railties//lib/rails/engine.rb#659 + # source://railties//lib/rails/engine.rb#675 def run_tasks_blocks(*_arg0); end private - # source://railties//lib/rails/engine.rb#691 + # source://railties//lib/rails/engine.rb#707 def _all_autoload_once_paths; end - # source://railties//lib/rails/engine.rb#695 + # source://railties//lib/rails/engine.rb#711 def _all_autoload_paths; end - # source://railties//lib/rails/engine.rb#704 + # source://railties//lib/rails/engine.rb#720 def _all_load_paths(add_autoload_paths_to_load_path); end - # source://railties//lib/rails/engine.rb#723 + # source://railties//lib/rails/engine.rb#744 def build_middleware; end - # source://railties//lib/rails/engine.rb#715 + # source://railties//lib/rails/engine.rb#736 def build_request(env); end - # source://railties//lib/rails/engine.rb#687 + # source://railties//lib/rails/engine.rb#703 def default_middleware_stack; end # @return [Boolean] # - # source://railties//lib/rails/engine.rb#671 + # source://railties//lib/rails/engine.rb#731 + def fixtures_in_root_and_not_in_vendor?(fixtures); end + + # @return [Boolean] + # + # source://railties//lib/rails/engine.rb#687 def has_migrations?; end - # source://railties//lib/rails/engine.rb#665 + # source://railties//lib/rails/engine.rb#681 def load_config_initializer(initializer); end class << self - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.1/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + # source://activesupport/7.1.1/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.1/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + # source://activesupport/7.1.1/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.1/lib/active_support/callbacks.rb#959 def _load_seed_callbacks=(value); end # Returns the value of attribute called_from. @@ -2455,7 +2640,7 @@ class Rails::Engine < ::Rails::Railtie # source://railties//lib/rails/engine.rb#374 def find_root(from); end - # source://railties//lib/rails/engine.rb#675 + # source://railties//lib/rails/engine.rb#691 def find_root_with_flag(flag, root_path, default = T.unsafe(nil)); end # @private @@ -2492,7 +2677,7 @@ class Rails::Engine::Configuration < ::Rails::Railtie::Configuration # source://railties//lib/rails/engine/configuration.rb#12 def initialize(root = T.unsafe(nil)); end - # source://railties//lib/rails/engine/configuration.rb#83 + # source://railties//lib/rails/engine/configuration.rb#88 def autoload_once_paths; end # Sets the attribute autoload_once_paths @@ -2502,7 +2687,7 @@ 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 + # source://railties//lib/rails/engine/configuration.rb#92 def autoload_paths; end # Sets the attribute autoload_paths @@ -2512,7 +2697,7 @@ 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 + # source://railties//lib/rails/engine/configuration.rb#84 def eager_load_paths; end # Sets the attribute eager_load_paths @@ -2571,7 +2756,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#80 def root=(value); end end @@ -2596,25 +2781,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,10 +2807,10 @@ 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 @@ -2641,7 +2826,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 +2843,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 +2856,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 +2935,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 +2979,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 +3146,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 +3157,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 +3184,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 +3231,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 +3257,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 +3266,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 +3278,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 +3342,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 +3372,19 @@ class Rails::Generators::ActiveModel # source://railties//lib/rails/generators/active_model.rb#31 def initialize(name); end - # DELETE destroy + # Used for: # - # source://railties//lib/rails/generators/active_model.rb#75 + # * DELETE +destroy+ + # + # source://railties//lib/rails/generators/active_model.rb#89 def destroy; end - # POST create - # PATCH/PUT update + # Used for: + # + # * POST +create+ + # * PATCH / PUT +update+ # - # source://railties//lib/rails/generators/active_model.rb#70 + # source://railties//lib/rails/generators/active_model.rb#82 def errors; end # Returns the value of attribute name. @@ -3208,34 +3392,44 @@ 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: # - # source://railties//lib/rails/generators/active_model.rb#64 + # * PATCH / PUT +update+ + # + # source://railties//lib/rails/generators/active_model.rb#74 def update(params = T.unsafe(nil)); end class << self - # GET index + # Used for: + # + # * GET +index+ # - # source://railties//lib/rails/generators/active_model.rb#36 + # 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: # - # source://railties//lib/rails/generators/active_model.rb#44 + # * GET +show+ + # * GET +edit+ + # * PATCH / PUT +update+ + # * DELETE +destroy+ + # + # source://railties//lib/rails/generators/active_model.rb#48 def find(klass, params = T.unsafe(nil)); end end end @@ -3244,33 +3438,24 @@ end 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 @@ -3288,93 +3473,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 # 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 @@ -3391,7 +3576,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 @@ -3424,8 +3609,8 @@ class Rails::Generators::Base < ::Thor::Group # "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 @@ -3514,13 +3699,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 @@ -3533,14 +3718,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. @@ -3548,15 +3733,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 @@ -3564,15 +3749,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 @@ -3589,17 +3786,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. @@ -3607,34 +3804,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 @@ -3644,10 +3841,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. @@ -3662,43 +3859,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. @@ -3715,26 +3912,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 @@ -3742,7 +3944,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 @@ -3821,7 +4023,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 @@ -3834,17 +4036,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 @@ -3877,16 +4079,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.0/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.0/lib/thor/base.rb#163 def name; end - # source://thor/1.2.2/lib/thor/base.rb#147 + # source://thor/1.3.0/lib/thor/base.rb#163 def name=(_arg0); end # source://railties//lib/rails/generators/named_base.rb#23 @@ -4101,90 +4303,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 @@ -4324,26 +4528,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 @@ -4363,25 +4567,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 @@ -4415,28 +4619,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 @@ -4449,8 +4653,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.1/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.1/lib/action_controller/metal.rb#262 + def middleware_stack; end + + # source://activesupport/7.1.1/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 @@ -4495,29 +4759,26 @@ class Rails::InfoController < ::Rails::ApplicationController private - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 + # source://actionview/7.1.1/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.1/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://actionview/7.0.6/lib/action_view/layouts.rb#209 + # source://actionview/7.1.1/lib/action_view/layouts.rb#211 def _layout; end - # source://actionview/7.0.6/lib/action_view/layouts.rb#210 + # source://actionview/7.1.1/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.1/lib/action_controller/metal.rb#262 def middleware_stack; end end end @@ -4614,48 +4875,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.1/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.1/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://actionpack/7.0.6/lib/abstract_controller/helpers.rb#11 + # source://actionpack/7.1.1/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.1/lib/action_controller/metal.rb#262 def middleware_stack; end end end @@ -4676,126 +4940,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 @@ -4807,7 +5071,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"] @@ -4815,17 +5080,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" @@ -4833,63 +5100,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 @@ -4902,61 +5169,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 @@ -4969,7 +5236,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 @@ -5009,7 +5276,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 @@ -5018,7 +5285,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: # @@ -5031,13 +5298,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: @@ -5213,6 +5480,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 @@ -5255,18 +5527,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. @@ -5283,7 +5555,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 @@ -5296,73 +5573,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 @@ -5372,30 +5649,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 @@ -5403,12 +5673,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 @@ -5427,12 +5697,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: # @@ -5441,137 +5711,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 @@ -5600,20 +6004,20 @@ class Rails::WelcomeController < ::Rails::ApplicationController private - # source://actionview/7.0.6/lib/action_view/layouts.rb#328 + # source://actionview/7.1.1/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.1/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://actionview/7.0.6/lib/action_view/layouts.rb#209 + # source://actionview/7.1.1/lib/action_view/layouts.rb#211 def _layout; end - # source://actionview/7.0.6/lib/action_view/layouts.rb#210 + # source://actionview/7.1.1/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.1/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 ff2099b28..c429a7248 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 @@ -1670,7 +1673,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 @@ -1679,14 +1682,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 @@ -2944,14 +2947,14 @@ class Rake::ThreadHistoryDisplay def threads; end end -# source://rake//lib/rake/thread_pool.rb#7 +# source://rake//lib/rake/thread_pool.rb#8 class Rake::ThreadPool # Creates a ThreadPool object. The +thread_count+ parameter is the size # of the pool. # # @return [ThreadPool] a new instance of ThreadPool # - # source://rake//lib/rake/thread_pool.rb#11 + # source://rake//lib/rake/thread_pool.rb#12 def initialize(thread_count); end # Creates a future executed by the +ThreadPool+. diff --git a/sorbet/rbi/gems/rbi@0.0.16.rbi b/sorbet/rbi/gems/rbi@0.1.2.rbi similarity index 72% rename from sorbet/rbi/gems/rbi@0.0.16.rbi rename to sorbet/rbi/gems/rbi@0.1.2.rbi index 079e7da81..b6ee6bad8 100644 --- a/sorbet/rbi/gems/rbi@0.0.16.rbi +++ b/sorbet/rbi/gems/rbi@0.1.2.rbi @@ -4,55 +4,28 @@ # This is an autogenerated file for types exported from the `rbi` gem. # Please instead update this file by running `bin/tapioca gem rbi`. -# source://rbi//lib/rbi.rb#7 +# 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#129 -class RBI::ASTVisitor - abstract! - - # @abstract - # - # source://rbi//lib/rbi/parser.rb#141 - sig { abstract.params(node: T.nilable(::AST::Node)).void } - def visit(node); end - - # source://rbi//lib/rbi/parser.rb#136 - sig { params(nodes: T::Array[::AST::Node]).void } - def visit_all(nodes); end - - private - - # source://rbi//lib/rbi/parser.rb#151 - sig { params(node: ::AST::Node).returns(::String) } - def parse_expr(node); end - - # source://rbi//lib/rbi/parser.rb#146 - sig { params(node: ::AST::Node).returns(::String) } - def parse_name(node); end -end - -# source://rbi//lib/rbi/model.rb#960 +# source://rbi//lib/rbi/model.rb#968 class RBI::Arg < ::RBI::Node - # source://rbi//lib/rbi/model.rb#972 + # source://rbi//lib/rbi/model.rb#980 sig { params(value: ::String, loc: T.nilable(::RBI::Loc)).void } def initialize(value, loc: T.unsafe(nil)); end - # source://rbi//lib/rbi/model.rb#978 + # source://rbi//lib/rbi/model.rb#986 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end - # source://rbi//lib/rbi/printer.rb#611 + # source://rbi//lib/rbi/printer.rb#613 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/model.rb#983 + # source://rbi//lib/rbi/model.rb#991 sig { returns(::String) } def to_s; end - # source://rbi//lib/rbi/model.rb#964 + # source://rbi//lib/rbi/model.rb#972 sig { returns(::String) } def value; end end @@ -61,13 +34,13 @@ end # # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://rbi//lib/rbi/model.rb#341 +# source://rbi//lib/rbi/model.rb#349 class RBI::Attr < ::RBI::NodeWithComments include ::RBI::Indexable abstract! - # source://rbi//lib/rbi/model.rb#366 + # source://rbi//lib/rbi/model.rb#374 sig do params( name: ::Symbol, @@ -80,58 +53,53 @@ class RBI::Attr < ::RBI::NodeWithComments end def initialize(name, names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end - # source://rbi//lib/rbi/printer.rb#346 + # source://rbi//lib/rbi/printer.rb#348 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#406 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#412 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end # @abstract # - # source://rbi//lib/rbi/model.rb#374 + # source://rbi//lib/rbi/model.rb#382 sig { abstract.returns(T::Array[::String]) } def fully_qualified_names; end - # source://rbi//lib/rbi/index.rb#109 + # source://rbi//lib/rbi/index.rb#113 sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#413 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#420 sig { override.params(other: ::RBI::Node).void } def merge_with(other); end - # source://rbi//lib/rbi/model.rb#348 + # source://rbi//lib/rbi/model.rb#356 sig { returns(T::Array[::Symbol]) } def names; end - # @return [Array] - # - # source://rbi//lib/rbi/model.rb#348 - def names=(_arg0); end - - # source://rbi//lib/rbi/printer.rb#373 + # source://rbi//lib/rbi/printer.rb#375 sig { override.returns(T::Boolean) } def oneline?; end - # source://rbi//lib/rbi/model.rb#354 + # source://rbi//lib/rbi/model.rb#362 sig { returns(T::Array[::RBI::Sig]) } def sigs; end - # source://rbi//lib/rbi/model.rb#351 + # source://rbi//lib/rbi/model.rb#359 sig { returns(::RBI::Visibility) } def visibility; end # @return [Visibility] # - # source://rbi//lib/rbi/model.rb#351 + # source://rbi//lib/rbi/model.rb#359 def visibility=(_arg0); end end -# source://rbi//lib/rbi/model.rb#377 +# source://rbi//lib/rbi/model.rb#385 class RBI::AttrAccessor < ::RBI::Attr - # source://rbi//lib/rbi/model.rb#391 + # source://rbi//lib/rbi/model.rb#399 sig do params( name: ::Symbol, @@ -145,22 +113,22 @@ class RBI::AttrAccessor < ::RBI::Attr end def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#444 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#452 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#397 + # source://rbi//lib/rbi/model.rb#405 sig { override.returns(T::Array[::String]) } def fully_qualified_names; end - # source://rbi//lib/rbi/model.rb#403 + # source://rbi//lib/rbi/model.rb#411 sig { override.returns(::String) } def to_s; end end -# source://rbi//lib/rbi/model.rb#409 +# source://rbi//lib/rbi/model.rb#417 class RBI::AttrReader < ::RBI::Attr - # source://rbi//lib/rbi/model.rb#423 + # source://rbi//lib/rbi/model.rb#431 sig do params( name: ::Symbol, @@ -174,22 +142,22 @@ class RBI::AttrReader < ::RBI::Attr end def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#426 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#434 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#429 + # source://rbi//lib/rbi/model.rb#437 sig { override.returns(T::Array[::String]) } def fully_qualified_names; end - # source://rbi//lib/rbi/model.rb#435 + # source://rbi//lib/rbi/model.rb#443 sig { override.returns(::String) } def to_s; end end -# source://rbi//lib/rbi/model.rb#441 +# source://rbi//lib/rbi/model.rb#449 class RBI::AttrWriter < ::RBI::Attr - # source://rbi//lib/rbi/model.rb#455 + # source://rbi//lib/rbi/model.rb#463 sig do params( name: ::Symbol, @@ -203,35 +171,35 @@ class RBI::AttrWriter < ::RBI::Attr end def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#435 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#443 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#461 + # source://rbi//lib/rbi/model.rb#469 sig { override.returns(T::Array[::String]) } def fully_qualified_names; end - # source://rbi//lib/rbi/model.rb#467 + # source://rbi//lib/rbi/model.rb#475 sig { override.returns(::String) } def to_s; end end # An arbitrary blank line that can be added both in trees and comments # -# source://rbi//lib/rbi/model.rb#70 +# source://rbi//lib/rbi/model.rb#74 class RBI::BlankLine < ::RBI::Comment - # source://rbi//lib/rbi/model.rb#74 + # source://rbi//lib/rbi/model.rb#78 sig { params(loc: T.nilable(::RBI::Loc)).void } def initialize(loc: T.unsafe(nil)); end - # source://rbi//lib/rbi/printer.rb#215 + # source://rbi//lib/rbi/printer.rb#217 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end end -# source://rbi//lib/rbi/model.rb#733 +# source://rbi//lib/rbi/model.rb#741 class RBI::BlockParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#744 + # source://rbi//lib/rbi/model.rb#752 sig do params( name: ::String, @@ -242,26 +210,26 @@ class RBI::BlockParam < ::RBI::Param end def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#755 + # source://rbi//lib/rbi/model.rb#763 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end - # source://rbi//lib/rbi/printer.rb#541 + # source://rbi//lib/rbi/printer.rb#543 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/printer.rb#546 + # source://rbi//lib/rbi/printer.rb#548 sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } def print_comment_leading_space(v, last:); end - # source://rbi//lib/rbi/model.rb#750 + # source://rbi//lib/rbi/model.rb#758 sig { override.returns(::String) } def to_s; end end -# source://rbi//lib/rbi/model.rb#213 +# source://rbi//lib/rbi/model.rb#218 class RBI::Class < ::RBI::Scope - # source://rbi//lib/rbi/model.rb#231 + # source://rbi//lib/rbi/model.rb#236 sig do params( name: ::String, @@ -273,58 +241,58 @@ class RBI::Class < ::RBI::Scope end def initialize(name, superclass_name: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#370 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#376 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#239 + # source://rbi//lib/rbi/model.rb#244 sig { override.returns(::String) } def fully_qualified_name; end - # source://rbi//lib/rbi/model.rb#217 + # source://rbi//lib/rbi/model.rb#222 sig { returns(::String) } def name; end # @return [String] # - # source://rbi//lib/rbi/model.rb#217 + # source://rbi//lib/rbi/model.rb#222 def name=(_arg0); end - # source://rbi//lib/rbi/printer.rb#282 + # source://rbi//lib/rbi/printer.rb#284 sig { override.params(v: ::RBI::Printer).void } def print_header(v); end - # source://rbi//lib/rbi/model.rb#220 + # source://rbi//lib/rbi/model.rb#225 sig { returns(T.nilable(::String)) } def superclass_name; end # @return [String, nil] # - # source://rbi//lib/rbi/model.rb#220 + # source://rbi//lib/rbi/model.rb#225 def superclass_name=(_arg0); end end -# source://rbi//lib/rbi/model.rb#50 +# source://rbi//lib/rbi/model.rb#53 class RBI::Comment < ::RBI::Node - # source://rbi//lib/rbi/model.rb#57 + # source://rbi//lib/rbi/model.rb#60 sig { params(text: ::String, loc: T.nilable(::RBI::Loc)).void } def initialize(text, loc: T.unsafe(nil)); end - # source://rbi//lib/rbi/model.rb#63 + # source://rbi//lib/rbi/model.rb#66 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end - # source://rbi//lib/rbi/printer.rb#195 + # source://rbi//lib/rbi/printer.rb#197 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/model.rb#54 + # source://rbi//lib/rbi/model.rb#57 sig { returns(::String) } def text; end # @return [String] # - # source://rbi//lib/rbi/model.rb#54 + # source://rbi//lib/rbi/model.rb#57 def text=(_arg0); end end @@ -343,33 +311,33 @@ end # end # ~~~ # -# source://rbi//lib/rbi/rewriters/merge_trees.rb#578 +# source://rbi//lib/rbi/rewriters/merge_trees.rb#589 class RBI::ConflictTree < ::RBI::Tree - # source://rbi//lib/rbi/rewriters/merge_trees.rb#585 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#596 sig { params(left_name: ::String, right_name: ::String).void } def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#596 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#607 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#582 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#593 sig { returns(::RBI::Tree) } def left; end # @return [Tree] # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#582 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#593 def right; end end # Consts # -# source://rbi//lib/rbi/model.rb#305 +# source://rbi//lib/rbi/model.rb#312 class RBI::Const < ::RBI::NodeWithComments include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#320 + # source://rbi//lib/rbi/model.rb#327 sig do params( name: ::String, @@ -381,70 +349,41 @@ class RBI::Const < ::RBI::NodeWithComments end def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/printer.rb#333 + # source://rbi//lib/rbi/printer.rb#335 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#397 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#403 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#328 + # source://rbi//lib/rbi/model.rb#335 sig { returns(::String) } def fully_qualified_name; end - # source://rbi//lib/rbi/index.rb#99 + # source://rbi//lib/rbi/index.rb#103 sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#309 + # source://rbi//lib/rbi/model.rb#316 sig { returns(::String) } def name; end - # source://rbi//lib/rbi/model.rb#334 + # source://rbi//lib/rbi/model.rb#342 sig { override.returns(::String) } def to_s; end # @return [String] # - # source://rbi//lib/rbi/model.rb#309 + # source://rbi//lib/rbi/model.rb#316 def value; end end -# source://rbi//lib/rbi/parser.rb#600 -class RBI::ConstBuilder < ::RBI::ASTVisitor - # source://rbi//lib/rbi/parser.rb#615 - sig { void } - def initialize; end - - # source://rbi//lib/rbi/parser.rb#612 - sig { returns(T::Array[::String]) } - def names; end - - # @return [Array] - # - # source://rbi//lib/rbi/parser.rb#612 - def names=(_arg0); end - - # source://rbi//lib/rbi/parser.rb#621 - sig { override.params(node: T.nilable(::AST::Node)).void } - def visit(node); end - - class << self - # source://rbi//lib/rbi/parser.rb#604 - sig { params(node: T.nilable(::AST::Node)).returns(T.nilable(::String)) } - def visit(node); end - end -end - -# source://rbi//lib/rbi.rb#8 -class RBI::Error < ::StandardError; end - -# source://rbi//lib/rbi/model.rb#808 +# source://rbi//lib/rbi/model.rb#816 class RBI::Extend < ::RBI::Mixin include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#820 + # source://rbi//lib/rbi/model.rb#828 sig do params( name: ::String, @@ -456,22 +395,22 @@ class RBI::Extend < ::RBI::Mixin end def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#492 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#502 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/index.rb#139 + # source://rbi//lib/rbi/index.rb#143 sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#826 + # source://rbi//lib/rbi/model.rb#834 sig { override.returns(::String) } def to_s; end end -# source://rbi//lib/rbi/model.rb#133 +# source://rbi//lib/rbi/model.rb#137 class RBI::File - # source://rbi//lib/rbi/model.rb#152 + # source://rbi//lib/rbi/model.rb#156 sig do params( strictness: T.nilable(::String), @@ -481,28 +420,28 @@ class RBI::File end def initialize(strictness: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#160 + # source://rbi//lib/rbi/model.rb#164 sig { params(node: ::RBI::Node).void } def <<(node); end - # source://rbi//lib/rbi/printer.rb#104 + # source://rbi//lib/rbi/printer.rb#105 sig { params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/model.rb#143 + # source://rbi//lib/rbi/model.rb#147 sig { returns(T::Array[::RBI::Comment]) } def comments; end # @return [Array] # - # source://rbi//lib/rbi/model.rb#143 + # source://rbi//lib/rbi/model.rb#147 def comments=(_arg0); end - # source://rbi//lib/rbi/model.rb#165 + # source://rbi//lib/rbi/model.rb#169 sig { returns(T::Boolean) } def empty?; end - # source://rbi//lib/rbi/printer.rb#128 + # source://rbi//lib/rbi/printer.rb#129 sig do params( out: T.any(::IO, ::StringIO), @@ -513,32 +452,32 @@ class RBI::File end def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end - # source://rbi//lib/rbi/model.rb#137 + # source://rbi//lib/rbi/model.rb#141 sig { returns(::RBI::Tree) } def root; end # @return [Tree] # - # source://rbi//lib/rbi/model.rb#137 + # source://rbi//lib/rbi/model.rb#141 def root=(_arg0); end - # source://rbi//lib/rbi/model.rb#140 + # source://rbi//lib/rbi/model.rb#144 sig { returns(T.nilable(::String)) } def strictness; end # @return [String, nil] # - # source://rbi//lib/rbi/model.rb#140 + # source://rbi//lib/rbi/model.rb#144 def strictness=(_arg0); end - # source://rbi//lib/rbi/printer.rb#134 + # source://rbi//lib/rbi/printer.rb#135 sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) } def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end end # source://rbi//lib/rbi/formatter.rb#5 class RBI::Formatter - # source://rbi//lib/rbi/formatter.rb#24 + # source://rbi//lib/rbi/formatter.rb#36 sig do params( add_sig_templates: T::Boolean, @@ -551,79 +490,46 @@ class RBI::Formatter end def initialize(add_sig_templates: T.unsafe(nil), group_nodes: T.unsafe(nil), max_line_length: T.unsafe(nil), nest_singleton_methods: T.unsafe(nil), nest_non_public_methods: T.unsafe(nil), sort_nodes: T.unsafe(nil)); end - # source://rbi//lib/rbi/formatter.rb#9 - sig { returns(T::Boolean) } - def add_sig_templates; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/formatter.rb#9 - def add_sig_templates=(_arg0); end + # source://rbi//lib/rbi/formatter.rb#15 + sig { params(add_sig_templates: T::Boolean).returns(T::Boolean) } + def add_sig_templates=(add_sig_templates); end - # source://rbi//lib/rbi/formatter.rb#53 + # source://rbi//lib/rbi/formatter.rb#59 sig { params(file: ::RBI::File).void } def format_file(file); end - # source://rbi//lib/rbi/formatter.rb#58 + # source://rbi//lib/rbi/formatter.rb#64 sig { params(tree: ::RBI::Tree).void } def format_tree(tree); end - # @return [Boolean] - # - # source://rbi//lib/rbi/formatter.rb#9 - def group_nodes; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/formatter.rb#9 - def group_nodes=(_arg0); end + # source://rbi//lib/rbi/formatter.rb#18 + sig { params(group_nodes: T::Boolean).returns(T::Boolean) } + def group_nodes=(group_nodes); end - # source://rbi//lib/rbi/formatter.rb#12 + # source://rbi//lib/rbi/formatter.rb#24 sig { returns(T.nilable(::Integer)) } def max_line_length; end # @return [Integer, nil] # - # source://rbi//lib/rbi/formatter.rb#12 + # source://rbi//lib/rbi/formatter.rb#24 def max_line_length=(_arg0); end - # @return [Boolean] - # - # source://rbi//lib/rbi/formatter.rb#9 - def nest_non_public_methods; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/formatter.rb#9 - def nest_non_public_methods=(_arg0); end - - # @return [Boolean] - # - # source://rbi//lib/rbi/formatter.rb#9 - def nest_singleton_methods; end + # source://rbi//lib/rbi/formatter.rb#21 + sig { params(nest_non_public_methods: T::Boolean).returns(T::Boolean) } + def nest_non_public_methods=(nest_non_public_methods); end - # @return [Boolean] - # - # source://rbi//lib/rbi/formatter.rb#9 - def nest_singleton_methods=(_arg0); end + # source://rbi//lib/rbi/formatter.rb#12 + sig { params(nest_singleton_methods: T::Boolean).returns(T::Boolean) } + def nest_singleton_methods=(nest_singleton_methods); end - # source://rbi//lib/rbi/formatter.rb#41 + # source://rbi//lib/rbi/formatter.rb#53 sig { params(file: ::RBI::File).returns(::String) } def print_file(file); end - # source://rbi//lib/rbi/formatter.rb#47 - sig { params(tree: ::RBI::Tree).returns(::String) } - def print_tree(tree); end - - # @return [Boolean] - # # source://rbi//lib/rbi/formatter.rb#9 - def sort_nodes; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/formatter.rb#9 - def sort_nodes=(_arg0); end + sig { params(sort_nodes: T::Boolean).returns(T::Boolean) } + def sort_nodes=(sort_nodes); end end # source://rbi//lib/rbi/rewriters/group_nodes.rb#88 @@ -632,7 +538,7 @@ class RBI::Group < ::RBI::Tree sig { params(kind: ::RBI::Group::Kind).void } def initialize(kind); end - # source://rbi//lib/rbi/printer.rb#836 + # source://rbi//lib/rbi/printer.rb#838 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end @@ -662,11 +568,11 @@ end # Sorbet's misc. # -# source://rbi//lib/rbi/model.rb#1285 +# source://rbi//lib/rbi/model.rb#1294 class RBI::Helper < ::RBI::NodeWithComments include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#1299 + # source://rbi//lib/rbi/model.rb#1308 sig do params( name: ::String, @@ -677,32 +583,32 @@ class RBI::Helper < ::RBI::NodeWithComments end def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/printer.rb#823 + # source://rbi//lib/rbi/printer.rb#825 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#510 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#520 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/index.rb#169 + # source://rbi//lib/rbi/index.rb#173 sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#1289 + # source://rbi//lib/rbi/model.rb#1298 sig { returns(::String) } def name; end - # source://rbi//lib/rbi/model.rb#1306 + # source://rbi//lib/rbi/model.rb#1315 sig { override.returns(::String) } def to_s; end end -# source://rbi//lib/rbi/model.rb#785 +# source://rbi//lib/rbi/model.rb#793 class RBI::Include < ::RBI::Mixin include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#797 + # source://rbi//lib/rbi/model.rb#805 sig do params( name: ::String, @@ -714,49 +620,49 @@ class RBI::Include < ::RBI::Mixin end def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#483 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#493 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/index.rb#129 + # source://rbi//lib/rbi/index.rb#133 sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#803 + # source://rbi//lib/rbi/model.rb#811 sig { override.returns(::String) } def to_s; end end # source://rbi//lib/rbi/index.rb#5 class RBI::Index < ::RBI::Visitor - # source://rbi//lib/rbi/index.rb#17 + # source://rbi//lib/rbi/index.rb#21 sig { void } def initialize; end - # source://rbi//lib/rbi/index.rb#28 + # source://rbi//lib/rbi/index.rb#32 sig { params(id: ::String).returns(T::Array[::RBI::Node]) } def [](id); end - # source://rbi//lib/rbi/index.rb#33 + # source://rbi//lib/rbi/index.rb#37 sig { params(nodes: ::RBI::Node).void } def index(*nodes); end - # source://rbi//lib/rbi/index.rb#23 + # source://rbi//lib/rbi/index.rb#27 sig { returns(T::Array[::String]) } def keys; end - # source://rbi//lib/rbi/index.rb#38 + # source://rbi//lib/rbi/index.rb#42 sig { override.params(node: T.nilable(::RBI::Node)).void } def visit(node); end private - # source://rbi//lib/rbi/index.rb#55 + # source://rbi//lib/rbi/index.rb#59 sig { params(node: T.all(::RBI::Indexable, ::RBI::Node)).void } def index_node(node); end class << self - # source://rbi//lib/rbi/index.rb#10 + # source://rbi//lib/rbi/index.rb#13 sig { params(node: ::RBI::Node).returns(::RBI::Index) } def index(*node); end end @@ -766,7 +672,7 @@ end # # @abstract Subclasses must implement the `abstract` methods below. # -# source://rbi//lib/rbi/index.rb#70 +# source://rbi//lib/rbi/index.rb#74 module RBI::Indexable interface! @@ -777,37 +683,37 @@ module RBI::Indexable # # @abstract # - # source://rbi//lib/rbi/index.rb#81 + # source://rbi//lib/rbi/index.rb#85 sig { abstract.returns(T::Array[::String]) } def index_ids; end end -# source://rbi//lib/rbi/model.rb#988 +# source://rbi//lib/rbi/model.rb#996 class RBI::KwArg < ::RBI::Arg - # source://rbi//lib/rbi/model.rb#1001 + # source://rbi//lib/rbi/model.rb#1009 sig { params(keyword: ::String, value: ::String, loc: T.nilable(::RBI::Loc)).void } def initialize(keyword, value, loc: T.unsafe(nil)); end - # source://rbi//lib/rbi/model.rb#1007 + # source://rbi//lib/rbi/model.rb#1015 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end - # source://rbi//lib/rbi/printer.rb#620 + # source://rbi//lib/rbi/printer.rb#622 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/model.rb#992 + # source://rbi//lib/rbi/model.rb#1000 sig { returns(::String) } def keyword; end - # source://rbi//lib/rbi/model.rb#1012 + # source://rbi//lib/rbi/model.rb#1020 sig { returns(::String) } def to_s; end end -# source://rbi//lib/rbi/model.rb#674 +# source://rbi//lib/rbi/model.rb#682 class RBI::KwOptParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#689 + # source://rbi//lib/rbi/model.rb#697 sig do params( name: ::String, @@ -819,30 +725,30 @@ class RBI::KwOptParam < ::RBI::Param end def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#701 + # source://rbi//lib/rbi/model.rb#709 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end - # source://rbi//lib/rbi/printer.rb#511 + # source://rbi//lib/rbi/printer.rb#513 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/printer.rb#516 + # source://rbi//lib/rbi/printer.rb#518 sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } def print_comment_leading_space(v, last:); end - # source://rbi//lib/rbi/model.rb#696 + # source://rbi//lib/rbi/model.rb#704 sig { override.returns(::String) } def to_s; end - # source://rbi//lib/rbi/model.rb#678 + # source://rbi//lib/rbi/model.rb#686 sig { returns(::String) } def value; end end -# source://rbi//lib/rbi/model.rb#647 +# source://rbi//lib/rbi/model.rb#655 class RBI::KwParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#658 + # source://rbi//lib/rbi/model.rb#666 sig do params( name: ::String, @@ -853,26 +759,26 @@ class RBI::KwParam < ::RBI::Param end def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#669 + # source://rbi//lib/rbi/model.rb#677 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end - # source://rbi//lib/rbi/printer.rb#496 + # source://rbi//lib/rbi/printer.rb#498 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/printer.rb#501 + # source://rbi//lib/rbi/printer.rb#503 sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } def print_comment_leading_space(v, last:); end - # source://rbi//lib/rbi/model.rb#664 + # source://rbi//lib/rbi/model.rb#672 sig { override.returns(::String) } def to_s; end end -# source://rbi//lib/rbi/model.rb#706 +# source://rbi//lib/rbi/model.rb#714 class RBI::KwRestParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#717 + # source://rbi//lib/rbi/model.rb#725 sig do params( name: ::String, @@ -883,26 +789,26 @@ class RBI::KwRestParam < ::RBI::Param end def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#728 + # source://rbi//lib/rbi/model.rb#736 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end - # source://rbi//lib/rbi/printer.rb#526 + # source://rbi//lib/rbi/printer.rb#528 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/printer.rb#531 + # source://rbi//lib/rbi/printer.rb#533 sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } def print_comment_leading_space(v, last:); end - # source://rbi//lib/rbi/model.rb#723 + # source://rbi//lib/rbi/model.rb#731 sig { override.returns(::String) } def to_s; end end # source://rbi//lib/rbi/loc.rb#5 class RBI::Loc - # source://rbi//lib/rbi/loc.rb#23 + # source://rbi//lib/rbi/loc.rb#38 sig do params( file: T.nilable(::String), @@ -916,47 +822,47 @@ 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#707 - sig { params(file: ::String, ast_loc: T.any(::Parser::Source::Map, ::Parser::Source::Range)).returns(::RBI::Loc) } - def from_ast_loc(file, ast_loc); end + # source://rbi//lib/rbi/loc.rb#12 + sig { params(file: ::String, prism_location: ::Prism::Location).returns(::RBI::Loc) } + def from_prism(file, prism_location); end end end # A tree that _might_ contain conflicts # -# source://rbi//lib/rbi/rewriters/merge_trees.rb#324 +# source://rbi//lib/rbi/rewriters/merge_trees.rb#330 class RBI::MergeTree < ::RBI::Tree - # source://rbi//lib/rbi/rewriters/merge_trees.rb#338 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#344 sig do params( loc: T.nilable(::RBI::Loc), @@ -967,18 +873,18 @@ class RBI::MergeTree < ::RBI::Tree end def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), conflicts: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#328 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#334 sig { returns(T::Array[::RBI::Rewriters::Merge::Conflict]) } def conflicts; end end # Methods and args # -# source://rbi//lib/rbi/model.rb#475 +# source://rbi//lib/rbi/model.rb#483 class RBI::Method < ::RBI::NodeWithComments include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#505 + # source://rbi//lib/rbi/model.rb#513 sig do params( name: ::String, @@ -993,88 +899,88 @@ class RBI::Method < ::RBI::NodeWithComments end def initialize(name, params: T.unsafe(nil), is_singleton: T.unsafe(nil), visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#525 + # source://rbi//lib/rbi/model.rb#533 sig { params(param: ::RBI::Param).void } def <<(param); end - # source://rbi//lib/rbi/printer.rb#382 + # source://rbi//lib/rbi/printer.rb#384 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#453 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#461 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#530 + # source://rbi//lib/rbi/model.rb#538 sig { returns(::String) } def fully_qualified_name; end - # source://rbi//lib/rbi/index.rb#119 + # source://rbi//lib/rbi/index.rb#123 sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/printer.rb#435 + # source://rbi//lib/rbi/printer.rb#437 sig { returns(T::Boolean) } def inline_params?; end - # source://rbi//lib/rbi/model.rb#485 + # source://rbi//lib/rbi/model.rb#493 sig { returns(T::Boolean) } def is_singleton; end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#485 + # source://rbi//lib/rbi/model.rb#493 def is_singleton=(_arg0); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#461 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#470 sig { override.params(other: ::RBI::Node).void } def merge_with(other); end - # source://rbi//lib/rbi/model.rb#479 + # source://rbi//lib/rbi/model.rb#487 sig { returns(::String) } def name; end # @return [String] # - # source://rbi//lib/rbi/model.rb#479 + # source://rbi//lib/rbi/model.rb#487 def name=(_arg0); end - # source://rbi//lib/rbi/printer.rb#430 + # source://rbi//lib/rbi/printer.rb#432 sig { override.returns(T::Boolean) } def oneline?; end - # source://rbi//lib/rbi/model.rb#482 + # source://rbi//lib/rbi/model.rb#490 sig { returns(T::Array[::RBI::Param]) } def params; end - # source://rbi//lib/rbi/model.rb#491 + # source://rbi//lib/rbi/model.rb#499 sig { returns(T::Array[::RBI::Sig]) } def sigs; end # @return [Array] # - # source://rbi//lib/rbi/model.rb#491 + # source://rbi//lib/rbi/model.rb#499 def sigs=(_arg0); end - # source://rbi//lib/rbi/model.rb#539 + # source://rbi//lib/rbi/model.rb#547 sig { override.returns(::String) } def to_s; end - # source://rbi//lib/rbi/model.rb#488 + # source://rbi//lib/rbi/model.rb#496 sig { returns(::RBI::Visibility) } def visibility; end # @return [Visibility] # - # source://rbi//lib/rbi/model.rb#488 + # source://rbi//lib/rbi/model.rb#496 def visibility=(_arg0); end end -# source://rbi//lib/rbi/model.rb#1345 +# source://rbi//lib/rbi/model.rb#1355 class RBI::MixesInClassMethods < ::RBI::Mixin include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#1357 + # source://rbi//lib/rbi/model.rb#1367 sig do params( name: ::String, @@ -1086,15 +992,15 @@ class RBI::MixesInClassMethods < ::RBI::Mixin end def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#501 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#511 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/index.rb#149 + # source://rbi//lib/rbi/index.rb#153 sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#1363 + # source://rbi//lib/rbi/model.rb#1373 sig { override.returns(::String) } def to_s; end end @@ -1103,11 +1009,11 @@ end # # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://rbi//lib/rbi/model.rb#762 +# source://rbi//lib/rbi/model.rb#770 class RBI::Mixin < ::RBI::NodeWithComments abstract! - # source://rbi//lib/rbi/model.rb#779 + # source://rbi//lib/rbi/model.rb#787 sig do params( name: ::String, @@ -1118,27 +1024,22 @@ class RBI::Mixin < ::RBI::NodeWithComments end def initialize(name, names, loc: T.unsafe(nil), comments: T.unsafe(nil)); end - # source://rbi//lib/rbi/printer.rb#556 + # source://rbi//lib/rbi/printer.rb#558 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#474 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#484 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#769 + # source://rbi//lib/rbi/model.rb#777 sig { returns(T::Array[::String]) } def names; end - - # @return [Array] - # - # source://rbi//lib/rbi/model.rb#769 - def names=(_arg0); end end -# source://rbi//lib/rbi/model.rb#186 +# source://rbi//lib/rbi/model.rb#190 class RBI::Module < ::RBI::Scope - # source://rbi//lib/rbi/model.rb#200 + # source://rbi//lib/rbi/model.rb#204 sig do params( name: ::String, @@ -1149,24 +1050,24 @@ class RBI::Module < ::RBI::Scope end def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#379 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#385 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#207 + # source://rbi//lib/rbi/model.rb#211 sig { override.returns(::String) } def fully_qualified_name; end - # source://rbi//lib/rbi/model.rb#190 + # source://rbi//lib/rbi/model.rb#194 sig { returns(::String) } def name; end # @return [String] # - # source://rbi//lib/rbi/model.rb#190 + # source://rbi//lib/rbi/model.rb#194 def name=(_arg0); end - # source://rbi//lib/rbi/printer.rb#268 + # source://rbi//lib/rbi/printer.rb#270 sig { override.params(v: ::RBI::Printer).void } def print_header(v); end end @@ -1183,13 +1084,13 @@ class RBI::Node # @abstract # - # source://rbi//lib/rbi/printer.rb#145 + # source://rbi//lib/rbi/printer.rb#146 sig { abstract.params(v: ::RBI::Printer).void } def accept_printer(v); end # Can `self` and `_other` be merged into a single definition? # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#283 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#287 sig { params(_other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(_other); end @@ -1212,19 +1113,19 @@ class RBI::Node # Merge `self` and `other` into a single definition # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#289 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#293 sig { params(other: ::RBI::Node).void } def merge_with(other); end - # source://rbi//lib/rbi/printer.rb#177 + # source://rbi//lib/rbi/printer.rb#179 sig { returns(T::Boolean) } def oneline?; end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#292 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#296 sig { returns(T.nilable(::RBI::ConflictTree)) } def parent_conflict_tree; end - # source://rbi//lib/rbi/model.rb#43 + # source://rbi//lib/rbi/model.rb#46 sig { returns(T.nilable(::RBI::Scope)) } def parent_scope; end @@ -1237,7 +1138,7 @@ class RBI::Node # source://rbi//lib/rbi/model.rb#12 def parent_tree=(_arg0); end - # source://rbi//lib/rbi/printer.rb#155 + # source://rbi//lib/rbi/printer.rb#156 sig do params( out: T.any(::IO, ::StringIO), @@ -1248,54 +1149,54 @@ class RBI::Node end def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end - # source://rbi//lib/rbi/printer.rb#168 + # source://rbi//lib/rbi/printer.rb#169 sig { params(v: ::RBI::Printer).void } def print_blank_line_before(v); end - # source://rbi//lib/rbi/model.rb#32 + # source://rbi//lib/rbi/model.rb#33 sig { params(node: ::RBI::Node).void } def replace(node); end - # source://rbi//lib/rbi/printer.rb#161 + # source://rbi//lib/rbi/printer.rb#162 sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) } def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end end # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://rbi//lib/rbi/model.rb#79 +# source://rbi//lib/rbi/model.rb#83 class RBI::NodeWithComments < ::RBI::Node abstract! - # source://rbi//lib/rbi/model.rb#89 + # source://rbi//lib/rbi/model.rb#93 sig { params(loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil)); end - # source://rbi//lib/rbi/model.rb#95 + # source://rbi//lib/rbi/model.rb#99 sig { returns(T::Array[::String]) } def annotations; end - # source://rbi//lib/rbi/model.rb#86 + # source://rbi//lib/rbi/model.rb#90 sig { returns(T::Array[::RBI::Comment]) } def comments; end # @return [Array] # - # source://rbi//lib/rbi/model.rb#86 + # source://rbi//lib/rbi/model.rb#90 def comments=(_arg0); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#306 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#311 sig { override.params(other: ::RBI::Node).void } def merge_with(other); end - # source://rbi//lib/rbi/printer.rb#186 + # source://rbi//lib/rbi/printer.rb#188 sig { override.returns(T::Boolean) } def oneline?; end end -# source://rbi//lib/rbi/model.rb#593 +# source://rbi//lib/rbi/model.rb#601 class RBI::OptParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#608 + # source://rbi//lib/rbi/model.rb#616 sig do params( name: ::String, @@ -1307,50 +1208,50 @@ class RBI::OptParam < ::RBI::Param end def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#615 + # source://rbi//lib/rbi/model.rb#623 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end - # source://rbi//lib/rbi/printer.rb#466 + # source://rbi//lib/rbi/printer.rb#468 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/printer.rb#471 + # source://rbi//lib/rbi/printer.rb#473 sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } def print_comment_leading_space(v, last:); end - # source://rbi//lib/rbi/model.rb#597 + # source://rbi//lib/rbi/model.rb#605 sig { returns(::String) } def value; end end # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://rbi//lib/rbi/model.rb#544 +# source://rbi//lib/rbi/model.rb#552 class RBI::Param < ::RBI::NodeWithComments abstract! - # source://rbi//lib/rbi/model.rb#560 + # source://rbi//lib/rbi/model.rb#568 sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end - # source://rbi//lib/rbi/printer.rb#444 + # source://rbi//lib/rbi/printer.rb#446 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/printer.rb#457 + # source://rbi//lib/rbi/printer.rb#459 sig { returns(T::Array[::String]) } def comments_lines; end - # source://rbi//lib/rbi/model.rb#551 + # source://rbi//lib/rbi/model.rb#559 sig { returns(::String) } def name; end - # source://rbi//lib/rbi/printer.rb#449 + # source://rbi//lib/rbi/printer.rb#451 sig { params(v: ::RBI::Printer, last: T::Boolean).void } def print_comment_leading_space(v, last:); end - # source://rbi//lib/rbi/model.rb#566 + # source://rbi//lib/rbi/model.rb#574 sig { override.returns(::String) } def to_s; end end @@ -1368,43 +1269,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#97 + # 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#86 + # 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#104 - 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#75 + # 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#80 + # 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#70 + # 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#91 + # 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#793 +class RBI::Parser::SigBuilder < ::RBI::Parser::Visitor + # source://rbi//lib/rbi/parser.rb#800 + sig { params(content: ::String, file: ::String).void } + def initialize(content, file:); end + + # source://rbi//lib/rbi/parser.rb#797 + sig { returns(::RBI::Sig) } + def current; end + + # source://rbi//lib/rbi/parser.rb#852 + sig { override.params(node: ::Prism::AssocNode).void } + def visit_assoc_node(node); end + + # source://rbi//lib/rbi/parser.rb#807 + 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#650 + sig { params(node: ::Prism::CallNode).returns(::RBI::Sig) } + def parse_sig(node); end + + # source://rbi//lib/rbi/parser.rb#660 + 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#710 + sig { params(send: ::Prism::CallNode).void } + def parse_tstruct_field(send); end + + # source://rbi//lib/rbi/parser.rb#747 + sig { params(name: ::String, node: ::Prism::Node).returns(::RBI::Visibility) } + def parse_visibility(name, node); end + + # source://rbi//lib/rbi/parser.rb#761 + sig { void } + def separate_header_comments; end + + # source://rbi//lib/rbi/parser.rb#771 + sig { void } + def set_root_tree_loc; end + + # source://rbi//lib/rbi/parser.rb#785 + 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 @@ -1487,7 +1549,7 @@ class RBI::Printer < ::RBI::Visitor sig { override.params(node: T.nilable(::RBI::Node)).void } def visit(node); end - # source://rbi//lib/rbi/printer.rb#89 + # source://rbi//lib/rbi/printer.rb#90 sig { override.params(nodes: T::Array[::RBI::Node]).void } def visit_all(nodes); end @@ -1496,9 +1558,9 @@ class RBI::Printer < ::RBI::Visitor def visit_file(file); end end -# source://rbi//lib/rbi/model.rb#901 +# source://rbi//lib/rbi/model.rb#909 class RBI::Private < ::RBI::Visibility - # source://rbi//lib/rbi/model.rb#911 + # source://rbi//lib/rbi/model.rb#919 sig do params( loc: T.nilable(::RBI::Loc), @@ -1509,9 +1571,9 @@ class RBI::Private < ::RBI::Visibility def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end end -# source://rbi//lib/rbi/model.rb#885 +# source://rbi//lib/rbi/model.rb#893 class RBI::Protected < ::RBI::Visibility - # source://rbi//lib/rbi/model.rb#895 + # source://rbi//lib/rbi/model.rb#903 sig do params( loc: T.nilable(::RBI::Loc), @@ -1522,9 +1584,9 @@ class RBI::Protected < ::RBI::Visibility def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end end -# source://rbi//lib/rbi/model.rb#869 +# source://rbi//lib/rbi/model.rb#877 class RBI::Public < ::RBI::Visibility - # source://rbi//lib/rbi/model.rb#879 + # source://rbi//lib/rbi/model.rb#887 sig do params( loc: T.nilable(::RBI::Loc), @@ -1535,9 +1597,9 @@ class RBI::Public < ::RBI::Visibility def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end end -# source://rbi//lib/rbi/model.rb#571 +# source://rbi//lib/rbi/model.rb#579 class RBI::ReqParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#582 + # source://rbi//lib/rbi/model.rb#590 sig do params( name: ::String, @@ -1548,39 +1610,39 @@ class RBI::ReqParam < ::RBI::Param end def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#588 + # source://rbi//lib/rbi/model.rb#596 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end end -# source://rbi//lib/rbi/model.rb#1368 +# source://rbi//lib/rbi/model.rb#1378 class RBI::RequiresAncestor < ::RBI::NodeWithComments include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#1381 + # source://rbi//lib/rbi/model.rb#1391 sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end - # source://rbi//lib/rbi/printer.rb#868 + # source://rbi//lib/rbi/printer.rb#870 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/index.rb#159 + # source://rbi//lib/rbi/index.rb#163 sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#1372 + # source://rbi//lib/rbi/model.rb#1382 sig { returns(::String) } def name; end - # source://rbi//lib/rbi/model.rb#1387 + # source://rbi//lib/rbi/model.rb#1397 sig { override.returns(::String) } def to_s; end end -# source://rbi//lib/rbi/model.rb#620 +# source://rbi//lib/rbi/model.rb#628 class RBI::RestParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#631 + # source://rbi//lib/rbi/model.rb#639 sig do params( name: ::String, @@ -1591,19 +1653,19 @@ class RBI::RestParam < ::RBI::Param end def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#642 + # source://rbi//lib/rbi/model.rb#650 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end - # source://rbi//lib/rbi/printer.rb#481 + # source://rbi//lib/rbi/printer.rb#483 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/printer.rb#486 + # source://rbi//lib/rbi/printer.rb#488 sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } def print_comment_leading_space(v, last:); end - # source://rbi//lib/rbi/model.rb#637 + # source://rbi//lib/rbi/model.rb#645 sig { override.returns(::String) } def to_s; end end @@ -1652,7 +1714,7 @@ class RBI::Rewriters::Annotate < ::RBI::Visitor sig { params(node: ::RBI::NodeWithComments).void } def annotate_node(node); end - # source://rbi//lib/rbi/rewriters/annotate.rb#37 + # source://rbi//lib/rbi/rewriters/annotate.rb#38 sig { params(node: ::RBI::Node).returns(T::Boolean) } def root?(node); end end @@ -1717,20 +1779,20 @@ end # # source://rbi//lib/rbi/rewriters/merge_trees.rb#39 class RBI::Rewriters::Merge - # source://rbi//lib/rbi/rewriters/merge_trees.rb#66 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#70 sig { params(left_name: ::String, right_name: ::String, keep: ::RBI::Rewriters::Merge::Keep).void } def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#75 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#79 sig { params(tree: ::RBI::Tree).void } def merge(tree); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#63 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#67 sig { returns(::RBI::MergeTree) } def tree; end class << self - # source://rbi//lib/rbi/rewriters/merge_trees.rb#51 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#54 sig do params( left: ::RBI::Tree, @@ -1746,19 +1808,19 @@ end # Used for logging / error displaying purpose # -# source://rbi//lib/rbi/rewriters/merge_trees.rb#82 +# source://rbi//lib/rbi/rewriters/merge_trees.rb#86 class RBI::Rewriters::Merge::Conflict < ::T::Struct const :left, ::RBI::Node const :right, ::RBI::Node const :left_name, ::String const :right_name, ::String - # source://rbi//lib/rbi/rewriters/merge_trees.rb#91 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#95 sig { returns(::String) } def to_s; end class << self - # source://sorbet-runtime/0.5.10908/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11109/lib/types/struct.rb#13 def inherited(s); end end end @@ -1794,19 +1856,19 @@ end # end # ~~~ # -# source://rbi//lib/rbi/rewriters/merge_trees.rb#241 +# source://rbi//lib/rbi/rewriters/merge_trees.rb#245 class RBI::Rewriters::Merge::ConflictTreeMerger < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/merge_trees.rb#243 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#247 sig { override.params(node: T.nilable(::RBI::Node)).void } def visit(node); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#248 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#252 sig { override.params(nodes: T::Array[::RBI::Node]).void } def visit_all(nodes); end private - # source://rbi//lib/rbi/rewriters/merge_trees.rb#269 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#273 sig { params(left: ::RBI::Tree, right: ::RBI::Tree).void } def merge_conflict_trees(left, right); end end @@ -1820,9 +1882,9 @@ class RBI::Rewriters::Merge::Keep < ::T::Enum end end -# source://rbi//lib/rbi/rewriters/merge_trees.rb#96 +# source://rbi//lib/rbi/rewriters/merge_trees.rb#100 class RBI::Rewriters::Merge::TreeMerger < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/merge_trees.rb#103 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#107 sig do params( output: ::RBI::Tree, @@ -1833,33 +1895,33 @@ class RBI::Rewriters::Merge::TreeMerger < ::RBI::Visitor end def initialize(output, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#100 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#104 sig { returns(T::Array[::RBI::Rewriters::Merge::Conflict]) } def conflicts; end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#115 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#119 sig { override.params(node: T.nilable(::RBI::Node)).void } def visit(node); end private - # source://rbi//lib/rbi/rewriters/merge_trees.rb#164 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#168 sig { returns(::RBI::Tree) } def current_scope; end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#181 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#185 sig { params(left: ::RBI::Scope, right: ::RBI::Scope).void } def make_conflict_scope(left, right); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#188 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#192 sig { params(left: ::RBI::Node, right: ::RBI::Node).void } def make_conflict_tree(left, right); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#169 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#173 sig { params(node: ::RBI::Node).returns(T.nilable(::RBI::Node)) } def previous_definition(node); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#200 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#204 sig { params(left: ::RBI::Scope, right: ::RBI::Scope).returns(::RBI::Scope) } def replace_scope_header(left, right); end end @@ -1923,38 +1985,38 @@ end # # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#48 class RBI::Rewriters::RemoveKnownDefinitions < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#67 + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#55 sig { params(index: ::RBI::Index).void } def initialize(index); end - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#64 + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#52 sig { returns(T::Array[::RBI::Rewriters::RemoveKnownDefinitions::Operation]) } def operations; end - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#79 + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#83 sig { override.params(node: T.nilable(::RBI::Node)).void } def visit(node); end - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#74 + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#78 sig { params(nodes: T::Array[::RBI::Node]).void } def visit_all(nodes); end private - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#107 + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#111 sig { params(node: ::RBI::Node, previous: ::RBI::Node).returns(T::Boolean) } def can_delete_node?(node, previous); end - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#125 + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#129 sig { params(node: ::RBI::Node, previous: ::RBI::Node).void } def delete_node(node, previous); end - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#98 + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#102 sig { params(node: ::RBI::Indexable).returns(T.nilable(::RBI::Node)) } def previous_definition_for(node); end class << self - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#57 + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#70 sig do params( tree: ::RBI::Tree, @@ -1965,17 +2027,17 @@ class RBI::Rewriters::RemoveKnownDefinitions < ::RBI::Visitor end end -# source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#130 +# source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#134 class RBI::Rewriters::RemoveKnownDefinitions::Operation < ::T::Struct const :deleted_node, ::RBI::Node const :duplicate_of, ::RBI::Node - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#137 + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#141 sig { returns(::String) } def to_s; end class << self - # source://sorbet-runtime/0.5.10908/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11109/lib/types/struct.rb#13 def inherited(s); end end end @@ -1988,19 +2050,19 @@ class RBI::Rewriters::SortNodes < ::RBI::Visitor private - # source://rbi//lib/rbi/rewriters/sort_nodes.rb#61 + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#73 sig { params(kind: ::RBI::Group::Kind).returns(::Integer) } def group_rank(kind); end - # source://rbi//lib/rbi/rewriters/sort_nodes.rb#82 + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#94 sig { params(node: ::RBI::Node).returns(T.nilable(::String)) } def node_name(node); end - # source://rbi//lib/rbi/rewriters/sort_nodes.rb#33 + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#45 sig { params(node: ::RBI::Node).returns(::Integer) } def node_rank(node); end - # source://rbi//lib/rbi/rewriters/sort_nodes.rb#94 + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#106 sig { params(node: ::RBI::Node).void } def sort_node_names!(node); end end @@ -2009,43 +2071,43 @@ end # # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://rbi//lib/rbi/model.rb#172 +# source://rbi//lib/rbi/model.rb#176 class RBI::Scope < ::RBI::Tree include ::RBI::Indexable abstract! - # source://rbi//lib/rbi/printer.rb#240 + # source://rbi//lib/rbi/printer.rb#242 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end # Duplicate `self` scope without its body # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#350 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#356 sig { returns(T.self_type) } def dup_empty; end # @abstract # - # source://rbi//lib/rbi/model.rb#178 + # source://rbi//lib/rbi/model.rb#182 sig { abstract.returns(::String) } def fully_qualified_name; end - # source://rbi//lib/rbi/index.rb#89 + # source://rbi//lib/rbi/index.rb#93 sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/printer.rb#254 + # source://rbi//lib/rbi/printer.rb#256 sig { params(v: ::RBI::Printer).void } def print_body(v); end # @abstract # - # source://rbi//lib/rbi/printer.rb#251 + # source://rbi//lib/rbi/printer.rb#253 sig { abstract.params(v: ::RBI::Printer).void } def print_header(v); end - # source://rbi//lib/rbi/model.rb#181 + # source://rbi//lib/rbi/model.rb#185 sig { override.returns(::String) } def to_s; end end @@ -2063,37 +2125,37 @@ end # end # ~~~ # -# source://rbi//lib/rbi/rewriters/merge_trees.rb#617 +# source://rbi//lib/rbi/rewriters/merge_trees.rb#628 class RBI::ScopeConflict < ::RBI::Tree - # source://rbi//lib/rbi/rewriters/merge_trees.rb#631 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#642 sig { params(left: ::RBI::Scope, right: ::RBI::Scope, left_name: ::String, right_name: ::String).void } def initialize(left:, right:, left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#640 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#651 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#621 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#632 sig { returns(::RBI::Scope) } def left; end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#656 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#667 sig { override.returns(T::Boolean) } def oneline?; end # @return [Scope] # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#621 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#632 def right; end end # Sends # -# source://rbi//lib/rbi/model.rb#919 +# source://rbi//lib/rbi/model.rb#927 class RBI::Send < ::RBI::NodeWithComments include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#937 + # source://rbi//lib/rbi/model.rb#945 sig do params( method: ::String, @@ -2105,44 +2167,44 @@ class RBI::Send < ::RBI::NodeWithComments end def initialize(method, args = T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#945 + # source://rbi//lib/rbi/model.rb#953 sig { params(arg: ::RBI::Arg).void } def <<(arg); end - # source://rbi//lib/rbi/model.rb#950 + # source://rbi//lib/rbi/model.rb#958 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end - # source://rbi//lib/rbi/printer.rb#590 + # source://rbi//lib/rbi/printer.rb#592 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/model.rb#926 + # source://rbi//lib/rbi/model.rb#934 sig { returns(T::Array[::RBI::Arg]) } def args; end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#519 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#529 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/index.rb#179 + # source://rbi//lib/rbi/index.rb#193 sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#923 + # source://rbi//lib/rbi/model.rb#931 sig { returns(::String) } def method; end - # source://rbi//lib/rbi/model.rb#955 + # source://rbi//lib/rbi/model.rb#963 sig { returns(::String) } def to_s; end end # Sorbet's sigs # -# source://rbi//lib/rbi/model.rb#1019 +# source://rbi//lib/rbi/model.rb#1027 class RBI::Sig < ::RBI::Node - # source://rbi//lib/rbi/model.rb#1051 + # source://rbi//lib/rbi/model.rb#1059 sig do params( params: T::Array[::RBI::SigParam], @@ -2159,139 +2221,109 @@ class RBI::Sig < ::RBI::Node end def initialize(params: T.unsafe(nil), return_type: T.unsafe(nil), is_abstract: T.unsafe(nil), is_override: T.unsafe(nil), is_overridable: T.unsafe(nil), is_final: T.unsafe(nil), type_params: T.unsafe(nil), checked: T.unsafe(nil), loc: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#1076 + # source://rbi//lib/rbi/model.rb#1084 sig { params(param: ::RBI::SigParam).void } def <<(param); end - # source://rbi//lib/rbi/model.rb#1081 + # source://rbi//lib/rbi/model.rb#1089 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end - # source://rbi//lib/rbi/printer.rb#631 + # source://rbi//lib/rbi/printer.rb#633 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/model.rb#1035 + # source://rbi//lib/rbi/model.rb#1043 sig { returns(T.nilable(::Symbol)) } def checked; end # @return [Symbol, nil] # - # source://rbi//lib/rbi/model.rb#1035 + # source://rbi//lib/rbi/model.rb#1043 def checked=(_arg0); end - # source://rbi//lib/rbi/printer.rb#654 + # source://rbi//lib/rbi/printer.rb#656 sig { returns(T::Boolean) } def inline_params?; end - # source://rbi//lib/rbi/model.rb#1029 + # source://rbi//lib/rbi/model.rb#1037 sig { returns(T::Boolean) } def is_abstract; end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#1029 + # source://rbi//lib/rbi/model.rb#1037 def is_abstract=(_arg0); end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#1029 + # source://rbi//lib/rbi/model.rb#1037 def is_final; end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#1029 + # source://rbi//lib/rbi/model.rb#1037 def is_final=(_arg0); end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#1029 + # source://rbi//lib/rbi/model.rb#1037 def is_overridable; end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#1029 + # source://rbi//lib/rbi/model.rb#1037 def is_overridable=(_arg0); end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#1029 + # source://rbi//lib/rbi/model.rb#1037 def is_override; end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#1029 + # source://rbi//lib/rbi/model.rb#1037 def is_override=(_arg0); end - # source://rbi//lib/rbi/printer.rb#649 + # source://rbi//lib/rbi/printer.rb#651 sig { override.returns(T::Boolean) } def oneline?; end - # source://rbi//lib/rbi/model.rb#1023 + # source://rbi//lib/rbi/model.rb#1031 sig { returns(T::Array[::RBI::SigParam]) } def params; end - # source://rbi//lib/rbi/model.rb#1026 + # source://rbi//lib/rbi/model.rb#1034 sig { returns(T.nilable(::String)) } def return_type; end # @return [String, nil] # - # source://rbi//lib/rbi/model.rb#1026 + # source://rbi//lib/rbi/model.rb#1034 def return_type=(_arg0); end - # source://rbi//lib/rbi/model.rb#1032 + # source://rbi//lib/rbi/model.rb#1040 sig { returns(T::Array[::String]) } def type_params; end private - # source://rbi//lib/rbi/printer.rb#696 + # source://rbi//lib/rbi/printer.rb#698 sig { params(v: ::RBI::Printer).void } def print_as_block(v); end - # source://rbi//lib/rbi/printer.rb#672 + # source://rbi//lib/rbi/printer.rb#674 sig { params(v: ::RBI::Printer).void } def print_as_line(v); end - # source://rbi//lib/rbi/printer.rb#661 + # source://rbi//lib/rbi/printer.rb#663 sig { returns(T::Array[::String]) } def sig_modifiers; end end -# source://rbi//lib/rbi/parser.rb#635 -class RBI::SigBuilder < ::RBI::ASTVisitor - # source://rbi//lib/rbi/parser.rb#649 - sig { void } - def initialize; end - - # source://rbi//lib/rbi/parser.rb#646 - sig { returns(::RBI::Sig) } - def current; end - - # @return [Sig] - # - # source://rbi//lib/rbi/parser.rb#646 - def current=(_arg0); end - - # source://rbi//lib/rbi/parser.rb#655 - sig { override.params(node: T.nilable(::AST::Node)).void } - def visit(node); end - - # source://rbi//lib/rbi/parser.rb#664 - sig { params(node: ::AST::Node).void } - def visit_send(node); end - - class << self - # source://rbi//lib/rbi/parser.rb#639 - sig { params(node: ::AST::Node).returns(::RBI::Sig) } - def build(node); end - end -end - -# source://rbi//lib/rbi/model.rb#1089 +# source://rbi//lib/rbi/model.rb#1098 class RBI::SigParam < ::RBI::NodeWithComments - # source://rbi//lib/rbi/model.rb#1104 + # source://rbi//lib/rbi/model.rb#1113 sig do params( name: ::String, @@ -2303,35 +2335,35 @@ class RBI::SigParam < ::RBI::NodeWithComments end def initialize(name, type, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#1112 + # source://rbi//lib/rbi/model.rb#1121 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end - # source://rbi//lib/rbi/printer.rb#749 + # source://rbi//lib/rbi/printer.rb#751 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/printer.rb#762 + # source://rbi//lib/rbi/printer.rb#764 sig { returns(T::Array[::String]) } def comments_lines; end - # source://rbi//lib/rbi/model.rb#1093 + # source://rbi//lib/rbi/model.rb#1102 sig { returns(::String) } def name; end - # source://rbi//lib/rbi/printer.rb#754 + # source://rbi//lib/rbi/printer.rb#756 sig { params(v: ::RBI::Printer, last: T::Boolean).void } def print_comment_leading_space(v, last:); end # @return [String] # - # source://rbi//lib/rbi/model.rb#1093 + # source://rbi//lib/rbi/model.rb#1102 def type; end end -# source://rbi//lib/rbi/model.rb#245 +# source://rbi//lib/rbi/model.rb#251 class RBI::SingletonClass < ::RBI::Scope - # source://rbi//lib/rbi/model.rb#255 + # source://rbi//lib/rbi/model.rb#261 sig do params( loc: T.nilable(::RBI::Loc), @@ -2341,18 +2373,18 @@ class RBI::SingletonClass < ::RBI::Scope end def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#261 + # source://rbi//lib/rbi/model.rb#267 sig { override.returns(::String) } def fully_qualified_name; end - # source://rbi//lib/rbi/printer.rb#319 + # source://rbi//lib/rbi/printer.rb#321 sig { override.params(v: ::RBI::Printer).void } def print_header(v); end end -# source://rbi//lib/rbi/model.rb#266 +# source://rbi//lib/rbi/model.rb#272 class RBI::Struct < ::RBI::Scope - # source://rbi//lib/rbi/model.rb#288 + # source://rbi//lib/rbi/model.rb#294 sig do params( name: ::String, @@ -2365,51 +2397,51 @@ class RBI::Struct < ::RBI::Scope end def initialize(name, members: T.unsafe(nil), keyword_init: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#388 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#394 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#297 + # source://rbi//lib/rbi/model.rb#303 sig { override.returns(::String) } def fully_qualified_name; end - # source://rbi//lib/rbi/model.rb#276 + # source://rbi//lib/rbi/model.rb#282 sig { returns(T::Boolean) } def keyword_init; end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#276 + # source://rbi//lib/rbi/model.rb#282 def keyword_init=(_arg0); end - # source://rbi//lib/rbi/model.rb#273 + # source://rbi//lib/rbi/model.rb#279 sig { returns(T::Array[::Symbol]) } def members; end # @return [Array] # - # source://rbi//lib/rbi/model.rb#273 + # source://rbi//lib/rbi/model.rb#279 def members=(_arg0); end - # source://rbi//lib/rbi/model.rb#270 + # source://rbi//lib/rbi/model.rb#276 sig { returns(::String) } def name; end # @return [String] # - # source://rbi//lib/rbi/model.rb#270 + # source://rbi//lib/rbi/model.rb#276 def name=(_arg0); end - # source://rbi//lib/rbi/printer.rb#298 + # source://rbi//lib/rbi/printer.rb#300 sig { override.params(v: ::RBI::Printer).void } def print_header(v); end end # Sorbet's T::Enum # -# source://rbi//lib/rbi/model.rb#1230 +# source://rbi//lib/rbi/model.rb#1239 class RBI::TEnum < ::RBI::Class - # source://rbi//lib/rbi/model.rb#1241 + # source://rbi//lib/rbi/model.rb#1250 sig do params( name: ::String, @@ -2421,11 +2453,11 @@ class RBI::TEnum < ::RBI::Class def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end end -# source://rbi//lib/rbi/model.rb#1247 +# source://rbi//lib/rbi/model.rb#1256 class RBI::TEnumBlock < ::RBI::NodeWithComments include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#1261 + # source://rbi//lib/rbi/model.rb#1270 sig do params( names: T::Array[::String], @@ -2436,40 +2468,40 @@ class RBI::TEnumBlock < ::RBI::NodeWithComments end def initialize(names = T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#1273 + # source://rbi//lib/rbi/model.rb#1282 sig { params(name: ::String).void } def <<(name); end - # source://rbi//lib/rbi/printer.rb#793 + # source://rbi//lib/rbi/printer.rb#795 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/model.rb#1268 + # source://rbi//lib/rbi/model.rb#1277 sig { returns(T::Boolean) } def empty?; end - # source://rbi//lib/rbi/index.rb#209 + # source://rbi//lib/rbi/index.rb#223 sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#546 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#556 sig { override.params(other: ::RBI::Node).void } def merge_with(other); end - # source://rbi//lib/rbi/model.rb#1251 + # source://rbi//lib/rbi/model.rb#1260 sig { returns(T::Array[::String]) } def names; end - # source://rbi//lib/rbi/model.rb#1278 + # source://rbi//lib/rbi/model.rb#1287 sig { override.returns(::String) } def to_s; end end # Sorbet's T::Struct # -# source://rbi//lib/rbi/model.rb#1119 +# source://rbi//lib/rbi/model.rb#1128 class RBI::TStruct < ::RBI::Class - # source://rbi//lib/rbi/model.rb#1130 + # source://rbi//lib/rbi/model.rb#1139 sig do params( name: ::String, @@ -2481,11 +2513,11 @@ class RBI::TStruct < ::RBI::Class def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end end -# source://rbi//lib/rbi/model.rb#1168 +# source://rbi//lib/rbi/model.rb#1177 class RBI::TStructConst < ::RBI::TStructField include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#1181 + # source://rbi//lib/rbi/model.rb#1190 sig do params( name: ::String, @@ -2498,30 +2530,30 @@ class RBI::TStructConst < ::RBI::TStructField end def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#537 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#547 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#1187 + # source://rbi//lib/rbi/model.rb#1196 sig { override.returns(T::Array[::String]) } def fully_qualified_names; end - # source://rbi//lib/rbi/index.rb#189 + # source://rbi//lib/rbi/index.rb#203 sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#1193 + # source://rbi//lib/rbi/model.rb#1202 sig { override.returns(::String) } def to_s; end end # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://rbi//lib/rbi/model.rb#1136 +# source://rbi//lib/rbi/model.rb#1145 class RBI::TStructField < ::RBI::NodeWithComments abstract! - # source://rbi//lib/rbi/model.rb#1157 + # source://rbi//lib/rbi/model.rb#1166 sig do params( name: ::String, @@ -2533,54 +2565,54 @@ class RBI::TStructField < ::RBI::NodeWithComments end def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end - # source://rbi//lib/rbi/printer.rb#771 + # source://rbi//lib/rbi/printer.rb#773 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#528 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#538 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#1146 + # source://rbi//lib/rbi/model.rb#1155 sig { returns(T.nilable(::String)) } def default; end # @return [String, nil] # - # source://rbi//lib/rbi/model.rb#1146 + # source://rbi//lib/rbi/model.rb#1155 def default=(_arg0); end # @abstract # - # source://rbi//lib/rbi/model.rb#1165 + # source://rbi//lib/rbi/model.rb#1174 sig { abstract.returns(T::Array[::String]) } def fully_qualified_names; end - # source://rbi//lib/rbi/model.rb#1143 + # source://rbi//lib/rbi/model.rb#1152 sig { returns(::String) } def name; end # @return [String] # - # source://rbi//lib/rbi/model.rb#1143 + # source://rbi//lib/rbi/model.rb#1152 def name=(_arg0); end # @return [String] # - # source://rbi//lib/rbi/model.rb#1143 + # source://rbi//lib/rbi/model.rb#1152 def type; end # @return [String] # - # source://rbi//lib/rbi/model.rb#1143 + # source://rbi//lib/rbi/model.rb#1152 def type=(_arg0); end end -# source://rbi//lib/rbi/model.rb#1198 +# source://rbi//lib/rbi/model.rb#1207 class RBI::TStructProp < ::RBI::TStructField include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#1211 + # source://rbi//lib/rbi/model.rb#1220 sig do params( name: ::String, @@ -2593,26 +2625,26 @@ class RBI::TStructProp < ::RBI::TStructField end def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#559 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#570 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#1217 + # source://rbi//lib/rbi/model.rb#1226 sig { override.returns(T::Array[::String]) } def fully_qualified_names; end - # source://rbi//lib/rbi/index.rb#199 + # source://rbi//lib/rbi/index.rb#213 sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#1223 + # source://rbi//lib/rbi/model.rb#1232 sig { override.returns(::String) } def to_s; end end -# source://rbi//lib/rbi/model.rb#102 +# source://rbi//lib/rbi/model.rb#106 class RBI::Tree < ::RBI::NodeWithComments - # source://rbi//lib/rbi/model.rb#115 + # source://rbi//lib/rbi/model.rb#119 sig do params( loc: T.nilable(::RBI::Loc), @@ -2622,11 +2654,11 @@ class RBI::Tree < ::RBI::NodeWithComments end def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#122 + # source://rbi//lib/rbi/model.rb#126 sig { params(node: ::RBI::Node).void } def <<(node); end - # source://rbi//lib/rbi/printer.rb#224 + # source://rbi//lib/rbi/printer.rb#226 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end @@ -2634,11 +2666,11 @@ class RBI::Tree < ::RBI::NodeWithComments sig { params(with_todo_comment: T::Boolean).void } def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end - # source://rbi//lib/rbi/rewriters/annotate.rb#48 + # source://rbi//lib/rbi/rewriters/annotate.rb#49 sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void } def annotate!(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end - # source://tapioca/0.11.7/lib/tapioca/rbi_ext/model.rb#38 + # source://tapioca/0.11.10/lib/tapioca/rbi_ext/model.rb#38 sig do params( name: ::String, @@ -2648,19 +2680,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.11.10/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.11.10/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.11.10/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.11.10/lib/tapioca/rbi_ext/model.rb#89 sig do params( name: ::String, @@ -2673,19 +2705,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.11.10/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.11.10/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.11.10/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.11.10/lib/tapioca/rbi_ext/model.rb#74 sig do params( name: ::String, @@ -2698,11 +2730,11 @@ class RBI::Tree < ::RBI::NodeWithComments end def create_type_variable(name, type:, variance: T.unsafe(nil), fixed: T.unsafe(nil), upper: T.unsafe(nil), lower: T.unsafe(nil)); end - # source://rbi//lib/rbi/rewriters/deannotate.rb#40 + # source://rbi//lib/rbi/rewriters/deannotate.rb#41 sig { params(annotation: ::String).void } def deannotate!(annotation); end - # source://rbi//lib/rbi/model.rb#128 + # source://rbi//lib/rbi/model.rb#132 sig { returns(T::Boolean) } def empty?; end @@ -2710,11 +2742,11 @@ class RBI::Tree < ::RBI::NodeWithComments sig { void } def group_nodes!; end - # source://rbi//lib/rbi/index.rb#64 + # source://rbi//lib/rbi/index.rb#68 sig { returns(::RBI::Index) } def index; end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#318 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#324 sig do params( other: ::RBI::Tree, @@ -2725,155 +2757,42 @@ class RBI::Tree < ::RBI::NodeWithComments end def merge(other, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end - # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#45 + # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#46 sig { void } def nest_non_public_methods!; end - # source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#35 + # source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#36 sig { void } def nest_singleton_methods!; end - # source://rbi//lib/rbi/model.rb#106 + # source://rbi//lib/rbi/model.rb#110 sig { returns(T::Array[::RBI::Node]) } def nodes; end - # source://rbi//lib/rbi/printer.rb#231 + # source://rbi//lib/rbi/printer.rb#233 sig { override.returns(T::Boolean) } def oneline?; end - # source://rbi//lib/rbi/rewriters/sort_nodes.rb#107 + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#119 sig { void } def sort_nodes!; end private - # source://tapioca/0.11.7/lib/tapioca/rbi_ext/model.rb#116 + # source://tapioca/0.11.10/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.11.10/lib/tapioca/rbi_ext/model.rb#111 sig { returns(T::Hash[::String, ::RBI::Node]) } def nodes_cache; end end -# source://rbi//lib/rbi/parser.rb#156 -class RBI::TreeBuilder < ::RBI::ASTVisitor - # source://rbi//lib/rbi/parser.rb#172 - sig do - params( - file: ::String, - comments: T::Array[::Parser::Source::Comment], - nodes_comments_assoc: T::Hash[::Parser::Source::Map, T::Array[::Parser::Source::Comment]] - ).void - end - def initialize(file:, comments: T.unsafe(nil), nodes_comments_assoc: T.unsafe(nil)); end - - # source://rbi//lib/rbi/parser.rb#163 - sig { returns(T.nilable(::AST::Node)) } - def last_node; end - - # source://rbi//lib/rbi/parser.rb#187 - sig { void } - def post_process; end - - # source://rbi//lib/rbi/parser.rb#160 - sig { returns(::RBI::Tree) } - def tree; end - - # source://rbi//lib/rbi/parser.rb#193 - sig { override.params(node: T.nilable(::Object)).void } - def visit(node); end - - private - - # source://rbi//lib/rbi/parser.rb#546 - sig { void } - def assoc_dangling_comments; end - - # source://rbi//lib/rbi/parser.rb#527 - sig { returns(::RBI::Tree) } - def current_scope; end - - # source://rbi//lib/rbi/parser.rb#532 - sig { returns(T::Array[::RBI::Sig]) } - def current_sigs; end - - # source://rbi//lib/rbi/parser.rb#539 - sig { returns(T::Array[::RBI::Comment]) } - def current_sigs_comments; end - - # source://rbi//lib/rbi/parser.rb#516 - sig { params(node: ::AST::Node).returns(T::Array[::RBI::Comment]) } - def node_comments(node); end - - # source://rbi//lib/rbi/parser.rb#511 - sig { params(node: ::AST::Node).returns(::RBI::Loc) } - def node_loc(node); end - - # source://rbi//lib/rbi/parser.rb#402 - sig { params(node: ::AST::Node).returns(T.nilable(::RBI::Node)) } - def parse_block(node); end - - # source://rbi//lib/rbi/parser.rb#249 - sig { params(node: ::AST::Node).returns(::RBI::Node) } - def parse_const_assign(node); end - - # source://rbi//lib/rbi/parser.rb#263 - sig { params(node: ::AST::Node).returns(::RBI::Method) } - def parse_def(node); end - - # source://rbi//lib/rbi/parser.rb#486 - sig { params(node: ::AST::Node).returns(::RBI::TEnumBlock) } - def parse_enum(node); end - - # source://rbi//lib/rbi/parser.rb#290 - sig { params(node: ::AST::Node).returns(::RBI::Param) } - def parse_param(node); end - - # source://rbi//lib/rbi/parser.rb#503 - sig { params(node: ::AST::Node).returns(::RBI::RequiresAncestor) } - def parse_requires_ancestor(node); end - - # source://rbi//lib/rbi/parser.rb#229 - sig { params(node: ::AST::Node).returns(::RBI::Scope) } - def parse_scope(node); end - - # source://rbi//lib/rbi/parser.rb#318 - sig { params(node: ::AST::Node).returns(T.nilable(::RBI::Node)) } - def parse_send(node); end - - # source://rbi//lib/rbi/parser.rb#385 - sig { params(node: ::AST::Node).returns(T::Array[::RBI::Arg]) } - def parse_send_args(node); end - - # source://rbi//lib/rbi/parser.rb#479 - sig { params(node: ::AST::Node).returns(::RBI::Sig) } - def parse_sig(node); end - - # source://rbi//lib/rbi/parser.rb#424 - sig { params(node: ::AST::Node).returns(::RBI::Struct) } - def parse_struct(node); end - - # source://rbi//lib/rbi/parser.rb#463 - sig { params(node: ::AST::Node).returns([::String, ::String, T.nilable(::String)]) } - def parse_tstruct_prop(node); end - - # source://rbi//lib/rbi/parser.rb#564 - sig { void } - def separate_header_comments; end - - # source://rbi//lib/rbi/parser.rb#586 - sig { void } - def set_root_tree_loc; end - - # source://rbi//lib/rbi/parser.rb#418 - sig { params(node: ::AST::Node).returns(T::Boolean) } - def struct_definition?(node); end -end - -# source://rbi//lib/rbi/model.rb#1311 +# source://rbi//lib/rbi/model.rb#1320 class RBI::TypeMember < ::RBI::NodeWithComments - # source://rbi//lib/rbi/model.rb#1326 + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#1335 sig do params( name: ::String, @@ -2885,25 +2804,29 @@ class RBI::TypeMember < ::RBI::NodeWithComments end def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/printer.rb#810 + # source://rbi//lib/rbi/printer.rb#812 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/model.rb#1334 + # source://rbi//lib/rbi/model.rb#1343 sig { returns(::String) } def fully_qualified_name; end - # source://rbi//lib/rbi/model.rb#1315 + # source://rbi//lib/rbi/index.rb#183 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1324 sig { returns(::String) } def name; end - # source://rbi//lib/rbi/model.rb#1340 + # source://rbi//lib/rbi/model.rb#1350 sig { override.returns(::String) } def to_s; end # @return [String] # - # source://rbi//lib/rbi/model.rb#1315 + # source://rbi//lib/rbi/model.rb#1324 def value; end end @@ -2929,54 +2852,54 @@ RBI::VERSION = T.let(T.unsafe(nil), String) # # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://rbi//lib/rbi/model.rb#833 +# source://rbi//lib/rbi/model.rb#841 class RBI::Visibility < ::RBI::NodeWithComments abstract! - # source://rbi//lib/rbi/model.rb#843 + # source://rbi//lib/rbi/model.rb#851 sig { params(visibility: ::Symbol, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } def initialize(visibility, loc: T.unsafe(nil), comments: T.unsafe(nil)); end - # source://rbi//lib/rbi/model.rb#849 + # source://rbi//lib/rbi/model.rb#857 sig { params(other: ::RBI::Visibility).returns(T::Boolean) } def ==(other); end - # source://rbi//lib/rbi/printer.rb#577 + # source://rbi//lib/rbi/printer.rb#579 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/model.rb#864 + # source://rbi//lib/rbi/model.rb#872 sig { returns(T::Boolean) } def private?; end - # source://rbi//lib/rbi/model.rb#859 + # source://rbi//lib/rbi/model.rb#867 sig { returns(T::Boolean) } def protected?; end - # source://rbi//lib/rbi/model.rb#854 + # source://rbi//lib/rbi/model.rb#862 sig { returns(T::Boolean) } def public?; end - # source://rbi//lib/rbi/model.rb#840 + # source://rbi//lib/rbi/model.rb#848 sig { returns(::Symbol) } def visibility; end end -# source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#51 +# source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#52 class RBI::VisibilityGroup < ::RBI::Tree - # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#58 + # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#59 sig { params(visibility: ::RBI::Visibility).void } def initialize(visibility); end - # source://rbi//lib/rbi/printer.rb#846 + # source://rbi//lib/rbi/printer.rb#848 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/printer.rb#859 + # source://rbi//lib/rbi/printer.rb#861 sig { override.returns(T::Boolean) } def oneline?; end - # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#55 + # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#56 sig { returns(::RBI::Visibility) } def visibility; end end diff --git a/sorbet/rbi/gems/rdoc@6.5.0.rbi b/sorbet/rbi/gems/rdoc@6.5.0.rbi new file mode 100644 index 000000000..7f4af9c7e --- /dev/null +++ b/sorbet/rbi/gems/rdoc@6.5.0.rbi @@ -0,0 +1,12323 @@ +# 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 + # source://rdoc//rdoc.rb#123 + 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 + + # Loads is_alias_for from the internal name. Returns nil if the alias + # cannot be found. + # + # source://rdoc//rdoc/any_method.rb#122 + def is_alias_for; end + + # Dumps this AnyMethod for use by ri. See also #marshal_load + # + # source://rdoc//rdoc/any_method.rb#140 + 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#177 + 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#226 + 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#239 + 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#271 + 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 + + # Sets the store for this method and its referenced code objects. + # + # source://rdoc//rdoc/any_method.rb#302 + def store=(store); end + + # For methods that +super+, find the superclass method that would be called. + # + # source://rdoc//rdoc/any_method.rb#311 + def superclass_method; end + + protected + + # call_seq without deduplication and alias lookup. + # + # source://rdoc//rdoc/any_method.rb#330 + 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#340 + 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 + +# A comment holds the text comment for a RDoc::CodeObject and provides a +# unified way of cleaning it up and parsing it into an RDoc::Markup::Document. +# +# Each comment may have a different markup format set by #format=. By default +# 'rdoc' is used. The :markup: directive tells RDoc which format to use. +# +# See RDoc::Markup@Other+directives for instructions on adding an alternate +# format. +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#144 + def empty?; end + + # HACK dubious + # + # source://rdoc//rdoc/comment.rb#151 + 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#164 + def format=(format); end + + # source://rdoc//rdoc/comment.rb#169 + 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#178 + def normalize; end + + # Was this text normalized? + # + # @return [Boolean] + # + # source://rdoc//rdoc/comment.rb#192 + 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#200 + 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#221 + 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#235 + 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#246 + 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#187 + def resolve(name, text); end + + # source://rdoc//rdoc/cross_reference.rb#134 + 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, safe_level = T.unsafe(nil), legacy_trim_mode = T.unsafe(nil), legacy_eoutvar = T.unsafe(nil), trim_mode: T.unsafe(nil), eoutvar: T.unsafe(nil)); end + + # Instructs +compiler+ how to write to +io_variable+ + # + # source://rdoc//rdoc/erbio.rb#34 + 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#123 + def change_encoding(text, encoding); end + + # Detects the encoding of +string+ based on the magic comment + # + # source://rdoc//rdoc/encoding.rb#103 + 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 + + # source://rdoc//rdoc/encoding.rb#89 + def remove_frozen_string_literal(string); end + + # Removes magic comments and shebang + # + # source://rdoc//rdoc/encoding.rb#113 + 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#84 + 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#89 + 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#18 + def initialize(str, debug = T.unsafe(nil)); end + + # Alphanumeric = /\p{Word}/ + # + # source://rdoc//rdoc/markdown/literals.rb#406 + def _Alphanumeric; end + + # AlphanumericAscii = /[A-Za-z0-9]/ + # + # source://rdoc//rdoc/markdown/literals.rb#413 + def _AlphanumericAscii; end + + # BOM = "uFEFF" + # + # source://rdoc//rdoc/markdown/literals.rb#420 + def _BOM; end + + # Newline = /\n|\r\n?|\p{Zl}|\p{Zp}/ + # + # source://rdoc//rdoc/markdown/literals.rb#427 + def _Newline; end + + # NonAlphanumeric = /\p{^Word}/ + # + # source://rdoc//rdoc/markdown/literals.rb#434 + def _NonAlphanumeric; end + + # Spacechar = /\t|\p{Zs}/ + # + # source://rdoc//rdoc/markdown/literals.rb#441 + def _Spacechar; end + + # source://rdoc//rdoc/markdown/literals.rb#332 + def apply(rule); end + + # source://rdoc//rdoc/markdown/literals.rb#298 + def apply_with_args(rule, *args); end + + # source://rdoc//rdoc/markdown/literals.rb#80 + def current_character(target = T.unsafe(nil)); end + + # source://rdoc//rdoc/markdown/literals.rb#41 + def current_column(target = T.unsafe(nil)); end + + # source://rdoc//rdoc/markdown/literals.rb#64 + def current_line(target = T.unsafe(nil)); end + + # source://rdoc//rdoc/markdown/literals.rb#89 + def current_pos_info(target = T.unsafe(nil)); end + + # source://rdoc//rdoc/markdown/literals.rb#279 + def external_invoke(other, rule, *args); end + + # Returns the value of attribute failed_rule. + # + # source://rdoc//rdoc/markdown/literals.rb#201 + def failed_rule; end + + # Returns the value of attribute failing_rule_offset. + # + # source://rdoc//rdoc/markdown/literals.rb#38 + def failing_rule_offset; end + + # source://rdoc//rdoc/markdown/literals.rb#148 + def failure_caret; end + + # source://rdoc//rdoc/markdown/literals.rb#153 + def failure_character; end + + # source://rdoc//rdoc/markdown/literals.rb#136 + def failure_info; end + + # source://rdoc//rdoc/markdown/literals.rb#157 + def failure_oneline; end + + # source://rdoc//rdoc/markdown/literals.rb#223 + def get_byte; end + + # source://rdoc//rdoc/markdown/literals.rb#101 + def get_line(no); end + + # source://rdoc//rdoc/markdown/literals.rb#115 + def get_text(start); end + + # source://rdoc//rdoc/markdown/literals.rb#365 + def grow_lr(rule, args, start_pos, m); end + + # source://rdoc//rdoc/markdown/literals.rb#97 + def lines; end + + # source://rdoc//rdoc/markdown/literals.rb#203 + def match_string(str); end + + # source://rdoc//rdoc/markdown/literals.rb#244 + def parse(rule = T.unsafe(nil)); end + + # Returns the value of attribute pos. + # + # source://rdoc//rdoc/markdown/literals.rb#39 + def pos; end + + # Sets the attribute pos + # + # @param value the value to set the attribute pos to. + # + # source://rdoc//rdoc/markdown/literals.rb#39 + def pos=(_arg0); end + + # source://rdoc//rdoc/markdown/literals.rb#51 + def position_line_offsets; end + + # @raise [ParseError] + # + # source://rdoc//rdoc/markdown/literals.rb#171 + def raise_error; end + + # Returns the value of attribute result. + # + # source://rdoc//rdoc/markdown/literals.rb#39 + def result; end + + # Sets the attribute result + # + # @param value the value to set the attribute result to. + # + # source://rdoc//rdoc/markdown/literals.rb#39 + def result=(_arg0); end + + # source://rdoc//rdoc/markdown/literals.rb#213 + def scan(reg); end + + # source://rdoc//rdoc/markdown/literals.rb#194 + def set_failed_rule(name); end + + # Sets the string and current parsing position for the parser. + # + # source://rdoc//rdoc/markdown/literals.rb#120 + def set_string(string, pos); end + + # :startdoc: + # :stopdoc: + # + # source://rdoc//rdoc/markdown/literals.rb#403 + 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#26 + def setup_parser(str, debug = T.unsafe(nil)); end + + # source://rdoc//rdoc/markdown/literals.rb#175 + def show_error(io = T.unsafe(nil)); end + + # source://rdoc//rdoc/markdown/literals.rb#127 + def show_pos; end + + # Returns the value of attribute string. + # + # source://rdoc//rdoc/markdown/literals.rb#37 + def string; end + + class << self + # source://rdoc//rdoc/markdown/literals.rb#396 + 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#259 + def initialize(ans, pos); end + + # Returns the value of attribute ans. + # + # source://rdoc//rdoc/markdown/literals.rb#267 + def ans; end + + # Returns the value of attribute left_rec. + # + # source://rdoc//rdoc/markdown/literals.rb#268 + 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#268 + def left_rec=(_arg0); end + + # source://rdoc//rdoc/markdown/literals.rb#270 + def move!(ans, pos, result); end + + # Returns the value of attribute pos. + # + # source://rdoc//rdoc/markdown/literals.rb#267 + def pos; end + + # Returns the value of attribute result. + # + # source://rdoc//rdoc/markdown/literals.rb#267 + def result; end + + # Returns the value of attribute set. + # + # source://rdoc//rdoc/markdown/literals.rb#267 + def set; end +end + +class RDoc::Markdown::Literals::RuleInfo + # @return [RuleInfo] a new instance of RuleInfo + # + # source://rdoc//rdoc/markdown/literals.rb#388 + def initialize(name, rendered); end + + # Returns the value of attribute name. + # + # source://rdoc//rdoc/markdown/literals.rb#393 + def name; end + + # Returns the value of attribute rendered. + # + # source://rdoc//rdoc/markdown/literals.rb#393 + 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 + +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#283 + 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#295 + 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#258 + 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#153 + def convert_attrs(str, attrs, exclusive = T.unsafe(nil)); end + + # source://rdoc//rdoc/markup/attribute_manager.rb#158 + def convert_attrs_matching_word_pairs(str, attrs, exclusive); end + + # source://rdoc//rdoc/markup/attribute_manager.rb#182 + def convert_attrs_word_pair_map(str, attrs, exclusive); end + + # Converts HTML tags to RDoc attributes + # + # source://rdoc//rdoc/markup/attribute_manager.rb#203 + def convert_html(str, attrs, exclusive = T.unsafe(nil)); end + + # Converts regexp handling sequences to RDoc attributes + # + # source://rdoc//rdoc/markup/attribute_manager.rb#220 + 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#326 + def display_attributes; end + + # @return [Boolean] + # + # source://rdoc//rdoc/markup/attribute_manager.rb#141 + 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#304 + 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#236 + 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#351 + def split_into_flow; end + + # Unescapes regexp handling sequences of text + # + # source://rdoc//rdoc/markup/attribute_manager.rb#248 + 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#146 +RDoc::Markup::AttributeManager::NON_PRINTING_END = T.let(T.unsafe(nil), String) + +# source://rdoc//rdoc/markup/attribute_manager.rb#145 +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#464 + 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#473 + def skip(token_type, error = T.unsafe(nil)); end + + # Turns text +input+ into a stream of tokens + # + # source://rdoc//rdoc/markup/parser.rb#484 + 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#574 + 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 + # @return [MyStringScanner] a new instance of MyStringScanner + # + # source://rdoc//rdoc/markup/parser.rb#423 + def initialize(input); end + + # source://rdoc//rdoc/markup/parser.rb#456 + def [](i); end + + # @return [Boolean] + # + # source://rdoc//rdoc/markup/parser.rb#448 + def eos?; end + + # source://rdoc//rdoc/markup/parser.rb#452 + def matched; end + + # source://rdoc//rdoc/markup/parser.rb#443 + def newline!; end + + # source://rdoc//rdoc/markup/parser.rb#439 + def pos; end + + # source://rdoc//rdoc/markup/parser.rb#428 + def scan(re); end + + # source://rdoc//rdoc/markup/parser.rb#434 + 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 + # @return [Table] a new instance of Table + # + # source://rdoc//rdoc/markup/table.rb#8 + def initialize(header, align, body); end + + # source://rdoc//rdoc/markup/table.rb#12 + def ==(other); end + + # source://rdoc//rdoc/markup/table.rb#19 + def accept(visitor); end + + # Returns the value of attribute align. + # + # source://rdoc//rdoc/markup/table.rb#6 + def align; end + + # Sets the attribute align + # + # @param value the value to set the attribute align to. + # + # source://rdoc//rdoc/markup/table.rb#6 + def align=(_arg0); end + + # Returns the value of attribute body. + # + # source://rdoc//rdoc/markup/table.rb#6 + def body; end + + # Sets the attribute body + # + # @param value the value to set the attribute body to. + # + # source://rdoc//rdoc/markup/table.rb#6 + def body=(_arg0); end + + # Returns the value of attribute header. + # + # source://rdoc//rdoc/markup/table.rb#6 + def header; end + + # Sets the attribute header + # + # @param value the value to set the attribute header to. + # + # source://rdoc//rdoc/markup/table.rb#6 + def header=(_arg0); end + + # source://rdoc//rdoc/markup/table.rb#23 + 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#288 + def accept_blank_line(blank_line); end + + # Adds +block_quote+ to the output + # + # source://rdoc//rdoc/markup/to_html.rb#189 + 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#296 + def accept_heading(heading); end + + # Finishes consumption of +list+ + # + # source://rdoc//rdoc/markup/to_html.rb#259 + def accept_list_end(list); end + + # Finishes consumption of +list_item+ + # + # source://rdoc//rdoc/markup/to_html.rb#281 + def accept_list_item_end(list_item); end + + # Prepares the visitor for consuming +list_item+ + # + # source://rdoc//rdoc/markup/to_html.rb#270 + def accept_list_item_start(list_item); end + + # Prepares the visitor for consuming +list+ + # + # source://rdoc//rdoc/markup/to_html.rb#250 + def accept_list_start(list); end + + # Adds +paragraph+ to the output + # + # source://rdoc//rdoc/markup/to_html.rb#202 + def accept_paragraph(paragraph); end + + # Adds +raw+ to the output + # + # source://rdoc//rdoc/markup/to_html.rb#317 + def accept_raw(raw); end + + # Adds +rule+ to the output + # + # source://rdoc//rdoc/markup/to_html.rb#243 + def accept_rule(rule); end + + # Adds +table+ to the output + # + # source://rdoc//rdoc/markup/to_html.rb#324 + def accept_table(header, body, aligns); end + + # Adds +verbatim+ to the output + # + # source://rdoc//rdoc/markup/to_html.rb#213 + 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#349 + def convert_string(text); end + + # Returns the generated output + # + # source://rdoc//rdoc/markup/to_html.rb#182 + 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#357 + def gen_url(url, text); end + + # source://rdoc//rdoc/markup/to_html.rb#84 + def handle_RDOCLINK(url); end + + # +target+ is a
+ # + # source://rdoc//rdoc/markup/to_html.rb#109 + 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#125 + 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#140 + 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#148 + 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#382 + 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#79 + def init_link_notation_regexp_handlings; end + + # Adds regexp handlings. + # + # source://rdoc//rdoc/markup/to_html.rb#69 + def init_regexp_handlings; end + + # Maps attributes to HTML tags + # + # source://rdoc//rdoc/markup/to_html.rb#391 + 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#417 + 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#401 + 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#431 + 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#173 + def start_accepting; end + + # Converts +item+ to HTML using RDoc::Text#to_html + # + # source://rdoc//rdoc/markup/to_html.rb#443 + def to_html(item); end +end + +# :section: Regexp Handling +# +# These methods are used by regexp handling markup added by RDoc::Markup#add_regexp_handling. +# +# source://rdoc//rdoc/markup/to_html.rb#64 +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#60 + 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#130 + 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#82 + 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#101 + 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#115 + def handle_regexp_RDOCLINK(target); end + + # source://rdoc//rdoc/markup/to_html_crossref.rb#45 + 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#140 + 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#82 + def accept_list_item_end(list_item); end + + # Prepares the visitor for consuming +list_item+ + # + # source://rdoc//rdoc/markup/to_html_snippet.rb#88 + def accept_list_item_start(list_item); end + + # Prepares the visitor for consuming +list+ + # + # source://rdoc//rdoc/markup/to_html_snippet.rb#95 + def accept_list_start(list); end + + # source://rdoc//rdoc/markup/to_html_snippet.rb#69 + 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#104 + def accept_verbatim(verbatim); end + + # Throws +:done+ when paragraph_limit paragraphs have been encountered + # + # source://rdoc//rdoc/markup/to_html_snippet.rb#195 + 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#204 + def convert(content); end + + # Converts flow items +flow+ + # + # source://rdoc//rdoc/markup/to_html_snippet.rb#215 + 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#168 + def gen_url(url, text); end + + # Removes escaping from the cross-references in +target+ + # + # source://rdoc//rdoc/markup/to_html_snippet.rb#128 + def handle_regexp_CROSSREF(target); end + + # +target+ is a
+ # + # source://rdoc//rdoc/markup/to_html_snippet.rb#135 + def handle_regexp_HARD_BREAK(target); end + + # In snippets, there are no lists + # + # source://rdoc//rdoc/markup/to_html_snippet.rb#188 + 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#143 + 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#261 + 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#251 + 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#119 + 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#270 + 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#600 + 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#619 + 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#645 + 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#1190 + def quiet; end + + # Set quietness to +bool+ + # + # source://rdoc//rdoc/options.rb#1197 + 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#1204 + 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#1231 + 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#1253 + 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#1270 + def visibility=(visibility); end + + # Displays a warning using Kernel#warn if we're being verbose + # + # source://rdoc//rdoc/options.rb#1282 + 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#1290 + 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#1304 + 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#599 + def find_body(class_name, meth_name, meth_obj, file_content, quiet = T.unsafe(nil)); end + + # Finds a RDoc::NormalClass or RDoc::NormalModule for +raw_name+ + # + # source://rdoc//rdoc/parser/c.rb#683 + def find_class(raw_name, name, base_name = T.unsafe(nil)); end + + # Look for class or module documentation above Init_+class_name+(void), + # in a Document-class +class_name+ (or module) comment or above an + # rb_define_class (or module). If a comment is supplied above a matching + # Init_ and a rb_define_class the Init_ comment is used. + # + # /* + # * This is a comment for Foo + # */ + # Init_Foo(void) { + # VALUE cFoo = rb_define_class("Foo", rb_cObject); + # } + # + # /* + # * Document-class: Foo + # * This is a comment for Foo + # */ + # Init_foo(void) { + # VALUE cFoo = rb_define_class("Foo", rb_cObject); + # } + # + # /* + # * This is a comment for Foo + # */ + # VALUE cFoo = rb_define_class("Foo", rb_cObject); + # + # source://rdoc//rdoc/parser/c.rb#724 + def find_class_comment(class_name, class_mod); end + + # Finds a comment matching +type+ and +const_name+ either above the + # comment or in the matching Document- section. + # + # source://rdoc//rdoc/parser/c.rb#780 + 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#797 + def find_modifiers(comment, meth_obj); end + + # Finds a Document-method override for +meth_obj+ on +class_name+ + # + # source://rdoc//rdoc/parser/c.rb#807 + 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#757 + def gen_const_table(file_content); end + + # Creates a new RDoc::Attr +attr_name+ on class +var_name+ that is either + # +read+, +write+ or both + # + # source://rdoc//rdoc/parser/c.rb#829 + 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#858 + 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#923 + def handle_constants(type, var_name, const_name, definition); end + + # Removes #ifdefs that would otherwise confuse us + # + # source://rdoc//rdoc/parser/c.rb#974 + 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#983 + 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#1053 + 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#1064 + 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#1093 + 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 + + # source://rdoc//rdoc/parser/c.rb#1220 + 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#1112 + 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#1195 + 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#1203 + 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 + +module RDoc::Parser::ChangeLog::Git + # source://rdoc//rdoc/parser/changelog.rb#247 + def create_entries(entries); end + + # source://rdoc//rdoc/parser/changelog.rb#225 + def parse_entries; end + + # source://rdoc//rdoc/parser/changelog.rb#220 + def parse_info(info); end +end + +# source://rdoc//rdoc/parser/changelog.rb#256 +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#258 + def initialize(base, commit, author, email, date, contents); end + + # source://rdoc//rdoc/parser/changelog.rb#298 + def accept(visitor); end + + # source://rdoc//rdoc/parser/changelog.rb#279 + 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#283 + def label(context = T.unsafe(nil)); end + + # source://rdoc//rdoc/parser/changelog.rb#275 + def level; end + + # source://rdoc//rdoc/parser/changelog.rb#315 + def pretty_print(q); end + + # source://rdoc//rdoc/parser/changelog.rb#287 + 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 + +class RDoc::Parser::RipperStateLex + # @return [RipperStateLex] a new instance of RipperStateLex + # + # source://rdoc//rdoc/parser/ripper_state_lex.rb#568 + def initialize(code); end + + # source://rdoc//rdoc/parser/ripper_state_lex.rb#317 + def get_squashed_tk; end + + private + + # source://rdoc//rdoc/parser/ripper_state_lex.rb#460 + def get_embdoc_tk(tk); end + + # source://rdoc//rdoc/parser/ripper_state_lex.rb#469 + def get_heredoc_tk(heredoc_name, indent); end + + # source://rdoc//rdoc/parser/ripper_state_lex.rb#544 + def get_op_tk(tk); end + + # source://rdoc//rdoc/parser/ripper_state_lex.rb#442 + def get_regexp_tk(tk); end + + # source://rdoc//rdoc/parser/ripper_state_lex.rb#415 + def get_string_tk(tk); end + + # source://rdoc//rdoc/parser/ripper_state_lex.rb#368 + def get_symbol_tk(tk); end + + # source://rdoc//rdoc/parser/ripper_state_lex.rb#506 + def get_words_tk(tk); end + + # @return [Boolean] + # + # source://rdoc//rdoc/parser/ripper_state_lex.rb#494 + def heredoc_end?(name, indent, tk); end + + # source://rdoc//rdoc/parser/ripper_state_lex.rb#488 + def retrieve_heredoc_info(tk); end + + class << self + # @return [Boolean] + # + # source://rdoc//rdoc/parser/ripper_state_lex.rb#587 + def end?(token); end + + # source://rdoc//rdoc/parser/ripper_state_lex.rb#575 + def parse(code); end + end +end + +# source://rdoc//rdoc/parser/ripper_state_lex.rb#15 +RDoc::Parser::RipperStateLex::EXPR_ARG = T.let(T.unsafe(nil), Integer) + +# source://rdoc//rdoc/parser/ripper_state_lex.rb#26 +RDoc::Parser::RipperStateLex::EXPR_ARG_ANY = T.let(T.unsafe(nil), Integer) + +# source://rdoc//rdoc/parser/ripper_state_lex.rb#11 +RDoc::Parser::RipperStateLex::EXPR_BEG = T.let(T.unsafe(nil), Integer) + +# source://rdoc//rdoc/parser/ripper_state_lex.rb#25 +RDoc::Parser::RipperStateLex::EXPR_BEG_ANY = T.let(T.unsafe(nil), Integer) + +# source://rdoc//rdoc/parser/ripper_state_lex.rb#20 +RDoc::Parser::RipperStateLex::EXPR_CLASS = T.let(T.unsafe(nil), Integer) + +# source://rdoc//rdoc/parser/ripper_state_lex.rb#16 +RDoc::Parser::RipperStateLex::EXPR_CMDARG = T.let(T.unsafe(nil), Integer) + +# source://rdoc//rdoc/parser/ripper_state_lex.rb#19 +RDoc::Parser::RipperStateLex::EXPR_DOT = T.let(T.unsafe(nil), Integer) + +# source://rdoc//rdoc/parser/ripper_state_lex.rb#12 +RDoc::Parser::RipperStateLex::EXPR_END = T.let(T.unsafe(nil), Integer) + +# source://rdoc//rdoc/parser/ripper_state_lex.rb#13 +RDoc::Parser::RipperStateLex::EXPR_ENDARG = T.let(T.unsafe(nil), Integer) + +# source://rdoc//rdoc/parser/ripper_state_lex.rb#14 +RDoc::Parser::RipperStateLex::EXPR_ENDFN = T.let(T.unsafe(nil), Integer) + +# source://rdoc//rdoc/parser/ripper_state_lex.rb#27 +RDoc::Parser::RipperStateLex::EXPR_END_ANY = T.let(T.unsafe(nil), Integer) + +# source://rdoc//rdoc/parser/ripper_state_lex.rb#23 +RDoc::Parser::RipperStateLex::EXPR_FITEM = T.let(T.unsafe(nil), Integer) + +# source://rdoc//rdoc/parser/ripper_state_lex.rb#18 +RDoc::Parser::RipperStateLex::EXPR_FNAME = T.let(T.unsafe(nil), Integer) + +# source://rdoc//rdoc/parser/ripper_state_lex.rb#21 +RDoc::Parser::RipperStateLex::EXPR_LABEL = T.let(T.unsafe(nil), Integer) + +# source://rdoc//rdoc/parser/ripper_state_lex.rb#22 +RDoc::Parser::RipperStateLex::EXPR_LABELED = T.let(T.unsafe(nil), Integer) + +# source://rdoc//rdoc/parser/ripper_state_lex.rb#17 +RDoc::Parser::RipperStateLex::EXPR_MID = T.let(T.unsafe(nil), Integer) + +# source://rdoc//rdoc/parser/ripper_state_lex.rb#10 +RDoc::Parser::RipperStateLex::EXPR_NONE = T.let(T.unsafe(nil), Integer) + +# source://rdoc//rdoc/parser/ripper_state_lex.rb#24 +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#308 + def initialize(code); end + + # source://rdoc//rdoc/parser/ripper_state_lex.rb#312 + 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#6 +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 + +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#233 + def collect_first_comment; end + + # Consumes trailing whitespace from the token stream + # + # source://rdoc//rdoc/parser/ruby.rb#276 + def consume_trailing_spaces; end + + # Creates a new attribute in +container+ with +name+. + # + # source://rdoc//rdoc/parser/ruby.rb#283 + 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#297 + def create_module_alias(container, constant, rhs_name); end + + # Aborts with +msg+ + # + # source://rdoc//rdoc/parser/ruby.rb#310 + def error(msg); end + + # Looks for a true or false token. + # + # source://rdoc//rdoc/parser/ruby.rb#319 + 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#337 + 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#420 + 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#453 + 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#555 + def get_end_token(tk); end + + # Get an included module that may be surrounded by parens + # + # source://rdoc//rdoc/parser/ruby.rb#470 + def get_included_module_with_optional_parens; end + + # Retrieves the method container for a singleton method. + # + # source://rdoc//rdoc/parser/ruby.rb#575 + def get_method_container(container, name_t); end + + # Extracts a name or symbol from the token stream. + # + # source://rdoc//rdoc/parser/ruby.rb#618 + 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#191 + 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#205 + 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#658 + def look_for_directives_in(container, comment); end + + # Adds useful info about the parser to +message+ + # + # source://rdoc//rdoc/parser/ruby.rb#678 + def make_message(message); end + + # Creates a comment with the correct format + # + # source://rdoc//rdoc/parser/ruby.rb#690 + def new_comment(comment, line_no = T.unsafe(nil)); end + + # Parses an +alias+ in +context+ with +comment+ + # + # source://rdoc//rdoc/parser/ruby.rb#759 + 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#701 + 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#730 + def parse_attr_accessor(context, single, tk, comment); end + + # Extracts call parameters from the token stream. + # + # source://rdoc//rdoc/parser/ruby.rb#798 + def parse_call_parameters(tk); end + + # Parses a class in +context+ with +comment+ + # + # source://rdoc//rdoc/parser/ruby.rb#841 + def parse_class(container, single, tk, comment); end + + # Parses and creates a regular class + # + # source://rdoc//rdoc/parser/ruby.rb#875 + 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#915 + 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#1080 + 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#1108 + def parse_comment_attr(container, type, name, comment); end + + # source://rdoc//rdoc/parser/ruby.rb#1120 + 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#1159 + 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#954 + def parse_constant(container, tk, comment, ignore_constants = T.unsafe(nil)); end + + # source://rdoc//rdoc/parser/ruby.rb#1021 + 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#2091 + 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#1194 + 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#1232 + def parse_identifier(container, single, tk, comment); end + + # Parses an +included+ with a block feature of ActiveSupport::Concern. + # + # source://rdoc//rdoc/parser/ruby.rb#1214 + 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#1296 + def parse_meta_attr(context, single, tk, comment); end + + # Parses a meta-programmed method + # + # source://rdoc//rdoc/parser/ruby.rb#1330 + 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#1376 + def parse_meta_method_name(comment, tk); end + + # Parses the parameters and block for a meta-programmed method. + # + # source://rdoc//rdoc/parser/ruby.rb#1400 + def parse_meta_method_params(container, single, meth, tk, comment); end + + # Parses a normal method defined by +def+ + # + # source://rdoc//rdoc/parser/ruby.rb#1432 + def parse_method(container, single, tk, comment); end + + # Parses a method that needs to be ignored. + # + # source://rdoc//rdoc/parser/ruby.rb#1511 + 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#1524 + 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#1551 + 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#1569 + def parse_method_name_singleton(container, name_t); end + + # Extracts +yield+ parameters from +method+ + # + # source://rdoc//rdoc/parser/ruby.rb#1613 + 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#1680 + def parse_method_parameters(method); end + + # Parses the parameters and body of +meth+ + # + # source://rdoc//rdoc/parser/ruby.rb#1481 + 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#1695 + def parse_module(container, single, tk, comment); end + + # Parses an RDoc::Require in +context+ containing +comment+ + # + # source://rdoc//rdoc/parser/ruby.rb#1717 + def parse_require(context, comment); end + + # Parses a rescue + # + # source://rdoc//rdoc/parser/ruby.rb#1738 + def parse_rescue; end + + # The core of the Ruby parser. + # + # source://rdoc//rdoc/parser/ruby.rb#1769 + 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#1959 + 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#1974 + 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#2002 + def parse_symbol_arg_space(no, tk); end + + # Returns symbol text from the next token + # + # source://rdoc//rdoc/parser/ruby.rb#2033 + def parse_symbol_in_arg; end + + # Parses statements in the top-level +container+ + # + # source://rdoc//rdoc/parser/ruby.rb#2050 + def parse_top_level_statements(container); end + + # Determines the visibility in +container+ from +tk+ + # + # source://rdoc//rdoc/parser/ruby.rb#2068 + def parse_visibility(container, single, tk); end + + # Determines the block parameter for +context+ + # + # source://rdoc//rdoc/parser/ruby.rb#2107 + 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#2128 + 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#2160 + 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#2179 + def record_location(container); end + + # Retrieve comment body without =begin/=end + # + # source://rdoc//rdoc/parser/ruby.rb#1758 + def retrieve_comment_body(tk); end + + # Scans this Ruby file for Ruby constructs + # + # source://rdoc//rdoc/parser/ruby.rb#2191 + def scan; end + + # skip the var [in] part of a 'for' statement + # + # source://rdoc//rdoc/parser/ruby.rb#2279 + def skip_for_variable; end + + # Skips the next method in +container+ + # + # source://rdoc//rdoc/parser/ruby.rb#2290 + def skip_method(container); end + + # while, until, and for have an optional do + # + # source://rdoc//rdoc/parser/ruby.rb#2238 + 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#398 + def skip_parentheses(&block); end + + # Skip spaces until a comment is found + # + # source://rdoc//rdoc/parser/ruby.rb#2299 + def skip_tkspace_comment(skip_nl = T.unsafe(nil)); end + + # Marks containers between +container+ and +ancestor+ as ignored + # + # source://rdoc//rdoc/parser/ruby.rb#643 + def suppress_parents(container, ancestor); end + + # @return [Boolean] + # + # source://rdoc//rdoc/parser/ruby.rb#183 + def tk_nl?(tk); end + + # Updates visibility in +container+ from +vis_type+ and +vis+. + # + # source://rdoc//rdoc/parser/ruby.rb#2311 + def update_visibility(container, vis_type, vis, singleton); end + + # Prints +message+ to +$stderr+ unless we're being quiet + # + # source://rdoc//rdoc/parser/ruby.rb#2356 + 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 + +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#51 + def initialize; end + + # reduce 0 omitted + # + # source://rdoc//rdoc/rd/block_parser.rb#684 + def _reduce_1(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#726 + def _reduce_10(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#731 + def _reduce_11(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#736 + def _reduce_12(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#744 + def _reduce_13(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#750 + def _reduce_14(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#757 + def _reduce_15(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#762 + def _reduce_16(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#767 + def _reduce_17(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#778 + def _reduce_18(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#789 + def _reduce_19(val, _values, result); end + + # @raise [ParseError] + # + # source://rdoc//rdoc/rd/block_parser.rb#689 + def _reduce_2(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#795 + def _reduce_20(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#801 + def _reduce_21(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#807 + def _reduce_22(val, _values, result); end + + # reduce 26 omitted + # + # source://rdoc//rdoc/rd/block_parser.rb#823 + def _reduce_27(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#829 + def _reduce_28(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#835 + def _reduce_29(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#694 + def _reduce_3(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#841 + def _reduce_30(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#846 + def _reduce_31(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#851 + def _reduce_32(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#857 + def _reduce_33(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#862 + def _reduce_34(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#867 + def _reduce_35(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#873 + def _reduce_36(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#879 + def _reduce_37(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#884 + def _reduce_38(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#889 + def _reduce_39(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#699 + def _reduce_4(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#895 + def _reduce_40(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#901 + def _reduce_41(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#906 + def _reduce_42(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#911 + def _reduce_43(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#919 + def _reduce_44(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#925 + def _reduce_45(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#930 + def _reduce_46(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#935 + def _reduce_47(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#941 + def _reduce_48(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#947 + def _reduce_49(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#704 + def _reduce_5(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#953 + def _reduce_50(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#959 + def _reduce_51(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#965 + def _reduce_52(val, _values, result); end + + # reduce 53 omitted + # + # source://rdoc//rdoc/rd/block_parser.rb#972 + def _reduce_54(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#977 + def _reduce_55(val, _values, result); end + + # reduce 56 omitted + # + # source://rdoc//rdoc/rd/block_parser.rb#984 + def _reduce_57(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#709 + def _reduce_6(val, _values, result); end + + # reduce 61 omitted + # + # source://rdoc//rdoc/rd/block_parser.rb#997 + def _reduce_62(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1003 + def _reduce_63(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1009 + def _reduce_64(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1015 + def _reduce_65(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1021 + def _reduce_66(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1027 + def _reduce_67(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1032 + def _reduce_68(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1037 + def _reduce_69(val, _values, result); end + + # reduce 70 omitted + # + # source://rdoc//rdoc/rd/block_parser.rb#1044 + def _reduce_71(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1049 + def _reduce_72(val, _values, result); end + + # reduce 7 omitted + # + # source://rdoc//rdoc/rd/block_parser.rb#716 + def _reduce_8(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#721 + def _reduce_9(val, _values, result); end + + # source://rdoc//rdoc/rd/block_parser.rb#1054 + def _reduce_none(val, _values, result); end + + # Adds footnote +content+ to the document + # + # source://rdoc//rdoc/rd/block_parser.rb#401 + def add_footnote(content); end + + # Adds label +label+ to the document + # + # source://rdoc//rdoc/rd/block_parser.rb#415 + def add_label(label); end + + # Retrieves the content of +values+ as a single String + # + # source://rdoc//rdoc/rd/block_parser.rb#384 + def content(values); end + + # Footnotes for this document + # + # source://rdoc//rdoc/rd/block_parser.rb#35 + def footnotes; end + + # Path to find included files in + # + # source://rdoc//rdoc/rd/block_parser.rb#45 + def include_path; end + + # Path to find included files in + # + # source://rdoc//rdoc/rd/block_parser.rb#45 + def include_path=(_arg0); end + + # Labels for items in this document + # + # source://rdoc//rdoc/rd/block_parser.rb#40 + def labels; end + + # Current line number + # + # source://rdoc//rdoc/rd/block_parser.rb#339 + def line_index; end + + # Returns the next token from the document + # + # source://rdoc//rdoc/rd/block_parser.rb#107 + def next_token; end + + # Raises a ParseError when invalid formatting is found + # + # @raise [ParseError] + # + # source://rdoc//rdoc/rd/block_parser.rb#323 + def on_error(et, ev, _values); end + + # Creates a paragraph for +value+ + # + # source://rdoc//rdoc/rd/block_parser.rb#391 + def paragraph(value); end + + # Parses +src+ and returns an RDoc::Markup::Document. + # + # source://rdoc//rdoc/rd/block_parser.rb#63 + def parse(src); end + + private + + # Cuts off excess whitespace in +src+ + # + # source://rdoc//rdoc/rd/block_parser.rb#287 + def cut_off(src); end + + # Formats line numbers +line_numbers+ prettily + # + # source://rdoc//rdoc/rd/block_parser.rb#375 + def format_line_num(*line_numbers); end + + # Retrieves the content for +file+ from the include_path + # + # source://rdoc//rdoc/rd/block_parser.rb#356 + 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#269 + def if_current_indent_equal(indent); end + + # Parses subtree +src+ + # + # source://rdoc//rdoc/rd/block_parser.rb#346 + def parse_subtree(src); end + + # source://rdoc//rdoc/rd/block_parser.rb#314 + def set_term_to_element(parent, term); end +end + +# source://rdoc//rdoc/rd/block_parser.rb#678 +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#90 + def initialize(block_parser); end + + # reduce 100 omitted + # + # source://rdoc//rdoc/rd/inline_parser.rb#1100 + def _reduce_101(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#1107 + def _reduce_102(val, _values, result); end + + # reduce 108 omitted + # + # source://rdoc//rdoc/rd/inline_parser.rb#1125 + def _reduce_109(val, _values, result); end + + # reduce 110 omitted + # + # source://rdoc//rdoc/rd/inline_parser.rb#1132 + def _reduce_111(val, _values, result); end + + # reduce 112 omitted + # + # source://rdoc//rdoc/rd/inline_parser.rb#1140 + def _reduce_113(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#1145 + def _reduce_114(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#1150 + def _reduce_115(val, _values, result); end + + # reduce 12 omitted + # + # source://rdoc//rdoc/rd/inline_parser.rb#763 + def _reduce_13(val, _values, result); end + + # reduce 135 omitted + # + # source://rdoc//rdoc/rd/inline_parser.rb#1195 + def _reduce_136(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#770 + def _reduce_14(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#777 + def _reduce_15(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#784 + def _reduce_16(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#791 + def _reduce_17(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#799 + def _reduce_18(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#805 + def _reduce_19(val, _values, result); end + + # reduce 1 omitted + # + # source://rdoc//rdoc/rd/inline_parser.rb#735 + def _reduce_2(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#813 + def _reduce_20(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#819 + def _reduce_21(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#828 + def _reduce_22(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#834 + def _reduce_23(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#840 + def _reduce_24(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#846 + def _reduce_25(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#855 + def _reduce_26(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#861 + def _reduce_27(val, _values, result); end + + # reduce 28 omitted + # + # source://rdoc//rdoc/rd/inline_parser.rb#870 + def _reduce_29(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#740 + def _reduce_3(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#875 + def _reduce_30(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#880 + def _reduce_31(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#886 + def _reduce_32(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#892 + def _reduce_33(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#898 + def _reduce_34(val, _values, result); end + + # reduce 35 omitted + # + # source://rdoc//rdoc/rd/inline_parser.rb#906 + def _reduce_36(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#911 + def _reduce_37(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#916 + def _reduce_38(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#922 + def _reduce_39(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#928 + def _reduce_40(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#934 + def _reduce_41(val, _values, result); end + + # reduce 42 omitted + # + # source://rdoc//rdoc/rd/inline_parser.rb#942 + def _reduce_43(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#948 + def _reduce_44(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#954 + def _reduce_45(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#960 + def _reduce_46(val, _values, result); end + + # reduce 56 omitted + # + # source://rdoc//rdoc/rd/inline_parser.rb#986 + def _reduce_57(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#992 + def _reduce_58(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#998 + def _reduce_59(val, _values, result); end + + # source://rdoc//rdoc/rd/inline_parser.rb#1004 + def _reduce_60(val, _values, result); end + + # reduce 61 omitted + # + # source://rdoc//rdoc/rd/inline_parser.rb#1011 + def _reduce_62(val, _values, result); end + + # reduce 63 omitted + # + # source://rdoc//rdoc/rd/inline_parser.rb#1019 + def _reduce_64(val, _values, result); end + + # reduce 77 omitted + # + # source://rdoc//rdoc/rd/inline_parser.rb#1051 + def _reduce_78(val, _values, result); end + + # reduce 137 omitted + # + # source://rdoc//rdoc/rd/inline_parser.rb#1202 + 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#239 + def inline(rdoc, reference = T.unsafe(nil)); end + + # Returns the next token from the inline text + # + # source://rdoc//rdoc/rd/inline_parser.rb#108 + def next_token; end + + # Returns words following an error + # + # source://rdoc//rdoc/rd/inline_parser.rb#228 + def next_words_on_error; end + + # Raises a ParseError when invalid formatting is found + # + # @raise [ParseError] + # + # source://rdoc//rdoc/rd/inline_parser.rb#188 + def on_error(et, ev, values); end + + # Parses the +inline+ text from RD format into RDoc format. + # + # source://rdoc//rdoc/rd/inline_parser.rb#97 + def parse(inline); end + + # Returns words before the error + # + # source://rdoc//rdoc/rd/inline_parser.rb#205 + def prev_words_on_error(ev); end + + private + + # Returns the last line of +src+ + # + # source://rdoc//rdoc/rd/inline_parser.rb#216 + def last_line(src); end +end + +# source://rdoc//rdoc/rd/inline_parser.rb#727 +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#452 + 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#517 + 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#536 + 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#390 + def initialize(initial_options = T.unsafe(nil)); end + + # Adds paths for undocumented classes +also_in+ to +out+ + # + # source://rdoc//rdoc/ri/driver.rb#428 + 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#445 + def add_class(out, name, classes); end + + # Adds +extends+ to +out+ + # + # source://rdoc//rdoc/ri/driver.rb#472 + 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#480 + def add_extension_modules(out, type, extensions); end + + # Renders multiple included +modules+ from +store+ to +out+. + # + # source://rdoc//rdoc/ri/driver.rb#498 + 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#525 + def add_extension_modules_single(out, store, include); end + + # Adds "(from ...)" to +out+ for +store+ + # + # source://rdoc//rdoc/ri/driver.rb#465 + def add_from(out, store); end + + # Adds +includes+ to +out+ + # + # source://rdoc//rdoc/ri/driver.rb#539 + def add_includes(out, includes); end + + # Looks up the method +name+ and adds it to +out+ + # + # source://rdoc//rdoc/ri/driver.rb#546 + def add_method(out, name); end + + # Adds documentation for all methods in +klass+ to +out+ + # + # source://rdoc//rdoc/ri/driver.rb#557 + 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#570 + def add_method_list(out, methods, name); end + + # Returns ancestor classes of +klass+ + # + # source://rdoc//rdoc/ri/driver.rb#590 + def ancestors_of(klass); end + + # source://rdoc//rdoc/ri/driver.rb#925 + def check_did_you_mean; end + + # For RubyGems backwards compatibility + # + # source://rdoc//rdoc/ri/driver.rb#621 + def class_cache; end + + # Builds a RDoc::Markup::Document from +found+, +klasess+ and +includes+ + # + # source://rdoc//rdoc/ri/driver.rb#627 + def class_document(name, found, klasses, includes, extends); end + + # Adds the class +comment+ to +out+. + # + # source://rdoc//rdoc/ri/driver.rb#649 + def class_document_comment(out, comment); end + + # Adds the constants from +klass+ to the Document +out+. + # + # source://rdoc//rdoc/ri/driver.rb#669 + 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#693 + 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#713 + def classes_and_includes_and_extends_for(name); end + + # Completes +name+ based on the caches. For Readline + # + # source://rdoc//rdoc/ri/driver.rb#738 + def complete(name); end + + # source://rdoc//rdoc/ri/driver.rb#749 + def complete_klass(name, klass, selector, method, completions); end + + # source://rdoc//rdoc/ri/driver.rb#768 + def complete_method(name, klass, selector, completions); end + + # Converts +document+ to text and writes it to the pager + # + # source://rdoc//rdoc/ri/driver.rb#788 + def display(document); end + + # Outputs formatted RI data for class +name+. Groups undocumented classes + # + # source://rdoc//rdoc/ri/driver.rb#801 + def display_class(name); end + + # Outputs formatted RI data for method +name+ + # + # source://rdoc//rdoc/ri/driver.rb#817 + 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#831 + def display_name(name); end + + # Displays each name in +name+ + # + # source://rdoc//rdoc/ri/driver.rb#860 + def display_names(names); end + + # Outputs formatted RI data for page +name+. + # + # source://rdoc//rdoc/ri/driver.rb#871 + def display_page(name); end + + # Outputs a formatted RI page list for the pages in +store+. + # + # source://rdoc//rdoc/ri/driver.rb#902 + 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#946 + 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#964 + def expand_name(name); end + + # Filters the methods in +found+ trying to find a match for +name+. + # + # source://rdoc//rdoc/ri/driver.rb#980 + 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#998 + 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#1044 + 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#1061 + def formatter(io); end + + # Runs ri interactively using Readline if it is available. + # + # source://rdoc//rdoc/ri/driver.rb#1074 + 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#1113 + def list_known_classes(names = T.unsafe(nil)); end + + # Returns an Array of methods matching +name+ + # + # source://rdoc//rdoc/ri/driver.rb#1145 + 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#1184 + 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#1207 + def load_methods_matching(name); end + + # Returns a filtered list of methods matching +name+ + # + # source://rdoc//rdoc/ri/driver.rb#1228 + def lookup_method(name); end + + # Builds a RDoc::Markup::Document from +found+, +klasses+ and +includes+ + # + # source://rdoc//rdoc/ri/driver.rb#1253 + def method_document(name, filtered); end + + # Returns the type of method (:both, :instance, :class) for +selector+ + # + # source://rdoc//rdoc/ri/driver.rb#1271 + 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#1283 + def name_regexp(name); end + + # Paginates output through a pager program. + # + # source://rdoc//rdoc/ri/driver.rb#1297 + def page; end + + # Are we using a pager? + # + # @return [Boolean] + # + # source://rdoc//rdoc/ri/driver.rb#1315 + 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#1326 + 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#1358 + def render_class(out, store, klass, also_in); end + + # source://rdoc//rdoc/ri/driver.rb#1388 + def render_method(out, store, method, name); end + + # source://rdoc//rdoc/ri/driver.rb#1408 + def render_method_arguments(out, arglists); end + + # source://rdoc//rdoc/ri/driver.rb#1417 + def render_method_comment(out, method, alias_for = T.unsafe(nil)); end + + # source://rdoc//rdoc/ri/driver.rb#1435 + def render_method_superclass(out, method); end + + # Looks up and displays ri data according to the options given. + # + # source://rdoc//rdoc/ri/driver.rb#1447 + 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#1467 + def setup_pager; end + + # Show all method documentation following a class or module + # + # source://rdoc//rdoc/ri/driver.rb#61 + def show_all; end + + # Show all method documentation following a class or module + # + # source://rdoc//rdoc/ri/driver.rb#61 + def show_all=(_arg0); end + + # Starts a WEBrick server for ri. + # + # source://rdoc//rdoc/ri/driver.rb#1493 + def start_server; end + + # An RDoc::RI::Store for each entry in the RI path + # + # source://rdoc//rdoc/ri/driver.rb#66 + def stores; end + + # An RDoc::RI::Store for each entry in the RI path + # + # source://rdoc//rdoc/ri/driver.rb#66 + def stores=(_arg0); end + + # Controls the user of the pager vs $stdout + # + # source://rdoc//rdoc/ri/driver.rb#71 + def use_stdout; end + + # Controls the user of the pager vs $stdout + # + # source://rdoc//rdoc/ri/driver.rb#71 + def use_stdout=(_arg0); end + + class << self + # Default options for ri + # + # source://rdoc//rdoc/ri/driver.rb#76 + def default_options; end + + # Dump +data_path+ using pp + # + # source://rdoc//rdoc/ri/driver.rb#97 + def dump(data_path); end + + # Parses +argv+ and returns a Hash of options + # + # source://rdoc//rdoc/ri/driver.rb#108 + def process_args(argv); end + + # Runs the ri command line executable using +argv+ + # + # source://rdoc//rdoc/ri/driver.rb#375 + 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, suggestions = 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#209 + def all_classes; end + + # Returns all classes and modules discovered by RDoc + # + # source://rdoc//rdoc/store.rb#216 + def all_classes_and_modules; end + + # All TopLevels known to RDoc + # + # source://rdoc//rdoc/store.rb#223 + def all_files; end + + # Returns all modules discovered by RDoc + # + # source://rdoc//rdoc/store.rb#230 + 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#239 + def ancestors; end + + # Attributes cache accessor. Maps a class to an Array of its attributes. + # + # source://rdoc//rdoc/store.rb#246 + 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#253 + def cache_path; end + + # Path to the ri data for +klass_name+ + # + # source://rdoc//rdoc/store.rb#260 + 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#269 + def class_methods; end + + # Path where data for +klass_name+ will be stored (methods or class data) + # + # source://rdoc//rdoc/store.rb#276 + def class_path(klass_name); end + + # Hash of all classes known to RDoc + # + # source://rdoc//rdoc/store.rb#283 + def classes_hash; end + + # Removes empty items and ensures item in each collection are unique and + # sorted + # + # source://rdoc//rdoc/store.rb#291 + 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#319 + 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#359 + def files_hash; end + + # Finds the enclosure (namespace) for the given C +variable+. + # + # source://rdoc//rdoc/store.rb#366 + def find_c_enclosure(variable); end + + # Finds the class with +name+ in all discovered classes + # + # source://rdoc//rdoc/store.rb#391 + def find_class_named(name); end + + # Finds the class with +name+ starting in namespace +from+ + # + # source://rdoc//rdoc/store.rb#398 + def find_class_named_from(name, from); end + + # Finds the class or module with +name+ + # + # source://rdoc//rdoc/store.rb#416 + def find_class_or_module(name); end + + # Finds the file with +name+ in all discovered files + # + # source://rdoc//rdoc/store.rb#424 + def find_file_named(name); end + + # Finds the module with +name+ in all discovered modules + # + # source://rdoc//rdoc/store.rb#431 + 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#439 + 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#452 + 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#471 + def fix_basic_object_inheritance; end + + # Friendly rendition of #path + # + # source://rdoc//rdoc/store.rb#480 + def friendly_path; end + + # source://rdoc//rdoc/store.rb#492 + 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#500 + 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#508 + def load_all; end + + # Loads cache file for this store + # + # source://rdoc//rdoc/store.rb#556 + def load_cache; end + + # Loads ri data for +klass_name+ and hooks it up to this store. + # + # source://rdoc//rdoc/store.rb#597 + def load_class(klass_name); end + + # Loads ri data for +klass_name+ + # + # source://rdoc//rdoc/store.rb#615 + def load_class_data(klass_name); end + + # Loads ri data for +method_name+ in +klass_name+ + # + # source://rdoc//rdoc/store.rb#630 + def load_method(klass_name, method_name); end + + # Loads ri data for +page_name+ + # + # source://rdoc//rdoc/store.rb#650 + 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#668 + def main; end + + # Sets the main page for this RDoc store. + # + # source://rdoc//rdoc/store.rb#675 + 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#683 + def make_variable_map(variables); end + + # Path to the ri data for +method_name+ in +klass_name+ + # + # source://rdoc//rdoc/store.rb#696 + 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#710 + def module_names; end + + # Hash of all modules known to RDoc + # + # source://rdoc//rdoc/store.rb#717 + def modules_hash; end + + # Returns the RDoc::TopLevel that is a text file and has the given +name+ + # + # source://rdoc//rdoc/store.rb#724 + def page(name); end + + # Path to the ri data for +page_name+ + # + # source://rdoc//rdoc/store.rb#733 + 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#744 + def remove_nodoc(all_hash); end + + # Saves all entries in the store + # + # source://rdoc//rdoc/store.rb#754 + def save; end + + # Writes the cache file for this store + # + # source://rdoc//rdoc/store.rb#779 + def save_cache; end + + # Writes the ri data for +klass+ (or module) + # + # source://rdoc//rdoc/store.rb#806 + def save_class(klass); end + + # Writes the ri data for +method+ on +klass+ + # + # source://rdoc//rdoc/store.rb#880 + def save_method(klass, method); end + + # Writes the ri data for +page+ + # + # source://rdoc//rdoc/store.rb#903 + 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#929 + 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#943 + def title; end + + # Sets the title page for this RDoc store. + # + # source://rdoc//rdoc/store.rb#950 + 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#959 + 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#967 + 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#975 + def unique_modules; end + + # The lazy constants alias will be discovered in passing + # + # source://rdoc//rdoc/store.rb#122 + def unmatched_constant_alias; end + + # source://rdoc//rdoc/store.rb#200 + 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. +# +# 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 and +# :rdoc:force. +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#155 + 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#273 + 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#171 + def check_names(names); end + + # Task description for the clobber rdoc task or its renamed equivalent + # + # source://rdoc//rdoc/task.rb#185 + def clobber_task_description; end + + # Sets default task values + # + # source://rdoc//rdoc/task.rb#192 + def defaults; end + + # Create the tasks defined by this task lib. + # + # source://rdoc//rdoc/task.rb#221 + def define; end + + # Whether to run the rdoc process as an external shell (default is false) + # + # source://rdoc//rdoc/task.rb#149 + def external; end + + # Whether to run the rdoc process as an external shell (default is false) + # + # source://rdoc//rdoc/task.rb#149 + def external=(_arg0); end + + # Name of format generator (--format) used by rdoc. (defaults to + # rdoc's default) + # + # source://rdoc//rdoc/task.rb#134 + def generator; end + + # Name of format generator (--format) used by rdoc. (defaults to + # rdoc's default) + # + # source://rdoc//rdoc/task.rb#134 + def generator=(_arg0); end + + # All source is inline now. This method is deprecated + # + # source://rdoc//rdoc/task.rb#206 + def inline_source; end + + # All source is inline now. This method is deprecated + # + # source://rdoc//rdoc/task.rb#214 + 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#123 + 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#123 + def main=(_arg0); end + + # Comment markup format. rdoc, rd and tomdoc are supported. (default is + # 'rdoc') + # + # source://rdoc//rdoc/task.rb#107 + def markup; end + + # Comment markup format. rdoc, rd and tomdoc are supported. (default is + # 'rdoc') + # + # source://rdoc//rdoc/task.rb#107 + def markup=(_arg0); end + + # Name of the main, top level task. (default is :rdoc) + # + # source://rdoc//rdoc/task.rb#101 + def name; end + + # Name of the main, top level task. (default is :rdoc) + # + # source://rdoc//rdoc/task.rb#101 + def name=(_arg0); end + + # List of options that will be supplied to RDoc + # + # source://rdoc//rdoc/task.rb#257 + def option_list; end + + # Additional list of options to be passed rdoc. (default is []) + # + # source://rdoc//rdoc/task.rb#144 + def options; end + + # Additional list of options to be passed rdoc. (default is []) + # + # source://rdoc//rdoc/task.rb#144 + def options=(_arg0); end + + # Name of directory to receive the html output files. (default is "html") + # + # source://rdoc//rdoc/task.rb#112 + def rdoc_dir; end + + # Name of directory to receive the html output files. (default is "html") + # + # source://rdoc//rdoc/task.rb#112 + def rdoc_dir=(_arg0); end + + # List of files to be included in the rdoc generation. (default is []) + # + # source://rdoc//rdoc/task.rb#139 + def rdoc_files; end + + # List of files to be included in the rdoc generation. (default is []) + # + # source://rdoc//rdoc/task.rb#139 + def rdoc_files=(_arg0); end + + # Task description for the rdoc task or its renamed equivalent + # + # source://rdoc//rdoc/task.rb#280 + def rdoc_task_description; end + + # Task description for the rerdoc task or its renamed description + # + # source://rdoc//rdoc/task.rb#287 + def rerdoc_task_description; end + + # Name of template to be used by rdoc. (defaults to rdoc's default) + # + # source://rdoc//rdoc/task.rb#128 + def template; end + + # Name of template to be used by rdoc. (defaults to rdoc's default) + # + # source://rdoc//rdoc/task.rb#128 + def template=(_arg0); end + + # Title of RDoc documentation. (defaults to rdoc's default) + # + # source://rdoc//rdoc/task.rb#117 + def title; end + + # Title of RDoc documentation. (defaults to rdoc's default) + # + # source://rdoc//rdoc/task.rb#117 + def title=(_arg0); end + + private + + # source://rdoc//rdoc/task.rb#304 + def clobber_task_name; end + + # source://rdoc//rdoc/task.rb#293 + def rdoc_target; end + + # source://rdoc//rdoc/task.rb#297 + def rdoc_task_name; end + + # source://rdoc//rdoc/task.rb#311 + 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#59 + def expand_tabs(text); end + + # Flush +text+ left based on the shortest line + # + # source://rdoc//rdoc/text.rb#78 + def flush_left(text); end + + # Returns the value of attribute language. + # + # source://rdoc//rdoc/text.rb#13 + def language; end + + # Sets the attribute language + # + # @param value the value to set the attribute language to. + # + # source://rdoc//rdoc/text.rb#13 + def language=(_arg0); end + + # Convert a string in markup format into HTML. + # + # Requires the including class to implement #formatter + # + # source://rdoc//rdoc/text.rb#97 + def markup(text); end + + # Strips hashes, expands tabs then flushes +text+ to the left + # + # source://rdoc//rdoc/text.rb#113 + def normalize_comment(text); end + + # Normalizes +text+ then builds a RDoc::Markup::Document from it + # + # source://rdoc//rdoc/text.rb#131 + def parse(text, format = T.unsafe(nil)); end + + # The first +limit+ characters of +text+ as HTML + # + # source://rdoc//rdoc/text.rb#145 + def snippet(text, limit = T.unsafe(nil)); end + + # Strips leading # characters from +text+ + # + # source://rdoc//rdoc/text.rb#154 + def strip_hashes(text); end + + # Strips leading and trailing \n characters from +text+ + # + # source://rdoc//rdoc/text.rb#166 + def strip_newlines(text); end + + # Strips /* */ style comments + # + # source://rdoc//rdoc/text.rb#173 + def strip_stars(text); end + + # source://rdoc//rdoc/text.rb#196 + def to_html(text); end + + # Wraps +txt+ to +line_len+ + # + # source://rdoc//rdoc/text.rb#283 + def wrap(txt, line_len = T.unsafe(nil)); end + + class << self + # Transcodes +character+ to +encoding+ with a +fallback+ character. + # + # source://rdoc//rdoc/text.rb#51 + def encode_fallback(character, encoding, fallback); end + end +end + +# 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#64 + 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#73 + def add_alias(an_alias); end + + # Adds +constant+ to +Object+ instead of +self+. + # + # source://rdoc//rdoc/top_level.rb#82 + def add_constant(constant); end + + # Adds +include+ to +Object+ instead of +self+. + # + # source://rdoc//rdoc/top_level.rb#91 + def add_include(include); end + + # Adds +method+ to +Object+ instead of +self+. + # + # source://rdoc//rdoc/top_level.rb#100 + 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#110 + def add_to_classes_or_modules(mod); end + + # Base name of this file + # + # source://rdoc//rdoc/top_level.rb#117 + 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#127 + def display?; end + + # An RDoc::TopLevel is equal to another with the same relative_name + # + # source://rdoc//rdoc/top_level.rb#64 + 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#137 + def find_class_or_module(name); end + + # Finds a class or module named +symbol+ + # + # source://rdoc//rdoc/top_level.rb#144 + def find_local_symbol(symbol); end + + # Finds a module or class with +name+ + # + # source://rdoc//rdoc/top_level.rb#151 + def find_module_named(name); end + + # Returns the relative name of this file + # + # source://rdoc//rdoc/top_level.rb#158 + def full_name; end + + # An RDoc::TopLevel has the same hash as another with the same + # relative_name + # + # source://rdoc//rdoc/top_level.rb#166 + def hash; end + + # URL for this with a +prefix+ + # + # source://rdoc//rdoc/top_level.rb#173 + def http_url(prefix); end + + # source://rdoc//rdoc/top_level.rb#179 + def inspect; end + + # Time this file was last modified, if known + # + # source://rdoc//rdoc/top_level.rb#191 + def last_modified; end + + # Dumps this TopLevel for use by ri. See also #marshal_load + # + # source://rdoc//rdoc/top_level.rb#198 + def marshal_dump; end + + # Loads this TopLevel from +array+. + # + # source://rdoc//rdoc/top_level.rb#210 + def marshal_load(array); end + + # Base name of this file + # + # source://rdoc//rdoc/top_level.rb#117 + 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#224 + def object_class; end + + # Base name of this file without the extension + # + # source://rdoc//rdoc/top_level.rb#235 + def page_name; end + + # The parser class that processed this file + # + # source://rdoc//rdoc/top_level.rb#36 + def parser; end + + # source://rdoc//rdoc/top_level.rb#55 + def parser=(val); end + + # Path to this file for use with HTML generator output. + # + # source://rdoc//rdoc/top_level.rb#245 + def path; end + + # source://rdoc//rdoc/top_level.rb#249 + 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#263 + 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#280 + def text?; end + + # source://rdoc//rdoc/top_level.rb#284 + def to_s; end +end + +# :stopdoc: +module Rake + extend ::FileUtils::StreamUtils_ + extend ::FileUtils +end + +# For backwards compatibility +# +# source://rdoc//rdoc/task.rb#326 +Rake::RDocTask = RDoc::Task diff --git a/sorbet/rbi/gems/regexp_parser@2.8.1.rbi b/sorbet/rbi/gems/regexp_parser@2.8.2.rbi similarity index 98% rename from sorbet/rbi/gems/regexp_parser@2.8.1.rbi rename to sorbet/rbi/gems/regexp_parser@2.8.2.rbi index e10d9b8de..80a6a1f4c 100644 --- a/sorbet/rbi/gems/regexp_parser@2.8.1.rbi +++ b/sorbet/rbi/gems/regexp_parser@2.8.2.rbi @@ -2590,17 +2590,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#2405 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#2430 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#2430 def literal_run=(_arg0); end # @raise [PrematureEndError] @@ -2613,168 +2613,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#2467 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#2434 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#2434 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#2434 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#2434 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#2434 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#2434 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#2434 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#2434 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#2461 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#2472 def emit_literal; end - # source://regexp_parser//lib/regexp_parser/scanner.rb#2490 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2507 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#2478 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#2434 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#2434 def free_spacing=(_arg0); end # @return [Boolean] # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2423 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2440 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#2434 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#2434 def group_depth=(_arg0); end # @return [Boolean] # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2452 def in_group?; end # @return [Boolean] # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2439 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2456 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#2434 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#2434 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#2434 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#2434 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#2434 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#2434 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#2434 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#2434 def tokens=(_arg0); end class << self - # source://regexp_parser//lib/regexp_parser/scanner.rb#2374 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2391 def long_prop_map; end - # source://regexp_parser//lib/regexp_parser/scanner.rb#2378 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2395 def parse_prop_map(name); end - # source://regexp_parser//lib/regexp_parser/scanner.rb#2382 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2399 def posix_classes; end # Scans the given regular expression text, or Regexp object and collects the @@ -2789,7 +2789,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#2387 def short_prop_map; end end end diff --git a/sorbet/rbi/gems/reline@0.3.9.rbi b/sorbet/rbi/gems/reline@0.3.9.rbi new file mode 100644 index 000000000..baca148f3 --- /dev/null +++ b/sorbet/rbi/gems/reline@0.3.9.rbi @@ -0,0 +1,2260 @@ +# typed: false + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `reline` gem. +# Please instead update this file by running `bin/tapioca gem reline`. + +# source://reline//lib/reline/version.rb#1 +module Reline + extend ::Forwardable + extend ::SingleForwardable + + class << self + # source://reline//lib/reline.rb#554 + def core; end + + # source://reline//lib/reline.rb#550 + def encoding_system_needs; end + + # source://reline//lib/reline.rb#531 + def insert_text(*args, &block); end + + # source://reline//lib/reline.rb#574 + def line_editor; end + + # source://reline//lib/reline.rb#570 + def ungetc(c); end + + # source://reline//lib/reline.rb#578 + def update_iogate; end + end +end + +# source://reline//lib/reline/ansi.rb#5 +class Reline::ANSI + class << self + # source://reline//lib/reline/ansi.rb#345 + def clear_screen; end + + # source://reline//lib/reline/ansi.rb#254 + def cursor_pos; end + + # source://reline//lib/reline/ansi.rb#360 + def deprep(otio); end + + # @return [Boolean] + # + # source://reline//lib/reline/ansi.rb#215 + def empty_buffer?; end + + # source://reline//lib/reline/ansi.rb#37 + def encoding; end + + # source://reline//lib/reline/ansi.rb#333 + def erase_after_cursor; end + + # source://reline//lib/reline/ansi.rb#237 + def get_screen_size; end + + # if the usage expects to wait indefinitely, use Float::INFINITY for timeout_second + # + # source://reline//lib/reline/ansi.rb#203 + def getc(timeout_second); end + + # source://reline//lib/reline/ansi.rb#176 + def getc_with_bracketed_paste(timeout_second); end + + # source://reline//lib/reline/ansi.rb#309 + def hide_cursor; end + + # @return [Boolean] + # + # source://reline//lib/reline/ansi.rb#211 + def in_pasting?; end + + # source://reline//lib/reline/ansi.rb#156 + def inner_getc(timeout_second); end + + # source://reline//lib/reline/ansi.rb#142 + def input=(val); end + + # source://reline//lib/reline/ansi.rb#289 + def move_cursor_column(x); end + + # source://reline//lib/reline/ansi.rb#301 + def move_cursor_down(x); end + + # source://reline//lib/reline/ansi.rb#293 + def move_cursor_up(x); end + + # source://reline//lib/reline/ansi.rb#147 + def output=(val); end + + # source://reline//lib/reline/ansi.rb#355 + def prep; end + + # source://reline//lib/reline/ansi.rb#226 + def retrieve_keybuffer; end + + # This only works when the cursor is at the bottom of the scroll range + # For more details, see https://github.com/ruby/reline/pull/577#issuecomment-1646679623 + # + # source://reline//lib/reline/ansi.rb#339 + def scroll_down(x); end + + # source://reline//lib/reline/ansi.rb#45 + def set_default_key_bindings(config, allow_terminfo: T.unsafe(nil)); end + + # source://reline//lib/reline/ansi.rb#67 + def set_default_key_bindings_ansi_cursor(config); end + + # source://reline//lib/reline/ansi.rb#106 + def set_default_key_bindings_comprehensive_list(config); end + + # source://reline//lib/reline/ansi.rb#89 + def set_default_key_bindings_terminfo(config); end + + # source://reline//lib/reline/ansi.rb#247 + def set_screen_size(rows, columns); end + + # source://reline//lib/reline/ansi.rb#351 + def set_winch_handler(&handler); end + + # source://reline//lib/reline/ansi.rb#321 + def show_cursor; end + + # source://reline//lib/reline/ansi.rb#222 + def ungetc(c); end + + # @return [Boolean] + # + # source://reline//lib/reline/ansi.rb#41 + def win?; end + + # source://reline//lib/reline/ansi.rb#151 + def with_raw_input; end + end +end + +# source://reline//lib/reline/ansi.rb#18 +Reline::ANSI::ANSI_CURSOR_KEY_BINDINGS = T.let(T.unsafe(nil), Hash) + +# source://reline//lib/reline/ansi.rb#6 +Reline::ANSI::CAPNAME_KEY_BINDINGS = T.let(T.unsafe(nil), Hash) + +# source://reline//lib/reline/ansi.rb#175 +Reline::ANSI::END_BRACKETED_PASTE = T.let(T.unsafe(nil), String) + +# source://reline//lib/reline/ansi.rb#174 +Reline::ANSI::START_BRACKETED_PASTE = T.let(T.unsafe(nil), String) + +# source://reline//lib/reline/config.rb#1 +class Reline::Config + # @return [Config] a new instance of Config + # + # source://reline//lib/reline/config.rb#50 + def initialize; end + + # source://reline//lib/reline/config.rb#172 + def add_default_key_binding(keystroke, target); end + + # source://reline//lib/reline/config.rb#168 + def add_default_key_binding_by_keymap(keymap, keystroke, target); end + + # source://reline//lib/reline/config.rb#160 + def add_oneshot_key_binding(keystroke, target); end + + # Returns the value of attribute autocompletion. + # + # source://reline//lib/reline/config.rb#48 + def autocompletion; end + + # Sets the attribute autocompletion + # + # @param value the value to set the attribute autocompletion to. + # + # source://reline//lib/reline/config.rb#48 + def autocompletion=(_arg0); end + + # source://reline//lib/reline/config.rb#342 + def bind_key(key, func_name); end + + # source://reline//lib/reline/config.rb#45 + def bind_tty_special_chars; end + + # source://reline//lib/reline/config.rb#45 + def bind_tty_special_chars=(_arg0); end + + # source://reline//lib/reline/config.rb#259 + def bind_variable(name, value); end + + # source://reline//lib/reline/config.rb#45 + def blink_matching_paren; end + + # source://reline//lib/reline/config.rb#45 + def blink_matching_paren=(_arg0); end + + # source://reline//lib/reline/config.rb#45 + def byte_oriented; end + + # source://reline//lib/reline/config.rb#45 + def byte_oriented=(_arg0); end + + # source://reline//lib/reline/config.rb#45 + def completion_ignore_case; end + + # source://reline//lib/reline/config.rb#45 + def completion_ignore_case=(_arg0); end + + # source://reline//lib/reline/config.rb#45 + def convert_meta; end + + # source://reline//lib/reline/config.rb#45 + def convert_meta=(_arg0); end + + # source://reline//lib/reline/config.rb#45 + def disable_completion; end + + # source://reline//lib/reline/config.rb#45 + def disable_completion=(_arg0); end + + # source://reline//lib/reline/config.rb#87 + def editing_mode; end + + # source://reline//lib/reline/config.rb#91 + def editing_mode=(val); end + + # @return [Boolean] + # + # source://reline//lib/reline/config.rb#95 + def editing_mode_is?(*val); end + + # source://reline//lib/reline/config.rb#45 + def emacs_mode_string; end + + # source://reline//lib/reline/config.rb#45 + def emacs_mode_string=(_arg0); end + + # source://reline//lib/reline/config.rb#45 + def enable_bracketed_paste; end + + # source://reline//lib/reline/config.rb#45 + def enable_bracketed_paste=(_arg0); end + + # source://reline//lib/reline/config.rb#45 + def enable_keypad; end + + # source://reline//lib/reline/config.rb#45 + def enable_keypad=(_arg0); end + + # source://reline//lib/reline/config.rb#45 + def expand_tilde; end + + # source://reline//lib/reline/config.rb#45 + def expand_tilde=(_arg0); end + + # source://reline//lib/reline/config.rb#229 + def handle_directive(directive, file, no); end + + # source://reline//lib/reline/config.rb#45 + def history_preserve_point; end + + # source://reline//lib/reline/config.rb#45 + def history_preserve_point=(_arg0); end + + # source://reline//lib/reline/config.rb#45 + def history_size; end + + # source://reline//lib/reline/config.rb#45 + def history_size=(_arg0); end + + # source://reline//lib/reline/config.rb#45 + def horizontal_scroll_mode; end + + # source://reline//lib/reline/config.rb#45 + def horizontal_scroll_mode=(_arg0); end + + # source://reline//lib/reline/config.rb#45 + def input_meta; end + + # source://reline//lib/reline/config.rb#45 + def input_meta=(_arg0); end + + # source://reline//lib/reline/config.rb#103 + def inputrc_path; end + + # source://reline//lib/reline/config.rb#45 + def isearch_terminators; end + + # source://reline//lib/reline/config.rb#45 + def isearch_terminators=(_arg0); end + + # source://reline//lib/reline/config.rb#152 + def key_bindings; end + + # source://reline//lib/reline/config.rb#356 + def key_notation_to_code(notation); end + + # source://reline//lib/reline/config.rb#99 + def keymap; end + + # source://reline//lib/reline/config.rb#45 + def keyseq_timeout; end + + # source://reline//lib/reline/config.rb#45 + def keyseq_timeout=(_arg0); end + + # source://reline//lib/reline/config.rb#45 + def mark_directories; end + + # source://reline//lib/reline/config.rb#45 + def mark_directories=(_arg0); end + + # source://reline//lib/reline/config.rb#45 + def mark_modified_lines; end + + # source://reline//lib/reline/config.rb#45 + def mark_modified_lines=(_arg0); end + + # source://reline//lib/reline/config.rb#45 + def mark_symlinked_directories; end + + # source://reline//lib/reline/config.rb#45 + def mark_symlinked_directories=(_arg0); end + + # source://reline//lib/reline/config.rb#45 + def match_hidden_files; end + + # source://reline//lib/reline/config.rb#45 + def match_hidden_files=(_arg0); end + + # source://reline//lib/reline/config.rb#45 + def meta_flag; end + + # source://reline//lib/reline/config.rb#45 + def meta_flag=(_arg0); end + + # source://reline//lib/reline/config.rb#45 + def output_meta; end + + # source://reline//lib/reline/config.rb#45 + def output_meta=(_arg0); end + + # source://reline//lib/reline/config.rb#45 + def page_completions; end + + # source://reline//lib/reline/config.rb#45 + def page_completions=(_arg0); end + + # source://reline//lib/reline/config.rb#390 + def parse_keyseq(str); end + + # source://reline//lib/reline/config.rb#45 + def prefer_visible_bell; end + + # source://reline//lib/reline/config.rb#45 + def prefer_visible_bell=(_arg0); end + + # source://reline//lib/reline/config.rb#45 + def print_completions_horizontally; end + + # source://reline//lib/reline/config.rb#45 + def print_completions_horizontally=(_arg0); end + + # source://reline//lib/reline/config.rb#133 + def read(file = T.unsafe(nil)); end + + # source://reline//lib/reline/config.rb#182 + def read_lines(lines, file = T.unsafe(nil)); end + + # source://reline//lib/reline/config.rb#76 + def reset; end + + # source://reline//lib/reline/config.rb#176 + def reset_default_key_bindings; end + + # source://reline//lib/reline/config.rb#164 + def reset_oneshot_key_bindings; end + + # source://reline//lib/reline/config.rb#337 + def retrieve_string(str); end + + # source://reline//lib/reline/config.rb#45 + def show_all_if_ambiguous; end + + # source://reline//lib/reline/config.rb#45 + def show_all_if_ambiguous=(_arg0); end + + # source://reline//lib/reline/config.rb#45 + def show_all_if_unmodified; end + + # source://reline//lib/reline/config.rb#45 + def show_all_if_unmodified=(_arg0); end + + # source://reline//lib/reline/config.rb#45 + def show_mode_in_prompt; end + + # source://reline//lib/reline/config.rb#45 + def show_mode_in_prompt=(_arg0); end + + # Returns the value of attribute test_mode. + # + # source://reline//lib/reline/config.rb#2 + def test_mode; end + + # source://reline//lib/reline/config.rb#45 + def vi_cmd_mode_string; end + + # source://reline//lib/reline/config.rb#45 + def vi_cmd_mode_string=(_arg0); end + + # source://reline//lib/reline/config.rb#45 + def vi_ins_mode_string; end + + # source://reline//lib/reline/config.rb#45 + def vi_ins_mode_string=(_arg0); end + + # source://reline//lib/reline/config.rb#45 + def visible_stats; end + + # source://reline//lib/reline/config.rb#45 + def visible_stats=(_arg0); end + + private + + # source://reline//lib/reline/config.rb#129 + def default_inputrc_path; end + + # @return [Boolean] + # + # source://reline//lib/reline/config.rb#398 + def seven_bit_encoding?(encoding); end +end + +# source://reline//lib/reline/config.rb#6 +class Reline::Config::InvalidInputrc < ::RuntimeError + # Returns the value of attribute file. + # + # source://reline//lib/reline/config.rb#7 + def file; end + + # Sets the attribute file + # + # @param value the value to set the attribute file to. + # + # source://reline//lib/reline/config.rb#7 + def file=(_arg0); end + + # Returns the value of attribute lineno. + # + # source://reline//lib/reline/config.rb#7 + def lineno; end + + # Sets the attribute lineno + # + # @param value the value to set the attribute lineno to. + # + # source://reline//lib/reline/config.rb#7 + def lineno=(_arg0); end +end + +# source://reline//lib/reline/config.rb#4 +Reline::Config::KEYSEQ_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://reline//lib/reline/config.rb#10 +Reline::Config::VARIABLE_NAMES = T.let(T.unsafe(nil), Array) + +# source://reline//lib/reline/config.rb#43 +Reline::Config::VARIABLE_NAME_SYMBOLS = T.let(T.unsafe(nil), Array) + +# source://reline//lib/reline.rb#49 +class Reline::Core + extend ::Forwardable + + # @return [Core] a new instance of Core + # @yield [_self] + # @yieldparam _self [Reline::Core] the object that the method was called on + # + # source://reline//lib/reline.rb#77 + def initialize; end + + # @raise [ArgumentError] + # + # source://reline//lib/reline.rb#171 + def add_dialog_proc(name_sym, p, context = T.unsafe(nil)); end + + # source://reline//lib/reline.rb#477 + def ambiguous_width; end + + # source://reline//lib/reline.rb#64 + def auto_indent_proc; end + + # @raise [ArgumentError] + # + # source://reline//lib/reline.rb#156 + def auto_indent_proc=(p); end + + # source://reline//lib/reline.rb#64 + def basic_quote_characters; end + + # source://reline//lib/reline.rb#113 + def basic_quote_characters=(v); end + + # source://reline//lib/reline.rb#64 + def basic_word_break_characters; end + + # source://reline//lib/reline.rb#105 + def basic_word_break_characters=(v); end + + # source://reline//lib/reline.rb#64 + def completer_quote_characters; end + + # source://reline//lib/reline.rb#117 + def completer_quote_characters=(v); end + + # source://reline//lib/reline.rb#64 + def completer_word_break_characters; end + + # source://reline//lib/reline.rb#109 + def completer_word_break_characters=(v); end + + # source://reline//lib/reline.rb#64 + def completion_append_character; end + + # source://reline//lib/reline.rb#93 + def completion_append_character=(val); end + + # source://reline//lib/reline.rb#133 + def completion_case_fold; end + + # source://reline//lib/reline.rb#129 + def completion_case_fold=(v); end + + # source://reline//lib/reline.rb#64 + def completion_proc; end + + # @raise [ArgumentError] + # + # source://reline//lib/reline.rb#141 + def completion_proc=(p); end + + # source://reline//lib/reline.rb#137 + def completion_quote_character; end + + # Returns the value of attribute config. + # + # source://reline//lib/reline.rb#66 + def config; end + + # Sets the attribute config + # + # @param value the value to set the attribute config to. + # + # source://reline//lib/reline.rb#66 + def config=(_arg0); end + + # source://reline//lib/reline.rb#181 + def dialog_proc(name_sym); end + + # source://reline//lib/reline.rb#64 + def dig_perfect_match_proc; end + + # @raise [ArgumentError] + # + # source://reline//lib/reline.rb#165 + def dig_perfect_match_proc=(p); end + + # source://reline//lib/reline.rb#205 + def emacs_editing_mode; end + + # @return [Boolean] + # + # source://reline//lib/reline.rb#214 + def emacs_editing_mode?; end + + # source://reline//lib/reline.rb#89 + def encoding; end + + # source://reline//lib/reline.rb#64 + def filename_quote_characters; end + + # source://reline//lib/reline.rb#121 + def filename_quote_characters=(v); end + + # source://reline//lib/reline.rb#218 + def get_screen_size; end + + # @raise [TypeError] + # + # source://reline//lib/reline.rb#185 + def input=(val); end + + # source://reline//lib/reline.rb#85 + def io_gate; end + + # Returns the value of attribute key_stroke. + # + # source://reline//lib/reline.rb#67 + 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#67 + def key_stroke=(_arg0); end + + # Returns the value of attribute last_incremental_search. + # + # source://reline//lib/reline.rb#69 + 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#69 + def last_incremental_search=(_arg0); end + + # Returns the value of attribute line_editor. + # + # source://reline//lib/reline.rb#68 + 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#68 + def line_editor=(_arg0); end + + # Returns the value of attribute output. + # + # source://reline//lib/reline.rb#70 + def output; end + + # @raise [TypeError] + # + # source://reline//lib/reline.rb#192 + def output=(val); end + + # source://reline//lib/reline.rb#64 + def output_modifier_proc; end + + # @raise [ArgumentError] + # + # source://reline//lib/reline.rb#146 + def output_modifier_proc=(p); end + + # source://reline//lib/reline.rb#64 + def pre_input_hook; end + + # source://reline//lib/reline.rb#161 + def pre_input_hook=(p); end + + # source://reline//lib/reline.rb#64 + def prompt_proc; end + + # @raise [ArgumentError] + # + # source://reline//lib/reline.rb#151 + def prompt_proc=(p); end + + # source://reline//lib/reline.rb#290 + def readline(prompt = T.unsafe(nil), add_hist = T.unsafe(nil)); end + + # source://reline//lib/reline.rb#271 + def readmultiline(prompt = T.unsafe(nil), add_hist = T.unsafe(nil), &confirm_multiline_termination); end + + # source://reline//lib/reline.rb#64 + def special_prefixes; end + + # source://reline//lib/reline.rb#125 + def special_prefixes=(v); end + + # source://reline//lib/reline.rb#200 + def vi_editing_mode; end + + # @return [Boolean] + # + # source://reline//lib/reline.rb#210 + def vi_editing_mode?; end + + private + + # source://reline//lib/reline.rb#304 + def inner_readline(prompt, add_hist, multiline, &confirm_multiline_termination); end + + # source://reline//lib/reline.rb#482 + def may_req_ambiguous_char_width; end + + # source://reline//lib/reline.rb#435 + def read_2nd_character_of_key_sequence(keyseq_timeout, buffer, c, block); end + + # source://reline//lib/reline.rb#463 + def read_escaped_key(keyseq_timeout, c, block); end + + # GNU Readline waits for "keyseq-timeout" milliseconds to see if the ESC + # is followed by a character, and times out and treats it as a standalone + # ESC if the second character does not arrive. If the second character + # comes before timed out, it is treated as a modifier key with the + # meta-property of meta-key, so that it can be distinguished from + # multibyte characters with the 8th bit turned on. + # + # GNU Readline will wait for the 2nd character with "keyseq-timeout" + # milli-seconds but wait forever after 3rd characters. + # + # source://reline//lib/reline.rb#396 + def read_io(keyseq_timeout, &block); end +end + +# source://reline//lib/reline.rb#50 +Reline::Core::ATTR_READER_NAMES = T.let(T.unsafe(nil), Array) + +# source://reline//lib/reline.rb#269 +Reline::DEFAULT_DIALOG_CONTEXT = T.let(T.unsafe(nil), Array) + +# source://reline//lib/reline.rb#222 +Reline::DEFAULT_DIALOG_PROC_AUTOCOMPLETE = T.let(T.unsafe(nil), Proc) + +# NOTE: For making compatible with the rb-readline gem +# +# source://reline//lib/reline.rb#14 +Reline::FILENAME_COMPLETION_PROC = T.let(T.unsafe(nil), T.untyped) + +# source://reline//lib/reline/general_io.rb#3 +class Reline::GeneralIO + class << self + # source://reline//lib/reline/general_io.rb#88 + def clear_screen; end + + # source://reline//lib/reline/general_io.rb#63 + def cursor_pos; end + + # source://reline//lib/reline/general_io.rb#114 + def deprep(otio); end + + # source://reline//lib/reline/general_io.rb#13 + def encoding; end + + # source://reline//lib/reline/general_io.rb#82 + def erase_after_cursor; end + + # source://reline//lib/reline/general_io.rb#107 + def finish_pasting; end + + # source://reline//lib/reline/general_io.rb#59 + def get_screen_size; end + + # source://reline//lib/reline/general_io.rb#41 + def getc(_timeout_second); end + + # source://reline//lib/reline/general_io.rb#67 + def hide_cursor; end + + # @return [Boolean] + # + # source://reline//lib/reline/general_io.rb#99 + def in_pasting?; end + + # source://reline//lib/reline/general_io.rb#33 + def input=(val); end + + # source://reline//lib/reline/general_io.rb#73 + def move_cursor_column(val); end + + # source://reline//lib/reline/general_io.rb#79 + def move_cursor_down(val); end + + # source://reline//lib/reline/general_io.rb#76 + def move_cursor_up(val); end + + # source://reline//lib/reline/general_io.rb#111 + def prep; end + + # source://reline//lib/reline/general_io.rb#4 + def reset(encoding: T.unsafe(nil)); end + + # source://reline//lib/reline/general_io.rb#85 + def scroll_down(val); end + + # source://reline//lib/reline/general_io.rb#27 + def set_default_key_bindings(_); end + + # source://reline//lib/reline/general_io.rb#91 + def set_screen_size(rows, columns); end + + # source://reline//lib/reline/general_io.rb#94 + def set_winch_handler(&handler); end + + # source://reline//lib/reline/general_io.rb#70 + def show_cursor; end + + # source://reline//lib/reline/general_io.rb#103 + def start_pasting; end + + # source://reline//lib/reline/general_io.rb#55 + def ungetc(c); end + + # @return [Boolean] + # + # source://reline//lib/reline/general_io.rb#23 + def win?; end + + # source://reline//lib/reline/general_io.rb#37 + def with_raw_input; end + end +end + +# source://reline//lib/reline.rb#609 +Reline::HISTORY = T.let(T.unsafe(nil), Reline::History) + +# source://reline//lib/reline/history.rb#1 +class Reline::History < ::Array + # @return [History] a new instance of History + # + # source://reline//lib/reline/history.rb#2 + def initialize(config); end + + # source://reline//lib/reline/history.rb#52 + def <<(val); end + + # source://reline//lib/reline/history.rb#15 + def [](index); end + + # source://reline//lib/reline/history.rb#20 + def []=(index, val); end + + # source://reline//lib/reline/history.rb#25 + def concat(*val); end + + # source://reline//lib/reline/history.rb#10 + def delete_at(index); end + + # source://reline//lib/reline/history.rb#31 + def push(*val); end + + # source://reline//lib/reline/history.rb#6 + def to_s; end + + private + + # @raise [IndexError] + # + # source://reline//lib/reline/history.rb#62 + def check_index(index); end +end + +# source://reline//lib/reline.rb#602 +Reline::IOGate = Reline::ANSI + +# source://reline//lib/reline.rb#19 +class Reline::Key < ::Struct + # @return [Boolean] + # + # source://reline//lib/reline.rb#20 + 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#20 + def match?(other); end + + # Returns the value of attribute with_meta + # + # @return [Object] the current value of with_meta + def with_meta; end + + # Sets the attribute with_meta + # + # @param value [Object] the value to set the attribute with_meta to. + # @return [Object] the newly set value + def with_meta=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://reline//lib/reline/key_actor/base.rb#1 +class Reline::KeyActor::Base + # @return [Base] a new instance of Base + # + # source://reline//lib/reline/key_actor/base.rb#8 + def initialize; end + + # source://reline//lib/reline/key_actor/base.rb#12 + def default_key_bindings; end + + # source://reline//lib/reline/key_actor/base.rb#4 + def get_method(key); end + + # source://reline//lib/reline/key_actor/base.rb#16 + def reset_default_key_bindings; end +end + +# source://reline//lib/reline/key_actor/base.rb#2 +Reline::KeyActor::Base::MAPPING = T.let(T.unsafe(nil), Array) + +# source://reline//lib/reline/key_actor/emacs.rb#2 +Reline::KeyActor::Emacs::MAPPING = T.let(T.unsafe(nil), Array) + +# source://reline//lib/reline/key_actor/vi_command.rb#2 +Reline::KeyActor::ViCommand::MAPPING = T.let(T.unsafe(nil), Array) + +# source://reline//lib/reline/key_actor/vi_insert.rb#2 +Reline::KeyActor::ViInsert::MAPPING = T.let(T.unsafe(nil), Array) + +# source://reline//lib/reline/key_stroke.rb#1 +class Reline::KeyStroke + # @return [KeyStroke] a new instance of KeyStroke + # + # source://reline//lib/reline/key_stroke.rb#6 + def initialize(config); end + + # source://reline//lib/reline/key_stroke.rb#10 + def compress_meta_key(ary); end + + # @return [Boolean] + # + # source://reline//lib/reline/key_stroke.rb#46 + def equal?(me, other); end + + # source://reline//lib/reline/key_stroke.rb#87 + def expand(input); end + + # source://reline//lib/reline/key_stroke.rb#71 + def match_status(input); end + + # @return [Boolean] + # + # source://reline//lib/reline/key_stroke.rb#22 + def start_with?(me, other); end + + private + + # source://reline//lib/reline/key_stroke.rb#145 + def key_mapping; end + + # returns match status of CSI/SS3 sequence and matched length + # + # source://reline//lib/reline/key_stroke.rb#116 + def match_unknown_escape_sequence(input); end +end + +# source://reline//lib/reline/key_stroke.rb#4 +Reline::KeyStroke::CSI_INTERMEDIATE_BYTES_RANGE = T.let(T.unsafe(nil), Range) + +# source://reline//lib/reline/key_stroke.rb#3 +Reline::KeyStroke::CSI_PARAMETER_BYTES_RANGE = T.let(T.unsafe(nil), Range) + +# source://reline//lib/reline/key_stroke.rb#2 +Reline::KeyStroke::ESC_BYTE = T.let(T.unsafe(nil), Integer) + +# source://reline//lib/reline/kill_ring.rb#1 +class Reline::KillRing + include ::Enumerable + + # @return [KillRing] a new instance of KillRing + # + # source://reline//lib/reline/kill_ring.rb#61 + def initialize(max = T.unsafe(nil)); end + + # source://reline//lib/reline/kill_ring.rb#68 + def append(string, before_p = T.unsafe(nil)); end + + # source://reline//lib/reline/kill_ring.rb#116 + def each; end + + # source://reline//lib/reline/kill_ring.rb#83 + def process; end + + # source://reline//lib/reline/kill_ring.rb#96 + def yank; end + + # source://reline//lib/reline/kill_ring.rb#106 + def yank_pop; end +end + +# source://reline//lib/reline/kill_ring.rb#21 +class Reline::KillRing::RingBuffer + # @return [RingBuffer] a new instance of RingBuffer + # + # source://reline//lib/reline/kill_ring.rb#25 + def initialize(max = T.unsafe(nil)); end + + # source://reline//lib/reline/kill_ring.rb#31 + def <<(point); end + + # @return [Boolean] + # + # source://reline//lib/reline/kill_ring.rb#56 + def empty?; end + + # Returns the value of attribute head. + # + # source://reline//lib/reline/kill_ring.rb#23 + def head; end + + # Returns the value of attribute size. + # + # source://reline//lib/reline/kill_ring.rb#22 + def size; end +end + +# source://reline//lib/reline/kill_ring.rb#11 +class Reline::KillRing::RingPoint < ::Struct + # @return [RingPoint] a new instance of RingPoint + # + # source://reline//lib/reline/kill_ring.rb#12 + def initialize(str); end + + # source://reline//lib/reline/kill_ring.rb#16 + def ==(other); end +end + +# source://reline//lib/reline/kill_ring.rb#6 +Reline::KillRing::State::CONTINUED = T.let(T.unsafe(nil), Symbol) + +# source://reline//lib/reline/kill_ring.rb#5 +Reline::KillRing::State::FRESH = T.let(T.unsafe(nil), Symbol) + +# source://reline//lib/reline/kill_ring.rb#7 +Reline::KillRing::State::PROCESSED = T.let(T.unsafe(nil), Symbol) + +# source://reline//lib/reline/kill_ring.rb#8 +Reline::KillRing::State::YANK = T.let(T.unsafe(nil), Symbol) + +# source://reline//lib/reline/line_editor.rb#6 +class Reline::LineEditor + # @return [LineEditor] a new instance of LineEditor + # + # source://reline//lib/reline/line_editor.rb#57 + def initialize(config, encoding); end + + # source://reline//lib/reline/line_editor.rb#639 + def add_dialog_proc(name, p, context = T.unsafe(nil)); end + + # Returns the value of attribute auto_indent_proc. + # + # source://reline//lib/reline/line_editor.rb#16 + def auto_indent_proc; end + + # Sets the attribute auto_indent_proc + # + # @param value the value to set the attribute auto_indent_proc to. + # + # source://reline//lib/reline/line_editor.rb#16 + def auto_indent_proc=(_arg0); end + + # Returns the value of attribute byte_pointer. + # + # source://reline//lib/reline/line_editor.rb#10 + def byte_pointer; end + + # source://reline//lib/reline/line_editor.rb#1842 + def byte_pointer=(val); end + + # source://reline//lib/reline/line_editor.rb#1613 + def call_completion_proc; end + + # source://reline//lib/reline/line_editor.rb#1621 + def call_completion_proc_with_checking_args(pre, target, post); end + + # Returns the value of attribute completion_append_character. + # + # source://reline//lib/reline/line_editor.rb#13 + def completion_append_character; end + + # Sets the attribute completion_append_character + # + # @param value the value to set the attribute completion_append_character to. + # + # source://reline//lib/reline/line_editor.rb#13 + def completion_append_character=(_arg0); end + + # Returns the value of attribute completion_proc. + # + # source://reline//lib/reline/line_editor.rb#12 + def completion_proc; end + + # Sets the attribute completion_proc + # + # @param value the value to set the attribute completion_proc to. + # + # source://reline//lib/reline/line_editor.rb#12 + def completion_proc=(_arg0); end + + # source://reline//lib/reline/line_editor.rb#1760 + def confirm_multiline_termination; end + + # Returns the value of attribute confirm_multiline_termination_proc. + # + # source://reline//lib/reline/line_editor.rb#11 + def confirm_multiline_termination_proc; end + + # Sets the attribute confirm_multiline_termination_proc + # + # @param value the value to set the attribute confirm_multiline_termination_proc to. + # + # source://reline//lib/reline/line_editor.rb#11 + def confirm_multiline_termination_proc=(_arg0); end + + # source://reline//lib/reline/line_editor.rb#1782 + def delete_text(start = T.unsafe(nil), length = T.unsafe(nil)); end + + # Returns the value of attribute dig_perfect_match_proc. + # + # source://reline//lib/reline/line_editor.rb#18 + def dig_perfect_match_proc; end + + # Sets the attribute dig_perfect_match_proc + # + # @param value the value to set the attribute dig_perfect_match_proc to. + # + # source://reline//lib/reline/line_editor.rb#18 + def dig_perfect_match_proc=(_arg0); end + + # source://reline//lib/reline/line_editor.rb#1229 + def editing_mode; end + + # @return [Boolean] + # + # source://reline//lib/reline/line_editor.rb#252 + def eof?; end + + # source://reline//lib/reline/line_editor.rb#248 + def finalize; end + + # source://reline//lib/reline/line_editor.rb#1868 + def finish; end + + # @return [Boolean] + # + # source://reline//lib/reline/line_editor.rb#1864 + def finished?; end + + # source://reline//lib/reline/line_editor.rb#1538 + def input_key(key); end + + # source://reline//lib/reline/line_editor.rb#1770 + def insert_text(text); end + + # source://reline//lib/reline/line_editor.rb#63 + def io_gate; end + + # source://reline//lib/reline/line_editor.rb#935 + def just_move_cursor; end + + # TODO: undo + # TODO: Use "private alias_method" idiom after drop Ruby 2.5. + # + # source://reline//lib/reline/line_editor.rb#9 + def line; end + + # source://reline//lib/reline/line_editor.rb#318 + def multiline_off; end + + # source://reline//lib/reline/line_editor.rb#314 + def multiline_on; end + + # Sets the attribute output + # + # @param value the value to set the attribute output to. + # + # source://reline//lib/reline/line_editor.rb#19 + def output=(_arg0); end + + # Returns the value of attribute output_modifier_proc. + # + # source://reline//lib/reline/line_editor.rb#14 + def output_modifier_proc; end + + # Sets the attribute output_modifier_proc + # + # @param value the value to set the attribute output_modifier_proc to. + # + # source://reline//lib/reline/line_editor.rb#14 + def output_modifier_proc=(_arg0); end + + # Returns the value of attribute pre_input_hook. + # + # source://reline//lib/reline/line_editor.rb#17 + def pre_input_hook; end + + # Sets the attribute pre_input_hook + # + # @param value the value to set the attribute pre_input_hook to. + # + # source://reline//lib/reline/line_editor.rb#17 + def pre_input_hook=(_arg0); end + + # Returns the value of attribute prompt_proc. + # + # source://reline//lib/reline/line_editor.rb#15 + def prompt_proc; end + + # Sets the attribute prompt_proc + # + # @param value the value to set the attribute prompt_proc to. + # + # source://reline//lib/reline/line_editor.rb#15 + def prompt_proc=(_arg0); end + + # source://reline//lib/reline/line_editor.rb#426 + def rerender; end + + # source://reline//lib/reline/line_editor.rb#420 + def rerender_all; end + + # source://reline//lib/reline/line_editor.rb#154 + def reset(prompt = T.unsafe(nil), encoding:); end + + # source://reline//lib/reline/line_editor.rb#296 + def reset_line; end + + # source://reline//lib/reline/line_editor.rb#256 + def reset_variables(prompt = T.unsafe(nil), encoding:); end + + # source://reline//lib/reline/line_editor.rb#185 + def resize; end + + # source://reline//lib/reline/line_editor.rb#1682 + def retrieve_completion_block(set_completion_quote_character = T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#67 + def set_pasting_state(in_pasting); end + + # source://reline//lib/reline/line_editor.rb#225 + def set_signal_handlers; end + + # @return [Boolean] + # + # source://reline//lib/reline/line_editor.rb#71 + def simplified_rendering?; end + + # source://reline//lib/reline/line_editor.rb#1856 + def whole_buffer; end + + # source://reline//lib/reline/line_editor.rb#1849 + def whole_lines; end + + # source://reline//lib/reline/line_editor.rb#1421 + 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#1411 + def argumentable?(method_obj); end + + # source://reline//lib/reline/line_editor.rb#2033 + def backward_char(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2523 + def backward_delete_char(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2701 + def backward_kill_word(key); end + + # source://reline//lib/reline/line_editor.rb#2682 + def backward_word(key); end + + # source://reline//lib/reline/line_editor.rb#2057 + def beginning_of_line(key); end + + # source://reline//lib/reline/line_editor.rb#1880 + def byteinsert(str, byte_pointer, other); end + + # source://reline//lib/reline/line_editor.rb#1874 + def byteslice!(str, byte_pointer, size); end + + # source://reline//lib/reline/line_editor.rb#322 + def calculate_height_by_lines(lines, prompt); end + + # source://reline//lib/reline/line_editor.rb#340 + def calculate_height_by_width(width); end + + # source://reline//lib/reline/line_editor.rb#378 + def calculate_nearest_cursor(line_to_calc = T.unsafe(nil), cursor = T.unsafe(nil), started_from = T.unsafe(nil), byte_pointer = T.unsafe(nil), update = T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#878 + def calculate_scroll_partial_screen(highest_in_all, cursor_y); end + + # source://reline//lib/reline/line_editor.rb#1887 + def calculate_width(str, allow_escape_code = T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2748 + def capitalize_word(key); end + + # source://reline//lib/reline/line_editor.rb#81 + def check_mode_string; end + + # source://reline//lib/reline/line_editor.rb#101 + def check_multiline_prompt(buffer, force_recalc: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#862 + def clear_dialog(cursor_column); end + + # source://reline//lib/reline/line_editor.rb#871 + def clear_dialog_with_trap_key(cursor_column); end + + # source://reline//lib/reline/line_editor.rb#2668 + def clear_screen(key); end + + # source://reline//lib/reline/line_editor.rb#1208 + def clear_screen_buffer(prompt, prompt_list, prompt_width); end + + # source://reline//lib/reline/line_editor.rb#1283 + def complete(list, just_show_list = T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#1237 + def complete_internal_proc(list, is_menu); end + + # source://reline//lib/reline/line_editor.rb#2804 + def copy_for_vi(text); end + + # source://reline//lib/reline/line_editor.rb#2600 + def delete_char(key); end + + # source://reline//lib/reline/line_editor.rb#2627 + def delete_char_or_list(key); end + + # source://reline//lib/reline/line_editor.rb#671 + def dialog_range(dialog, dialog_y); end + + # source://reline//lib/reline/line_editor.rb#2760 + def downcase_word(key); end + + # source://reline//lib/reline/line_editor.rb#3103 + def ed_argument_digit(key); end + + # source://reline//lib/reline/line_editor.rb#2668 + def ed_clear_screen(key); end + + # source://reline//lib/reline/line_editor.rb#3015 + def ed_delete_next_char(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2933 + def ed_delete_prev_char(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2701 + def ed_delete_prev_word(key); end + + # Editline:: +ed-insert+ (vi input: almost all; emacs: printable characters) + # In insert mode, insert the input character left of the cursor + # position. In replace mode, overwrite the character at the + # cursor and move the cursor to the right by one character + # position. Accept an argument to do this repeatedly. It is an + # error if the input character is the NUL character (+Ctrl-@+). + # Failure to enlarge the edit buffer also results in an error. + # Editline:: +ed-digit+ (emacs: 0 to 9) If in argument input mode, append + # the input digit to the argument being read. Otherwise, call + # +ed-insert+. It is an error if the input character is not a + # digit or if the existing argument is already greater than a + # million. + # GNU Readline:: +self-insert+ (a, b, A, 1, !, …) Insert yourself. + # + # source://reline//lib/reline/line_editor.rb#1944 + def ed_digit(key); end + + # Editline:: +ed-insert+ (vi input: almost all; emacs: printable characters) + # In insert mode, insert the input character left of the cursor + # position. In replace mode, overwrite the character at the + # cursor and move the cursor to the right by one character + # position. Accept an argument to do this repeatedly. It is an + # error if the input character is the NUL character (+Ctrl-@+). + # Failure to enlarge the edit buffer also results in an error. + # Editline:: +ed-digit+ (emacs: 0 to 9) If in argument input mode, append + # the input digit to the argument being read. Otherwise, call + # +ed-insert+. It is an error if the input character is not a + # digit or if the existing argument is already greater than a + # million. + # GNU Readline:: +self-insert+ (a, b, A, 1, !, …) Insert yourself. + # + # source://reline//lib/reline/line_editor.rb#1944 + def ed_insert(key); end + + # Editline:: +ed-kill-line+ (vi command: +D+, +Ctrl-K+; emacs: +Ctrl-K+, + # +Ctrl-U+) + Kill from the cursor to the end of the line. + # GNU Readline:: +kill-line+ (+C-k+) Kill the text from point to the end of + # the line. With a negative numeric argument, kill backward + # from the cursor to the beginning of the current line. + # + # source://reline//lib/reline/line_editor.rb#2551 + def ed_kill_line(key); end + + # source://reline//lib/reline/line_editor.rb#2057 + def ed_move_to_beg(key); end + + # source://reline//lib/reline/line_editor.rb#2062 + def ed_move_to_end(key); end + + # source://reline//lib/reline/line_editor.rb#2490 + def ed_newline(key); end + + # source://reline//lib/reline/line_editor.rb#2013 + def ed_next_char(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2442 + def ed_next_history(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2033 + def ed_prev_char(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2391 + def ed_prev_history(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2682 + def ed_prev_word(key); end + + # source://reline//lib/reline/line_editor.rb#1997 + def ed_quoted_insert(str, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2339 + def ed_search_next_history(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2292 + def ed_search_prev_history(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2713 + def ed_transpose_chars(key); end + + # source://reline//lib/reline/line_editor.rb#2733 + def ed_transpose_words(key); end + + # do nothing + # + # source://reline//lib/reline/line_editor.rb#1914 + def ed_unassigned(key); end + + # source://reline//lib/reline/line_editor.rb#2748 + def em_capitol_case(key); end + + # source://reline//lib/reline/line_editor.rb#2600 + def em_delete(key); end + + # source://reline//lib/reline/line_editor.rb#2691 + def em_delete_next_word(key); end + + # source://reline//lib/reline/line_editor.rb#2627 + def em_delete_or_list(key); end + + # source://reline//lib/reline/line_editor.rb#2523 + def em_delete_prev_char(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#3287 + def em_exchange_mark(key); end + + # Editline:: +em-kill-line+ (not bound) Delete the entire contents of the + # edit buffer and save it to the cut buffer. +vi-kill-line-prev+ + # GNU Readline:: +kill-whole-line+ (not bound) Kill all characters on the + # current line, no matter where point is. + # + # source://reline//lib/reline/line_editor.rb#2589 + def em_kill_line(key); end + + # source://reline//lib/reline/line_editor.rb#2792 + def em_kill_region(key); end + + # source://reline//lib/reline/line_editor.rb#2760 + def em_lower_case(key); end + + # source://reline//lib/reline/line_editor.rb#3298 + def em_meta_next(key); end + + # source://reline//lib/reline/line_editor.rb#2673 + def em_next_word(key); end + + # source://reline//lib/reline/line_editor.rb#3282 + def em_set_mark(key); end + + # source://reline//lib/reline/line_editor.rb#2776 + def em_upper_case(key); end + + # source://reline//lib/reline/line_editor.rb#2639 + def em_yank(key); end + + # source://reline//lib/reline/line_editor.rb#2651 + def em_yank_pop(key); end + + # source://reline//lib/reline/line_editor.rb#2062 + def end_of_line(key); end + + # source://reline//lib/reline/line_editor.rb#3287 + def exchange_point_and_mark(key); end + + # source://reline//lib/reline/line_editor.rb#2013 + def forward_char(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2287 + def forward_search_history(key); end + + # source://reline//lib/reline/line_editor.rb#2673 + def forward_word(key); end + + # source://reline//lib/reline/line_editor.rb#2077 + def generate_searcher; end + + # source://reline//lib/reline/line_editor.rb#2292 + def history_search_backward(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2339 + def history_search_forward(key, arg: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://reline//lib/reline/line_editor.rb#1415 + def inclusive?(method_obj); end + + # source://reline//lib/reline/line_editor.rb#2195 + def incremental_search_history(key); end + + # source://reline//lib/reline/line_editor.rb#332 + def insert_new_line(cursor_line, next_line); end + + # source://reline//lib/reline/line_editor.rb#1891 + def key_delete(key); end + + # source://reline//lib/reline/line_editor.rb#1899 + def key_newline(key); end + + # Editline:: +ed-kill-line+ (vi command: +D+, +Ctrl-K+; emacs: +Ctrl-K+, + # +Ctrl-U+) + Kill from the cursor to the end of the line. + # GNU Readline:: +kill-line+ (+C-k+) Kill the text from point to the end of + # the line. With a negative numeric argument, kill backward + # from the cursor to the beginning of the current line. + # + # source://reline//lib/reline/line_editor.rb#2551 + def kill_line(key); end + + # Editline:: +em-kill-line+ (not bound) Delete the entire contents of the + # edit buffer and save it to the cut buffer. +vi-kill-line-prev+ + # GNU Readline:: +kill-whole-line+ (not bound) Kill all characters on the + # current line, no matter where point is. + # + # source://reline//lib/reline/line_editor.rb#2589 + def kill_whole_line(key); end + + # source://reline//lib/reline/line_editor.rb#2691 + def kill_word(key); end + + # source://reline//lib/reline/line_editor.rb#1233 + def menu(target, list); end + + # source://reline//lib/reline/line_editor.rb#1185 + def modify_lines(before, force_recalc: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#1327 + def move_completed_list(list, direction); end + + # source://reline//lib/reline/line_editor.rb#368 + def move_cursor_down(val); end + + # source://reline//lib/reline/line_editor.rb#359 + def move_cursor_up(val); end + + # source://reline//lib/reline/line_editor.rb#2442 + def next_history(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#1498 + def normal_char(key); end + + # source://reline//lib/reline/line_editor.rb#658 + def padding_space_with_escape_sequences(str, width); end + + # source://reline//lib/reline/line_editor.rb#2391 + def previous_history(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#1643 + def process_auto_indent; end + + # source://reline//lib/reline/line_editor.rb#1916 + def process_insert(force: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#1441 + def process_key(key, method_symbol); end + + # source://reline//lib/reline/line_editor.rb#1997 + def quoted_insert(str, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#665 + def range_subtract(base_ranges, subtract_ranges); end + + # source://reline//lib/reline/line_editor.rb#649 + def render_dialog(cursor_column); end + + # source://reline//lib/reline/line_editor.rb#677 + def render_dialog_changes(changes, cursor_column); end + + # source://reline//lib/reline/line_editor.rb#1088 + 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#1062 + def render_whole_lines(lines, prompt, prompt_width); end + + # source://reline//lib/reline/line_editor.rb#911 + def rerender_added_newline(prompt, prompt_width, prompt_list); end + + # source://reline//lib/reline/line_editor.rb#1007 + def rerender_all_lines; end + + # source://reline//lib/reline/line_editor.rb#963 + def rerender_changed_current_line; end + + # source://reline//lib/reline/line_editor.rb#2282 + def reverse_search_history(key); end + + # source://reline//lib/reline/line_editor.rb#1373 + def run_for_operators(key, method_symbol, &block); end + + # source://reline//lib/reline/line_editor.rb#348 + def scroll_down(val); end + + # source://reline//lib/reline/line_editor.rb#3171 + def search_next_char(key, arg, need_prev_char: T.unsafe(nil), inclusive: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#3228 + def search_prev_char(key, arg, need_next_char = T.unsafe(nil)); end + + # Editline:: +ed-insert+ (vi input: almost all; emacs: printable characters) + # In insert mode, insert the input character left of the cursor + # position. In replace mode, overwrite the character at the + # cursor and move the cursor to the right by one character + # position. Accept an argument to do this repeatedly. It is an + # error if the input character is the NUL character (+Ctrl-@+). + # Failure to enlarge the edit buffer also results in an error. + # Editline:: +ed-digit+ (emacs: 0 to 9) If in argument input mode, append + # the input digit to the argument being read. Otherwise, call + # +ed-insert+. It is an error if the input character is not a + # digit or if the existing argument is already greater than a + # million. + # GNU Readline:: +self-insert+ (a, b, A, 1, !, …) Insert yourself. + # + # source://reline//lib/reline/line_editor.rb#1944 + def self_insert(key); end + + # source://reline//lib/reline/line_editor.rb#3282 + def set_mark(key); end + + # source://reline//lib/reline/line_editor.rb#1195 + def show_menu; end + + # source://reline//lib/reline/line_editor.rb#344 + def split_by_width(str, max_width); end + + # source://reline//lib/reline/line_editor.rb#2713 + def transpose_chars(key); end + + # source://reline//lib/reline/line_editor.rb#2733 + def transpose_words(key); end + + # Editline:: +vi-kill-line-prev+ (vi: +Ctrl-U+) Delete the string from the + # beginning of the edit buffer to the cursor and save it to the + # cut buffer. + # GNU Readline:: +unix-line-discard+ (+C-u+) Kill backward from the cursor + # to the beginning of the current line. + # + # source://reline//lib/reline/line_editor.rb#2574 + def unix_line_discard(key); end + + # source://reline//lib/reline/line_editor.rb#2792 + def unix_word_rubout(key); end + + # source://reline//lib/reline/line_editor.rb#2776 + def upcase_word(key); end + + # source://reline//lib/reline/line_editor.rb#769 + def update_each_dialog(dialog, cursor_column); end + + # source://reline//lib/reline/line_editor.rb#2814 + def vi_add(key); end + + # source://reline//lib/reline/line_editor.rb#2928 + def vi_add_at_eol(key); end + + # source://reline//lib/reline/line_editor.rb#2954 + def vi_change_meta(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2819 + def vi_command_mode(key); end + + # source://reline//lib/reline/line_editor.rb#2972 + def vi_delete_meta(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2903 + def vi_delete_prev_char(key); end + + # source://reline//lib/reline/line_editor.rb#2884 + def vi_end_big_word(key, arg: T.unsafe(nil), inclusive: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2999 + def vi_end_of_transmission(key); end + + # source://reline//lib/reline/line_editor.rb#2845 + def vi_end_word(key, arg: T.unsafe(nil), inclusive: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2999 + def vi_eof_maybe(key); end + + # source://reline//lib/reline/line_editor.rb#2053 + def vi_first_print(key); end + + # source://reline//lib/reline/line_editor.rb#3057 + def vi_histedit(key); end + + # source://reline//lib/reline/line_editor.rb#2810 + def vi_insert(key); end + + # source://reline//lib/reline/line_editor.rb#2923 + def vi_insert_at_bol(key); end + + # source://reline//lib/reline/line_editor.rb#3268 + def vi_join_lines(key, arg: T.unsafe(nil)); end + + # Editline:: +vi-kill-line-prev+ (vi: +Ctrl-U+) Delete the string from the + # beginning of the edit buffer to the cursor and save it to the + # cut buffer. + # GNU Readline:: +unix-line-discard+ (+C-u+) Kill backward from the cursor + # to the beginning of the current line. + # + # source://reline//lib/reline/line_editor.rb#2574 + def vi_kill_line_prev(key); end + + # source://reline//lib/reline/line_editor.rb#2999 + def vi_list_or_eof(key); end + + # source://reline//lib/reline/line_editor.rb#2819 + def vi_movement_mode(key); end + + # source://reline//lib/reline/line_editor.rb#2864 + def vi_next_big_word(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#3163 + def vi_next_char(key, arg: T.unsafe(nil), inclusive: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2825 + def vi_next_word(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#3091 + def vi_paste_next(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#3079 + def vi_paste_prev(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2874 + def vi_prev_big_word(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#3220 + def vi_prev_char(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2835 + def vi_prev_word(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#3135 + def vi_replace_char(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2287 + def vi_search_next(key); end + + # source://reline//lib/reline/line_editor.rb#2282 + def vi_search_prev(key); end + + # source://reline//lib/reline/line_editor.rb#3120 + def vi_to_column(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#3034 + def vi_to_history_line(key); end + + # source://reline//lib/reline/line_editor.rb#3167 + def vi_to_next_char(key, arg: T.unsafe(nil), inclusive: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#3224 + def vi_to_prev_char(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2987 + def vi_yank(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2949 + def vi_zero(key); end + + # source://reline//lib/reline/line_editor.rb#2639 + def yank(key); end + + # source://reline//lib/reline/line_editor.rb#2651 + def yank_pop(key); end +end + +# source://reline//lib/reline/line_editor.rb#51 +class Reline::LineEditor::CompletionJourneyData < ::Struct + # Returns the value of attribute list + # + # @return [Object] the current value of list + def list; end + + # Sets the attribute list + # + # @param value [Object] the value to set the attribute list to. + # @return [Object] the newly set value + def list=(_); end + + # Returns the value of attribute pointer + # + # @return [Object] the current value of pointer + def pointer; end + + # Sets the attribute pointer + # + # @param value [Object] the value to set the attribute pointer to. + # @return [Object] the newly set value + def pointer=(_); end + + # Returns the value of attribute postposing + # + # @return [Object] the current value of postposing + def postposing; end + + # Sets the attribute postposing + # + # @param value [Object] the value to set the attribute postposing to. + # @return [Object] the newly set value + def postposing=(_); end + + # Returns the value of attribute preposing + # + # @return [Object] the current value of preposing + def preposing; end + + # Sets the attribute preposing + # + # @param value [Object] the value to set the attribute preposing to. + # @return [Object] the newly set value + def preposing=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://reline//lib/reline/line_editor.rb#44 +Reline::LineEditor::CompletionState::COMPLETION = T.let(T.unsafe(nil), Symbol) + +# source://reline//lib/reline/line_editor.rb#46 +Reline::LineEditor::CompletionState::JOURNEY = T.let(T.unsafe(nil), Symbol) + +# source://reline//lib/reline/line_editor.rb#45 +Reline::LineEditor::CompletionState::MENU = T.let(T.unsafe(nil), Symbol) + +# source://reline//lib/reline/line_editor.rb#47 +Reline::LineEditor::CompletionState::MENU_WITH_PERFECT_MATCH = T.let(T.unsafe(nil), Symbol) + +# source://reline//lib/reline/line_editor.rb#43 +Reline::LineEditor::CompletionState::NORMAL = T.let(T.unsafe(nil), Symbol) + +# source://reline//lib/reline/line_editor.rb#48 +Reline::LineEditor::CompletionState::PERFECT_MATCH = T.let(T.unsafe(nil), Symbol) + +# source://reline//lib/reline/line_editor.rb#648 +Reline::LineEditor::DIALOG_DEFAULT_HEIGHT = T.let(T.unsafe(nil), Integer) + +# source://reline//lib/reline/line_editor.rb#592 +class Reline::LineEditor::Dialog + # @return [Dialog] a new instance of Dialog + # + # source://reline//lib/reline/line_editor.rb#596 + def initialize(name, config, proc_scope); end + + # source://reline//lib/reline/line_editor.rb#620 + def call(key); end + + # Returns the value of attribute column. + # + # source://reline//lib/reline/line_editor.rb#594 + def column; end + + # Sets the attribute column + # + # @param value the value to set the attribute column to. + # + # source://reline//lib/reline/line_editor.rb#594 + def column=(_arg0); end + + # Returns the value of attribute contents. + # + # source://reline//lib/reline/line_editor.rb#593 + def contents; end + + # source://reline//lib/reline/line_editor.rb#613 + def contents=(contents); end + + # Returns the value of attribute name. + # + # source://reline//lib/reline/line_editor.rb#593 + def name; end + + # Returns the value of attribute pointer. + # + # source://reline//lib/reline/line_editor.rb#594 + def pointer; end + + # Sets the attribute pointer + # + # @param value the value to set the attribute pointer to. + # + # source://reline//lib/reline/line_editor.rb#594 + def pointer=(_arg0); end + + # Returns the value of attribute scroll_top. + # + # source://reline//lib/reline/line_editor.rb#594 + def scroll_top; end + + # Sets the attribute scroll_top + # + # @param value the value to set the attribute scroll_top to. + # + # source://reline//lib/reline/line_editor.rb#594 + def scroll_top=(_arg0); end + + # source://reline//lib/reline/line_editor.rb#605 + def set_cursor_pos(col, row); end + + # Returns the value of attribute trap_key. + # + # source://reline//lib/reline/line_editor.rb#594 + def trap_key; end + + # Sets the attribute trap_key + # + # @param value the value to set the attribute trap_key to. + # + # source://reline//lib/reline/line_editor.rb#594 + def trap_key=(_arg0); end + + # Returns the value of attribute vertical_offset. + # + # source://reline//lib/reline/line_editor.rb#594 + def vertical_offset; end + + # Sets the attribute vertical_offset + # + # @param value the value to set the attribute vertical_offset to. + # + # source://reline//lib/reline/line_editor.rb#594 + def vertical_offset=(_arg0); end + + # Returns the value of attribute width. + # + # source://reline//lib/reline/line_editor.rb#593 + def width; end + + # source://reline//lib/reline/line_editor.rb#609 + def width=(v); end +end + +# source://reline//lib/reline/line_editor.rb#515 +class Reline::LineEditor::DialogProcScope + # @return [DialogProcScope] a new instance of DialogProcScope + # + # source://reline//lib/reline/line_editor.rb#516 + def initialize(line_editor, config, proc_to_exec, context); end + + # source://reline//lib/reline/line_editor.rb#587 + def call; end + + # source://reline//lib/reline/line_editor.rb#532 + def call_completion_proc_with_checking_args(pre, target, post); end + + # source://reline//lib/reline/line_editor.rb#579 + def completion_journey_data; end + + # source://reline//lib/reline/line_editor.rb#583 + def config; end + + # source://reline//lib/reline/line_editor.rb#524 + def context; end + + # source://reline//lib/reline/line_editor.rb#557 + def cursor_pos; end + + # source://reline//lib/reline/line_editor.rb#540 + def dialog; end + + # source://reline//lib/reline/line_editor.rb#561 + def just_cursor_moving; end + + # source://reline//lib/reline/line_editor.rb#553 + def key; end + + # source://reline//lib/reline/line_editor.rb#573 + def preferred_dialog_height; end + + # source://reline//lib/reline/line_editor.rb#528 + def retrieve_completion_block(set_completion_quote_character = T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#569 + def screen_height; end + + # source://reline//lib/reline/line_editor.rb#565 + def screen_width; end + + # source://reline//lib/reline/line_editor.rb#544 + def set_cursor_pos(col, row); end + + # source://reline//lib/reline/line_editor.rb#536 + def set_dialog(dialog); end + + # source://reline//lib/reline/line_editor.rb#549 + def set_key(key); end +end + +# source://reline//lib/reline/line_editor.rb#55 +Reline::LineEditor::MINIMUM_SCROLLBAR_HEIGHT = T.let(T.unsafe(nil), Integer) + +# source://reline//lib/reline/line_editor.rb#52 +class Reline::LineEditor::MenuInfo < ::Struct + # Returns the value of attribute list + # + # @return [Object] the current value of list + def list; end + + # Sets the attribute list + # + # @param value [Object] the value to set the attribute list to. + # @return [Object] the newly set value + def list=(_); end + + # Returns the value of attribute target + # + # @return [Object] the current value of target + def target; end + + # Sets the attribute target + # + # @param value [Object] the value to set the attribute target to. + # @return [Object] the newly set value + def target=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://reline//lib/reline/line_editor.rb#54 +Reline::LineEditor::PROMPT_LIST_CACHE_TIMEOUT = T.let(T.unsafe(nil), Float) + +# source://reline//lib/reline/line_editor.rb#21 +Reline::LineEditor::VI_MOTIONS = T.let(T.unsafe(nil), Array) + +# source://reline//lib/reline/terminfo.rb#12 +module Reline::Terminfo + extend ::Fiddle + extend ::Fiddle::CParser + extend ::Fiddle::Importer + + class << self + # source://reline//lib/reline/terminfo.rb#32 + def curses_dl; end + + # source://reline//lib/reline/terminfo.rb#17 + def curses_dl_files; end + + # @return [Boolean] + # + # source://reline//lib/reline/terminfo.rb#151 + def enabled?; end + + # source://reline//lib/reline/terminfo.rb#80 + def setupterm(term, fildes); end + + # @raise [TerminfoError] + # + # source://reline//lib/reline/terminfo.rb#127 + def tigetflag(capname); end + + # @raise [TerminfoError] + # + # source://reline//lib/reline/terminfo.rb#139 + def tigetnum(capname); end + + # @raise [TerminfoError] + # + # source://reline//lib/reline/terminfo.rb#109 + def tigetstr(capname); end + + # source://reline//lib/reline/terminfo.rb#119 + def tiparm(str, *args); end + end +end + +# source://reline//lib/reline/terminfo.rb#103 +class Reline::Terminfo::StringWithTiparm < ::String + # for method chain + # + # source://reline//lib/reline/terminfo.rb#104 + def tiparm(*args); end +end + +# source://reline//lib/reline.rb#15 +Reline::USERNAME_COMPLETION_PROC = T.let(T.unsafe(nil), T.untyped) + +# source://reline//lib/reline/unicode.rb#1 +class Reline::Unicode + class << self + # source://reline//lib/reline/unicode.rb#105 + def calculate_width(str, allow_escape_code = T.unsafe(nil)); end + + # source://reline//lib/reline/unicode.rb#307 + def ed_transpose_words(line, byte_pointer); end + + # source://reline//lib/reline/unicode.rb#267 + def em_backward_word(line, byte_pointer); end + + # source://reline//lib/reline/unicode.rb#287 + def em_big_backward_word(line, byte_pointer); end + + # source://reline//lib/reline/unicode.rb#218 + def em_forward_word(line, byte_pointer); end + + # source://reline//lib/reline/unicode.rb#238 + def em_forward_word_with_capitalization(line, byte_pointer); end + + # source://reline//lib/reline/unicode.rb#44 + def escape_for_print(str); end + + # source://reline//lib/reline/unicode.rb#85 + def get_mbchar_width(mbchar); end + + # source://reline//lib/reline/unicode.rb#204 + def get_next_mbchar_size(line, byte_pointer); end + + # source://reline//lib/reline/unicode.rb#209 + def get_prev_mbchar_size(line, byte_pointer); end + + # source://reline//lib/reline/unicode.rb#131 + def split_by_width(str, max_width, encoding = T.unsafe(nil)); end + + # Take a chunk of a String cut by width with escape sequences. + # + # source://reline//lib/reline/unicode.rb#175 + def take_range(str, start_col, max_width); end + + # source://reline//lib/reline/unicode.rb#596 + def vi_backward_word(line, byte_pointer); end + + # source://reline//lib/reline/unicode.rb#458 + def vi_big_backward_word(line, byte_pointer); end + + # source://reline//lib/reline/unicode.rb#428 + def vi_big_forward_end_word(line, byte_pointer); end + + # source://reline//lib/reline/unicode.rb#408 + def vi_big_forward_word(line, byte_pointer); end + + # source://reline//lib/reline/unicode.rb#628 + def vi_first_print(line); end + + # source://reline//lib/reline/unicode.rb#519 + def vi_forward_end_word(line, byte_pointer); end + + # source://reline//lib/reline/unicode.rb#478 + def vi_forward_word(line, byte_pointer, drop_terminate_spaces = T.unsafe(nil)); end + end +end + +# source://reline//lib/reline/unicode.rb#40 +Reline::Unicode::CSI_REGEXP = T.let(T.unsafe(nil), Regexp) + +# Ambiguous +# +# source://reline//lib/reline/unicode/east_asian_width.rb#158 +Reline::Unicode::EastAsianWidth::TYPE_A = T.let(T.unsafe(nil), Regexp) + +# Fullwidth +# +# source://reline//lib/reline/unicode/east_asian_width.rb#6 +Reline::Unicode::EastAsianWidth::TYPE_F = T.let(T.unsafe(nil), Regexp) + +# Halfwidth +# +# source://reline//lib/reline/unicode/east_asian_width.rb#13 +Reline::Unicode::EastAsianWidth::TYPE_H = T.let(T.unsafe(nil), Regexp) + +# Neutral +# +# source://reline//lib/reline/unicode/east_asian_width.rb#341 +Reline::Unicode::EastAsianWidth::TYPE_N = T.let(T.unsafe(nil), Regexp) + +# Narrow +# +# source://reline//lib/reline/unicode/east_asian_width.rb#147 +Reline::Unicode::EastAsianWidth::TYPE_NA = T.let(T.unsafe(nil), Regexp) + +# Wide +# +# source://reline//lib/reline/unicode/east_asian_width.rb#24 +Reline::Unicode::EastAsianWidth::TYPE_W = T.let(T.unsafe(nil), Regexp) + +# C-? C-8 +# +# source://reline//lib/reline/unicode.rb#36 +Reline::Unicode::EscapedChars = T.let(T.unsafe(nil), Array) + +# source://reline//lib/reline/unicode.rb#2 +Reline::Unicode::EscapedPairs = T.let(T.unsafe(nil), Hash) + +# source://reline//lib/reline/unicode.rb#57 +Reline::Unicode::HalfwidthDakutenHandakuten = T.let(T.unsafe(nil), Regexp) + +# source://reline//lib/reline/unicode.rb#59 +Reline::Unicode::MBCharWidthRE = T.let(T.unsafe(nil), Regexp) + +# source://reline//lib/reline/unicode.rb#39 +Reline::Unicode::NON_PRINTING_END = T.let(T.unsafe(nil), String) + +# source://reline//lib/reline/unicode.rb#38 +Reline::Unicode::NON_PRINTING_START = T.let(T.unsafe(nil), String) + +# source://reline//lib/reline/unicode.rb#41 +Reline::Unicode::OSC_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://reline//lib/reline/unicode.rb#42 +Reline::Unicode::WIDTH_SCANNER = T.let(T.unsafe(nil), Regexp) + +# source://reline//lib/reline/version.rb#2 +Reline::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/rexml@3.2.5.rbi b/sorbet/rbi/gems/rexml@3.2.6.rbi similarity index 97% rename from sorbet/rbi/gems/rexml@3.2.5.rbi rename to sorbet/rbi/gems/rexml@3.2.6.rbi index a94e56718..c8d67b58d 100644 --- a/sorbet/rbi/gems/rexml@3.2.5.rbi +++ b/sorbet/rbi/gems/rexml@3.2.6.rbi @@ -101,18 +101,18 @@ class REXML::Attribute # # @return [Attribute] a new instance of Attribute # - # source://rexml//lib/rexml/attribute.rb#45 + # source://rexml//lib/rexml/attribute.rb#42 def initialize(first, second = T.unsafe(nil), parent = T.unsafe(nil)); end # Returns true if other is an Attribute and has the same name and value, # false otherwise. # - # source://rexml//lib/rexml/attribute.rb#109 + # source://rexml//lib/rexml/attribute.rb#106 def ==(other); end # Returns a copy of this attribute # - # source://rexml//lib/rexml/attribute.rb#158 + # source://rexml//lib/rexml/attribute.rb#163 def clone; end # source://rexml//lib/rexml/attribute.rb#132 @@ -128,15 +128,15 @@ class REXML::Attribute # # Returns this attribute # - # source://rexml//lib/rexml/attribute.rb#166 + # source://rexml//lib/rexml/attribute.rb#171 def element=(element); end # Creates (and returns) a hash from both the name and value # - # source://rexml//lib/rexml/attribute.rb#114 + # source://rexml//lib/rexml/attribute.rb#111 def hash; end - # source://rexml//lib/rexml/attribute.rb#192 + # source://rexml//lib/rexml/attribute.rb#197 def inspect; end # Returns the namespace URL, if defined, or nil otherwise @@ -161,17 +161,17 @@ class REXML::Attribute # e.add_attribute("a", "b") # e.attribute("a").namespace # => "" # - # source://rexml//lib/rexml/attribute.rb#98 + # source://rexml//lib/rexml/attribute.rb#95 def namespace(arg = T.unsafe(nil)); end - # source://rexml//lib/rexml/attribute.rb#188 + # source://rexml//lib/rexml/attribute.rb#193 def node_type; end # The normalized value of this attribute. That is, the attribute with # entities intact. # - # source://rexml//lib/rexml/attribute.rb#18 - def normalized=(_arg0); end + # source://rexml//lib/rexml/attribute.rb#157 + def normalized=(new_normalized); end # Returns the namespace of the attribute. # @@ -183,14 +183,14 @@ class REXML::Attribute # a = Attribute.new( "x", "y" ) # a.prefix # -> "" # - # source://rexml//lib/rexml/attribute.rb#73 + # source://rexml//lib/rexml/attribute.rb#70 def prefix; end # Removes this Attribute from the tree, and returns true if successful # # This method is usually not called directly. # - # source://rexml//lib/rexml/attribute.rb#179 + # source://rexml//lib/rexml/attribute.rb#184 def remove; end # Returns the attribute value, with entities replaced @@ -205,21 +205,21 @@ class REXML::Attribute # b = Attribute.new( "ns:x", "y" ) # b.to_string # -> "ns:x='y'" # - # source://rexml//lib/rexml/attribute.rb#124 + # source://rexml//lib/rexml/attribute.rb#121 def to_string; end # Returns the UNNORMALIZED value of this attribute. That is, entities # have been expanded to their values # - # source://rexml//lib/rexml/attribute.rb#150 + # source://rexml//lib/rexml/attribute.rb#149 def value; end # Writes this attribute (EG, puts 'key="value"' to the output) # - # source://rexml//lib/rexml/attribute.rb#184 + # source://rexml//lib/rexml/attribute.rb#189 def write(output, indent = T.unsafe(nil)); end - # source://rexml//lib/rexml/attribute.rb#198 + # source://rexml//lib/rexml/attribute.rb#203 def xpath; end end @@ -978,7 +978,7 @@ class REXML::Document < ::REXML::Element # d.to_s # => "FooBar" # # When argument +document+ is given, it must be an existing - # document object, whose context and attributes (but not chidren) + # document object, whose context and attributes (but not children) # are cloned into the new document: # # d = REXML::Document.new(xml_string) @@ -2225,7 +2225,7 @@ class REXML::Element < ::REXML::Parent # :call-seq: # has_text? -> true or false # - # Returns +true if the element has one or more text noded, + # Returns +true+ if the element has one or more text noded, # +false+ otherwise: # # d = REXML::Document.new '
text' @@ -2473,7 +2473,7 @@ class REXML::Element < ::REXML::Parent # text(xpath = nil) -> text_string or nil # # Returns the text string from the first text node child - # in a specified element, if it exists, # +nil+ otherwise. + # in a specified element, if it exists, +nil+ otherwise. # # With no argument, returns the text from the first text node in +self+: # @@ -2481,7 +2481,7 @@ class REXML::Element < ::REXML::Parent # d.root.text.class # => String # d.root.text # => "some text " # - # With argument +xpath+, returns text from the the first text node + # With argument +xpath+, returns text from the first text node # in the element that matches +xpath+: # # d.root.text(1) # => "this is bold!" @@ -3252,6 +3252,9 @@ class REXML::Entity < ::REXML::Child # source://rexml//lib/rexml/entity.rb#85 def normalized; end + # source://rexml//lib/rexml/entity.rb#138 + def parent=(other); end + # Returns the value of attribute pubid. # # source://rexml//lib/rexml/entity.rb#22 @@ -3298,6 +3301,11 @@ class REXML::Entity < ::REXML::Child # source://rexml//lib/rexml/entity.rb#97 def write(out, indent = T.unsafe(nil)); end + private + + # source://rexml//lib/rexml/entity.rb#144 + def resolve_value; end + class << self # Evaluates whether the given string matches an entity definition, # returning true if so, and false otherwise. @@ -3554,6 +3562,54 @@ class REXML::Instruction < ::REXML::Child def write(writer, indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end end +# Adds named attributes to an object. +# +# source://rexml//lib/rexml/namespace.rb#7 +module REXML::Namespace + include ::REXML::XMLTokens + + # The name of the object, valid if set + # + # source://rexml//lib/rexml/namespace.rb#9 + def expanded_name; end + + # Fully expand the name, even if the prefix wasn't specified in the + # source file. + # + # source://rexml//lib/rexml/namespace.rb#57 + def fully_expanded_name; end + + # Compares names optionally WITH namespaces + # + # @return [Boolean] + # + # source://rexml//lib/rexml/namespace.rb#43 + def has_name?(other, ns = T.unsafe(nil)); end + + # The name of the object, valid if set + # + # source://rexml//lib/rexml/namespace.rb#9 + def name; end + + # Sets the name and the expanded name + # + # source://rexml//lib/rexml/namespace.rb#17 + def name=(name); end + + # The expanded name of the object, valid if name is set + # + # source://rexml//lib/rexml/namespace.rb#11 + def prefix; end + + # The expanded name of the object, valid if name is set + # + # source://rexml//lib/rexml/namespace.rb#11 + def prefix=(_arg0); end +end + +# source://rexml//lib/rexml/namespace.rb#13 +REXML::Namespace::NAME_WITHOUT_NAMESPACE = T.let(T.unsafe(nil), Regexp) + # source://rexml//lib/rexml/doctype.rb#280 class REXML::NotationDecl < ::REXML::Child # @return [NotationDecl] a new instance of NotationDecl @@ -3972,57 +4028,62 @@ end # There is strange, dark magic at work in this code. Beware. Go back! Go # back while you still can! # -# source://rexml//lib/rexml/parsers/xpathparser.rb#11 +# source://rexml//lib/rexml/parsers/xpathparser.rb#12 class REXML::Parsers::XPathParser include ::REXML::XMLTokens - # source://rexml//lib/rexml/parsers/xpathparser.rb#41 - def abbreviate(path); end + # source://rexml//lib/rexml/parsers/xpathparser.rb#42 + def abbreviate(path_or_parsed); end - # source://rexml//lib/rexml/parsers/xpathparser.rb#99 - def expand(path); end + # source://rexml//lib/rexml/parsers/xpathparser.rb#132 + def expand(path_or_parsed); end - # source://rexml//lib/rexml/parsers/xpathparser.rb#15 + # source://rexml//lib/rexml/parsers/xpathparser.rb#16 def namespaces=(namespaces); end - # source://rexml//lib/rexml/parsers/xpathparser.rb#20 + # source://rexml//lib/rexml/parsers/xpathparser.rb#21 def parse(path); end - # source://rexml//lib/rexml/parsers/xpathparser.rb#35 + # For backward compatibility + # + # source://rexml//lib/rexml/parsers/xpathparser.rb#174 + def preciate_to_string(parsed, &block); end + + # source://rexml//lib/rexml/parsers/xpathparser.rb#36 def predicate(path); end - # source://rexml//lib/rexml/parsers/xpathparser.rb#138 - def predicate_to_string(path, &block); end + # source://rexml//lib/rexml/parsers/xpathparser.rb#174 + def predicate_to_path(parsed, &block); end private # | AdditiveExpr ('+' | '-') MultiplicativeExpr # | MultiplicativeExpr # - # source://rexml//lib/rexml/parsers/xpathparser.rb#455 + # source://rexml//lib/rexml/parsers/xpathparser.rb#505 def AdditiveExpr(path, parsed); end # | AndExpr S 'and' S EqualityExpr # | EqualityExpr # - # source://rexml//lib/rexml/parsers/xpathparser.rb#388 + # source://rexml//lib/rexml/parsers/xpathparser.rb#438 def AndExpr(path, parsed); end # | EqualityExpr ('=' | '!=') RelationalExpr # | RelationalExpr # - # source://rexml//lib/rexml/parsers/xpathparser.rb#407 + # source://rexml//lib/rexml/parsers/xpathparser.rb#457 def EqualityExpr(path, parsed); end # | FilterExpr Predicate # | PrimaryExpr # - # source://rexml//lib/rexml/parsers/xpathparser.rb#558 + # source://rexml//lib/rexml/parsers/xpathparser.rb#608 def FilterExpr(path, parsed); end # | FUNCTION_NAME '(' ( expr ( ',' expr )* )? ')' # - # source://rexml//lib/rexml/parsers/xpathparser.rb#613 + # source://rexml//lib/rexml/parsers/xpathparser.rb#663 def FunctionCall(rest, parsed); end # LocationPath @@ -4030,69 +4091,72 @@ class REXML::Parsers::XPathParser # | '/' RelativeLocationPath? # | '//' RelativeLocationPath # - # source://rexml//lib/rexml/parsers/xpathparser.rb#193 + # source://rexml//lib/rexml/parsers/xpathparser.rb#243 def LocationPath(path, parsed); end # | MultiplicativeExpr ('*' | S ('div' | 'mod') S) UnaryExpr # | UnaryExpr # - # source://rexml//lib/rexml/parsers/xpathparser.rb#478 + # source://rexml//lib/rexml/parsers/xpathparser.rb#528 def MultiplicativeExpr(path, parsed); end - # source://rexml//lib/rexml/parsers/xpathparser.rb#293 + # source://rexml//lib/rexml/parsers/xpathparser.rb#343 def NodeTest(path, parsed); end # | OrExpr S 'or' S AndExpr # | AndExpr # - # source://rexml//lib/rexml/parsers/xpathparser.rb#369 + # source://rexml//lib/rexml/parsers/xpathparser.rb#419 def OrExpr(path, parsed); end # | LocationPath # | FilterExpr ('/' | '//') RelativeLocationPath # - # source://rexml//lib/rexml/parsers/xpathparser.rb#540 + # source://rexml//lib/rexml/parsers/xpathparser.rb#590 def PathExpr(path, parsed); end # Filters the supplied nodeset on the predicate(s) # - # source://rexml//lib/rexml/parsers/xpathparser.rb#345 + # source://rexml//lib/rexml/parsers/xpathparser.rb#395 def Predicate(path, parsed); end - # source://rexml//lib/rexml/parsers/xpathparser.rb#576 + # source://rexml//lib/rexml/parsers/xpathparser.rb#626 def PrimaryExpr(path, parsed); end # | RelationalExpr ('<' | '>' | '<=' | '>=') AdditiveExpr # | AdditiveExpr # - # source://rexml//lib/rexml/parsers/xpathparser.rb#430 + # source://rexml//lib/rexml/parsers/xpathparser.rb#480 def RelationalExpr(path, parsed); end - # source://rexml//lib/rexml/parsers/xpathparser.rb#217 + # source://rexml//lib/rexml/parsers/xpathparser.rb#267 def RelativeLocationPath(path, parsed); end # | '-' UnaryExpr # | UnionExpr # - # source://rexml//lib/rexml/parsers/xpathparser.rb#503 + # source://rexml//lib/rexml/parsers/xpathparser.rb#553 def UnaryExpr(path, parsed); end # | UnionExpr '|' PathExpr # | PathExpr # - # source://rexml//lib/rexml/parsers/xpathparser.rb#521 + # source://rexml//lib/rexml/parsers/xpathparser.rb#571 def UnionExpr(path, parsed); end # get_group( '[foo]bar' ) -> ['bar', '[foo]'] # - # source://rexml//lib/rexml/parsers/xpathparser.rb#626 + # source://rexml//lib/rexml/parsers/xpathparser.rb#676 def get_group(string); end - # source://rexml//lib/rexml/parsers/xpathparser.rb#644 + # source://rexml//lib/rexml/parsers/xpathparser.rb#694 def parse_args(string); end + + # source://rexml//lib/rexml/parsers/xpathparser.rb#224 + def quote_literal(literal); end end -# source://rexml//lib/rexml/parsers/xpathparser.rb#289 +# source://rexml//lib/rexml/parsers/xpathparser.rb#339 REXML::Parsers::XPathParser::LOCAL_NAME_WILDCARD = T.let(T.unsafe(nil), Regexp) # Returns a 1-1 map of the nodeset @@ -4106,7 +4170,7 @@ REXML::Parsers::XPathParser::LOCAL_NAME_WILDCARD = T.let(T.unsafe(nil), Regexp) # | PI '(' LITERAL ')' PI # | '[' expr ']' Predicate # -# source://rexml//lib/rexml/parsers/xpathparser.rb#288 +# source://rexml//lib/rexml/parsers/xpathparser.rb#338 REXML::Parsers::XPathParser::PREFIX_WILDCARD = T.let(T.unsafe(nil), Regexp) # source://rexml//lib/rexml/doctype.rb#10 @@ -4401,7 +4465,7 @@ class REXML::Text < ::REXML::Child # source://rexml//lib/rexml/text.rb#131 def check(string, pattern, doctype); end - # source://rexml//lib/rexml/text.rb#405 + # source://rexml//lib/rexml/text.rb#407 def expand(ref, doctype, filter); end # Escapes all possible entities @@ -4416,7 +4480,7 @@ class REXML::Text < ::REXML::Child # Unescapes all possible entities # - # source://rexml//lib/rexml/text.rb#392 + # source://rexml//lib/rexml/text.rb#394 def unnormalize(string, doctype = T.unsafe(nil), filter = T.unsafe(nil), illegal = T.unsafe(nil)); end end end diff --git a/sorbet/rbi/gems/rspec-mocks@3.12.5.rbi b/sorbet/rbi/gems/rspec-mocks@3.12.6.rbi similarity index 100% rename from sorbet/rbi/gems/rspec-mocks@3.12.5.rbi rename to sorbet/rbi/gems/rspec-mocks@3.12.6.rbi diff --git a/sorbet/rbi/gems/rspec-support@3.12.0.rbi b/sorbet/rbi/gems/rspec-support@3.12.1.rbi similarity index 100% rename from sorbet/rbi/gems/rspec-support@3.12.0.rbi rename to sorbet/rbi/gems/rspec-support@3.12.1.rbi diff --git a/sorbet/rbi/gems/rubocop-ast@1.29.0.rbi b/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi similarity index 99% rename from sorbet/rbi/gems/rubocop-ast@1.29.0.rbi rename to sorbet/rbi/gems/rubocop-ast@1.30.0.rbi index 3f349270e..6b8b0f920 100644 --- a/sorbet/rbi/gems/rubocop-ast@1.29.0.rbi +++ b/sorbet/rbi/gems/rubocop-ast@1.30.0.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 @@ -1809,7 +1827,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. @@ -4916,116 +4934,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 @@ -5085,10 +5103,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 @@ -5383,6 +5401,9 @@ RuboCop::AST::NodePattern::Sets::SET_HAS_MANY_HAS_ONE = T.let(T.unsafe(nil), Set # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_HAS_MANY_HAS_ONE_BELONGS_TO = T.let(T.unsafe(nil), Set) +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_IF_UNLESS = T.let(T.unsafe(nil), Set) + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_INCLUDE_EXTEND_PREPEND = T.let(T.unsafe(nil), Set) @@ -5465,7 +5486,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) diff --git a/sorbet/rbi/gems/rubocop-capybara@2.18.0.rbi b/sorbet/rbi/gems/rubocop-capybara@2.19.0.rbi similarity index 69% rename from sorbet/rbi/gems/rubocop-capybara@2.18.0.rbi rename to sorbet/rbi/gems/rubocop-capybara@2.19.0.rbi index 5cad5664e..a67022133 100644 --- a/sorbet/rbi/gems/rubocop-capybara@2.18.0.rbi +++ b/sorbet/rbi/gems/rubocop-capybara@2.19.0.rbi @@ -195,6 +195,68 @@ RuboCop::Cop::Capybara::CapybaraHelp::SPECIFIC_OPTIONS = T.let(T.unsafe(nil), Ha # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/capybara_help.rb#35 RuboCop::Cop::Capybara::CapybaraHelp::SPECIFIC_PSEUDO_CLASSES = T.let(T.unsafe(nil), Array) +# Checks for click button or link style. +# +# @example EnforcedStyle: strict (default) +# # bad +# click_link_or_button('foo') +# click_on('foo') +# +# # good +# click_link('foo') +# click_button('foo') +# @example EnforcedStyle: link_or_button +# # bad +# click_link('foo') +# click_button('foo') +# +# # good +# click_link_or_button('foo') +# click_on('foo') +# +# source://rubocop-capybara//lib/rubocop/cop/capybara/click_link_or_button_style.rb#26 +class RuboCop::Cop::Capybara::ClickLinkOrButtonStyle < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + + # source://rubocop-capybara//lib/rubocop/cop/capybara/click_link_or_button_style.rb#37 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop-capybara//lib/rubocop/cop/capybara/click_link_or_button_style.rb#62 + def link_or_button_method?(node); end + + # @return [Boolean] + # + # source://rubocop-capybara//lib/rubocop/cop/capybara/click_link_or_button_style.rb#45 + def offense?(node); end + + # source://rubocop-capybara//lib/rubocop/cop/capybara/click_link_or_button_style.rb#50 + def offense_message(node); end + + # @return [Boolean] + # + # source://rubocop-capybara//lib/rubocop/cop/capybara/click_link_or_button_style.rb#58 + def strict_method?(node); end +end + +# source://rubocop-capybara//lib/rubocop/cop/capybara/click_link_or_button_style.rb#34 +RuboCop::Cop::Capybara::ClickLinkOrButtonStyle::CLICK_LINK_OR_BUTTON = T.let(T.unsafe(nil), Array) + +# source://rubocop-capybara//lib/rubocop/cop/capybara/click_link_or_button_style.rb#31 +RuboCop::Cop::Capybara::ClickLinkOrButtonStyle::MSG_CLICK_LINK_OR_BUTTON = T.let(T.unsafe(nil), String) + +# source://rubocop-capybara//lib/rubocop/cop/capybara/click_link_or_button_style.rb#29 +RuboCop::Cop::Capybara::ClickLinkOrButtonStyle::MSG_STRICT = T.let(T.unsafe(nil), String) + +# source://rubocop-capybara//lib/rubocop/cop/capybara/click_link_or_button_style.rb#35 +RuboCop::Cop::Capybara::ClickLinkOrButtonStyle::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop-capybara//lib/rubocop/cop/capybara/click_link_or_button_style.rb#33 +RuboCop::Cop::Capybara::ClickLinkOrButtonStyle::STRICT_METHODS = T.let(T.unsafe(nil), Array) + # Helps parsing css selector. # # @api private @@ -393,75 +455,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. @@ -577,6 +637,241 @@ 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 there is a more specific actions offered by Capybara. # # @example @@ -648,68 +943,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. diff --git a/sorbet/rbi/gems/rubocop-factory_bot@2.23.1.rbi b/sorbet/rbi/gems/rubocop-factory_bot@2.24.0.rbi similarity index 89% rename from sorbet/rbi/gems/rubocop-factory_bot@2.23.1.rbi rename to sorbet/rbi/gems/rubocop-factory_bot@2.24.0.rbi index fed875311..da0a7a7f3 100644 --- a/sorbet/rbi/gems/rubocop-factory_bot@2.23.1.rbi +++ b/sorbet/rbi/gems/rubocop-factory_bot@2.24.0.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. @@ -372,41 +414,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 +447,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,29 +537,29 @@ 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 @@ -686,6 +724,34 @@ RuboCop::Cop::FactoryBot::FactoryNameStyle::MSG = T.let(T.unsafe(nil), String) # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_name_style.rb#56 RuboCop::Cop::FactoryBot::FactoryNameStyle::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) +# Do not create a FactoryBot sequence for an id column. +# +# @example +# # bad - can lead to conflicts between FactoryBot and DB sequences +# factory :foo do +# sequence :id +# end +# +# # good - a non-id column +# factory :foo do +# sequence :some_non_id_column +# end +# +# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/id_sequence.rb#19 +class RuboCop::Cop::FactoryBot::IdSequence < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/id_sequence.rb#26 + def on_send(node); end +end + +# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/id_sequence.rb#23 +RuboCop::Cop::FactoryBot::IdSequence::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/id_sequence.rb#24 +RuboCop::Cop::FactoryBot::IdSequence::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Checks for redundant `factory` option. # # @example diff --git a/sorbet/rbi/gems/rubocop-performance@1.18.0.rbi b/sorbet/rbi/gems/rubocop-performance@1.19.1.rbi similarity index 94% rename from sorbet/rbi/gems/rubocop-performance@1.18.0.rbi rename to sorbet/rbi/gems/rubocop-performance@1.19.1.rbi index 3ce0715cc..25f96a87b 100644 --- a/sorbet/rbi/gems/rubocop-performance@1.18.0.rbi +++ b/sorbet/rbi/gems/rubocop-performance@1.19.1.rbi @@ -10,6 +10,35 @@ module RuboCop; end # source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#4 module RuboCop::Cop; end +module RuboCop::Cop::Lint; end + +class RuboCop::Cop::Lint::UnusedMethodArgument < ::RuboCop::Cop::Base + # source://rubocop/1.57.2/lib/rubocop/cop/lint/unused_method_argument.rb#66 + def not_implemented?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop/1.57.2/lib/rubocop/cop/lint/unused_method_argument.rb#81 + def autocorrect(corrector, node); end + + # source://rubocop/1.57.2/lib/rubocop/cop/lint/unused_method_argument.rb#85 + def check_argument(variable); end + + # source://rubocop/1.57.2/lib/rubocop/cop/lint/unused_method_argument.rb#93 + def ignored_method?(body); end + + # source://rubocop/1.57.2/lib/rubocop/cop/lint/unused_method_argument.rb#98 + def message(variable); end + + class << self + # source://rubocop-performance//lib/rubocop-performance.rb#15 + def autocorrect_incompatible_with; end + + # source://rubocop/1.57.2/lib/rubocop/cop/lint/unused_method_argument.rb#75 + def joining_forces; end + end +end + # source://rubocop-performance//lib/rubocop/cop/performance/ancestors_include.rb#5 module RuboCop::Cop::Performance; end @@ -77,12 +106,15 @@ class RuboCop::Cop::Performance::ArraySemiInfiniteRangeSlice < ::RuboCop::Cop::B # source://rubocop-performance//lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb#41 def endless_range_slice?(param0 = T.unsafe(nil)); end + # source://rubocop-performance//lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb#52 + def on_csend(node); end + # source://rubocop-performance//lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb#52 def on_send(node); end private - # source://rubocop-performance//lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb#65 + # source://rubocop-performance//lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb#66 def correction(receiver, range_node); end end @@ -208,6 +240,11 @@ class RuboCop::Cop::Performance::BlockGivenWithExplicitBlock < ::RuboCop::Cop::B # source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#33 def reassigns_block_arg?(param0 = T.unsafe(nil), param1); end + + class << self + # source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#51 + def autocorrect_incompatible_with; end + end end # source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#31 @@ -841,7 +878,10 @@ class RuboCop::Cop::Performance::DeletePrefix < ::RuboCop::Cop::Base # source://rubocop-performance//lib/rubocop/cop/performance/delete_prefix.rb#66 def delete_prefix_candidate?(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/delete_prefix.rb#70 + # source://rubocop-performance//lib/rubocop/cop/performance/delete_prefix.rb#71 + def on_csend(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/delete_prefix.rb#71 def on_send(node); end end @@ -901,7 +941,10 @@ class RuboCop::Cop::Performance::DeleteSuffix < ::RuboCop::Cop::Base # source://rubocop-performance//lib/rubocop/cop/performance/delete_suffix.rb#66 def delete_suffix_candidate?(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/delete_suffix.rb#70 + # source://rubocop-performance//lib/rubocop/cop/performance/delete_suffix.rb#71 + def on_csend(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/delete_suffix.rb#71 def on_send(node); end end @@ -940,6 +983,9 @@ class RuboCop::Cop::Performance::Detect < ::RuboCop::Cop::Base # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#41 def detect_candidate?(param0 = T.unsafe(nil)); end + # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#50 + def on_csend(node); end + # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#50 def on_send(node); end @@ -947,27 +993,27 @@ class RuboCop::Cop::Performance::Detect < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#69 + # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#70 def accept_first_call?(receiver, body); end - # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#101 + # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#102 def autocorrect(corrector, node, replacement); end # @return [Boolean] # - # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#127 + # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#128 def lazy?(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#112 + # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#113 def message_for_method(method, index); end - # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#123 + # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#124 def preferred_method; end - # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#78 + # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#79 def register_offense(node, receiver, second_method, index); end - # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#93 + # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#94 def replacement(method, index); end end @@ -1099,6 +1145,9 @@ class RuboCop::Cop::Performance::EndWith < ::RuboCop::Cop::Base include ::RuboCop::Cop::RegexpMetacharacter extend ::RuboCop::Cop::AutoCorrector + # source://rubocop-performance//lib/rubocop/cop/performance/end_with.rb#62 + def on_csend(node); end + # source://rubocop-performance//lib/rubocop/cop/performance/end_with.rb#62 def on_match_with_lvasgn(node); end @@ -1292,27 +1341,36 @@ class RuboCop::Cop::Performance::InefficientHashSearch < ::RuboCop::Cop::Base # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#47 def inefficient_include?(param0 = T.unsafe(nil)); end + # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#51 + def on_csend(node); end + # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#51 def on_send(node); end private - # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#89 - def autocorrect_argument(node); end + # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#91 + def correct_argument(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#93 - def autocorrect_hash_expression(node); end + # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#99 + def correct_dot(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#73 - def autocorrect_method(node); end + # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#95 + def correct_hash_expression(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#80 + # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#75 + def correct_method(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#82 def current_method(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#69 + # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#67 def message(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#84 + # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#71 + def replacement(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#86 def use_long_method; end end @@ -1410,30 +1468,33 @@ class RuboCop::Cop::Performance::MapCompact < ::RuboCop::Cop::Base # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#40 def map_compact(param0 = T.unsafe(nil)); end + # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#53 + def on_csend(node); end + # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#53 def on_send(node); end private - # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#93 + # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#94 def compact_method_with_final_newline_range(compact_method_range); end # @return [Boolean] # - # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#89 + # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#90 def invoke_method_after_map_compact_on_same_line?(compact_node, chained_method); end # @return [Boolean] # - # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#85 + # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#86 def map_method_and_compact_method_on_same_line?(map_node, compact_node); end - # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#67 + # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#68 def remove_compact_method(corrector, map_node, compact_node, chained_method); end # @return [Boolean] # - # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#81 + # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#82 def use_dot?(node); end end @@ -1443,6 +1504,59 @@ RuboCop::Cop::Performance::MapCompact::MSG = T.let(T.unsafe(nil), String) # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#36 RuboCop::Cop::Performance::MapCompact::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) +# Checks if the map method is used in a chain. +# +# Autocorrection is not supported because an appropriate block variable name cannot be determined automatically. +# +# [source,ruby] +# ---- +# class X +# def initialize +# @@num = 0 +# end +# +# def foo +# @@num += 1 +# self +# end +# +# def bar +# @@num * 2 +# end +# end +# +# [X.new, X.new].map(&:foo).map(&:bar) # => [4, 4] +# [X.new, X.new].map { |x| x.foo.bar } # => [2, 4] +# ---- +# +# @example +# +# # bad +# array.map(&:foo).map(&:bar) +# +# # good +# array.map { |item| item.foo.bar } +# +# source://rubocop-performance//lib/rubocop/cop/performance/map_method_chain.rb#43 +class RuboCop::Cop::Performance::MapMethodChain < ::RuboCop::Cop::Base + # source://rubocop-performance//lib/rubocop/cop/performance/map_method_chain.rb#49 + def block_pass_with_symbol_arg?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/map_method_chain.rb#53 + def on_send(node); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/map_method_chain.rb#71 + def find_begin_of_chained_map_method(node, map_args); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/map_method_chain.rb#46 +RuboCop::Cop::Performance::MapMethodChain::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/map_method_chain.rb#47 +RuboCop::Cop::Performance::MapMethodChain::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Identifies places where methods are converted to blocks, with the # use of `&method`, and passed as arguments to method calls. # It is faster to replace those with explicit blocks, calling those methods inside. @@ -1521,26 +1635,21 @@ RuboCop::Cop::Performance::OpenStruct::RESTRICT_ON_SEND = T.let(T.unsafe(nil), A # # good # ('a'..'z').cover?('b') # => true # -# # Example of a case where `Range#cover?` may not provide -# # the desired result: -# -# ('a'..'z').cover?('yellow') # => true -# -# source://rubocop-performance//lib/rubocop/cop/performance/range_include.rb#28 +# source://rubocop-performance//lib/rubocop/cop/performance/range_include.rb#29 class RuboCop::Cop::Performance::RangeInclude < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/range_include.rb#43 + # source://rubocop-performance//lib/rubocop/cop/performance/range_include.rb#44 def on_send(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/range_include.rb#39 + # source://rubocop-performance//lib/rubocop/cop/performance/range_include.rb#40 def range_include(param0 = T.unsafe(nil)); end end -# source://rubocop-performance//lib/rubocop/cop/performance/range_include.rb#31 +# source://rubocop-performance//lib/rubocop/cop/performance/range_include.rb#32 RuboCop::Cop::Performance::RangeInclude::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/range_include.rb#32 +# source://rubocop-performance//lib/rubocop/cop/performance/range_include.rb#33 RuboCop::Cop::Performance::RangeInclude::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Identifies the use of a `&block` parameter and `block.call` @@ -1732,26 +1841,47 @@ RuboCop::Cop::Performance::RedundantEqualityComparisonBlock::TARGET_METHODS = T. class RuboCop::Cop::Performance::RedundantMatch < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#28 + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#30 def match_call?(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#37 + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#39 def on_send(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#33 + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#35 def only_truthiness_matters?(param0 = T.unsafe(nil)); end private - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#49 + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#51 def autocorrect(corrector, node); end # @return [Boolean] # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#55 + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#57 def autocorrectable?(node); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#86 + def call_like?(arg); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#63 + def replacement(node); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#73 + def requires_parentheses?(arg); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#80 + def requires_parentheses_for_call_like?(arg); end end +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#26 +RuboCop::Cop::Performance::RedundantMatch::HIGHER_PRECEDENCE_OPERATOR_METHODS = T.let(T.unsafe(nil), Array) + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#23 RuboCop::Cop::Performance::RedundantMatch::MSG = T.let(T.unsafe(nil), String) @@ -1939,6 +2069,9 @@ RuboCop::Cop::Performance::RedundantSortBlock::MSG = T.let(T.unsafe(nil), String class RuboCop::Cop::Performance::RedundantSplitRegexpArgument < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#27 + def on_csend(node); end + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#27 def on_send(node); end @@ -1949,10 +2082,10 @@ class RuboCop::Cop::Performance::RedundantSplitRegexpArgument < ::RuboCop::Cop:: # @return [Boolean] # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#41 + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#42 def determinist_regexp?(regexp_node); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#45 + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#46 def replacement(regexp_node); end end @@ -2246,6 +2379,9 @@ class RuboCop::Cop::Performance::ReverseEach < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector + # source://rubocop-performance//lib/rubocop/cop/performance/reverse_each.rb#33 + def on_csend(node); end + # source://rubocop-performance//lib/rubocop/cop/performance/reverse_each.rb#33 def on_send(node); end @@ -2254,12 +2390,12 @@ class RuboCop::Cop::Performance::ReverseEach < ::RuboCop::Cop::Base private - # source://rubocop-performance//lib/rubocop/cop/performance/reverse_each.rb#53 + # source://rubocop-performance//lib/rubocop/cop/performance/reverse_each.rb#54 def offense_range(node); end # @return [Boolean] # - # source://rubocop-performance//lib/rubocop/cop/performance/reverse_each.rb#47 + # source://rubocop-performance//lib/rubocop/cop/performance/reverse_each.rb#48 def use_return_value?(node); end end @@ -2287,6 +2423,9 @@ class RuboCop::Cop::Performance::ReverseFirst < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector + # source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#30 + def on_csend(node); end + # source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#30 def on_send(node); end @@ -2295,16 +2434,16 @@ class RuboCop::Cop::Performance::ReverseFirst < ::RuboCop::Cop::Base private - # source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#63 + # source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#64 def build_bad_method(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#55 + # source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#56 def build_good_method(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#49 + # source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#50 def build_message(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#45 + # source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#46 def correction_range(receiver, node); end end @@ -2334,15 +2473,18 @@ class RuboCop::Cop::Performance::SelectMap < ::RuboCop::Cop::Base # source://rubocop-performance//lib/rubocop/cop/performance/select_map.rb#27 def bad_method?(param0 = T.unsafe(nil)); end + # source://rubocop-performance//lib/rubocop/cop/performance/select_map.rb#31 + def on_csend(node); end + # source://rubocop-performance//lib/rubocop/cop/performance/select_map.rb#31 def on_send(node); end private - # source://rubocop-performance//lib/rubocop/cop/performance/select_map.rb#44 + # source://rubocop-performance//lib/rubocop/cop/performance/select_map.rb#45 def map_method_candidate(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/select_map.rb#54 + # source://rubocop-performance//lib/rubocop/cop/performance/select_map.rb#55 def offense_range(node, map_method); end end @@ -2458,7 +2600,10 @@ RuboCop::Cop::Performance::SortReverse::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Performance::Squeeze < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/squeeze.rb#38 + # source://rubocop-performance//lib/rubocop/cop/performance/squeeze.rb#39 + def on_csend(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/squeeze.rb#39 def on_send(node); end # source://rubocop-performance//lib/rubocop/cop/performance/squeeze.rb#29 @@ -2468,7 +2613,7 @@ class RuboCop::Cop::Performance::Squeeze < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop-performance//lib/rubocop/cop/performance/squeeze.rb#58 + # source://rubocop-performance//lib/rubocop/cop/performance/squeeze.rb#61 def repeating_literal?(regex_str); end end @@ -2522,6 +2667,9 @@ class RuboCop::Cop::Performance::StartWith < ::RuboCop::Cop::Base include ::RuboCop::Cop::RegexpMetacharacter extend ::RuboCop::Cop::AutoCorrector + # source://rubocop-performance//lib/rubocop/cop/performance/start_with.rb#62 + def on_csend(node); end + # source://rubocop-performance//lib/rubocop/cop/performance/start_with.rb#62 def on_match_with_lvasgn(node); end @@ -2596,10 +2744,13 @@ RuboCop::Cop::Performance::StringIdentifierArgument::RESTRICT_ON_SEND = T.let(T. class RuboCop::Cop::Performance::StringInclude < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#34 + # source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#35 + def on_csend(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#35 def on_match_with_lvasgn(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#34 + # source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#35 def on_send(node); end # source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#28 @@ -2609,7 +2760,7 @@ class RuboCop::Cop::Performance::StringInclude < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#53 + # source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#57 def literal?(regex_str); end end @@ -2639,6 +2790,9 @@ class RuboCop::Cop::Performance::StringReplacement < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#37 + def on_csend(node); end + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#37 def on_send(node); end @@ -2649,45 +2803,45 @@ class RuboCop::Cop::Performance::StringReplacement < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#83 + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#84 def accept_first_param?(first_param); end # @return [Boolean] # - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#78 + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#79 def accept_second_param?(second_param); end - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#59 + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#60 def autocorrect(corrector, node); end - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#99 + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#100 def first_source(first_param); end - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#142 + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#143 def message(node, first_source, second_source); end - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#148 + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#149 def method_suffix(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#48 + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#49 def offense(node, first_param, second_param); end - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#128 + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#129 def range(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#152 + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#153 def remove_second_param(corrector, node, first_param); end - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#69 + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#70 def replace_method(corrector, node, first_source, second_source, first_param); end - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#132 + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#133 def replacement_method(node, first_source, second_source); end - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#117 + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#118 def source_from_regex_constructor(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#110 + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#111 def source_from_regex_literal(node); end end @@ -2896,26 +3050,27 @@ RuboCop::Cop::Performance::TimesMap::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr # source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#27 class RuboCop::Cop::Performance::UnfreezeString < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#33 + # source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#36 def dup_string?(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#44 + # source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#47 def on_send(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#37 + # source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#40 def string_new?(param0 = T.unsafe(nil)); end private - # source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#57 + # source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#60 def string_value(node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#30 +# source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#33 RuboCop::Cop::Performance::UnfreezeString::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#31 +# source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#34 RuboCop::Cop::Performance::UnfreezeString::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Identifies places where `URI::Parser.new` can be replaced by `URI::DEFAULT_PARSER`. diff --git a/sorbet/rbi/gems/rubocop-rails@2.20.2.rbi b/sorbet/rbi/gems/rubocop-rails@2.22.1.rbi similarity index 92% rename from sorbet/rbi/gems/rubocop-rails@2.20.2.rbi rename to sorbet/rbi/gems/rubocop-rails@2.22.1.rbi index 4f7518505..560a86e80 100644 --- a/sorbet/rbi/gems/rubocop-rails@2.20.2.rbi +++ b/sorbet/rbi/gems/rubocop-rails@2.22.1.rbi @@ -100,6 +100,38 @@ module RuboCop::Cop::ClassSendNodeHelper def class_send_nodes(class_node); end end +# A mixin to extend cops in order to determine the database type. +# +# This module automatically detect an adapter from `development` environment +# in `config/database.yml` or the environment variable `DATABASE_URL` +# when the `Database` option is not set. +# +# source://rubocop-rails//lib/rubocop/cop/mixin/database_type_resolvable.rb#10 +module RuboCop::Cop::DatabaseTypeResolvable + # source://rubocop-rails//lib/rubocop/cop/mixin/database_type_resolvable.rb#14 + def database; end + + private + + # source://rubocop-rails//lib/rubocop/cop/mixin/database_type_resolvable.rb#61 + def database_adapter; end + + # source://rubocop-rails//lib/rubocop/cop/mixin/database_type_resolvable.rb#31 + def database_from_env; end + + # source://rubocop-rails//lib/rubocop/cop/mixin/database_type_resolvable.rb#20 + def database_from_yaml; end + + # source://rubocop-rails//lib/rubocop/cop/mixin/database_type_resolvable.rb#43 + def database_yaml; end +end + +# source://rubocop-rails//lib/rubocop/cop/mixin/database_type_resolvable.rb#11 +RuboCop::Cop::DatabaseTypeResolvable::MYSQL = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/mixin/database_type_resolvable.rb#12 +RuboCop::Cop::DatabaseTypeResolvable::POSTGRESQL = T.let(T.unsafe(nil), String) + # Common functionality for enforcing a specific superclass. # # source://rubocop-rails//lib/rubocop/cop/mixin/enforce_superclass.rb#6 @@ -392,8 +424,8 @@ RuboCop::Cop::Rails::ActionControllerFlashBeforeRender::MSG = T.let(T.unsafe(nil # source://rubocop-rails//lib/rubocop/cop/rails/action_controller_flash_before_render.rb#51 RuboCop::Cop::Rails::ActionControllerFlashBeforeRender::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# Using `ActionController::TestCase`` is discouraged and should be replaced by -# `ActionDispatch::IntegrationTest``. Controller tests are too close to the +# Using `ActionController::TestCase` is discouraged and should be replaced by +# `ActionDispatch::IntegrationTest`. Controller tests are too close to the # internals of a controller whereas integration tests mimic the browser/user. # # @example @@ -425,6 +457,9 @@ RuboCop::Cop::Rails::ActionControllerTestCase::MSG = T.let(T.unsafe(nil), String # The cop is configurable and can enforce the use of the older # something_filter methods or the newer something_action methods. # +# IMPORTANT: This cop is deprecated. Because the `*_filter` methods were removed in Rails 4.2, +# and that Rails version is no longer supported by RuboCop Rails. This cop will be removed in RuboCop Rails 3.0. +# # @example EnforcedStyle: action (default) # # bad # after_filter :do_stuff @@ -446,42 +481,42 @@ RuboCop::Cop::Rails::ActionControllerTestCase::MSG = T.let(T.unsafe(nil), String # append_around_filter :do_stuff # skip_after_filter :do_stuff # -# source://rubocop-rails//lib/rubocop/cop/rails/action_filter.rb#32 +# source://rubocop-rails//lib/rubocop/cop/rails/action_filter.rb#35 class RuboCop::Cop::Rails::ActionFilter < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-rails//lib/rubocop/cop/rails/action_filter.rb#72 + # source://rubocop-rails//lib/rubocop/cop/rails/action_filter.rb#75 def on_block(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/action_filter.rb#76 + # source://rubocop-rails//lib/rubocop/cop/rails/action_filter.rb#79 def on_send(node); end private - # source://rubocop-rails//lib/rubocop/cop/rails/action_filter.rb#93 + # source://rubocop-rails//lib/rubocop/cop/rails/action_filter.rb#96 def bad_methods; end - # source://rubocop-rails//lib/rubocop/cop/rails/action_filter.rb#82 + # source://rubocop-rails//lib/rubocop/cop/rails/action_filter.rb#85 def check_method_node(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/action_filter.rb#97 + # source://rubocop-rails//lib/rubocop/cop/rails/action_filter.rb#100 def good_methods; end - # source://rubocop-rails//lib/rubocop/cop/rails/action_filter.rb#101 + # source://rubocop-rails//lib/rubocop/cop/rails/action_filter.rb#104 def preferred_method(method); end end -# source://rubocop-rails//lib/rubocop/cop/rails/action_filter.rb#54 +# source://rubocop-rails//lib/rubocop/cop/rails/action_filter.rb#57 RuboCop::Cop::Rails::ActionFilter::ACTION_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop-rails//lib/rubocop/cop/rails/action_filter.rb#38 +# source://rubocop-rails//lib/rubocop/cop/rails/action_filter.rb#41 RuboCop::Cop::Rails::ActionFilter::FILTER_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop-rails//lib/rubocop/cop/rails/action_filter.rb#36 +# source://rubocop-rails//lib/rubocop/cop/rails/action_filter.rb#39 RuboCop::Cop::Rails::ActionFilter::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-rails//lib/rubocop/cop/rails/action_filter.rb#70 +# source://rubocop-rails//lib/rubocop/cop/rails/action_filter.rb#73 RuboCop::Cop::Rails::ActionFilter::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Enforces consistent ordering of the standard Rails RESTful controller actions. @@ -1337,8 +1372,9 @@ RuboCop::Cop::Rails::Blank::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # The `bulk` option is only supported on the MySQL and # the PostgreSQL (5.2 later) adapter; thus it will # automatically detect an adapter from `development` environment -# in `config/database.yml` when the `Database` option is not set. -# If the adapter is not `mysql2` or `postgresql`, +# in `config/database.yml` or the environment variable `DATABASE_URL` +# when the `Database` option is not set. +# If the adapter is not `mysql2`, `trilogy`, or `postgresql`, # this Cop ignores offenses. # # @example @@ -1387,8 +1423,10 @@ RuboCop::Cop::Rails::Blank::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # end # end # -# source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#65 +# source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#66 class RuboCop::Cop::Rails::BulkChangeTable < ::RuboCop::Cop::Base + include ::RuboCop::Cop::DatabaseTypeResolvable + # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#119 def on_def(node); end @@ -1399,37 +1437,28 @@ class RuboCop::Cop::Rails::BulkChangeTable < ::RuboCop::Cop::Base # @param node [RuboCop::AST::SendNode] # - # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#246 + # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#213 def add_offense_for_alter_methods(node); end # @param node [RuboCop::AST::SendNode] # - # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#256 + # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#223 def add_offense_for_change_table(node); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#223 + # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#190 def call_to_combinable_alter_method?(child_node); end - # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#227 + # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#194 def combinable_alter_methods; end - # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#236 + # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#203 def combinable_transformations; end # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#158 def count_transformations(send_nodes); end - # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#177 - def database; end - - # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#181 - def database_from_yaml; end - - # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#192 - def database_yaml; end - # @param node [RuboCop::AST::SendNode] (send nil? :change_table ...) # @return [Boolean] # @@ -1441,28 +1470,28 @@ class RuboCop::Cop::Rails::BulkChangeTable < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#210 + # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#177 def support_bulk_alter?; end end # Record combinable alter methods and register offensive nodes. # -# source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#261 +# source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#228 class RuboCop::Cop::Rails::BulkChangeTable::AlterMethodsRecorder # @return [AlterMethodsRecorder] a new instance of AlterMethodsRecorder # - # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#262 + # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#229 def initialize; end - # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#281 + # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#248 def flush; end - # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#286 + # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#253 def offensive_nodes; end # @param new_node [RuboCop::AST::SendNode] # - # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#268 + # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#235 def process(new_node); end end @@ -1475,24 +1504,18 @@ RuboCop::Cop::Rails::BulkChangeTable::COMBINABLE_TRANSFORMATIONS = T.let(T.unsaf # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#76 RuboCop::Cop::Rails::BulkChangeTable::MIGRATION_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#69 +# source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#72 RuboCop::Cop::Rails::BulkChangeTable::MSG_FOR_ALTER_METHODS = T.let(T.unsafe(nil), String) -# source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#66 +# source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#69 RuboCop::Cop::Rails::BulkChangeTable::MSG_FOR_CHANGE_TABLE = T.let(T.unsafe(nil), String) -# source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#73 -RuboCop::Cop::Rails::BulkChangeTable::MYSQL = T.let(T.unsafe(nil), String) - # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#113 RuboCop::Cop::Rails::BulkChangeTable::MYSQL_COMBINABLE_ALTER_METHODS = T.let(T.unsafe(nil), Array) # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#111 RuboCop::Cop::Rails::BulkChangeTable::MYSQL_COMBINABLE_TRANSFORMATIONS = T.let(T.unsafe(nil), Array) -# source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#74 -RuboCop::Cop::Rails::BulkChangeTable::POSTGRESQL = T.let(T.unsafe(nil), String) - # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#117 RuboCop::Cop::Rails::BulkChangeTable::POSTGRESQL_COMBINABLE_ALTER_METHODS = T.let(T.unsafe(nil), Array) @@ -1704,6 +1727,52 @@ RuboCop::Cop::Rails::CreateTableWithTimestamps::MSG = T.let(T.unsafe(nil), Strin # source://rubocop-rails//lib/rubocop/cop/rails/create_table_with_timestamps.rb#56 RuboCop::Cop::Rails::CreateTableWithTimestamps::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) +# Avoid dangerous column names. +# +# Some column names are considered dangerous because they would overwrite methods already defined. +# +# @example +# # bad +# add_column :users, :save +# +# # good +# add_column :users, :saved +# +# source://rubocop-rails//lib/rubocop/cop/rails/dangerous_column_names.rb#16 +class RuboCop::Cop::Rails::DangerousColumnNames < ::RuboCop::Cop::Base + # source://rubocop-rails//lib/rubocop/cop/rails/dangerous_column_names.rb#414 + def on_send(node); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/dangerous_column_names.rb#424 + def column_name_node_from(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/dangerous_column_names.rb#441 + def dangerous_column_name?(column_name); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/dangerous_column_names.rb#435 + def dangerous_column_name_node?(node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/dangerous_column_names.rb#17 +RuboCop::Cop::Rails::DangerousColumnNames::COLUMN_TYPE_METHOD_NAMES = T.let(T.unsafe(nil), Set) + +# Generated from `ActiveRecord::AttributeMethods.dangerous_attribute_methods` on activerecord 7.1.0. +# +# source://rubocop-rails//lib/rubocop/cop/rails/dangerous_column_names.rb#36 +RuboCop::Cop::Rails::DangerousColumnNames::DANGEROUS_COLUMN_NAMES = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/dangerous_column_names.rb#410 +RuboCop::Cop::Rails::DangerousColumnNames::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/dangerous_column_names.rb#412 +RuboCop::Cop::Rails::DangerousColumnNames::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Checks for the correct use of Date methods, # such as Date.today, Date.current etc. # @@ -2161,27 +2230,55 @@ RuboCop::Cop::Rails::DotSeparatedKeys::TRANSLATE_METHODS = T.let(T.unsafe(nil), # belongs_to :bar # has_one :foo # -# source://rubocop-rails//lib/rubocop/cop/rails/duplicate_association.rb#23 +# # bad +# has_many :foo, class_name: 'Foo' +# has_many :bar, class_name: 'Foo' +# has_one :baz +# +# # good +# has_many :bar, class_name: 'Foo' +# has_one :foo +# +# source://rubocop-rails//lib/rubocop/cop/rails/duplicate_association.rb#32 class RuboCop::Cop::Rails::DuplicateAssociation < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::ClassSendNodeHelper + include ::RuboCop::Cop::ActiveRecordHelper extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-rails//lib/rubocop/cop/rails/duplicate_association.rb#30 + # source://rubocop-rails//lib/rubocop/cop/rails/duplicate_association.rb#41 def association(param0 = T.unsafe(nil)); end - # source://rubocop-rails//lib/rubocop/cop/rails/duplicate_association.rb#34 + # source://rubocop-rails//lib/rubocop/cop/rails/duplicate_association.rb#45 + def class_name(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/duplicate_association.rb#49 def on_class(class_node); end private - # source://rubocop-rails//lib/rubocop/cop/rails/duplicate_association.rb#48 - def offenses(class_node); end + # source://rubocop-rails//lib/rubocop/cop/rails/duplicate_association.rb#75 + def association_nodes(class_node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/duplicate_association.rb#81 + def duplicated_association_name_nodes(association_nodes); end + + # source://rubocop-rails//lib/rubocop/cop/rails/duplicate_association.rb#89 + def duplicated_class_name_nodes(association_nodes); end + + # source://rubocop-rails//lib/rubocop/cop/rails/duplicate_association.rb#105 + def leave_duplicated_association(grouped_associations); end + + # source://rubocop-rails//lib/rubocop/cop/rails/duplicate_association.rb#65 + def register_offense(name, nodes, message_template); end end -# source://rubocop-rails//lib/rubocop/cop/rails/duplicate_association.rb#28 +# source://rubocop-rails//lib/rubocop/cop/rails/duplicate_association.rb#38 RuboCop::Cop::Rails::DuplicateAssociation::MSG = T.let(T.unsafe(nil), String) +# source://rubocop-rails//lib/rubocop/cop/rails/duplicate_association.rb#39 +RuboCop::Cop::Rails::DuplicateAssociation::MSG_CLASS_NAME = T.let(T.unsafe(nil), String) + # Checks for multiple scopes in a model that have the same `where` clause. This # often means you copy/pasted a scope, updated the name, and forgot to change the condition. # @@ -2526,6 +2623,35 @@ RuboCop::Cop::Rails::EnumUniqueness::MSG = T.let(T.unsafe(nil), String) # source://rubocop-rails//lib/rubocop/cop/rails/enum_uniqueness.rb#24 RuboCop::Cop::Rails::EnumUniqueness::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) +# Checks for usage of `Rails.env.development? || Rails.env.test?` which +# can be replaced with `Rails.env.local?`, introduced in Rails 7.1. +# +# @example +# +# # bad +# Rails.env.development? || Rails.env.test? +# +# # good +# Rails.env.local? +# +# source://rubocop-rails//lib/rubocop/cop/rails/env_local.rb#17 +class RuboCop::Cop::Rails::EnvLocal < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRailsVersion + + # source://rubocop-rails//lib/rubocop/cop/rails/env_local.rb#34 + def on_or(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/env_local.rb#27 + def rails_env_local_candidate?(param0 = T.unsafe(nil)); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/env_local.rb#22 +RuboCop::Cop::Rails::EnvLocal::LOCAL_ENVIRONMENTS = T.let(T.unsafe(nil), Set) + +# source://rubocop-rails//lib/rubocop/cop/rails/env_local.rb#21 +RuboCop::Cop::Rails::EnvLocal::MSG = T.let(T.unsafe(nil), String) + # Checks that Rails.env is compared using `.production?`-like # methods instead of equality against a string or symbol. # @@ -2824,7 +2950,7 @@ class RuboCop::Cop::Rails::FilePath < ::RuboCop::Cop::Base private - # source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#220 + # source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#223 def append_argument(corrector, node, argument_source); end # source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#164 @@ -2833,10 +2959,10 @@ class RuboCop::Cop::Rails::FilePath < ::RuboCop::Cop::Base # source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#172 def autocorrect_file_join(corrector, node); end - # source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#201 + # source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#204 def autocorrect_rails_root_join_with_slash_separated_path(corrector, node); end - # source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#186 + # source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#189 def autocorrect_rails_root_join_with_string_arguments(corrector, node); end # source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#153 @@ -2867,22 +2993,22 @@ class RuboCop::Cop::Rails::FilePath < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#232 + # source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#235 def extension_node?(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#228 + # source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#231 def extract_rails_root_join_argument_source(node, rails_root_index); end - # source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#216 + # source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#219 def find_rails_root_index(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#212 + # source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#215 def inner_range_of(node); end # source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#131 def register_offense(node, require_to_s:, &block); end - # source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#224 + # source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#227 def replace_with_rails_root_join(corrector, node, argument_source); end # @return [Boolean] @@ -3237,7 +3363,7 @@ RuboCop::Cop::Rails::HasManyOrHasOneDependent::RESTRICT_ON_SEND = T.let(T.unsafe # Checks for use of the helper methods which reference # instance variables. # -# Relying on instance variables makes it difficult to re-use helper +# Relying on instance variables makes it difficult to reuse helper # methods. # # If it seems awkward to explicitly pass in each dependent @@ -3378,6 +3504,7 @@ RuboCop::Cop::Rails::HttpPositionalArguments::ROUTING_METHODS = T.let(T.unsafe(n # @example EnforcedStyle: symbolic (default) # # bad # render :foo, status: 200 +# render :foo, status: '200' # render json: { foo: 'bar' }, status: 200 # render plain: 'foo/bar', status: 304 # redirect_to root_url, status: 301 @@ -3404,121 +3531,127 @@ RuboCop::Cop::Rails::HttpPositionalArguments::ROUTING_METHODS = T.let(T.unsafe(n # redirect_to root_url, status: 301 # head 200 # -# source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#38 +# source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#39 class RuboCop::Cop::Rails::HttpStatus < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#44 + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#45 def http_status(param0 = T.unsafe(nil)); end - # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#56 + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#57 def on_send(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#52 + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#53 def status_code(param0 = T.unsafe(nil)); end private - # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#76 + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#77 def checker_class; end end -# source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#124 +# source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#125 class RuboCop::Cop::Rails::HttpStatus::NumericStyleChecker # @return [NumericStyleChecker] a new instance of NumericStyleChecker # - # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#131 + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#132 def initialize(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#139 + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#140 def message; end # Returns the value of attribute node. # - # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#129 + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#130 def node; end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#135 + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#136 def offensive?; end - # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#143 + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#144 def preferred_style; end private - # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#149 + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#150 def number; end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#157 + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#158 def permitted_symbol?; end - # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#153 + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#154 def symbol; end end -# source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#126 +# source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#127 RuboCop::Cop::Rails::HttpStatus::NumericStyleChecker::DEFAULT_MSG = T.let(T.unsafe(nil), String) -# source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#125 +# source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#126 RuboCop::Cop::Rails::HttpStatus::NumericStyleChecker::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#127 +# source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#128 RuboCop::Cop::Rails::HttpStatus::NumericStyleChecker::PERMITTED_STATUS = T.let(T.unsafe(nil), Array) -# source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#42 +# source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#43 RuboCop::Cop::Rails::HttpStatus::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#86 +# source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#87 class RuboCop::Cop::Rails::HttpStatus::SymbolicStyleChecker # @return [SymbolicStyleChecker] a new instance of SymbolicStyleChecker # - # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#92 + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#93 def initialize(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#100 + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#101 def message; end # Returns the value of attribute node. # - # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#90 + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#91 def node; end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#96 + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#97 def offensive?; end - # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#104 + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#105 def preferred_style; end private # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#118 + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#119 def custom_http_status_code?; end - # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#114 + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#115 def number; end - # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#110 + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#111 def symbol; end end -# source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#88 +# source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#89 RuboCop::Cop::Rails::HttpStatus::SymbolicStyleChecker::DEFAULT_MSG = T.let(T.unsafe(nil), String) -# source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#87 +# source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#88 RuboCop::Cop::Rails::HttpStatus::SymbolicStyleChecker::MSG = T.let(T.unsafe(nil), String) # Checks for places where I18n "lazy" lookup can be used. # -# @example +# This cop has two different enforcement modes. When the EnforcedStyle +# is `lazy` (the default), explicit lookups are added as offenses. +# +# When the EnforcedStyle is `explicit` then lazy lookups are added as +# offenses. +# +# @example EnforcedStyle: lazy (default) # # en.yml # # en: # # books: @@ -3540,34 +3673,60 @@ RuboCop::Cop::Rails::HttpStatus::SymbolicStyleChecker::MSG = T.let(T.unsafe(nil) # redirect_to books_url, notice: t('.success') # end # end +# @example EnforcedStyle: explicit +# # bad +# class BooksController < ApplicationController +# def create +# # ... +# redirect_to books_url, notice: t('.success') +# end +# end # -# source://rubocop-rails//lib/rubocop/cop/rails/i18n_lazy_lookup.rb#31 +# # good +# class BooksController < ApplicationController +# def create +# # ... +# redirect_to books_url, notice: t('books.create.success') +# end +# end +# +# source://rubocop-rails//lib/rubocop/cop/rails/i18n_lazy_lookup.rb#54 class RuboCop::Cop::Rails::I18nLazyLookup < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::VisibilityHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-rails//lib/rubocop/cop/rails/i18n_lazy_lookup.rb#43 + # source://rubocop-rails//lib/rubocop/cop/rails/i18n_lazy_lookup.rb#67 def on_send(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/i18n_lazy_lookup.rb#39 + # source://rubocop-rails//lib/rubocop/cop/rails/i18n_lazy_lookup.rb#63 def translate_call?(param0 = T.unsafe(nil)); end private - # source://rubocop-rails//lib/rubocop/cop/rails/i18n_lazy_lookup.rb#63 + # source://rubocop-rails//lib/rubocop/cop/rails/i18n_lazy_lookup.rb#109 def controller_and_action(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/i18n_lazy_lookup.rb#81 + # source://rubocop-rails//lib/rubocop/cop/rails/i18n_lazy_lookup.rb#127 def controller_path(controller); end - # source://rubocop-rails//lib/rubocop/cop/rails/i18n_lazy_lookup.rb#73 + # source://rubocop-rails//lib/rubocop/cop/rails/i18n_lazy_lookup.rb#119 def get_scoped_key(key_node, controller, action); end + + # source://rubocop-rails//lib/rubocop/cop/rails/i18n_lazy_lookup.rb#96 + def handle_explicit_style(node, key_node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/i18n_lazy_lookup.rb#80 + def handle_lazy_style(node, key_node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/i18n_lazy_lookup.rb#140 + def message(_range); end end -# source://rubocop-rails//lib/rubocop/cop/rails/i18n_lazy_lookup.rb#35 +# source://rubocop-rails//lib/rubocop/cop/rails/i18n_lazy_lookup.rb#59 RuboCop::Cop::Rails::I18nLazyLookup::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-rails//lib/rubocop/cop/rails/i18n_lazy_lookup.rb#37 +# source://rubocop-rails//lib/rubocop/cop/rails/i18n_lazy_lookup.rb#61 RuboCop::Cop::Rails::I18nLazyLookup::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for the use of `I18n.locale=` method. @@ -4200,26 +4359,26 @@ class RuboCop::Cop::Rails::LexicallyScopedActionFilter < ::RuboCop::Cop::Base private - # source://rubocop-rails//lib/rubocop/cop/rails/lexically_scoped_action_filter.rb#155 + # source://rubocop-rails//lib/rubocop/cop/rails/lexically_scoped_action_filter.rb#154 def alias_methods(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/lexically_scoped_action_filter.rb#146 + # source://rubocop-rails//lib/rubocop/cop/rails/lexically_scoped_action_filter.rb#145 def aliased_action_methods(node, defined_methods); end # @param node [RuboCop::AST::Node] # @return [Array] # - # source://rubocop-rails//lib/rubocop/cop/rails/lexically_scoped_action_filter.rb#172 + # source://rubocop-rails//lib/rubocop/cop/rails/lexically_scoped_action_filter.rb#171 def array_values(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/lexically_scoped_action_filter.rb#140 + # source://rubocop-rails//lib/rubocop/cop/rails/lexically_scoped_action_filter.rb#138 def defined_action_methods(block); end # @param methods [Array] # @param parent [RuboCop::AST::Node] # @return [String] # - # source://rubocop-rails//lib/rubocop/cop/rails/lexically_scoped_action_filter.rb#195 + # source://rubocop-rails//lib/rubocop/cop/rails/lexically_scoped_action_filter.rb#194 def message(methods, parent); end end @@ -4478,8 +4637,13 @@ RuboCop::Cop::Rails::NegateInclude::MSG = T.let(T.unsafe(nil), String) # source://rubocop-rails//lib/rubocop/cop/rails/negate_include.rb#26 RuboCop::Cop::Rails::NegateInclude::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# Checks for add_column call with NOT NULL constraint -# in migration file. +# Checks for add_column call with NOT NULL constraint in migration file. +# +# `TEXT` can have default values in PostgreSQL, but not in MySQL. +# It will automatically detect an adapter from `development` environment +# in `config/database.yml` or the environment variable `DATABASE_URL` +# when the `Database` option is not set. If the database is MySQL, +# this cop ignores offenses for the `TEXT`. # # @example # # bad @@ -4492,39 +4656,41 @@ RuboCop::Cop::Rails::NegateInclude::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arra # add_reference :products, :category # add_reference :products, :category, null: false, default: 1 # -# source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#19 +# source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#24 class RuboCop::Cop::Rails::NotNullColumn < ::RuboCop::Cop::Base - # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#23 + include ::RuboCop::Cop::DatabaseTypeResolvable + + # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#30 def add_not_null_column?(param0 = T.unsafe(nil)); end - # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#27 + # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#34 def add_not_null_reference?(param0 = T.unsafe(nil)); end - # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#35 + # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#42 def default_option?(param0 = T.unsafe(nil)); end - # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#31 + # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#38 def null_false?(param0 = T.unsafe(nil)); end - # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#39 + # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#46 def on_send(node); end private - # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#46 + # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#53 def check_add_column(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#54 + # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#64 def check_add_reference(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#60 + # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#70 def check_pairs(pairs); end end -# source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#20 +# source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#27 RuboCop::Cop::Rails::NotNullColumn::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#21 +# source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#28 RuboCop::Cop::Rails::NotNullColumn::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for places where ordering by `id` column is used. @@ -4582,26 +4748,29 @@ class RuboCop::Cop::Rails::Output < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-rails//lib/rubocop/cop/rails/output.rb#31 + # source://rubocop-rails//lib/rubocop/cop/rails/output.rb#32 def io_output?(param0 = T.unsafe(nil)); end - # source://rubocop-rails//lib/rubocop/cop/rails/output.rb#41 + # source://rubocop-rails//lib/rubocop/cop/rails/output.rb#42 def on_send(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/output.rb#27 + # source://rubocop-rails//lib/rubocop/cop/rails/output.rb#28 def output?(param0 = T.unsafe(nil)); end private # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/output.rb#54 + # source://rubocop-rails//lib/rubocop/cop/rails/output.rb#55 def match_gvar?(sym); end - # source://rubocop-rails//lib/rubocop/cop/rails/output.rb#58 + # source://rubocop-rails//lib/rubocop/cop/rails/output.rb#59 def offense_range(node); end end +# source://rubocop-rails//lib/rubocop/cop/rails/output.rb#26 +RuboCop::Cop::Rails::Output::ALLOWED_TYPES = T.let(T.unsafe(nil), Array) + # source://rubocop-rails//lib/rubocop/cop/rails/output.rb#24 RuboCop::Cop::Rails::Output::MSG = T.let(T.unsafe(nil), String) @@ -5173,20 +5342,31 @@ class RuboCop::Cop::Rails::RakeEnvironment < ::RuboCop::Cop::Base private - # source://rubocop-rails//lib/rubocop/cop/rails/rake_environment.rb#58 - def correct_task_dependency(task_name); end + # source://rubocop-rails//lib/rubocop/cop/rails/rake_environment.rb#62 + def correct_task_arguments_dependency(task_method); end # source://rubocop-rails//lib/rubocop/cop/rails/rake_environment.rb#66 + def correct_task_dependency(task_name); end + + # source://rubocop-rails//lib/rubocop/cop/rails/rake_environment.rb#91 + def task_arguments(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/rake_environment.rb#74 def task_name(node); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/rake_environment.rb#83 + # source://rubocop-rails//lib/rubocop/cop/rails/rake_environment.rb#95 + def with_arguments?(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/rake_environment.rb#99 def with_dependencies?(node); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/rake_environment.rb#98 + # source://rubocop-rails//lib/rubocop/cop/rails/rake_environment.rb#114 def with_hash_style_dependencies?(hash_node); end end @@ -5266,6 +5446,81 @@ RuboCop::Cop::Rails::ReadWriteAttribute::MSG = T.let(T.unsafe(nil), String) # source://rubocop-rails//lib/rubocop/cop/rails/read_write_attribute.rb#41 RuboCop::Cop::Rails::ReadWriteAttribute::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) +# Detect redundant `all` used as a receiver for Active Record query methods. +# +# @example +# # bad +# User.all.find(id) +# User.all.order(:created_at) +# users.all.where(id: ids) +# user.articles.all.order(:created_at) +# +# # good +# User.find(id) +# User.order(:created_at) +# users.where(id: ids) +# user.articles.order(:created_at) +# @example AllowedReceivers: ['ActionMailer::Preview', 'ActiveSupport::TimeZone'] (default) +# # good +# ActionMailer::Preview.all.first +# ActiveSupport::TimeZone.all.first +# +# source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#28 +class RuboCop::Cop::Rails::RedundantActiveRecordAllMethod < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ActiveRecordHelper + include ::RuboCop::Cop::AllowedReceivers + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#148 + def followed_by_query_method?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#152 + def on_send(node); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#172 + def offense_range(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#165 + def possible_enumerable_block_method?(node); end +end + +# TODO: In the future, please support only RuboCop 1.52+ and use `RuboCop::Cop::AllowedReceivers`: +# https://github.com/rubocop/rubocop/blob/v1.52.0/lib/rubocop/cop/mixin/allowed_receivers.rb +# At that time, this duplicated module implementation can be removed. +# +# source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#179 +module RuboCop::Cop::Rails::RedundantActiveRecordAllMethod::AllowedReceivers + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#180 + def allowed_receiver?(receiver); end + + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#200 + def allowed_receivers; end + + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#186 + def receiver_name(receiver); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#34 +RuboCop::Cop::Rails::RedundantActiveRecordAllMethod::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#146 +RuboCop::Cop::Rails::RedundantActiveRecordAllMethod::POSSIBLE_ENUMERABLE_BLOCK_METHODS = T.let(T.unsafe(nil), Array) + +# Defined methods in `ActiveRecord::Querying::QUERYING_METHODS` on activerecord 7.1.0. +# +# source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#39 +RuboCop::Cop::Rails::RedundantActiveRecordAllMethod::QUERYING_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#36 +RuboCop::Cop::Rails::RedundantActiveRecordAllMethod::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Checks Rails model validations for a redundant `allow_nil` when # `allow_blank` is present. # @@ -5414,7 +5669,7 @@ class RuboCop::Cop::Rails::RedundantPresenceValidationOnBelongsTo < ::RuboCop::C # @param association [Symbol] # @return [Array, nil] matching node # - # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#99 + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#106 def any_belongs_to?(param0 = T.unsafe(nil), association:); end # Match a class with a matching association, either by name or an explicit @@ -5431,7 +5686,7 @@ class RuboCop::Cop::Rails::RedundantPresenceValidationOnBelongsTo < ::RuboCop::C # @param fk [Symbol] e.g. `:user_id` # @return [Array] matching nodes # - # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#125 + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#132 def belongs_to?(param0 = T.unsafe(nil), key:, fk:); end # Match a matching `belongs_to` association with a matching explicit `foreign_key` option @@ -5442,7 +5697,7 @@ class RuboCop::Cop::Rails::RedundantPresenceValidationOnBelongsTo < ::RuboCop::C # @param fk [Symbol] e.g. `:user_id` # @return [Array] matching nodes # - # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#160 + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#167 def belongs_to_with_a_matching_fk?(param0 = T.unsafe(nil), param1); end # Match a matching `belongs_to` association, without an explicit `foreign_key` option @@ -5451,20 +5706,20 @@ class RuboCop::Cop::Rails::RedundantPresenceValidationOnBelongsTo < ::RuboCop::C # @param key [Symbol] e.g. `:user` # @return [Array] matching nodes # - # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#143 + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#150 def belongs_to_without_fk?(param0 = T.unsafe(nil), param1); end - # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#164 + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#171 def on_send(node); end # Match a `belongs_to` association with an optional option in a hash # - # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#74 + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#81 def optional?(param0 = T.unsafe(nil)); end # Match an optional option in a hash # - # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#80 + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#87 def optional_option?(param0 = T.unsafe(nil)); end # Match a `validates` statement with a presence check @@ -5475,41 +5730,45 @@ class RuboCop::Cop::Rails::RedundantPresenceValidationOnBelongsTo < ::RuboCop::C # validates :name, :user, presence: true # @example source that matches - by a foreign key # validates :user_id, presence: true + # @example source that DOES NOT match - if condition + # validates :user_id, presence: true, if: condition + # @example source that DOES NOT match - unless condition + # validates :user_id, presence: true, unless: condition # @example source that DOES NOT match - strict validation # validates :user_id, presence: true, strict: true # @example source that DOES NOT match - custom strict validation # validates :user_id, presence: true, strict: MissingUserError # - # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#61 + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#67 def presence_validation?(param0 = T.unsafe(nil)); end private - # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#175 + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#182 def add_offense_and_correct(node, all_keys, keys, options, presence); end - # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#203 + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#210 def belongs_to_for(model_class_node, key); end - # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#235 + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#242 def extract_validation_for_keys(corrector, node, keys, options); end - # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#191 + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#198 def message_for(keys); end - # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#196 + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#203 def non_optional_belongs_to(node, keys); end - # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#216 + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#223 def remove_keys_from_validation(corrector, node, keys); end - # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#227 + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#234 def remove_presence_option(corrector, presence); end - # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#212 + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#219 def remove_validation(corrector, node); end - # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#251 + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#258 def validation_range(node); end end @@ -6383,67 +6642,79 @@ class RuboCop::Cop::Rails::RootPathnameMethods < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#146 + # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#172 def dir_glob?(param0 = T.unsafe(nil)); end - # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#163 + # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#189 def on_send(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#137 - def pathname_method(param0 = T.unsafe(nil)); end + # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#163 + def pathname_method_for_ruby_2_4_or_lower(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#153 + def pathname_method_for_ruby_2_5_or_higher(param0 = T.unsafe(nil)); end - # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#159 + # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#185 def rails_root?(param0 = T.unsafe(nil)); end - # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#151 + # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#177 def rails_root_pathname?(param0 = T.unsafe(nil)); end private - # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#186 + # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#220 def build_path_glob_replacement(path, method); end - # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#194 + # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#228 def build_path_replacement(path, method, args); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#228 + # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#262 def enforce_double_quotes?; end # @yield [method, path, args, rails_root] # - # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#179 + # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#205 def evidence(node); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#206 + # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#240 def include_interpolation?(arguments); end - # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#212 + # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#246 def join_arguments(arguments); end - # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#232 + # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#212 + def pathname_method(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#266 def string_literals_config; end end # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#41 +RuboCop::Cop::Rails::RootPathnameMethods::DIR_GLOB_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#56 RuboCop::Cop::Rails::RootPathnameMethods::DIR_METHODS = T.let(T.unsafe(nil), Set) # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#43 +RuboCop::Cop::Rails::RootPathnameMethods::DIR_NON_GLOB_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#58 RuboCop::Cop::Rails::RootPathnameMethods::FILE_METHODS = T.let(T.unsafe(nil), Set) -# source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#105 +# source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#120 RuboCop::Cop::Rails::RootPathnameMethods::FILE_TEST_METHODS = T.let(T.unsafe(nil), Set) -# source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#133 +# source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#148 RuboCop::Cop::Rails::RootPathnameMethods::FILE_UTILS_METHODS = T.let(T.unsafe(nil), Set) # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#39 RuboCop::Cop::Rails::RootPathnameMethods::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#135 +# source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#150 RuboCop::Cop::Rails::RootPathnameMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) # Favor `Rails.public_path` over `Rails.root` with `'public'` @@ -6691,12 +6962,12 @@ class RuboCop::Cop::Rails::SaveBang < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#256 + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#261 def allowed_receiver?(node); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#314 + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#319 def argument?(node); end # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#221 @@ -6715,7 +6986,7 @@ class RuboCop::Cop::Rails::SaveBang < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#252 + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#257 def checked_immediately?(node); end # @return [Boolean] @@ -6734,22 +7005,25 @@ class RuboCop::Cop::Rails::SaveBang < ::RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#289 + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#294 def const_matches?(const, allowed_const); end + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#252 + def deparenthesize(node); end + # Check argument signature as no arguments or one hash # # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#333 + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#338 def expected_signature?(node); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#318 + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#323 def explicit_return?(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#306 + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#311 def find_method_with_sibling_index(node, sibling_index = T.unsafe(nil)); end # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#211 @@ -6757,7 +7031,7 @@ class RuboCop::Cop::Rails::SaveBang < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#296 + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#301 def implicit_return?(node); end # @return [Boolean] @@ -6772,7 +7046,7 @@ class RuboCop::Cop::Rails::SaveBang < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#328 + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#333 def persist_method?(node, methods = T.unsafe(nil)); end # @return [Boolean] @@ -6782,7 +7056,7 @@ class RuboCop::Cop::Rails::SaveBang < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#266 + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#271 def receiver_chain_matches?(node, allowed_receiver); end # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#171 @@ -6790,7 +7064,7 @@ class RuboCop::Cop::Rails::SaveBang < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#323 + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#328 def return_value_assigned?(node); end # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#182 @@ -6870,18 +7144,21 @@ class RuboCop::Cop::Rails::SchemaComment < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/schema_comment.rb#88 + # source://rubocop-rails//lib/rubocop/cop/rails/schema_comment.rb#96 def add_column_without_comment?(node); end + # source://rubocop-rails//lib/rubocop/cop/rails/schema_comment.rb#86 + def check_column_within_create_table_block(node); end + # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/schema_comment.rb#96 - def create_table_column_call_without_comment?(node); end + # source://rubocop-rails//lib/rubocop/cop/rails/schema_comment.rb#100 + def create_table_without_comment?(node); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/schema_comment.rb#92 - def create_table_without_comment?(node); end + # source://rubocop-rails//lib/rubocop/cop/rails/schema_comment.rb#104 + def t_column_without_comment?(node); end end # source://rubocop-rails//lib/rubocop/cop/rails/schema_comment.rb#27 @@ -6924,6 +7201,45 @@ RuboCop::Cop::Rails::ScopeArgs::MSG = T.let(T.unsafe(nil), String) # source://rubocop-rails//lib/rubocop/cop/rails/scope_args.rb#20 RuboCop::Cop::Rails::ScopeArgs::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) +# Checks for uses of `select(:column_name)` with `map(&:column_name)`. +# These can be replaced with `pluck(:column_name)`. +# +# There also should be some performance improvement since it skips instantiating the model class for matches. +# +# @example +# # bad +# Model.select(:column_name).map(&:column_name) +# +# # good +# Model.pluck(:column_name) +# +# source://rubocop-rails//lib/rubocop/cop/rails/select_map.rb#22 +class RuboCop::Cop::Rails::SelectMap < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/select_map.rb#29 + def on_send(node); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/select_map.rb#55 + def autocorrect(corrector, select_node, node, preferred_method); end + + # source://rubocop-rails//lib/rubocop/cop/rails/select_map.rb#46 + def find_select_node(node, column_name); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/select_map.rb#62 + def match_column_name?(select_candidate, column_name); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/select_map.rb#25 +RuboCop::Cop::Rails::SelectMap::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/select_map.rb#27 +RuboCop::Cop::Rails::SelectMap::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Enforces that short forms of `I18n` methods are used: # `t` instead of `translate` and `l` instead of `localize`. # @@ -7260,6 +7576,7 @@ RuboCop::Cop::Rails::ThreeStateBooleanColumn::RESTRICT_ON_SEND = T.let(T.unsafe( # # bad # Time.now # Time.parse('2015-03-02T19:05:37') +# '2015-03-02T19:05:37'.to_time # # # good # Time.current @@ -7277,48 +7594,51 @@ RuboCop::Cop::Rails::ThreeStateBooleanColumn::RESTRICT_ON_SEND = T.let(T.unsafe( # # bad # Time.at(timestamp).in_time_zone # -# source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#42 +# source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#43 class RuboCop::Cop::Rails::TimeZone < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#60 + # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#59 def on_const(node); end + # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#68 + def on_send(node); end + private - # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#221 + # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#228 def acceptable_methods(klass, method_name, node); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#128 + # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#135 def attach_timezone_specifier?(date); end - # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#71 + # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#78 def autocorrect(corrector, node); end - # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#88 + # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#95 def autocorrect_time_new(node, corrector); end - # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#132 + # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#139 def build_message(klass, method_name, node); end - # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#181 + # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#188 def check_localtime(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#110 + # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#117 def check_time_node(klass, node); end - # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#145 + # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#152 def extract_method_chain(node); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#205 + # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#212 def flexible?; end - # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#213 + # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#220 def good_methods; end # Only add the method to the chain if the method being @@ -7326,7 +7646,7 @@ class RuboCop::Cop::Rails::TimeZone < ::RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#156 + # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#163 def method_from_time_class?(node); end # checks that parent node of send_type @@ -7334,22 +7654,22 @@ class RuboCop::Cop::Rails::TimeZone < ::RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#167 + # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#174 def method_send?(node); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#201 + # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#208 def need_check_localtime?(chain); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#197 + # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#204 def not_danger_chain?(chain); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#244 + # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#251 def offset_option_provided?(node); end # Time.new, Time.at, and Time.now can be called with a time zone offset @@ -7359,42 +7679,48 @@ class RuboCop::Cop::Rails::TimeZone < ::RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#235 + # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#242 def offset_provided?(node); end # remove redundant `.in_time_zone` from `Time.zone.now.in_time_zone` # - # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#97 + # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#104 def remove_redundant_in_time_zone(corrector, node); end - # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#173 + # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#180 def safe_method(method_name, node); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#209 + # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#216 def strict?; end end -# source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#56 +# source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#54 RuboCop::Cop::Rails::TimeZone::ACCEPTED_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#54 +# source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#53 RuboCop::Cop::Rails::TimeZone::DANGEROUS_METHODS = T.let(T.unsafe(nil), Array) # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#52 RuboCop::Cop::Rails::TimeZone::GOOD_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#46 +# source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#47 RuboCop::Cop::Rails::TimeZone::MSG = T.let(T.unsafe(nil), String) # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#48 RuboCop::Cop::Rails::TimeZone::MSG_ACCEPTABLE = T.let(T.unsafe(nil), String) -# source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#50 +# source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#49 RuboCop::Cop::Rails::TimeZone::MSG_LOCALTIME = T.let(T.unsafe(nil), String) -# source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#58 +# source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#50 +RuboCop::Cop::Rails::TimeZone::MSG_STRING_TO_TIME = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#57 +RuboCop::Cop::Rails::TimeZone::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#55 RuboCop::Cop::Rails::TimeZone::TIMEZONE_SPECIFIER = T.let(T.unsafe(nil), Regexp) # Checks for the use of `Time.zone=` method. @@ -7556,6 +7882,8 @@ RuboCop::Cop::Rails::TopLevelHashWithIndifferentAccess::MSG = T.let(T.unsafe(nil # error when rollback is desired, and to use `next` when commit is # desired. # +# If you are defining custom transaction methods, you can configure it with `TransactionMethods`. +# # @example # # bad # ApplicationRecord.transaction do @@ -7593,34 +7921,54 @@ RuboCop::Cop::Rails::TopLevelHashWithIndifferentAccess::MSG = T.let(T.unsafe(nil # # Commit # next if user.active? # end +# @example TransactionMethods: ["custom_transaction"] +# # bad +# CustomModel.custom_transaction do +# return if user.active? +# end # -# source://rubocop-rails//lib/rubocop/cop/rails/transaction_exit_statement.rb#53 +# source://rubocop-rails//lib/rubocop/cop/rails/transaction_exit_statement.rb#62 class RuboCop::Cop::Rails::TransactionExitStatement < ::RuboCop::Cop::Base - # source://rubocop-rails//lib/rubocop/cop/rails/transaction_exit_statement.rb#60 + # source://rubocop-rails//lib/rubocop/cop/rails/transaction_exit_statement.rb#66 def exit_statements(param0); end - # source://rubocop-rails//lib/rubocop/cop/rails/transaction_exit_statement.rb#72 + # source://rubocop-rails//lib/rubocop/cop/rails/transaction_exit_statement.rb#78 def on_send(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/transaction_exit_statement.rb#64 + # source://rubocop-rails//lib/rubocop/cop/rails/transaction_exit_statement.rb#70 def rescue_body_return_node?(param0 = T.unsafe(nil)); end private # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/transaction_exit_statement.rb#98 + # source://rubocop-rails//lib/rubocop/cop/rails/transaction_exit_statement.rb#93 + def in_transaction_block?(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/transaction_exit_statement.rb#110 def nested_block?(statement_node); end - # source://rubocop-rails//lib/rubocop/cop/rails/transaction_exit_statement.rb#88 + # source://rubocop-rails//lib/rubocop/cop/rails/transaction_exit_statement.rb#100 def statement(statement_node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/transaction_exit_statement.rb#119 + def transaction_method?(method_name); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/transaction_exit_statement.rb#115 + def transaction_method_name?(method_name); end end -# source://rubocop-rails//lib/rubocop/cop/rails/transaction_exit_statement.rb#54 -RuboCop::Cop::Rails::TransactionExitStatement::MSG = T.let(T.unsafe(nil), String) +# source://rubocop-rails//lib/rubocop/cop/rails/transaction_exit_statement.rb#64 +RuboCop::Cop::Rails::TransactionExitStatement::BUILT_IN_TRANSACTION_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop-rails//lib/rubocop/cop/rails/transaction_exit_statement.rb#58 -RuboCop::Cop::Rails::TransactionExitStatement::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) +# source://rubocop-rails//lib/rubocop/cop/rails/transaction_exit_statement.rb#63 +RuboCop::Cop::Rails::TransactionExitStatement::MSG = T.let(T.unsafe(nil), String) # Prefer using `distinct` before `pluck` instead of `uniq` after `pluck`. # @@ -7884,6 +8232,49 @@ RuboCop::Cop::Rails::UnusedIgnoredColumns::MSG = T.let(T.unsafe(nil), String) # source://rubocop-rails//lib/rubocop/cop/rails/unused_ignored_columns.rb#25 RuboCop::Cop::Rails::UnusedIgnoredColumns::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) +# If you try to render content along with a non-content status code (100-199, 204, 205, or 304), +# it will be dropped from the response. +# +# This cop checks for uses of `render` which specify both body content and a non-content status. +# +# @example +# # bad +# render 'foo', status: :continue +# render status: 100, plain: 'Ruby!' +# +# # good +# head :continue +# head 100 +# +# source://rubocop-rails//lib/rubocop/cop/rails/unused_render_content.rb#19 +class RuboCop::Cop::Rails::UnusedRenderContent < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # source://rubocop-rails//lib/rubocop/cop/rails/unused_render_content.rb#45 + def non_content_status?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/unused_render_content.rb#59 + def on_send(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/unused_render_content.rb#52 + def unused_render_content?(param0 = T.unsafe(nil)); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/unused_render_content.rb#28 +RuboCop::Cop::Rails::UnusedRenderContent::BODY_OPTIONS = T.let(T.unsafe(nil), Set) + +# source://rubocop-rails//lib/rubocop/cop/rails/unused_render_content.rb#22 +RuboCop::Cop::Rails::UnusedRenderContent::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/unused_render_content.rb#25 +RuboCop::Cop::Rails::UnusedRenderContent::NON_CONTENT_STATUSES = T.let(T.unsafe(nil), Set) + +# source://rubocop-rails//lib/rubocop/cop/rails/unused_render_content.rb#24 +RuboCop::Cop::Rails::UnusedRenderContent::NON_CONTENT_STATUS_CODES = T.let(T.unsafe(nil), Set) + +# source://rubocop-rails//lib/rubocop/cop/rails/unused_render_content.rb#23 +RuboCop::Cop::Rails::UnusedRenderContent::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Checks for the use of old-style attribute validation macros. # # @example @@ -8056,7 +8447,6 @@ RuboCop::Cop::Rails::WhereEquals::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # # bad # User.exists?(name: 'john') # User.exists?(['name = ?', 'john']) -# User.exists?('name = ?', 'john') # user.posts.exists?(published: true) # # # good @@ -8066,57 +8456,57 @@ RuboCop::Cop::Rails::WhereEquals::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # user.posts.where(published: true).exists? # User.where('length(name) > 10').exists? # -# source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#51 +# source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#50 class RuboCop::Cop::Rails::WhereExists < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#62 + # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#61 def exists_with_args?(param0 = T.unsafe(nil)); end - # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#66 + # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#65 def on_send(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#58 + # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#57 def where_exists_call?(param0 = T.unsafe(nil)); end private - # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#112 + # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#111 def build_good_method(args); end - # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#120 + # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#119 def build_good_method_exists(args); end - # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#128 + # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#127 def build_good_method_where(args); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#98 + # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#97 def convertable_args?(args); end - # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#104 + # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#103 def correction_range(node); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#86 + # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#85 def exists_style?; end - # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#90 + # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#89 def find_offenses(node, &block); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#82 + # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#81 def where_style?; end end -# source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#55 +# source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#54 RuboCop::Cop::Rails::WhereExists::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#56 +# source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#55 RuboCop::Cop::Rails::WhereExists::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Use `where.missing(...)` to find missing relationship records. @@ -8305,116 +8695,179 @@ RuboCop::Cop::Rails::WhereNotWithMultipleConditions::RESTRICT_ON_SEND = T.let(T. module RuboCop::Cop::Style; end +class RuboCop::Cop::Style::InverseMethods < ::RuboCop::Cop::Base + # source://rubocop/1.57.2/lib/rubocop/cop/style/inverse_methods.rb#70 + def inverse_block?(param0 = T.unsafe(nil)); end + + # source://rubocop/1.57.2/lib/rubocop/cop/style/inverse_methods.rb#61 + def inverse_candidate?(param0 = T.unsafe(nil)); end + + # source://rubocop/1.57.2/lib/rubocop/cop/style/inverse_methods.rb#91 + def on_block(node); end + + # source://rubocop/1.57.2/lib/rubocop/cop/style/inverse_methods.rb#91 + def on_numblock(node); end + + # source://rubocop/1.57.2/lib/rubocop/cop/style/inverse_methods.rb#78 + def on_send(node); end + + private + + # source://rubocop/1.57.2/lib/rubocop/cop/style/inverse_methods.rb#176 + def camel_case_constant?(node); end + + # source://rubocop/1.57.2/lib/rubocop/cop/style/inverse_methods.rb#120 + def correct_inverse_block(corrector, node); end + + # source://rubocop/1.57.2/lib/rubocop/cop/style/inverse_methods.rb#111 + def correct_inverse_method(corrector, node); end + + # source://rubocop/1.57.2/lib/rubocop/cop/style/inverse_methods.rb#127 + def correct_inverse_selector(block, corrector); end + + # source://rubocop/1.57.2/lib/rubocop/cop/style/inverse_methods.rb#180 + def dot_range(loc); end + + # source://rubocop/1.57.2/lib/rubocop/cop/style/inverse_methods.rb#163 + def end_parentheses(node, method_call); end + + # source://rubocop/1.57.2/lib/rubocop/cop/style/inverse_methods.rb#149 + def inverse_blocks; end + + # source://rubocop/1.57.2/lib/rubocop/cop/style/inverse_methods.rb#144 + def inverse_methods; end + + # source://rubocop/1.57.2/lib/rubocop/cop/style/inverse_methods.rb#190 + def message(method, inverse); end + + # source://rubocop/1.57.2/lib/rubocop/cop/style/inverse_methods.rb#153 + def negated?(node); end + + # source://rubocop/1.57.2/lib/rubocop/cop/style/inverse_methods.rb#157 + def not_to_receiver(node, method_call); end + + # source://rubocop/1.57.2/lib/rubocop/cop/style/inverse_methods.rb#171 + def possible_class_hierarchy_check?(lhs, rhs, method); end + + # source://rubocop/1.57.2/lib/rubocop/cop/style/inverse_methods.rb#184 + def remove_end_parenthesis(corrector, node, method, method_call); end + + class << self + # source://rubocop-rails//lib/rubocop-rails.rb#22 + def autocorrect_incompatible_with; end + end +end + class RuboCop::Cop::Style::MethodCallWithArgsParentheses < ::RuboCop::Cop::Base - # source://rubocop/1.54.0/lib/rubocop/cop/style/method_call_with_args_parentheses.rb#217 + # source://rubocop/1.57.2/lib/rubocop/cop/style/method_call_with_args_parentheses.rb#217 def on_csend(node); end - # source://rubocop/1.54.0/lib/rubocop/cop/style/method_call_with_args_parentheses.rb#217 + # source://rubocop/1.57.2/lib/rubocop/cop/style/method_call_with_args_parentheses.rb#217 def on_send(node); end - # source://rubocop/1.54.0/lib/rubocop/cop/style/method_call_with_args_parentheses.rb#217 + # source://rubocop/1.57.2/lib/rubocop/cop/style/method_call_with_args_parentheses.rb#217 def on_super(node); end - # source://rubocop/1.54.0/lib/rubocop/cop/style/method_call_with_args_parentheses.rb#217 + # source://rubocop/1.57.2/lib/rubocop/cop/style/method_call_with_args_parentheses.rb#217 def on_yield(node); end private - # source://rubocop/1.54.0/lib/rubocop/cop/style/method_call_with_args_parentheses.rb#226 + # source://rubocop/1.57.2/lib/rubocop/cop/style/method_call_with_args_parentheses.rb#226 def args_begin(node); end - # source://rubocop/1.54.0/lib/rubocop/cop/style/method_call_with_args_parentheses.rb#235 + # source://rubocop/1.57.2/lib/rubocop/cop/style/method_call_with_args_parentheses.rb#235 def args_end(node); end - # source://rubocop/1.54.0/lib/rubocop/cop/style/method_call_with_args_parentheses.rb#239 + # source://rubocop/1.57.2/lib/rubocop/cop/style/method_call_with_args_parentheses.rb#239 def args_parenthesized?(node); end class << self - # source://rubocop-rails//lib/rubocop-rails.rb#22 + # source://rubocop-rails//lib/rubocop-rails.rb#30 def autocorrect_incompatible_with; end end end class RuboCop::Cop::Style::RedundantSelf < ::RuboCop::Cop::Base - # source://rubocop/1.54.0/lib/rubocop/cop/style/redundant_self.rb#59 + # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#59 def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end - # source://rubocop/1.54.0/lib/rubocop/cop/style/redundant_self.rb#67 + # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#67 def on_and_asgn(node); end - # source://rubocop/1.54.0/lib/rubocop/cop/style/redundant_self.rb#85 + # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#85 def on_args(node); end - # source://rubocop/1.54.0/lib/rubocop/cop/style/redundant_self.rb#119 + # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#119 def on_block(node); end - # source://rubocop/1.54.0/lib/rubocop/cop/style/redundant_self.rb#89 + # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#89 def on_blockarg(node); end - # source://rubocop/1.54.0/lib/rubocop/cop/style/redundant_self.rb#80 + # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#80 def on_def(node); end - # source://rubocop/1.54.0/lib/rubocop/cop/style/redundant_self.rb#80 + # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#80 def on_defs(node); end - # source://rubocop/1.54.0/lib/rubocop/cop/style/redundant_self.rb#125 + # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#125 def on_if(node); end - # source://rubocop/1.54.0/lib/rubocop/cop/style/redundant_self.rb#103 + # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#103 def on_in_pattern(node); end - # source://rubocop/1.54.0/lib/rubocop/cop/style/redundant_self.rb#98 + # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#98 def on_lvasgn(node); end - # source://rubocop/1.54.0/lib/rubocop/cop/style/redundant_self.rb#93 + # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#93 def on_masgn(node); end - # source://rubocop/1.54.0/lib/rubocop/cop/style/redundant_self.rb#119 + # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#119 def on_numblock(node); end - # source://rubocop/1.54.0/lib/rubocop/cop/style/redundant_self.rb#73 + # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#73 def on_op_asgn(node); end - # source://rubocop/1.54.0/lib/rubocop/cop/style/redundant_self.rb#67 + # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#67 def on_or_asgn(node); end - # source://rubocop/1.54.0/lib/rubocop/cop/style/redundant_self.rb#107 + # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#107 def on_send(node); end - # source://rubocop/1.54.0/lib/rubocop/cop/style/redundant_self.rb#125 + # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#125 def on_until(node); end - # source://rubocop/1.54.0/lib/rubocop/cop/style/redundant_self.rb#125 + # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#125 def on_while(node); end private - # source://rubocop/1.54.0/lib/rubocop/cop/style/redundant_self.rb#181 + # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#181 def add_lhs_to_local_variables_scopes(rhs, lhs); end - # source://rubocop/1.54.0/lib/rubocop/cop/style/redundant_self.rb#189 + # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#189 def add_masgn_lhs_variables(rhs, lhs); end - # source://rubocop/1.54.0/lib/rubocop/cop/style/redundant_self.rb#195 + # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#195 def add_match_var_scopes(in_pattern_node); end - # source://rubocop/1.54.0/lib/rubocop/cop/style/redundant_self.rb#143 + # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#143 def add_scope(node, local_variables = T.unsafe(nil)); end - # source://rubocop/1.54.0/lib/rubocop/cop/style/redundant_self.rb#175 + # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#175 def allow_self(node); end - # source://rubocop/1.54.0/lib/rubocop/cop/style/redundant_self.rb#149 + # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#149 def allowed_send_node?(node); end - # source://rubocop/1.54.0/lib/rubocop/cop/style/redundant_self.rb#166 + # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#166 def on_argument(node); end - # source://rubocop/1.54.0/lib/rubocop/cop/style/redundant_self.rb#158 + # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#158 def regular_method_call?(node); end class << self - # source://rubocop-rails//lib/rubocop-rails.rb#30 + # source://rubocop-rails//lib/rubocop-rails.rb#38 def autocorrect_incompatible_with; end end end diff --git a/sorbet/rbi/gems/rubocop-rspec@2.22.0.rbi b/sorbet/rbi/gems/rubocop-rspec@2.25.0.rbi similarity index 92% rename from sorbet/rbi/gems/rubocop-rspec@2.22.0.rbi rename to sorbet/rbi/gems/rubocop-rspec@2.25.0.rbi index d1c9dd215..a2f3ddec1 100644 --- a/sorbet/rbi/gems/rubocop-rspec@2.22.0.rbi +++ b/sorbet/rbi/gems/rubocop-rspec@2.25.0.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. @@ -1392,7 +1392,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 @@ -1517,27 +1517,27 @@ class RuboCop::Cop::RSpec::EmptyExampleGroup < ::RuboCop::Cop::RSpec::Base # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_example_group.rb#97 def examples_inside_block?(param0 = T.unsafe(nil)); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_example_group.rb#137 + # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_example_group.rb#138 def on_block(node); end private # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_example_group.rb#163 + # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_example_group.rb#164 def conditionals_with_examples?(body); end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_example_group.rb#171 + # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_example_group.rb#172 def examples_in_branches?(condition_node); end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_example_group.rb#152 + # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_example_group.rb#153 def offensive?(body); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_example_group.rb#175 + # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_example_group.rb#178 def removed_range(node); end end @@ -1838,15 +1838,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 +1924,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,22 +1940,27 @@ 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. @@ -2100,10 +2165,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#67 + # 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#76 + # source://rubocop-rspec//lib/rubocop/cop/rspec/excessive_docstring_spacing.rb#85 def docstring(node); end # @param text [String] @@ -2114,13 +2179,13 @@ class RuboCop::Cop::RSpec::ExcessiveDocstringSpacing < ::RuboCop::Cop::RSpec::Ba # @param text [String] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/excessive_docstring_spacing.rb#61 + # source://rubocop-rspec//lib/rubocop/cop/rspec/excessive_docstring_spacing.rb#68 def strip_excessive_whitespace(text); end # Recursive processing is required to process nested dstr nodes # that is the case for \-separated multiline strings with interpolation. # - # source://rubocop-rspec//lib/rubocop/cop/rspec/excessive_docstring_spacing.rb#88 + # source://rubocop-rspec//lib/rubocop/cop/rspec/excessive_docstring_spacing.rb#97 def text(node); end end @@ -2162,7 +2227,7 @@ class RuboCop::Cop::RSpec::ExpectActual < ::RuboCop::Cop::RSpec::Base # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_actual.rb#90 def complex_literal?(node); end - # This is not implement using a NodePattern because it seems + # This is not implemented using a NodePattern because it seems # to not be able to match against an explicit (nil) sexp # # @return [Boolean] @@ -2533,8 +2598,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 +2663,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. @@ -2697,41 +2776,53 @@ end # # good # describe 'test' do; end # +# # bad +# shared_examples 'test', focus: true do; end +# +# # good +# shared_examples 'test' do; end +# +# # bad +# shared_context 'test', focus: true do; end +# +# # good +# shared_context 'test' do; end +# # # bad (does not support autocorrection) # focus 'test' do; end # -# source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#40 +# source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#52 class RuboCop::Cop::RSpec::Focus < ::RuboCop::Cop::RSpec::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#47 + # source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#59 def focusable_selector?(param0 = T.unsafe(nil)); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#64 + # source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#77 def focused_block?(param0 = T.unsafe(nil)); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#58 + # source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#71 def metadata(param0 = T.unsafe(nil)); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#68 + # source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#81 def on_send(node); end private - # source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#95 + # 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#82 + # 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#88 + # source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#103 def with_surrounding(focus); end end -# source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#44 +# source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#56 RuboCop::Cop::RSpec::Focus::MSG = T.let(T.unsafe(nil), String) # Checks the arguments passed to `before`, `around`, and `after`. @@ -3140,6 +3231,9 @@ RuboCop::Cop::RSpec::ImplicitSubject::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Ar # It makes reading the test harder because it's not clear what exactly # is tested by this particular example. # +# The configurable options `AllowedIdentifiers` and `AllowedPatterns` +# will also read those set in `Naming/VariableNumber`. +# # @example `Max: 1 (default)` # # bad # let(:item_1) { create(:item) } @@ -3161,36 +3255,53 @@ RuboCop::Cop::RSpec::ImplicitSubject::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Ar # # good # let(:item_1) { create(:item) } # let(:item_2) { create(:item) } +# @example `AllowedIdentifiers: ['item_1', 'item_2']` +# # good +# let(:item_1) { create(:item) } +# let(:item_2) { create(:item) } +# @example `AllowedPatterns: ['item']` +# # good +# let(:item_1) { create(:item) } +# let(:item_2) { create(:item) } # -# source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#34 +# source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#47 class RuboCop::Cop::RSpec::IndexedLet < ::RuboCop::Cop::RSpec::Base - # source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#39 + include ::RuboCop::Cop::AllowedIdentifiers + include ::RuboCop::Cop::AllowedPattern + + # source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#55 def let_name(param0 = T.unsafe(nil)); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#46 + # source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#62 def on_block(node); end private - # source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#62 + # source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#104 + def allowed_identifiers; end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#98 + def cop_config_patterns_values; end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#78 def filter_indexed_lets(candidates); end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#71 + # source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#87 def indexed_let?(node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#75 + # source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#94 def let_name_stripped_index(node); end end -# source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#60 +# source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#76 RuboCop::Cop::RSpec::IndexedLet::INDEX_REGEX = T.let(T.unsafe(nil), Regexp) -# source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#35 +# source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#51 RuboCop::Cop::RSpec::IndexedLet::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#59 +# source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#75 RuboCop::Cop::RSpec::IndexedLet::SUFFIX_INDEX_REGEX = T.let(T.unsafe(nil), Regexp) # A helper for `inflected` style @@ -3609,7 +3720,7 @@ RuboCop::Cop::RSpec::LeadingSubject::MSG = T.let(T.unsafe(nil), String) # stub_const('SomeModule::SomeClass', foo_class) # end # end -# @see https://relishapp.com/rspec/rspec-mocks/docs/mutating-constants +# @see https://rspec.info/features/3-12/rspec-mocks/mutating-constants # # source://rubocop-rspec//lib/rubocop/cop/rspec/leaky_constant_declaration.rb#96 class RuboCop::Cop::RSpec::LeakyConstantDeclaration < ::RuboCop::Cop::RSpec::Base @@ -3677,29 +3788,34 @@ class RuboCop::Cop::RSpec::LetBeforeExamples < ::RuboCop::Cop::RSpec::Base # source://rubocop-rspec//lib/rubocop/cop/rspec/let_before_examples.rb#47 def include_examples?(param0 = T.unsafe(nil)); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/let_before_examples.rb#54 + # source://rubocop-rspec//lib/rubocop/cop/rspec/let_before_examples.rb#58 def on_block(node); end private - # source://rubocop-rspec//lib/rubocop/cop/rspec/let_before_examples.rb#89 + # source://rubocop-rspec//lib/rubocop/cop/rspec/let_before_examples.rb#93 def autocorrect(corrector, node, first_example); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/let_before_examples.rb#70 + # source://rubocop-rspec//lib/rubocop/cop/rspec/let_before_examples.rb#74 def check_let_declarations(node); end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/let_before_examples.rb#62 + # source://rubocop-rspec//lib/rubocop/cop/rspec/let_before_examples.rb#66 def example_group_with_include_examples?(body); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/let_before_examples.rb#85 + # source://rubocop-rspec//lib/rubocop/cop/rspec/let_before_examples.rb#89 def find_first_example(node); end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/let_before_examples.rb#66 + # source://rubocop-rspec//lib/rubocop/cop/rspec/let_before_examples.rb#70 def multiline_block?(block); end + + class << self + # source://rubocop-rspec//lib/rubocop/cop/rspec/let_before_examples.rb#54 + def autocorrect_incompatible_with; end + end end # source://rubocop-rspec//lib/rubocop/cop/rspec/let_before_examples.rb#36 @@ -3993,7 +4109,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 @@ -4003,6 +4119,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. @@ -4829,21 +5046,29 @@ RuboCop::Cop::RSpec::OverwritingSetup::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::Pending < ::RuboCop::Cop::RSpec::Base include ::RuboCop::Cop::RSpec::SkipOrPending - # source://rubocop-rspec//lib/rubocop/cop/rspec/pending.rb#56 + # source://rubocop-rspec//lib/rubocop/cop/rspec/pending.rb#61 def on_send(node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/pending.rb#49 + # source://rubocop-rspec//lib/rubocop/cop/rspec/pending.rb#54 def pending_block?(param0 = T.unsafe(nil)); end # source://rubocop-rspec//lib/rubocop/cop/rspec/pending.rb#41 def skippable?(param0 = T.unsafe(nil)); end + # source://rubocop-rspec//lib/rubocop/cop/rspec/pending.rb#49 + def skippable_example?(param0 = T.unsafe(nil)); end + private # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/pending.rb#64 + # source://rubocop-rspec//lib/rubocop/cop/rspec/pending.rb#69 def skipped?(node); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/pending.rb#74 + def skipped_regular_example_without_body?(node); end end # source://rubocop-rspec//lib/rubocop/cop/rspec/pending.rb#38 @@ -5086,28 +5311,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 } @@ -5115,127 +5346,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 @@ -5385,6 +5613,67 @@ RuboCop::Cop::RSpec::Rails::MinitestAssertions::MSG = T.let(T.unsafe(nil), Strin # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#24 RuboCop::Cop::RSpec::Rails::MinitestAssertions::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) +# Enforces use of `be_invalid` or `not_to` for negated be_valid. +# +# @example EnforcedStyle: not_to (default) +# # bad +# expect(foo).to be_invalid +# +# # good +# expect(foo).not_to be_valid +# +# # good (with method chain) +# expect(foo).to be_invalid.and be_odd +# @example EnforcedStyle: be_invalid +# # bad +# expect(foo).not_to be_valid +# +# # good +# expect(foo).to be_invalid +# +# # good (with method chain) +# expect(foo).to be_invalid.or be_even +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/negation_be_valid.rb#33 +class RuboCop::Cop::RSpec::Rails::NegationBeValid < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/negation_be_valid.rb#46 + def be_invalid?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/negation_be_valid.rb#41 + def not_to?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/negation_be_valid.rb#50 + def on_send(node); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/negation_be_valid.rb#75 + def message(_matcher); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/negation_be_valid.rb#62 + def offense?(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/negation_be_valid.rb#71 + def offense_range(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/negation_be_valid.rb#90 + def replaced_matcher; end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/negation_be_valid.rb#81 + def replaced_runner; end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/negation_be_valid.rb#37 +RuboCop::Cop::RSpec::Rails::NegationBeValid::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/negation_be_valid.rb#38 +RuboCop::Cop::RSpec::Rails::NegationBeValid::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Prefer to travel in `before` rather than `around`. # # @example @@ -5485,6 +5774,95 @@ RuboCop::Cop::RSpec::ReceiveCounts::MSG = T.let(T.unsafe(nil), String) # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_counts.rb#30 RuboCop::Cop::RSpec::ReceiveCounts::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) +# Checks for multiple messages stubbed on the same object. +# +# @example +# # bad +# before do +# allow(Service).to receive(:foo).and_return(bar) +# allow(Service).to receive(:baz).and_return(qux) +# end +# +# # good +# before do +# allow(Service).to receive_messages(foo: bar, baz: qux) +# end +# +# # good - ignore same message +# before do +# allow(Service).to receive(:foo).and_return(bar) +# allow(Service).to receive(:foo).and_return(qux) +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/receive_messages.rb#31 +class RuboCop::Cop::RSpec::ReceiveMessages < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_messages.rb#44 + def allow_argument(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_messages.rb#39 + def allow_receive_message?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_messages.rb#63 + def on_begin(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_messages.rb#59 + def receive_and_return_argument(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_messages.rb#54 + def receive_arg(param0); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_messages.rb#49 + def receive_node(param0); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_messages.rb#83 + def add_repeated_lines_and_arguments(items); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_messages.rb#100 + def arguments(items); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_messages.rb#150 + 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 + + # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_messages.rb#135 + def message(repeated_lines); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_messages.rb#109 + def normalize_receive_arg(receive_arg); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_messages.rb#117 + def normalize_return_arg(return_arg); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_messages.rb#125 + def register_offense(item, repeated_lines, args); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_messages.rb#73 + def repeated_receive_message(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_messages.rb#139 + def replace_to_receive_messages(corrector, item, args); end + + # @return [Boolean] + # + # 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 + def uniq_items(items); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/receive_messages.rb#35 +RuboCop::Cop::RSpec::ReceiveMessages::MSG = T.let(T.unsafe(nil), String) + # Prefer `not_to receive(...)` over `receive(...).never`. # # @example @@ -6391,31 +6769,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 @@ -6809,7 +7307,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] # @@ -6906,7 +7404,7 @@ RuboCop::Cop::RSpec::VariableName::MSG = T.let(T.unsafe(nil), String) # let(:foo) do # instance_double(@klass, method_name: 'returned_value') # end -# @see https://relishapp.com/rspec/rspec-mocks/docs/verifying-doubles +# @see https://rspec.info/features/3-12/rspec-mocks/verifying-doubles # # source://rubocop-rspec//lib/rubocop/cop/rspec/verified_double_reference.rb#43 class RuboCop::Cop::RSpec::VerifiedDoubleReference < ::RuboCop::Cop::RSpec::Base @@ -6922,7 +7420,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] # @@ -6956,7 +7454,7 @@ RuboCop::Cop::RSpec::VerifiedDoubleReference::RESTRICT_ON_SEND = T.let(T.unsafe( # let(:foo) do # instance_double("ClassName", method_name: 'returned value') # end -# @see https://relishapp.com/rspec/rspec-mocks/docs/verifying-doubles +# @see https://rspec.info/features/3-12/rspec-mocks/verifying-doubles # # source://rubocop-rspec//lib/rubocop/cop/rspec/verified_doubles.rb#26 class RuboCop::Cop::RSpec::VerifiedDoubles < ::RuboCop::Cop::RSpec::Base @@ -7075,14 +7573,14 @@ class RuboCop::Cop::Style::TrailingCommaInArguments < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::RangeHelp - # source://rubocop/1.54.0/lib/rubocop/cop/style/trailing_comma_in_arguments.rb#95 + # source://rubocop/1.57.2/lib/rubocop/cop/style/trailing_comma_in_arguments.rb#95 def on_csend(node); end - # source://rubocop/1.54.0/lib/rubocop/cop/style/trailing_comma_in_arguments.rb#95 + # source://rubocop/1.57.2/lib/rubocop/cop/style/trailing_comma_in_arguments.rb#95 def on_send(node); end class << self - # source://rubocop-rspec//lib/rubocop-rspec.rb#59 + # source://rubocop-rspec//lib/rubocop-rspec.rb#60 def autocorrect_incompatible_with; end end end diff --git a/sorbet/rbi/gems/rubocop@1.54.0.rbi b/sorbet/rbi/gems/rubocop@1.57.2.rbi similarity index 97% rename from sorbet/rbi/gems/rubocop@1.54.0.rbi rename to sorbet/rbi/gems/rubocop@1.57.2.rbi index d8d0901ba..713b62b8a 100644 --- a/sorbet/rbi/gems/rubocop@1.54.0.rbi +++ b/sorbet/rbi/gems/rubocop@1.57.2.rbi @@ -166,77 +166,77 @@ end class RuboCop::CLI::Command::AutoGenerateConfig < ::RuboCop::CLI::Command::Base # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#21 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#22 def run; end private # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#97 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#98 def add_formatter; end # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#105 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#106 def add_inheritance_from_auto_generated_file(config_file); end # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#101 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#102 def execute_runner; end # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#126 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#127 def existing_configuration(config_file); end # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#59 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#60 def line_length_cop(config); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#47 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#48 def line_length_enabled?(config); end # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#55 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#56 def max_line_length(config); end # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#30 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#31 def maybe_run_line_length_cop; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#148 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#153 def options_config_in_root?; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#63 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#64 def options_has_only_flag?; end # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#139 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#144 def relative_path_to_todo_from_options_config; end # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#90 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#91 def reset_config_and_auto_gen_file; end # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#81 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#82 def run_all_cops(line_length_contents); end # Do an initial run with only Layout/LineLength so that cops that @@ -245,23 +245,23 @@ class RuboCop::CLI::Command::AutoGenerateConfig < ::RuboCop::CLI::Command::Base # # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#70 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#71 def run_line_length_cop; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#51 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#52 def same_max_line_length?(config1, config2); end # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#42 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#43 def skip_line_length_cop(reason); end # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#132 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#133 def write_config_file(file_name, file_string, rubocop_yml_contents); end end @@ -272,29 +272,34 @@ RuboCop::CLI::Command::AutoGenerateConfig::AUTO_GENERATED_FILE = T.let(T.unsafe( # @api private # -# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#14 +# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#15 RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1 = T.let(T.unsafe(nil), String) # @api private # -# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#18 +# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#19 RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_DISABLED = T.let(T.unsafe(nil), String) # @api private # -# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#17 +# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#18 RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_OVERRIDDEN = T.let(T.unsafe(nil), String) # @api private # -# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#19 +# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#20 RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_SKIPPED = T.let(T.unsafe(nil), String) # @api private # -# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#15 +# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#16 RuboCop::CLI::Command::AutoGenerateConfig::PHASE_2 = T.let(T.unsafe(nil), String) +# @api private +# +# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#13 +RuboCop::CLI::Command::AutoGenerateConfig::PLACEHOLDER = T.let(T.unsafe(nil), String) + # @api private # # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#12 @@ -1915,22 +1920,28 @@ class RuboCop::ConfigObsoletion::ParameterRule < ::RuboCop::ConfigObsoletion::Ru # @api private # - # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#31 + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#39 def alternative; end # @api private # - # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#35 + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#43 def alternatives; end # @api private + # @return [Boolean] # - # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#39 + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#31 + def applies_to_current_ruby_version?; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#47 def reason; end # @api private # - # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#43 + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#51 def severity; end end @@ -2735,25 +2746,25 @@ module RuboCop::Cop::AutocorrectLogic # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#46 def disable_offense(offense_range); end - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#111 + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#113 def disable_offense_at_end_of_line(range, eol_comment); end - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#115 + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#117 def disable_offense_before_and_after(range_by_lines); end # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#56 def disable_offense_with_eol_or_surround_comment(range); end - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#107 + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#109 def max_line_length; end # Expand the given range to include all of any lines it covers. Does not # include newline at end of the last line. # - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#97 + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#99 def range_by_lines(range); end - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#88 + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#90 def range_of_first_line(range); end # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#67 @@ -3099,7 +3110,7 @@ class RuboCop::Cop::Base # time as this cop # # @api public - # @return [Array] + # @return [Array] # # source://rubocop//lib/rubocop/cop/base.rb#59 def autocorrect_incompatible_with; end @@ -3292,38 +3303,121 @@ module RuboCop::Cop::Bundler; end # gem 'rubocop', '~> 0.90.0' # end # -# source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#38 +# source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#39 class RuboCop::Cop::Bundler::DuplicatedGem < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp - # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#57 + # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#58 def gem_declarations(param0); end - # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#44 + # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#45 def on_new_investigation; end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#66 + # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#67 def conditional_declaration?(nodes); end - # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#59 + # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#60 def duplicated_gem_nodes; end - # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#80 + # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#81 def register_offense(node, gem_name, line_of_first_occurrence); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#74 + # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#75 def within_conditional?(node, conditional_node); end end -# source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#41 +# source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#42 RuboCop::Cop::Bundler::DuplicatedGem::MSG = T.let(T.unsafe(nil), String) +# A Gem group, or a set of groups, should be listed only once in a Gemfile. +# +# For example, if the values of `source`, `git`, `platforms`, or `path` +# surrounding `group` are different, no offense will be registered: +# +# [source,ruby] +# ----- +# platforms :ruby do +# group :default do +# gem 'openssl' +# end +# end +# +# platforms :jruby do +# group :default do +# gem 'jruby-openssl' +# end +# end +# ----- +# +# @example +# # bad +# group :development do +# gem 'rubocop' +# end +# +# group :development do +# gem 'rubocop-rails' +# end +# +# # bad (same set of groups declared twice) +# group :development, :test do +# gem 'rubocop' +# end +# +# group :test, :development do +# gem 'rspec' +# end +# +# # good +# group :development do +# gem 'rubocop' +# end +# +# group :development, :test do +# gem 'rspec' +# end +# +# # good +# gem 'rubocop', groups: [:development, :test] +# gem 'rspec', groups: [:development, :test] +# +# source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#58 +class RuboCop::Cop::Bundler::DuplicatedGroup < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#66 + def group_declarations(param0); end + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#68 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#82 + def duplicated_group_nodes; end + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#105 + def find_source_key(node); end + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#115 + def group_attributes(node); end + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#94 + def register_offense(node, group_name, line_of_first_occurrence); end +end + +# source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#61 +RuboCop::Cop::Bundler::DuplicatedGroup::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#63 +RuboCop::Cop::Bundler::DuplicatedGroup::SOURCE_BLOCK_NAMES = T.let(T.unsafe(nil), Array) + # Each gem in the Gemfile should have a comment explaining # its purpose in the project, or the reason for its version # or source. @@ -3762,31 +3856,37 @@ RuboCop::Cop::Bundler::InsecureProtocolSource::RESTRICT_ON_SEND = T.let(T.unsafe # gem 'rubocop' # # gem 'rspec' -# -# # good only if TreatCommentsAsGroupSeparators is true +# @example TreatCommentsAsGroupSeparators: true (default) +# # good +# # For code quality +# gem 'rubocop' +# # For tests +# gem 'rspec' +# @example TreatCommentsAsGroupSeparators: false +# # bad # # For code quality # gem 'rubocop' # # For tests # gem 'rspec' # -# source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#27 +# source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#35 class RuboCop::Cop::Bundler::OrderedGems < ::RuboCop::Cop::Base include ::RuboCop::Cop::OrderedGemNode extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#56 + # source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#64 def gem_declarations(param0); end - # source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#35 + # source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#43 def on_new_investigation; end private - # source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#49 + # source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#57 def previous_declaration(node); end end -# source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#31 +# source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#39 RuboCop::Cop::Bundler::OrderedGems::MSG = T.let(T.unsafe(nil), String) # Common functionality for checking assignment nodes. @@ -4894,7 +4994,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.2.2.4/lib/parser/source/tree_rewriter.rb#252 def rewrite; end # Swaps sources at the given ranges. @@ -5226,24 +5326,24 @@ RuboCop::Cop::EndKeywordAlignment::MSG = T.let(T.unsafe(nil), String) module RuboCop::Cop::EnforceSuperclass # @api private # - # source://rubocop-rails/2.20.2/lib/rubocop/cop/mixin/enforce_superclass.rb#19 + # source://rubocop-rails/2.22.1/lib/rubocop/cop/mixin/enforce_superclass.rb#19 def on_class(node); end # @api private # - # source://rubocop-rails/2.20.2/lib/rubocop/cop/mixin/enforce_superclass.rb#25 + # source://rubocop-rails/2.22.1/lib/rubocop/cop/mixin/enforce_superclass.rb#25 def on_send(node); end private - # source://rubocop-rails/2.20.2/lib/rubocop/cop/mixin/enforce_superclass.rb#33 + # source://rubocop-rails/2.22.1/lib/rubocop/cop/mixin/enforce_superclass.rb#33 def register_offense(offense_node); end class << self # @api private # @private # - # source://rubocop-rails/2.20.2/lib/rubocop/cop/mixin/enforce_superclass.rb#7 + # source://rubocop-rails/2.22.1/lib/rubocop/cop/mixin/enforce_superclass.rb#7 def included(base); end end end @@ -5809,34 +5909,40 @@ RuboCop::Cop::Gemspec::DuplicatedAssignment::MSG = T.let(T.unsafe(nil), String) # spec.add_runtime_dependency 'rubocop' # # spec.add_runtime_dependency 'rspec' -# -# # good only if TreatCommentsAsGroupSeparators is true +# @example TreatCommentsAsGroupSeparators: true (default) +# # good +# # For code quality +# spec.add_dependency 'rubocop' +# # For tests +# spec.add_dependency 'rspec' +# @example TreatCommentsAsGroupSeparators: false +# # bad # # For code quality # spec.add_dependency 'rubocop' # # For tests # spec.add_dependency 'rspec' # -# source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#53 +# source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#61 class RuboCop::Cop::Gemspec::OrderedDependencies < ::RuboCop::Cop::Base include ::RuboCop::Cop::OrderedGemNode extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#87 + # source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#95 def dependency_declarations(param0); end - # source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#61 + # source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#69 def on_new_investigation; end private - # source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#82 + # source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#90 def get_dependency_name(node); end - # source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#76 + # source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#84 def previous_declaration(node); end end -# source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#57 +# source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#65 RuboCop::Cop::Gemspec::OrderedDependencies::MSG = T.let(T.unsafe(nil), String) # Requires a gemspec to have `rubygems_mfa_required` metadata set. @@ -6427,61 +6533,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 @@ -6489,22 +6595,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 @@ -6517,12 +6623,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 @@ -6536,7 +6642,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 @@ -6920,74 +7026,74 @@ class RuboCop::Cop::LambdaLiteralToMethodCorrector # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#115 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#118 def arg_to_unparenthesized_call?; end # Returns the value of attribute arguments. # - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#31 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#34 def arguments; end - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#99 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#102 def arguments_begin_pos; end - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#95 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#98 def arguments_end_pos; end - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#107 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#110 def block_begin; end - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#103 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#106 def block_end; end # Returns the value of attribute block_node. # - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#31 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#34 def block_node; end - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#56 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#59 def insert_arguments(corrector); end - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#40 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#43 def insert_separating_space(corrector); end - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#85 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#88 def lambda_arg_string; end # Returns the value of attribute method. # - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#31 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#34 def method; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#89 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#92 def needs_separating_space?; end - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#50 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#53 def remove_arguments(corrector); end - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#63 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#66 def remove_leading_whitespace(corrector); end - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#71 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#74 def remove_trailing_whitespace(corrector); end - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#33 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#36 def remove_unparenthesized_whitespace(corrector); end - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#76 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#79 def replace_delimiters(corrector); end - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#46 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#49 def replace_selector(corrector); end - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#111 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#114 def selector_end; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#131 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#134 def separating_space?; end end @@ -8394,11 +8500,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 @@ -8621,7 +8722,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 # @@ -8654,90 +8771,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 @@ -9995,13 +10128,13 @@ class RuboCop::Cop::Layout::EndAlignment < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#161 def alignment_node(node); end - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#172 + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#178 def alignment_node_for_variable_style(node); end # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#142 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#196 def assignment_or_operator_method(node); end # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#116 @@ -11536,71 +11669,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. @@ -12260,35 +12394,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 @@ -13454,10 +13591,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 @@ -13471,12 +13611,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 @@ -13936,60 +14076,68 @@ class RuboCop::Cop::Layout::RedundantLineBreak < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#51 + def on_lvasgn(node); end + + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#55 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#64 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#72 def check_assignment(node, _rhs); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#112 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#120 def comment_within?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#82 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#90 def configured_to_not_be_inspected?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#106 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#114 def convertible_block?(node); end - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#132 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#68 + def end_with_percent_blank_string?(processed_source); end + + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#142 def max_line_length; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#77 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#85 def offense?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#89 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#97 def other_cop_takes_precedence?(node); end - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#70 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#78 def register_offense(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#95 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#103 def single_line_block_chain_enabled?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#99 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#107 def suitable_as_single_line?(node); end - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#123 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#133 def to_single_line(source); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#118 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#128 def too_long?(node); end end @@ -14201,6 +14349,13 @@ class RuboCop::Cop::Layout::SpaceAfterComma < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/layout/space_after_comma.rb#21 def space_style_before_rcurly; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_after_comma.rb#32 + def before_semicolon?(token); end end # Checks for space between a method name and a left parenthesis in defs. @@ -14645,7 +14800,7 @@ RuboCop::Cop::Layout::SpaceAroundKeyword::SAFE_NAVIGATION = T.let(T.unsafe(nil), # foo &. bar # foo &. bar&. buzz # RuboCop:: Cop -# RuboCop:: Cop:: Cop +# RuboCop:: Cop:: Base # :: RuboCop::Cop # # # good @@ -14657,7 +14812,7 @@ RuboCop::Cop::Layout::SpaceAroundKeyword::SAFE_NAVIGATION = T.let(T.unsafe(nil), # foo&.bar # foo&.bar&.buzz # RuboCop::Cop -# RuboCop::Cop::Cop +# RuboCop::Cop::Base # ::RuboCop::Cop # # source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#37 @@ -16017,13 +16172,18 @@ class RuboCop::Cop::Layout::TrailingEmptyLines < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#79 + # source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#90 + def end_with_percent_blank_string?(processed_source); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#80 def ends_in_end?(processed_source); end - # source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#89 + # source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#94 def message(wanted_blank_lines, blank_lines); end - # source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#66 + # source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#67 def offense_detected(buffer, wanted_blank_lines, blank_lines, whitespace_at_end); end end @@ -17158,12 +17318,17 @@ class RuboCop::Cop::Lint::Debugger < ::RuboCop::Cop::Base private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#116 + def assumed_argument?(node); end + # @return [Boolean] # # source://rubocop//lib/rubocop/cop/lint/debugger.rb#95 def assumed_usage_context?(node); end - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#102 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#105 def chained_method_name(send_node); end # @return [Boolean] @@ -18177,7 +18342,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. # @@ -20499,89 +20664,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 @@ -21620,6 +21787,14 @@ RuboCop::Cop::Lint::RedundantDirGlobSort::RESTRICT_ON_SEND = T.let(T.unsafe(nil) # Checks for redundant quantifiers inside Regexp literals. # +# It is always allowed when interpolation is used in a regexp literal, +# because it's unknown what kind of string will be expanded as a result: +# +# [source,ruby] +# ---- +# /(?:a*#{interpolation})?/x +# ---- +# # @example # # bad # /(?:x+)+/ @@ -21639,48 +21814,48 @@ RuboCop::Cop::Lint::RedundantDirGlobSort::RESTRICT_ON_SEND = T.let(T.unsafe(nil) # # good # /(?:x*)/ # -# source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#26 +# source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#34 class RuboCop::Cop::Lint::RedundantRegexpQuantifiers < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#34 + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#42 def on_regexp(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#73 + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#83 def character_set?(expr); end - # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#51 + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#61 def each_redundantly_quantified_pair(node); end - # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#77 + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#87 def mergeable_quantifier(expr); end - # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#93 + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#103 def merged_quantifier(exp1, exp2); end - # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#109 + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#119 def message(group, child, replacement); end - # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#105 + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#115 def quantifier_range(group, child); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#65 + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#75 def redundant_group?(expr); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#69 + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#79 def redundantly_quantifiable?(node); end end -# source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#30 +# source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#38 RuboCop::Cop::Lint::RedundantRegexpQuantifiers::MSG_REDUNDANT_QUANTIFIER = T.let(T.unsafe(nil), String) # Checks for unnecessary `require` statement. @@ -21712,48 +21887,52 @@ 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 snake case constant. +# +# For all receivers, the `instance_of?`, `kind_of?`, `is_a?`, `eql?`, `respond_to?`, +# and `equal?` methods are checked by default. +# These are customizable with `AllowedMethods` option. # # The `AllowedMethods` option specifies nil-safe methods, # in other words, it is a method that is allowed to skip safe navigation. @@ -21765,6 +21944,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 @@ -21776,6 +21958,9 @@ 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 @@ -21790,37 +21975,40 @@ 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#61 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#78 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#73 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#91 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#101 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#66 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#68 RuboCop::Cop::Lint::RedundantSafeNavigation::NIL_SPECIFIC_METHODS = T.let(T.unsafe(nil), Set) +# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#70 +RuboCop::Cop::Lint::RedundantSafeNavigation::SNAKE_CASE = T.let(T.unsafe(nil), Regexp) + # Checks for unneeded usages of splat expansion # # @example @@ -22502,8 +22690,13 @@ class RuboCop::Cop::Lint::SafeNavigationChain < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#92 + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#91 def brackets?(send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#95 + def require_parentheses?(send_node); end end # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#33 @@ -23031,6 +23224,11 @@ class RuboCop::Cop::Lint::ShadowingOuterLocalVariable < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#93 def find_conditional_node_from_ascendant(node); end + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#100 + def node_or_its_ascendant_conditional?(node); end + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#49 def ractor_block?(param0 = T.unsafe(nil)); end @@ -24276,7 +24474,7 @@ class RuboCop::Cop::Lint::UnusedMethodArgument < ::RuboCop::Cop::Base def message(variable); end class << self - # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#71 + # source://rubocop-performance/1.19.1/lib/rubocop-performance.rb#15 def autocorrect_incompatible_with; end # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#75 @@ -24574,12 +24772,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 @@ -24597,70 +24801,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#136 + # 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#120 + # 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#153 + # 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#177 + # 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#166 + # 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#162 + # 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#170 + # 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#110 + # 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#103 + # @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#129 + # 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`. @@ -25071,6 +25288,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 @@ -25105,101 +25332,104 @@ 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#212 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#208 def autocorrect_void_expression(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#178 + # source://rubocop//lib/rubocop/cop/lint/void.rb#196 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#108 def check_expression(expr); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#128 + # source://rubocop//lib/rubocop/cop/lint/void.rb#146 def check_literal(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#152 + # source://rubocop//lib/rubocop/cop/lint/void.rb#170 def check_nonmutating(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#136 + # source://rubocop//lib/rubocop/cop/lint/void.rb#154 def check_self(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#113 + # source://rubocop//lib/rubocop/cop/lint/void.rb#128 def check_var(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#144 + # source://rubocop//lib/rubocop/cop/lint/void.rb#162 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#118 + def check_void_op(node, &block); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/void.rb#170 + # source://rubocop//lib/rubocop/cop/lint/void.rb#188 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 @@ -25462,13 +25692,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 @@ -25594,18 +25823,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 @@ -26480,18 +26709,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 @@ -26511,62 +26743,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` @@ -26574,29 +26806,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 @@ -27408,12 +27640,12 @@ class RuboCop::Cop::Naming::HeredocDelimiterNaming < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_naming.rb#49 + # source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_naming.rb#51 def forbidden_delimiters; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_naming.rb#39 + # source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_naming.rb#41 def meaningful_delimiters?(node); end end @@ -28943,25 +29175,20 @@ module RuboCop::Cop::PrecedingFollowingAlignment # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#95 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#93 def aligned_assignment?(range, line); end - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#91 - def aligned_char?(range, line); end - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#70 def aligned_comment_lines; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#107 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#105 def aligned_identical?(range, line); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#83 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#81 def aligned_operator?(range, line); end # @return [Boolean] @@ -28986,10 +29213,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] @@ -29015,7 +29242,7 @@ module RuboCop::Cop::PrecedingFollowingAlignment # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#87 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#85 def aligned_words?(range, line); end # @return [Boolean] @@ -29023,16 +29250,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 @@ -30311,9 +30538,6 @@ class RuboCop::Cop::Style::Alias < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/alias.rb#150 - def identifier(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/alias.rb#51 def on_alias(node); end @@ -30349,9 +30573,12 @@ class RuboCop::Cop::Style::Alias < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/alias.rb#135 def correct_alias_to_alias_method(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/alias.rb#144 + # source://rubocop//lib/rubocop/cop/style/alias.rb#142 def correct_alias_with_symbol_args(corrector, node); end + # source://rubocop//lib/rubocop/cop/style/alias.rb#147 + def identifier(node); end + # source://rubocop//lib/rubocop/cop/style/alias.rb#113 def lexical_scope_type(node); end @@ -30483,6 +30710,12 @@ 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.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. +# # @example # # bad # def foo(*args, &block) @@ -30498,7 +30731,25 @@ RuboCop::Cop::Style::AndOr::MSG = T.let(T.unsafe(nil), String) # def foo(...) # bar(...) # end -# @example AllowOnlyRestArgument: true (default) +# @example UseAnonymousForwarding: true (default, only relevant for Ruby >= 3.2) +# # bad +# def foo(*args, **kwargs) +# args_only(*args) +# kwargs_only(**kwargs) +# end +# +# # good +# def foo(*, **) +# args_only(*) +# kwargs_only(**) +# end +# @example UseAnonymousForwarding: false (only relevant for Ruby >= 3.2) +# # good +# def foo(*args, **kwargs) +# args_only(*args) +# kwargs_only(**kwargs) +# end +# @example AllowOnlyRestArgument: true (default, only relevant for Ruby < 3.2) # # good # def foo(*args) # bar(*args) @@ -30507,7 +30758,7 @@ RuboCop::Cop::Style::AndOr::MSG = T.let(T.unsafe(nil), String) # def foo(**kwargs) # bar(**kwargs) # end -# @example AllowOnlyRestArgument: false +# @example AllowOnlyRestArgument: false (only relevant for Ruby < 3.2) # # bad # # The following code can replace the arguments with `...`, # # but it will change the behavior. Because `...` forwards block also. @@ -30519,59 +30770,192 @@ RuboCop::Cop::Style::AndOr::MSG = T.let(T.unsafe(nil), String) # bar(**kwargs) # end # -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#49 +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#75 class RuboCop::Cop::Style::ArgumentsForwarding < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#72 - def forwarding_method_arguments?(param0 = T.unsafe(nil), param1, param2, param3); end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#84 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#89 def on_def(node); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#84 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#89 def on_defs(node); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#64 - def only_rest_arguments?(param0 = T.unsafe(nil), param1); end + private + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#122 + def add_forward_all_offenses(node, send_classifications, forwardable_args); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#233 + def add_parens_if_missing(node, corrector); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#131 + def add_post_ruby_32_offenses(def_node, send_classifications, forwardable_args); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#59 - def use_rest_arguments?(param0 = T.unsafe(nil)); end + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#225 + def allow_only_rest_arguments?; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#217 + def arguments_range(node, first_node); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#174 + def classification_and_forwards(def_node, send_node, referenced_lvars, forwardable_args); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#159 + def classify_send_nodes(def_node, send_nodes, referenced_lvars, forwardable_args); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#114 + def extract_forwardable_args(args); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#149 + def non_splat_or_block_pass_lvar_references(body); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#118 + def only_forwards_all?(send_classifications); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#207 + def register_forward_all_offense(def_or_send, send_or_arguments, rest_or_splat); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#191 + def register_forward_args_offense(def_arguments_or_send, rest_arg_or_splat); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#199 + def register_forward_kwargs_offense(add_parens, def_arguments_or_send, kwrest_arg_or_splat); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#229 + def use_anonymous_forwarding?; end +end + +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#83 +RuboCop::Cop::Style::ArgumentsForwarding::ADDITIONAL_ARG_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#86 +RuboCop::Cop::Style::ArgumentsForwarding::ARGS_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#82 +RuboCop::Cop::Style::ArgumentsForwarding::FORWARDING_LVAR_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#85 +RuboCop::Cop::Style::ArgumentsForwarding::FORWARDING_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#87 +RuboCop::Cop::Style::ArgumentsForwarding::KWARGS_MSG = T.let(T.unsafe(nil), String) + +# Classifies send nodes for possible rest/kwrest/all (including block) forwarding. +# +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#240 +class RuboCop::Cop::Style::ArgumentsForwarding::SendNodeClassifier + extend ::RuboCop::AST::NodePattern::Macros + + # @return [SendNodeClassifier] a new instance of SendNodeClassifier + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#252 + def initialize(def_node, send_node, referenced_lvars, forwardable_args, **config); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#280 + def classification; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#247 + def extract_forwarded_kwrest_arg(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#274 + def forwarded_block_arg; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#250 + def forwarded_block_arg?(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#268 + def forwarded_kwrest_arg; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#262 + def forwarded_rest_arg; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#244 + def forwarded_rest_arg?(param0 = T.unsafe(nil), param1); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#116 - def all_lvars_as_forwarding_method_arguments?(def_node, forwarding_method); end + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#348 + def additional_kwargs?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#149 - def allow_only_rest_arguments?; end + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#344 + def additional_kwargs_or_forwarded_kwargs?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#143 - def arguments_range(node); end + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#358 + def allow_offense_for_no_block?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#329 + def any_arg_referenced?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#103 - def extract_argument_names_from(args); end + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#313 + def arguments; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#110 - def forwarding_method?(node, rest_arg, kwargs, block_arg); end + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#292 + def can_forward_all?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#125 - def register_offense_to_forwarding_method_arguments(forwarding_method); end + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#352 + def forward_additional_kwargs?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#134 - def register_offense_to_method_definition_arguments(method_definition); end -end + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#309 + def forwarded_rest_and_kwrest_args; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#362 + def no_additional_args?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#337 + def no_post_splat_args?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#305 + def offensive_block_forwarding?; end -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#56 -RuboCop::Cop::Style::ArgumentsForwarding::MSG = T.let(T.unsafe(nil), String) + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#325 + def referenced_block_arg?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#321 + def referenced_kwrest_arg?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#317 + def referenced_rest_arg?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#301 + def ruby_32_missing_rest_or_kwest?; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#333 + def target_ruby_version; end +end # Enforces the use of `Array()` instead of explicit `Array` check or `[*var]`. # @@ -30619,6 +31003,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? @@ -30640,46 +31033,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_. @@ -31263,7 +31656,7 @@ class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#458 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#459 def array_or_range?(node); end # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#208 @@ -31271,7 +31664,7 @@ class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#462 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#463 def begin_required?(block_node); end # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#236 @@ -31279,7 +31672,7 @@ class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#399 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#400 def braces_for_chaining_style?(node); end # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#248 @@ -31287,25 +31680,25 @@ class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#376 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#377 def braces_required_method?(method_name); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#380 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#381 def braces_required_methods; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#409 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#410 def braces_style?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#454 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#455 def conditional?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#413 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#414 def correction_would_break_code?(node); end # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#309 @@ -31313,12 +31706,12 @@ class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#423 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#424 def functional_block?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#419 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#420 def functional_method?(method_name); end # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#326 @@ -31326,7 +31719,7 @@ class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#384 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#385 def line_count_based_block_style?(node); end # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#218 @@ -31340,12 +31733,12 @@ class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#431 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#432 def procedural_method?(method_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#427 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#428 def procedural_oneliners_may_have_braces?; end # @return [Boolean] @@ -31369,17 +31762,17 @@ class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#447 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#448 def return_value_of_scope?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#435 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#436 def return_value_used?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#388 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#389 def semantic_block_style?(node); end # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#226 @@ -31854,53 +32247,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#85 + # 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#105 + # 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#121 + # 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#109 + # 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#117 + # 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#113 + # 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 @@ -32188,6 +32581,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 @@ -32196,46 +32590,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 @@ -32355,7 +32750,7 @@ class RuboCop::Cop::Style::CombinableLoops < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#66 def on_block(node); end - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#78 + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#79 def on_for(node); end # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#66 @@ -32365,20 +32760,20 @@ class RuboCop::Cop::Style::CombinableLoops < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#89 + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#90 def collection_looping_method?(node); end - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#105 + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#107 def combine_with_left_sibling(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#94 + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#95 def same_collection_looping_block?(node, sibling); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#101 + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#103 def same_collection_looping_for?(node, sibling); end end @@ -34302,30 +34697,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. # @@ -35900,13 +36298,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') @@ -35929,45 +36339,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. @@ -36193,10 +36613,10 @@ class RuboCop::Cop::Style::FrozenStringLiteralComment < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#176 + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#178 def disabled_offense(processed_source); end - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#188 + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#190 def enable_comment(corrector); end # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#120 @@ -36208,34 +36628,34 @@ class RuboCop::Cop::Style::FrozenStringLiteralComment < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#114 def ensure_no_comment(processed_source); end - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#212 + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#214 def following_comment; end - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#150 + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#152 def frozen_string_literal_comment(processed_source); end - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#194 + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#196 def insert_comment(corrector); end # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#137 def last_special_comment(processed_source); end - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#204 + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#206 def line_range(line); end - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#156 + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#158 def missing_offense(processed_source); end - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#162 + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#164 def missing_true_offense(processed_source); end - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#208 + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#210 def preceding_comment; end - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#184 + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#186 def remove_comment(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#168 + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#170 def unnecessary_comment_offense(processed_source); end end @@ -36400,6 +36820,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 @@ -36436,7 +36875,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 @@ -36445,83 +36884,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 @@ -36614,62 +37059,62 @@ end # # bad # Hash[*ary] # -# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#34 +# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#44 class RuboCop::Cop::Style::HashConversion < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#44 + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#54 def hash_from_array?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#46 + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#56 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#128 + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#138 def allowed_splat_argument?; end - # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#121 + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#131 def args_to_hash(args); end - # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#108 + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#118 def multi_argument(node); end - # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#84 + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#94 def register_offense_for_hash(node, hash_argument); end - # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#93 + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#103 def register_offense_for_zip_method(node, zip_method); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#103 + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#113 def requires_parens?(node); end - # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#61 + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#71 def single_argument(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#78 + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#88 def use_zip_method_without_argument?(first_argument); end end -# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#39 +# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#49 RuboCop::Cop::Style::HashConversion::MSG_LITERAL_HASH_ARG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#38 +# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#48 RuboCop::Cop::Style::HashConversion::MSG_LITERAL_MULTI_ARG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#40 +# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#50 RuboCop::Cop::Style::HashConversion::MSG_SPLAT = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#37 +# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#47 RuboCop::Cop::Style::HashConversion::MSG_TO_H = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#41 +# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#51 RuboCop::Cop::Style::HashConversion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for uses of `each_key` and `each_value` Hash methods. @@ -37258,40 +37703,43 @@ class RuboCop::Cop::Style::IdenticalConditionalBranches < ::RuboCop::Cop::Base private + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#181 + 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#190 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#170 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#230 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#245 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#214 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#224 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#220 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#241 def tail(node); end end @@ -38048,7 +38496,7 @@ class RuboCop::Cop::Style::InverseMethods < ::RuboCop::Cop::Base def remove_end_parenthesis(corrector, node, method, method_call); end class << self - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#56 + # source://rubocop-rails/2.22.1/lib/rubocop-rails.rb#22 def autocorrect_incompatible_with; end end end @@ -38360,34 +38808,34 @@ class RuboCop::Cop::Style::LambdaCall < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#28 + # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#29 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#62 + # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#67 def explicit_style?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#58 + # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#63 def implicit_style?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#46 + # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#51 def offense?(node); end - # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#50 + # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#55 def prefer(node); end end -# source://rubocop//lib/rubocop/cop/style/lambda_call.rb#25 +# source://rubocop//lib/rubocop/cop/style/lambda_call.rb#26 RuboCop::Cop::Style::LambdaCall::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/lambda_call.rb#26 +# source://rubocop//lib/rubocop/cop/style/lambda_call.rb#27 RuboCop::Cop::Style::LambdaCall::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for string literal concatenation at @@ -39072,7 +39520,7 @@ class RuboCop::Cop::Style::MethodCallWithArgsParentheses < ::RuboCop::Cop::Base def args_parenthesized?(node); end class << self - # source://rubocop-rails/2.20.2/lib/rubocop-rails.rb#22 + # source://rubocop-rails/2.22.1/lib/rubocop-rails.rb#30 def autocorrect_incompatible_with; end end end @@ -39090,12 +39538,12 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#158 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#165 def allowed_chained_call_with_parentheses?(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#161 def allowed_multiline_call_with_parentheses?(node); end # @return [Boolean] @@ -39105,17 +39553,17 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#167 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#174 def ambiguous_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#196 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#203 def assigned_before?(node, target); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#204 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#211 def assignment_in_condition?(node); end # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#31 @@ -39123,7 +39571,7 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#141 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#142 def call_as_argument_or_chain?(node); end # @return [Boolean] @@ -39136,6 +39584,11 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#110 def call_in_logical_operators?(node); end + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#148 + def call_in_match_pattern?(node); end + # @return [Boolean] # # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#119 @@ -39153,22 +39606,22 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#137 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#138 def call_with_braced_block?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#214 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#221 def forwards_anonymous_rest_arguments?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#183 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#190 def hash_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#147 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#154 def hash_literal_in_arguments?(node); end # @return [Boolean] @@ -39178,7 +39631,7 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#200 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#207 def inside_string_interpolation?(node); end # Require hash value omission be enclosed in parentheses to prevent the following issue: @@ -39196,7 +39649,7 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#179 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#186 def logical_operator?(node); end # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#40 @@ -39212,7 +39665,7 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#187 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#194 def regexp_slash_literal?(node); end # @return [Boolean] @@ -39222,7 +39675,7 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#171 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#178 def splat?(node); end # @return [Boolean] @@ -39237,12 +39690,12 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#175 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#182 def ternary_if?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#191 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#198 def unary_literal?(node); end end @@ -41223,16 +41676,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 @@ -42237,24 +42687,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 @@ -43312,6 +43762,8 @@ RuboCop::Cop::Style::RandomWithOffset::RESTRICT_ON_SEND = T.let(T.unsafe(nil), A # array.join('') # [1, 2, 3].join("") # array.sum(0) +# exit(true) +# exit!(false) # string.split(" ") # "first\nsecond".split(" ") # string.chomp("\n") @@ -43322,37 +43774,42 @@ RuboCop::Cop::Style::RandomWithOffset::RESTRICT_ON_SEND = T.let(T.unsafe(nil), A # array.join # [1, 2, 3].join # array.sum +# exit +# exit! # string.split # "first second".split # string.chomp # string.chomp! # A.foo # -# source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#53 +# source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#57 class RuboCop::Cop::Style::RedundantArgument < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#59 + # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#64 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#88 + # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#93 def argument_range(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#81 + # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#86 def redundant_arg_for_method(method_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#74 + # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#79 def redundant_argument?(node); end end -# source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#57 +# source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#61 RuboCop::Cop::Style::RedundantArgument::MSG = T.let(T.unsafe(nil), String) +# source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#62 +RuboCop::Cop::Style::RedundantArgument::NO_RECEIVER_METHODS = T.let(T.unsafe(nil), Array) + # Checks for the instantiation of array using redundant `Array` constructor. # Autocorrect replaces to array literal which is the simplest and fastest. # @@ -43557,50 +44014,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 @@ -43833,13 +44293,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 @@ -43966,23 +44421,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`. @@ -44045,48 +44540,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)`. @@ -44239,6 +44750,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? @@ -44246,38 +44760,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. @@ -44744,16 +45267,16 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#36 def arg_in_call_with_block?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#220 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#246 def first_send_argument?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#225 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#251 def first_super_argument?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#230 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#256 def first_yield_argument?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#138 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#158 def interpolation?(param0 = T.unsafe(nil)); end # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#27 @@ -44800,36 +45323,39 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#234 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#260 def call_chain_starts_with_int?(begin_node, send_node); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#125 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#129 def check(begin_node); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#140 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#160 def check_send(begin_node, node); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#149 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#169 def check_unary(begin_node, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#173 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#193 def disallowed_literal?(begin_node, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#105 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#107 def empty_parentheses?(node); end + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#140 + def find_offense_message(begin_node, node); end + # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#110 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#112 def first_arg_begins_with_hash_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#215 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#235 def first_argument?(node); end # @return [Boolean] @@ -44839,12 +45365,12 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#169 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#189 def keyword_ancestor?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#188 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#208 def keyword_with_redundant_parentheses?(node); end # @return [Boolean] @@ -44854,20 +45380,18 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#201 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#221 def method_call_with_redundant_parentheses?(node); end - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#117 - def method_chain_begins_with_hash_literal?(node); end + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#121 + def method_chain_begins_with_hash_literal(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#159 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#179 def offense(node, msg); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#211 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#231 def only_begin_arg?(args); end # @return [Boolean] @@ -44877,12 +45401,12 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#177 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#197 def raised_to_power_negative_numeric?(begin_node, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#165 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#185 def suspect_unary?(node); end # @return [Boolean] @@ -45015,6 +45539,9 @@ RuboCop::Cop::Style::RedundantPercentQ::STRING_INTERPOLATION_REGEXP = T.let(T.un class RuboCop::Cop::Style::RedundantRegexpArgument < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#47 + def on_csend(node); end + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#47 def on_send(node); end @@ -45022,13 +45549,13 @@ class RuboCop::Cop::Style::RedundantRegexpArgument < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#63 + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#64 def determinist_regexp?(regexp_node); end - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#67 + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#68 def preferred_argument(regexp_node); end - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#80 + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#81 def replacement(regexp_node); end end @@ -45251,13 +45778,18 @@ RuboCop::Cop::Style::RedundantRegexpEscape::MSG_REDUNDANT_ESCAPE = T.let(T.unsaf # return something # end # -# # good +# # bad # def test # return something if something_else # end # # # good # def test +# something if something_else +# end +# +# # good +# def test # if x # elsif y # else @@ -45274,79 +45806,79 @@ RuboCop::Cop::Style::RedundantRegexpEscape::MSG_REDUNDANT_ESCAPE = T.let(T.unsaf # return x, y # end # -# source://rubocop//lib/rubocop/cop/style/redundant_return.rb#50 +# source://rubocop//lib/rubocop/cop/style/redundant_return.rb#55 class RuboCop::Cop::Style::RedundantReturn < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#64 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#69 def on_def(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#64 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#69 def on_defs(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#58 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#63 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#99 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#104 def add_braces(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#94 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#99 def add_brackets(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#164 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#169 def allow_multiple_return_values?; end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#159 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#164 def check_begin_node(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#105 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#110 def check_branch(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#133 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#138 def check_case_node(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#154 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#159 def check_ensure_node(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#138 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#143 def check_if_node(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#150 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#155 def check_resbody_node(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#145 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#150 def check_rescue_node(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#121 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#126 def check_return_node(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#75 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#80 def correct_with_arguments(return_node, corrector); end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#71 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#76 def correct_without_arguments(return_node, corrector); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#90 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#95 def hash_without_braces?(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#168 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#173 def message(node); end end -# source://rubocop//lib/rubocop/cop/style/redundant_return.rb#54 +# source://rubocop//lib/rubocop/cop/style/redundant_return.rb#59 RuboCop::Cop::Style::RedundantReturn::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/redundant_return.rb#55 +# source://rubocop//lib/rubocop/cop/style/redundant_return.rb#60 RuboCop::Cop::Style::RedundantReturn::MULTI_RETURN_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/redundant_return.rb#56 +# source://rubocop//lib/rubocop/cop/style/redundant_return.rb#61 RuboCop::Cop::Style::RedundantReturn::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for redundant uses of `self`. @@ -45484,7 +46016,7 @@ class RuboCop::Cop::Style::RedundantSelf < ::RuboCop::Cop::Base def regular_method_call?(node); end class << self - # source://rubocop-rails/2.20.2/lib/rubocop-rails.rb#30 + # source://rubocop-rails/2.22.1/lib/rubocop-rails.rb#38 def autocorrect_incompatible_with; end end end @@ -46341,9 +46873,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 @@ -46366,46 +46902,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. @@ -46431,14 +46967,14 @@ RuboCop::Cop::Style::ReturnNil::RETURN_NIL_MSG = T.let(T.unsafe(nil), String) # # do_something? # end -# @example AllowedMethod: ['foo?'] +# @example AllowedMethods: ['foo?'] # # good # def foo? # return if condition # # do_something? # end -# @example AllowedPattern: [/foo/] +# @example AllowedPatterns: [/foo/] # # good # def foo? # return if condition @@ -46460,6 +46996,14 @@ class RuboCop::Cop::Style::ReturnNilInPredicateMethodDefinition < ::RuboCop::Cop # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#58 def return_nil?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#79 + def nil_node_at_the_end_of_method_body(body); end + + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#87 + def register_offense(offense_node, replacement); end end # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#55 @@ -46919,48 +47463,48 @@ class RuboCop::Cop::Style::Semicolon < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/semicolon.rb#64 def check_for_line_terminator_or_opener; end - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#73 + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#70 def each_semicolon; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#105 + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#102 def exist_semicolon_after_left_curly_brace?(tokens); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#113 + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#110 def exist_semicolon_after_left_string_interpolation_brace?(tokens); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#101 + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#98 def exist_semicolon_before_right_curly_brace?(tokens); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#109 + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#106 def exist_semicolon_before_right_string_interpolation_brace?(tokens); end - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#137 + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#134 def expressions_per_line(exprs); end - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#151 + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#148 def find_range_node(token_before_semicolon); end - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#143 + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#140 def find_semicolon_positions(line); end - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#157 + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#154 def range_nodes; end - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#117 + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#114 def register_semicolon(line, column, after_expression, token_before_semicolon = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#86 + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#83 def semicolon_position(tokens); end - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#82 + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#79 def tokens_for_lines; end class << self @@ -47179,13 +47723,16 @@ RuboCop::Cop::Style::SignalException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Ar 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#43 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#39 def single_argument_dig?(param0 = T.unsafe(nil)); end end +# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#36 +RuboCop::Cop::Style::SingleArgumentDig::IGNORED_ARGUMENT_TYPES = T.let(T.unsafe(nil), Array) + # source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#34 RuboCop::Cop::Style::SingleArgumentDig::MSG = T.let(T.unsafe(nil), String) @@ -47264,6 +47811,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. # @@ -47433,10 +48024,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 @@ -47466,13 +48057,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] @@ -47482,15 +48073,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] @@ -47503,7 +48094,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 @@ -48107,40 +48698,67 @@ end # source://rubocop//lib/rubocop/cop/style/string_literals.rb#35 RuboCop::Cop::Style::StringLiterals::MSG_INCONSISTENT = T.let(T.unsafe(nil), String) -# Checks that quotes inside the string interpolation +# Checks that quotes inside string, symbol, and regexp interpolations # match the configured preference. # # @example EnforcedStyle: single_quotes (default) # # bad -# result = "Tests #{success ? "PASS" : "FAIL"}" +# string = "Tests #{success ? "PASS" : "FAIL"}" +# symbol = :"Tests #{success ? "PASS" : "FAIL"}" +# heredoc = <<~TEXT +# Tests #{success ? "PASS" : "FAIL"} +# TEXT +# regexp = /Tests #{success ? "PASS" : "FAIL"}/ # # # good -# result = "Tests #{success ? 'PASS' : 'FAIL'}" +# string = "Tests #{success ? 'PASS' : 'FAIL'}" +# symbol = :"Tests #{success ? 'PASS' : 'FAIL'}" +# heredoc = <<~TEXT +# Tests #{success ? 'PASS' : 'FAIL'} +# TEXT +# regexp = /Tests #{success ? 'PASS' : 'FAIL'}/ # @example EnforcedStyle: double_quotes # # bad -# result = "Tests #{success ? 'PASS' : 'FAIL'}" +# string = "Tests #{success ? 'PASS' : 'FAIL'}" +# symbol = :"Tests #{success ? 'PASS' : 'FAIL'}" +# heredoc = <<~TEXT +# Tests #{success ? 'PASS' : 'FAIL'} +# TEXT +# regexp = /Tests #{success ? 'PASS' : 'FAIL'}/ # # # good -# result = "Tests #{success ? "PASS" : "FAIL"}" +# string = "Tests #{success ? "PASS" : "FAIL"}" +# symbol = :"Tests #{success ? "PASS" : "FAIL"}" +# heredoc = <<~TEXT +# Tests #{success ? "PASS" : "FAIL"} +# TEXT +# regexp = /Tests #{success ? "PASS" : "FAIL"}/ # -# source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#22 +# source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#42 class RuboCop::Cop::Style::StringLiteralsInInterpolation < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::StringLiteralsHelp include ::RuboCop::Cop::StringHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#28 + # source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#48 def autocorrect(corrector, node); end + # Cop classes that include the StringHelp module usually ignore regexp + # nodes. Not so for this cop, which is why we override the on_regexp + # definition with an empty one. + # + # source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#55 + def on_regexp(node); end + private - # source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#34 + # source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#59 def message(_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#41 + # source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#66 def offense?(node); end end @@ -48331,6 +48949,15 @@ RuboCop::Cop::Style::SwapValues::SIMPLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), # # # bad # [:foo, :bar, :baz] +# +# # bad (contains spaces) +# %i[foo\ bar baz\ quux] +# +# # bad (contains [] with spaces) +# %i[foo \[ \]] +# +# # bad (contains () with spaces) +# %i(foo \( \)) # @example EnforcedStyle: brackets # # good # [:foo, :bar, :baz] @@ -48338,7 +48965,7 @@ RuboCop::Cop::Style::SwapValues::SIMPLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), # # bad # %i[foo bar baz] # -# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#31 +# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#40 class RuboCop::Cop::Style::SymbolArray < ::RuboCop::Cop::Base include ::RuboCop::Cop::ArrayMinSize include ::RuboCop::Cop::ArraySyntax @@ -48347,48 +48974,62 @@ class RuboCop::Cop::Style::SymbolArray < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#48 + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#66 def on_array(node); end private - # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#67 + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#96 def build_bracketed_array(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#90 - def symbol_without_quote?(string); end + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#78 + def complex_content?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#60 - def symbols_contain_spaces?(node); end + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#92 + def invalid_percent_array_contents?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#119 + def symbol_without_quote?(string); end - # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#82 + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#111 def to_symbol_literal(string); end class << self # Returns the value of attribute largest_brackets. # - # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#45 + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#63 def largest_brackets; end # Sets the attribute largest_brackets # # @param value the value to set the attribute largest_brackets to. # - # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#45 + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#63 def largest_brackets=(_arg0); end end end -# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#42 +# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#51 RuboCop::Cop::Style::SymbolArray::ARRAY_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#41 +# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#52 +RuboCop::Cop::Style::SymbolArray::DELIMITERS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#50 RuboCop::Cop::Style::SymbolArray::PERCENT_MSG = T.let(T.unsafe(nil), String) +# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#57 +RuboCop::Cop::Style::SymbolArray::REDEFINABLE_OPERATORS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#53 +RuboCop::Cop::Style::SymbolArray::SPECIAL_GVARS = T.let(T.unsafe(nil), Array) + # Checks symbol literal syntax. # # @example @@ -49005,7 +49646,7 @@ class RuboCop::Cop::Style::TrailingCommaInArguments < ::RuboCop::Cop::Base def on_send(node); end class << self - # source://rubocop-rspec/2.22.0/lib/rubocop-rspec.rb#59 + # source://rubocop-rspec/2.25.0/lib/rubocop-rspec.rb#60 def autocorrect_incompatible_with; end end end @@ -50214,61 +50855,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 @@ -51167,12 +51809,10 @@ class RuboCop::Cop::Utils::RegexpRanges # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#11 def initialize(root); end - # Returns the value of attribute compound_token. - # - # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#9 + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#18 def compound_token; end - # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#16 + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#24 def pairs; end # Returns the value of attribute root. @@ -51182,26 +51822,29 @@ class RuboCop::Cop::Utils::RegexpRanges private - # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#65 + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#78 def compose_range(expressions, current); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#77 + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#90 def escaped_octal?(expr); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#81 + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#94 def octal_digit?(char); end - # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#85 + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#98 def pop_octal_digits(expressions); end - # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#31 + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#44 def populate(expr); end - # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#50 + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#32 + def populate_all; end + + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#63 def process_set(expressions, current); end end @@ -51483,7 +52126,10 @@ class RuboCop::Cop::VariableForce::Assignment private - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#120 + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#125 + def find_multiple_assignment_node(grandparent_node); end + + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#121 def for_assignment_node; end # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#104 @@ -51492,7 +52138,7 @@ class RuboCop::Cop::VariableForce::Assignment # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#96 def operator_assignment_node; end - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#113 + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#114 def rest_assignment_node; end end @@ -52882,32 +53528,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 @@ -53410,37 +54055,37 @@ RuboCop::Formatter::GitHubActionsFormatter::ESCAPE_MAP = T.let(T.unsafe(nil), Ha # 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#10 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 +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#14 class RuboCop::Formatter::HTMLFormatter::Color < ::Struct # Returns the value of attribute alpha # @@ -53464,7 +54109,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 @@ -53489,7 +54134,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 @@ -53501,68 +54146,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#11 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#77 def initialize(files, summary); end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#125 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#124 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#84 def binding; end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#90 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#89 def decorated_message(offense); end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#121 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#120 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#75 def files; end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#101 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#100 def highlight_source_tag(offense); end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#94 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#93 def highlighted_source_line(offense); end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#117 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#116 def possible_ellipses(location); end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#112 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#111 def source_after_highlight(offense); end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#107 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#106 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#75 def summary; end end -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#74 +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#73 RuboCop::Formatter::HTMLFormatter::ERBContext::LOGO_IMAGE_PATH = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#66 +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#65 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 # @@ -53595,7 +54240,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 # @@ -53639,7 +54284,7 @@ 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#12 RuboCop::Formatter::HTMLFormatter::TEMPLATE_PATH = T.let(T.unsafe(nil), String) # This formatter formats the report data in JSON format. @@ -54145,53 +54790,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#56 + # source://rubocop//lib/rubocop/lsp/routes.rb#61 def handle_initialized(_request); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#159 + # source://rubocop//lib/rubocop/lsp/routes.rb#170 def handle_method_missing(request); end - # source://rubocop//lib/rubocop/lsp/routes.rb#62 + # source://rubocop//lib/rubocop/lsp/routes.rb#67 def handle_shutdown(request); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#148 + # 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#193 + # source://rubocop//lib/rubocop/lsp/routes.rb#208 def diagnostic(file_uri, text); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#173 - def format_file(file_uri); end + # source://rubocop//lib/rubocop/lsp/routes.rb#178 + def extract_initialization_options_from(request); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#207 - def remove_file_protocol_from(uri); end + # source://rubocop//lib/rubocop/lsp/routes.rb#188 + def format_file(file_uri, command: T.unsafe(nil)); end # @api private - # @return [Boolean] # - # source://rubocop//lib/rubocop/lsp/routes.rb#167 - def safe_autocorrect?(request); end + # source://rubocop//lib/rubocop/lsp/routes.rb#222 + def remove_file_protocol_from(uri); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#211 + # source://rubocop//lib/rubocop/lsp/routes.rb#226 def to_diagnostic(offense); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#223 + # source://rubocop//lib/rubocop/lsp/routes.rb#238 def to_range(location); end class << self @@ -54230,12 +54874,22 @@ class RuboCop::Lsp::Runtime # # @api private # - # source://rubocop//lib/rubocop/lsp/runtime.rb#36 - def format(path, text); end + # source://rubocop//lib/rubocop/lsp/runtime.rb#38 + def format(path, text, command:); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/runtime.rb#17 + def layout_mode=(_arg0); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/runtime.rb#17 + def lint_mode=(_arg0); end # @api private # - # source://rubocop//lib/rubocop/lsp/runtime.rb#46 + # source://rubocop//lib/rubocop/lsp/runtime.rb#55 def offenses(path, text); end # @api private @@ -54247,12 +54901,17 @@ class RuboCop::Lsp::Runtime # @api private # - # source://rubocop//lib/rubocop/lsp/runtime.rb#67 + # source://rubocop//lib/rubocop/lsp/runtime.rb#77 + def config_only_options; end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/runtime.rb#84 def redirect_stdout(&block); end # @api private # - # source://rubocop//lib/rubocop/lsp/runtime.rb#75 + # source://rubocop//lib/rubocop/lsp/runtime.rb#92 def run_rubocop(options, path); end end @@ -54271,12 +54930,12 @@ class RuboCop::Lsp::Server # @api private # # source://rubocop//lib/rubocop/lsp/server.rb#56 - def configure(safe_autocorrect: T.unsafe(nil)); end + def configure(options); end # @api private # # source://rubocop//lib/rubocop/lsp/server.rb#48 - def format(path, text); end + def format(path, text, command:); end # @api private # @@ -54290,7 +54949,7 @@ class RuboCop::Lsp::Server # @api private # - # source://rubocop//lib/rubocop/lsp/server.rb#60 + # source://rubocop//lib/rubocop/lsp/server.rb#62 def stop(&block); end # @api private @@ -54524,12 +55183,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 @@ -54543,22 +55202,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. # @@ -55196,7 +55858,7 @@ class RuboCop::ResultCache # # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#233 + # source://rubocop//lib/rubocop/result_cache.rb#237 def context_checksum(team, options); end # @api private @@ -55215,7 +55877,7 @@ class RuboCop::ResultCache # # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#217 + # source://rubocop//lib/rubocop/result_cache.rb#221 def relevant_options_digest(options); end # The checksum of the RuboCop program running the inspection. @@ -55241,7 +55903,7 @@ class RuboCop::ResultCache # # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#224 + # source://rubocop//lib/rubocop/result_cache.rb#228 def team_checksum(team); end class << self @@ -55430,7 +56092,7 @@ class RuboCop::Runner # source://rubocop//lib/rubocop/runner.rb#414 def formatter_set; end - # source://rubocop//lib/rubocop/runner.rb#468 + # source://rubocop//lib/rubocop/runner.rb#470 def get_processed_source(file); end # source://rubocop//lib/rubocop/runner.rb#342 @@ -55481,7 +56143,7 @@ class RuboCop::Runner # otherwise dormant team that can be used for config- and option- # level caching in ResultCache. # - # source://rubocop//lib/rubocop/runner.rb#490 + # source://rubocop//lib/rubocop/runner.rb#492 def standby_team(config); end # @return [Boolean] @@ -55593,18 +56255,18 @@ class RuboCop::TargetFinder # @api private # - # source://rubocop//lib/rubocop/target_finder.rb#145 + # source://rubocop//lib/rubocop/target_finder.rb#149 def all_cops_include; end # @api private # - # source://rubocop//lib/rubocop/target_finder.rb#116 + # source://rubocop//lib/rubocop/target_finder.rb#120 def combined_exclude_glob_patterns(base_dir); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#172 + # source://rubocop//lib/rubocop/target_finder.rb#176 def configured_include?(file); end # @api private @@ -55649,63 +56311,63 @@ class RuboCop::TargetFinder # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#176 + # source://rubocop//lib/rubocop/target_finder.rb#180 def included_file?(file); end # @api private # - # source://rubocop//lib/rubocop/target_finder.rb#180 + # source://rubocop//lib/rubocop/target_finder.rb#184 def process_explicit_path(path, mode); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#149 + # source://rubocop//lib/rubocop/target_finder.rb#153 def ruby_executable?(file); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#123 + # source://rubocop//lib/rubocop/target_finder.rb#127 def ruby_extension?(file); end # @api private # - # source://rubocop//lib/rubocop/target_finder.rb#127 + # source://rubocop//lib/rubocop/target_finder.rb#131 def ruby_extensions; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#168 + # source://rubocop//lib/rubocop/target_finder.rb#172 def ruby_file?(file); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#134 + # source://rubocop//lib/rubocop/target_finder.rb#138 def ruby_filename?(file); end # @api private # - # source://rubocop//lib/rubocop/target_finder.rb#138 + # source://rubocop//lib/rubocop/target_finder.rb#142 def ruby_filenames; end # @api private # - # source://rubocop//lib/rubocop/target_finder.rb#160 + # source://rubocop//lib/rubocop/target_finder.rb#164 def ruby_interpreters(file); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#164 + # source://rubocop//lib/rubocop/target_finder.rb#168 def stdin?; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#108 + # source://rubocop//lib/rubocop/target_finder.rb#112 def symlink_excluded_or_infinite_loop?(base_dir, current_dir, exclude_pattern, flags); end # Finds all Ruby source files under the current or other supplied @@ -55738,7 +56400,7 @@ class RuboCop::TargetFinder # @api private # - # source://rubocop//lib/rubocop/target_finder.rb#197 + # source://rubocop//lib/rubocop/target_finder.rb#201 def order; end end @@ -55756,34 +56418,34 @@ class RuboCop::TargetRuby # @api private # @return [TargetRuby] a new instance of TargetRuby # - # source://rubocop//lib/rubocop/target_ruby.rb#248 + # source://rubocop//lib/rubocop/target_ruby.rb#252 def initialize(config); end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#264 + # source://rubocop//lib/rubocop/target_ruby.rb#268 def rubocop_version_with_support; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#252 + # source://rubocop//lib/rubocop/target_ruby.rb#256 def source; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_ruby.rb#260 + # source://rubocop//lib/rubocop/target_ruby.rb#264 def supported?; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#256 + # source://rubocop//lib/rubocop/target_ruby.rb#260 def version; end class << self # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#234 + # source://rubocop//lib/rubocop/target_ruby.rb#238 def supported_versions; end end end @@ -55821,18 +56483,18 @@ RuboCop::TargetRuby::DEFAULT_VERSION = T.let(T.unsafe(nil), Float) # # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#222 +# source://rubocop//lib/rubocop/target_ruby.rb#226 class RuboCop::TargetRuby::Default < ::RuboCop::TargetRuby::Source # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#223 + # source://rubocop//lib/rubocop/target_ruby.rb#227 def name; end private # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#229 + # source://rubocop//lib/rubocop/target_ruby.rb#233 def find_version; end end @@ -55845,11 +56507,11 @@ class RuboCop::TargetRuby::GemspecFile < ::RuboCop::TargetRuby::Source extend ::RuboCop::AST::NodePattern::Macros # source://rubocop//lib/rubocop/target_ruby.rb#159 - def gem_requirement?(param0 = T.unsafe(nil)); end + def gem_requirement_versions(param0 = T.unsafe(nil)); end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#163 + # source://rubocop//lib/rubocop/target_ruby.rb#165 def name; end # source://rubocop//lib/rubocop/target_ruby.rb#154 @@ -55859,37 +56521,37 @@ class RuboCop::TargetRuby::GemspecFile < ::RuboCop::TargetRuby::Source # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#210 + # source://rubocop//lib/rubocop/target_ruby.rb#214 def find_default_minimal_known_ruby(right_hand_side); end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#169 + # source://rubocop//lib/rubocop/target_ruby.rb#171 def find_version; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#179 + # source://rubocop//lib/rubocop/target_ruby.rb#181 def gemspec_filename; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#186 + # source://rubocop//lib/rubocop/target_ruby.rb#188 def gemspec_filepath; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#206 + # source://rubocop//lib/rubocop/target_ruby.rb#210 def version_from_array(array); end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#191 + # source://rubocop//lib/rubocop/target_ruby.rb#193 def version_from_gemspec_file(file); end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#196 + # source://rubocop//lib/rubocop/target_ruby.rb#198 def version_from_right_hand_side(right_hand_side); end end @@ -55973,7 +56635,7 @@ RuboCop::TargetRuby::RubyVersionFile::RUBY_VERSION_PATTERN = T.let(T.unsafe(nil) # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#238 +# source://rubocop//lib/rubocop/target_ruby.rb#242 RuboCop::TargetRuby::SOURCES = T.let(T.unsafe(nil), Array) # A place where information about a target ruby version is found. diff --git a/sorbet/rbi/gems/selenium-webdriver@4.10.0.rbi b/sorbet/rbi/gems/selenium-webdriver@4.15.0.rbi similarity index 96% rename from sorbet/rbi/gems/selenium-webdriver@4.10.0.rbi rename to sorbet/rbi/gems/selenium-webdriver@4.15.0.rbi index 9f3d8061b..bef38f062 100644 --- a/sorbet/rbi/gems/selenium-webdriver@4.10.0.rbi +++ b/sorbet/rbi/gems/selenium-webdriver@4.15.0.rbi @@ -32,19 +32,19 @@ module Selenium::WebDriver # @see Selenium::WebDriver::Firefox::Driver # @see Selenium::WebDriver::IE::Driver # - # source://selenium-webdriver//lib/selenium/webdriver.rb#87 + # source://selenium-webdriver//lib/selenium/webdriver.rb#88 def for(*args); end # Returns logger instance that can be used across the whole Selenium. # # @return [Logger] # - # source://selenium-webdriver//lib/selenium/webdriver.rb#97 + # source://selenium-webdriver//lib/selenium/webdriver.rb#98 def logger(**opts); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver.rb#50 + # source://selenium-webdriver//lib/selenium/webdriver.rb#51 def root; end end end @@ -61,15 +61,13 @@ class Selenium::WebDriver::ActionBuilder # correctly when using asynchronous. # # @param bridge [Selenium::WebDriver::Remote::Bridge] the bridge for the current driver instance. - # @param deprecated_mouse [Selenium::WebDriver::Interactions::PointerInput] PointerInput for the mouse. - # @param deprecated_keyboard [Selenium::WebDriver::Interactions::KeyInput] KeyInput for the keyboard. # @param deprecated_async [Boolean] Whether to perform the actions asynchronously per device. # Defaults to false for backwards compatibility. # @param devices [Array] list of valid sources of input. # @param async [Boolean] Whether to perform the actions asynchronously per device. # @return [ActionBuilder] A self reference. # - # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#45 + # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#43 def initialize(bridge, devices: T.unsafe(nil), async: T.unsafe(nil), duration: T.unsafe(nil)); end # Adds a KeyInput device @@ -81,7 +79,7 @@ class Selenium::WebDriver::ActionBuilder # @param name [String] name for the device # @return [Interactions::KeyInput] The key input added # - # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#84 + # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#82 def add_key_input(name); end # Adds a PointerInput device of the given kind @@ -94,7 +92,7 @@ class Selenium::WebDriver::ActionBuilder # @param kind [Symbol] kind of pointer device to create # @return [Interactions::PointerInput] The pointer input added # - # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#68 + # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#66 def add_pointer_input(kind, name); end # Adds a WheelInput device @@ -106,12 +104,12 @@ class Selenium::WebDriver::ActionBuilder # @param name [String] name for the device # @return [Interactions::WheelInput] The wheel input added # - # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#100 + # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#98 def add_wheel_input(name); end # Clears all actions from the builder. # - # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#211 + # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#209 def clear_all_actions; end # Retrieves the input device for the given name or type @@ -121,7 +119,7 @@ class Selenium::WebDriver::ActionBuilder # @raise [ArgumentError] # @return [Selenium::WebDriver::Interactions::InputDevice] input device with given name or type # - # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#112 + # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#110 def device(name: T.unsafe(nil), type: T.unsafe(nil)); end # Returns the value of attribute devices. @@ -133,7 +131,7 @@ class Selenium::WebDriver::ActionBuilder # # @return [Selenium::WebDriver::Interactions::InputDevice] current KeyInput device # - # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#136 + # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#134 def key_inputs; end # Creates a pause for the given device of the given duration. If no duration is given, the pause will only wait @@ -149,7 +147,7 @@ class Selenium::WebDriver::ActionBuilder # @param duration [Float] Duration to pause # @return [ActionBuilder] A self reference. # - # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#166 + # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#164 def pause(device: T.unsafe(nil), duration: T.unsafe(nil)); end # Creates multiple pauses for the given device of the given duration. @@ -165,31 +163,31 @@ class Selenium::WebDriver::ActionBuilder # @param duration [Float] Duration to pause # @return [ActionBuilder] A self reference. # - # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#188 + # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#186 def pauses(device: T.unsafe(nil), number: T.unsafe(nil), duration: T.unsafe(nil)); end # Executes the actions added to the builder. # - # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#201 + # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#199 def perform; end # Retrieves the current PointerInput devices # # @return [Array] array of current PointerInput devices # - # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#126 + # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#124 def pointer_inputs; end # Releases all action states from the browser. # - # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#219 + # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#217 def release_actions; end # Retrieves the current WheelInput device # # @return [Selenium::WebDriver::Interactions::InputDevice] current WheelInput devices # - # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#146 + # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#144 def wheel_inputs; end private @@ -198,14 +196,14 @@ class Selenium::WebDriver::ActionBuilder # # @raise [TypeError] # - # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#241 + # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#239 def add_input(device); end # Adds pauses for all devices but the given devices # # @param action_devices [Array[InputDevice]] Array of Input Devices performing an action in this tick. # - # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#231 + # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#229 def tick(*action_devices); end end @@ -231,12 +229,15 @@ end # source://selenium-webdriver//lib/selenium/webdriver/atoms.rb#22 module Selenium::WebDriver::Atoms + # source://selenium-webdriver//lib/selenium/webdriver/atoms.rb#23 + def atom_script(function_name); end + private - # source://selenium-webdriver//lib/selenium/webdriver/atoms.rb#29 + # source://selenium-webdriver//lib/selenium/webdriver/atoms.rb#34 def execute_atom(function_name, *arguments); end - # source://selenium-webdriver//lib/selenium/webdriver/atoms.rb#25 + # source://selenium-webdriver//lib/selenium/webdriver/atoms.rb#30 def read_atom(function); end end @@ -752,13 +753,13 @@ Selenium::WebDriver::ChildProcess::SIGTERM = T.let(T.unsafe(nil), String) # source://selenium-webdriver//lib/selenium/webdriver/common/child_process.rb#27 class Selenium::WebDriver::ChildProcess::TimeoutError < ::StandardError; end -# source://selenium-webdriver//lib/selenium/webdriver/chrome.rb#24 +# source://selenium-webdriver//lib/selenium/webdriver/chrome.rb#22 module Selenium::WebDriver::Chrome class << self - # source://selenium-webdriver//lib/selenium/webdriver/chrome.rb#36 + # source://selenium-webdriver//lib/selenium/webdriver/chrome.rb#34 def path; end - # source://selenium-webdriver//lib/selenium/webdriver/chrome.rb#31 + # source://selenium-webdriver//lib/selenium/webdriver/chrome.rb#29 def path=(path); end end end @@ -775,7 +776,7 @@ class Selenium::WebDriver::Chrome::Driver < ::Selenium::WebDriver::Chromium::Dri # @return [Driver] a new instance of Driver # # source://selenium-webdriver//lib/selenium/webdriver/chrome/driver.rb#33 - def initialize(capabilities: T.unsafe(nil), options: T.unsafe(nil), service: T.unsafe(nil), url: T.unsafe(nil), **opts); end + def initialize(options: T.unsafe(nil), service: T.unsafe(nil), url: T.unsafe(nil), **opts); end # @api private # @@ -795,6 +796,9 @@ module Selenium::WebDriver::Chrome::Features include ::Selenium::WebDriver::Chromium::Features # source://selenium-webdriver//lib/selenium/webdriver/chrome/features.rb#38 + def command_list; end + + # source://selenium-webdriver//lib/selenium/webdriver/chrome/features.rb#42 def commands(command); end end @@ -823,19 +827,22 @@ Selenium::WebDriver::Chrome::Options::KEY = T.let(T.unsafe(nil), String) # source://selenium-webdriver//lib/selenium/webdriver/chrome/profile.rb#29 class Selenium::WebDriver::Chrome::Profile < ::Selenium::WebDriver::Chromium::Profile; end -# source://selenium-webdriver//lib/selenium/webdriver/chrome/service.rb#25 -class Selenium::WebDriver::Chrome::Service < ::Selenium::WebDriver::Chromium::Service; end +# source://selenium-webdriver//lib/selenium/webdriver/chrome/service.rb#23 +class Selenium::WebDriver::Chrome::Service < ::Selenium::WebDriver::Service + # source://selenium-webdriver//lib/selenium/webdriver/chrome/service.rb#28 + def log; end +end -# source://selenium-webdriver//lib/selenium/webdriver/chrome/service.rb#26 +# source://selenium-webdriver//lib/selenium/webdriver/chrome/service.rb#24 Selenium::WebDriver::Chrome::Service::DEFAULT_PORT = T.let(T.unsafe(nil), Integer) -# source://selenium-webdriver//lib/selenium/webdriver/chrome/service.rb#27 +# source://selenium-webdriver//lib/selenium/webdriver/chrome/service.rb#25 Selenium::WebDriver::Chrome::Service::EXECUTABLE = T.let(T.unsafe(nil), String) -# source://selenium-webdriver//lib/selenium/webdriver/chrome/service.rb#28 +# source://selenium-webdriver//lib/selenium/webdriver/chrome/service.rb#26 Selenium::WebDriver::Chrome::Service::SHUTDOWN_SUPPORTED = T.let(T.unsafe(nil), TrueClass) -# source://selenium-webdriver//lib/selenium/webdriver/chromium.rb#24 +# source://selenium-webdriver//lib/selenium/webdriver/chromium.rb#22 module Selenium::WebDriver::Chromium; end # Driver implementation for Chrome. @@ -848,12 +855,12 @@ class Selenium::WebDriver::Chromium::Driver < ::Selenium::WebDriver::Driver # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/chromium/driver.rb#48 + # source://selenium-webdriver//lib/selenium/webdriver/chromium/driver.rb#47 def devtools_url; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/chromium/driver.rb#55 + # source://selenium-webdriver//lib/selenium/webdriver/chromium/driver.rb#54 def devtools_version; end end @@ -864,49 +871,46 @@ Selenium::WebDriver::Chromium::Driver::EXTENSIONS = T.let(T.unsafe(nil), Array) # source://selenium-webdriver//lib/selenium/webdriver/chromium/features.rb#23 module Selenium::WebDriver::Chromium::Features - # source://selenium-webdriver//lib/selenium/webdriver/chromium/features.rb#86 + # source://selenium-webdriver//lib/selenium/webdriver/chromium/features.rb#82 def available_log_types; end - # source://selenium-webdriver//lib/selenium/webdriver/chromium/features.rb#50 + # source://selenium-webdriver//lib/selenium/webdriver/chromium/features.rb#46 def cast_issue_message; end - # source://selenium-webdriver//lib/selenium/webdriver/chromium/features.rb#46 + # source://selenium-webdriver//lib/selenium/webdriver/chromium/features.rb#42 def cast_sink_to_use=(name); end - # source://selenium-webdriver//lib/selenium/webdriver/chromium/features.rb#42 + # source://selenium-webdriver//lib/selenium/webdriver/chromium/features.rb#38 def cast_sinks; end - # source://selenium-webdriver//lib/selenium/webdriver/chromium/features.rb#34 - def commands(command); end - - # source://selenium-webdriver//lib/selenium/webdriver/chromium/features.rb#78 + # source://selenium-webdriver//lib/selenium/webdriver/chromium/features.rb#74 def delete_network_conditions; end - # source://selenium-webdriver//lib/selenium/webdriver/chromium/features.rb#38 + # source://selenium-webdriver//lib/selenium/webdriver/chromium/features.rb#34 def launch_app(id); end - # source://selenium-webdriver//lib/selenium/webdriver/chromium/features.rb#91 + # source://selenium-webdriver//lib/selenium/webdriver/chromium/features.rb#87 def log(type); end - # source://selenium-webdriver//lib/selenium/webdriver/chromium/features.rb#70 + # source://selenium-webdriver//lib/selenium/webdriver/chromium/features.rb#66 def network_conditions; end - # source://selenium-webdriver//lib/selenium/webdriver/chromium/features.rb#74 + # source://selenium-webdriver//lib/selenium/webdriver/chromium/features.rb#70 def network_conditions=(conditions); end - # source://selenium-webdriver//lib/selenium/webdriver/chromium/features.rb#82 + # source://selenium-webdriver//lib/selenium/webdriver/chromium/features.rb#78 def send_command(command_params); end - # source://selenium-webdriver//lib/selenium/webdriver/chromium/features.rb#66 + # source://selenium-webdriver//lib/selenium/webdriver/chromium/features.rb#62 def set_permission(name, value); end - # source://selenium-webdriver//lib/selenium/webdriver/chromium/features.rb#58 + # source://selenium-webdriver//lib/selenium/webdriver/chromium/features.rb#54 def start_cast_desktop_mirroring(name); end - # source://selenium-webdriver//lib/selenium/webdriver/chromium/features.rb#54 + # source://selenium-webdriver//lib/selenium/webdriver/chromium/features.rb#50 def start_cast_tab_mirroring(name); end - # source://selenium-webdriver//lib/selenium/webdriver/chromium/features.rb#62 + # source://selenium-webdriver//lib/selenium/webdriver/chromium/features.rb#58 def stop_casting(name); end end @@ -919,7 +923,7 @@ class Selenium::WebDriver::Chromium::Options < ::Selenium::WebDriver::Options # # @example # options = Selenium::WebDriver::Chrome::Options.new(args: ['start-maximized', 'user-data-dir=/tmp/temp_profile']) - # driver = Selenium::WebDriver.for(:chrome, capabilities: options) + # driver = Selenium::WebDriver.for(:chrome, options: options) # @option opts # @option opts # @option opts @@ -966,7 +970,7 @@ class Selenium::WebDriver::Chromium::Options < ::Selenium::WebDriver::Options # @option opts # @param opts [Hash] the pre-defined options for adding mobile emulation values # - # source://selenium-webdriver//lib/selenium/webdriver/chromium/options.rb#199 + # source://selenium-webdriver//lib/selenium/webdriver/chromium/options.rb#181 def add_emulation(**opts); end # Add an extension by Base64-encoded string. @@ -1009,7 +1013,7 @@ class Selenium::WebDriver::Chromium::Options < ::Selenium::WebDriver::Options # @param activity [String] Name of the Activity hosting the WebView (Not available on Chrome Apps). # @see https://chromedriver.chromium.org/getting-started/getting-started---android # - # source://selenium-webdriver//lib/selenium/webdriver/chromium/options.rb#215 + # source://selenium-webdriver//lib/selenium/webdriver/chromium/options.rb#197 def enable_android(package: T.unsafe(nil), serial_number: T.unsafe(nil), use_running_app: T.unsafe(nil), activity: T.unsafe(nil)); end # NOTE: special handling of 'extensions' to validate when set instead of when used @@ -1028,18 +1032,6 @@ class Selenium::WebDriver::Chromium::Options < ::Selenium::WebDriver::Options # source://selenium-webdriver//lib/selenium/webdriver/chromium/options.rb#115 def extensions=(extensions); end - # Run Chrome in headless mode. - # Old headless uses a non-production browser and is set with `--headless` - # Native headless from v86 - v108 is set with `--headless=chrome` - # Native headless from v109+ is set with `--headless=new` - # - # @example Enable headless mode - # options = Selenium::WebDriver::Chrome::Options.new - # options.headless! - # - # source://selenium-webdriver//lib/selenium/webdriver/chromium/options.rb#173 - def headless!; end - # Returns the value of attribute logging_prefs. # # source://selenium-webdriver//lib/selenium/webdriver/chromium/options.rb#24 @@ -1066,23 +1058,23 @@ class Selenium::WebDriver::Chromium::Options < ::Selenium::WebDriver::Options protected - # source://selenium-webdriver//lib/selenium/webdriver/chromium/options.rb#240 + # source://selenium-webdriver//lib/selenium/webdriver/chromium/options.rb#222 def binary_path; end # @return [Boolean] # - # source://selenium-webdriver//lib/selenium/webdriver/chromium/options.rb#255 + # source://selenium-webdriver//lib/selenium/webdriver/chromium/options.rb#237 def camelize?(key); end - # source://selenium-webdriver//lib/selenium/webdriver/chromium/options.rb#244 + # source://selenium-webdriver//lib/selenium/webdriver/chromium/options.rb#226 def encode_extension(path); end - # source://selenium-webdriver//lib/selenium/webdriver/chromium/options.rb#224 + # source://selenium-webdriver//lib/selenium/webdriver/chromium/options.rb#206 def process_browser_options(browser_options); end # @raise [Error::WebDriverError] # - # source://selenium-webdriver//lib/selenium/webdriver/chromium/options.rb#248 + # source://selenium-webdriver//lib/selenium/webdriver/chromium/options.rb#230 def validate_extension(path); end end @@ -1145,14 +1137,6 @@ class Selenium::WebDriver::Chromium::Profile def write_prefs_to(dir); end end -# source://selenium-webdriver//lib/selenium/webdriver/chromium/service.rb#23 -class Selenium::WebDriver::Chromium::Service < ::Selenium::WebDriver::Service - protected - - # source://selenium-webdriver//lib/selenium/webdriver/chromium/service.rb#26 - def extract_service_args(driver_opts); end -end - # source://selenium-webdriver//lib/selenium/webdriver/common/virtual_authenticator/credential.rb#27 class Selenium::WebDriver::Credential # @raise [ArgumentError] @@ -1739,7 +1723,7 @@ class Selenium::WebDriver::DevTools::Response end end -# source://selenium-webdriver//lib/selenium/webdriver.rb#34 +# source://selenium-webdriver//lib/selenium/webdriver.rb#35 class Selenium::WebDriver::Dimension < ::Struct # Returns the value of attribute height # @@ -1957,7 +1941,7 @@ class Selenium::WebDriver::Driver private - # source://selenium-webdriver//lib/selenium/webdriver/common/driver.rb#342 + # source://selenium-webdriver//lib/selenium/webdriver/common/driver.rb#330 def add_extensions(browser); end # Returns the value of attribute bridge. @@ -1968,13 +1952,10 @@ class Selenium::WebDriver::Driver # source://selenium-webdriver//lib/selenium/webdriver/common/driver.rb#315 def create_bridge(caps:, url:, http_client: T.unsafe(nil)); end - # source://selenium-webdriver//lib/selenium/webdriver/common/driver.rb#321 - def generate_capabilities(capabilities); end - - # source://selenium-webdriver//lib/selenium/webdriver/common/driver.rb#338 + # source://selenium-webdriver//lib/selenium/webdriver/common/driver.rb#326 def screenshot; end - # source://selenium-webdriver//lib/selenium/webdriver/common/driver.rb#333 + # source://selenium-webdriver//lib/selenium/webdriver/common/driver.rb#321 def service_url(service); end class << self @@ -2186,6 +2167,25 @@ module Selenium::WebDriver::DriverExtensions::HasDevTools def devtools; end end +# source://selenium-webdriver//lib/selenium/webdriver/common/driver_extensions/has_file_downloads.rb#23 +module Selenium::WebDriver::DriverExtensions::HasFileDownloads + # source://selenium-webdriver//lib/selenium/webdriver/common/driver_extensions/has_file_downloads.rb#49 + def delete_downloadable_files; end + + # source://selenium-webdriver//lib/selenium/webdriver/common/driver_extensions/has_file_downloads.rb#30 + def download_file(file_name, target_directory); end + + # source://selenium-webdriver//lib/selenium/webdriver/common/driver_extensions/has_file_downloads.rb#24 + def downloadable_files; end + + private + + # @raise [Error::WebDriverError] + # + # source://selenium-webdriver//lib/selenium/webdriver/common/driver_extensions/has_file_downloads.rb#57 + def verify_enabled; end +end + # source://selenium-webdriver//lib/selenium/webdriver/common/driver_extensions/has_launching.rb#23 module Selenium::WebDriver::DriverExtensions::HasLaunching # Launches Chromium app specified by id. @@ -2196,24 +2196,6 @@ module Selenium::WebDriver::DriverExtensions::HasLaunching def launch_app(id); end end -# source://selenium-webdriver//lib/selenium/webdriver/common/driver_extensions/has_location.rb#24 -module Selenium::WebDriver::DriverExtensions::HasLocation - # @raise [Error::UnsupportedOperationError] - # - # source://selenium-webdriver//lib/selenium/webdriver/common/driver_extensions/has_location.rb#25 - def location; end - - # @raise [Error::UnsupportedOperationError] - # - # source://selenium-webdriver//lib/selenium/webdriver/common/driver_extensions/has_location.rb#29 - def location=(*_arg0); end - - # @raise [Error::UnsupportedOperationError] - # - # source://selenium-webdriver//lib/selenium/webdriver/common/driver_extensions/has_location.rb#25 - def set_location; end -end - # source://selenium-webdriver//lib/selenium/webdriver/common/driver_extensions/has_log_events.rb#23 module Selenium::WebDriver::DriverExtensions::HasLogEvents include ::Selenium::WebDriver::Atoms @@ -2305,19 +2287,6 @@ module Selenium::WebDriver::DriverExtensions::HasNetworkConditions def network_conditions=(conditions); end end -# source://selenium-webdriver//lib/selenium/webdriver/common/driver_extensions/has_network_connection.rb#24 -module Selenium::WebDriver::DriverExtensions::HasNetworkConnection - # @raise [Error::UnsupportedOperationError] - # - # source://selenium-webdriver//lib/selenium/webdriver/common/driver_extensions/has_network_connection.rb#25 - def network_connection_type; end - - # @raise [Error::UnsupportedOperationError] - # - # source://selenium-webdriver//lib/selenium/webdriver/common/driver_extensions/has_network_connection.rb#30 - def network_connection_type=(*_arg0); end -end - # source://selenium-webdriver//lib/selenium/webdriver/common/driver_extensions/has_network_interception.rb#23 module Selenium::WebDriver::DriverExtensions::HasNetworkInterception # Intercepts requests coming from browser allowing @@ -2494,13 +2463,13 @@ class Selenium::WebDriver::DriverFinder end end -# source://selenium-webdriver//lib/selenium/webdriver/edge.rb#24 +# source://selenium-webdriver//lib/selenium/webdriver/edge.rb#22 module Selenium::WebDriver::Edge class << self - # source://selenium-webdriver//lib/selenium/webdriver/edge.rb#36 + # source://selenium-webdriver//lib/selenium/webdriver/edge.rb#34 def path; end - # source://selenium-webdriver//lib/selenium/webdriver/edge.rb#31 + # source://selenium-webdriver//lib/selenium/webdriver/edge.rb#29 def path=(path); end end end @@ -2517,7 +2486,7 @@ class Selenium::WebDriver::Edge::Driver < ::Selenium::WebDriver::Chromium::Drive # @return [Driver] a new instance of Driver # # source://selenium-webdriver//lib/selenium/webdriver/edge/driver.rb#33 - def initialize(capabilities: T.unsafe(nil), options: T.unsafe(nil), service: T.unsafe(nil), url: T.unsafe(nil), **opts); end + def initialize(options: T.unsafe(nil), service: T.unsafe(nil), url: T.unsafe(nil), **opts); end # @api private # @@ -2537,6 +2506,9 @@ module Selenium::WebDriver::Edge::Features include ::Selenium::WebDriver::Chromium::Features # source://selenium-webdriver//lib/selenium/webdriver/edge/features.rb#38 + def command_list; end + + # source://selenium-webdriver//lib/selenium/webdriver/edge/features.rb#42 def commands(command); end end @@ -2576,16 +2548,19 @@ Selenium::WebDriver::Edge::Options::KEY = T.let(T.unsafe(nil), String) # source://selenium-webdriver//lib/selenium/webdriver/edge/profile.rb#29 class Selenium::WebDriver::Edge::Profile < ::Selenium::WebDriver::Chromium::Profile; end -# source://selenium-webdriver//lib/selenium/webdriver/edge/service.rb#25 -class Selenium::WebDriver::Edge::Service < ::Selenium::WebDriver::Chromium::Service; end +# source://selenium-webdriver//lib/selenium/webdriver/edge/service.rb#23 +class Selenium::WebDriver::Edge::Service < ::Selenium::WebDriver::Service + # source://selenium-webdriver//lib/selenium/webdriver/edge/service.rb#28 + def log; end +end -# source://selenium-webdriver//lib/selenium/webdriver/edge/service.rb#26 +# source://selenium-webdriver//lib/selenium/webdriver/edge/service.rb#24 Selenium::WebDriver::Edge::Service::DEFAULT_PORT = T.let(T.unsafe(nil), Integer) -# source://selenium-webdriver//lib/selenium/webdriver/edge/service.rb#27 +# source://selenium-webdriver//lib/selenium/webdriver/edge/service.rb#25 Selenium::WebDriver::Edge::Service::EXECUTABLE = T.let(T.unsafe(nil), String) -# source://selenium-webdriver//lib/selenium/webdriver/edge/service.rb#28 +# source://selenium-webdriver//lib/selenium/webdriver/edge/service.rb#26 Selenium::WebDriver::Edge::Service::SHUTDOWN_SUPPORTED = T.let(T.unsafe(nil), TrueClass) # source://selenium-webdriver//lib/selenium/webdriver/common/element.rb#22 @@ -3215,7 +3190,7 @@ class Selenium::WebDriver::Firefox::Driver < ::Selenium::WebDriver::Driver # @return [Driver] a new instance of Driver # # source://selenium-webdriver//lib/selenium/webdriver/firefox/driver.rb#41 - def initialize(capabilities: T.unsafe(nil), options: T.unsafe(nil), service: T.unsafe(nil), url: T.unsafe(nil), **opts); end + def initialize(options: T.unsafe(nil), service: T.unsafe(nil), url: T.unsafe(nil), **opts); end # @api private # @@ -3298,21 +3273,24 @@ Selenium::WebDriver::Firefox::Extension::NAMESPACE = T.let(T.unsafe(nil), String # source://selenium-webdriver//lib/selenium/webdriver/firefox/features.rb#23 module Selenium::WebDriver::Firefox::Features # source://selenium-webdriver//lib/selenium/webdriver/firefox/features.rb#32 + def command_list; end + + # source://selenium-webdriver//lib/selenium/webdriver/firefox/features.rb#36 def commands(command); end - # source://selenium-webdriver//lib/selenium/webdriver/firefox/features.rb#60 + # source://selenium-webdriver//lib/selenium/webdriver/firefox/features.rb#64 def context; end - # source://selenium-webdriver//lib/selenium/webdriver/firefox/features.rb#56 + # source://selenium-webdriver//lib/selenium/webdriver/firefox/features.rb#60 def context=(context); end - # source://selenium-webdriver//lib/selenium/webdriver/firefox/features.rb#52 + # source://selenium-webdriver//lib/selenium/webdriver/firefox/features.rb#56 def full_screenshot; end - # source://selenium-webdriver//lib/selenium/webdriver/firefox/features.rb#36 + # source://selenium-webdriver//lib/selenium/webdriver/firefox/features.rb#40 def install_addon(path, temporary); end - # source://selenium-webdriver//lib/selenium/webdriver/firefox/features.rb#48 + # source://selenium-webdriver//lib/selenium/webdriver/firefox/features.rb#52 def uninstall_addon(id); end end @@ -3325,7 +3303,7 @@ class Selenium::WebDriver::Firefox::Options < ::Selenium::WebDriver::Options # # @example # options = Selenium::WebDriver::Firefox::Options.new(args: ['--host=127.0.0.1']) - # driver = Selenium::WebDriver.for :firefox, capabilities: options + # driver = Selenium::WebDriver.for :firefox, options: options # @option opts # @option opts # @option opts @@ -3380,22 +3358,13 @@ class Selenium::WebDriver::Firefox::Options < ::Selenium::WebDriver::Options # @param intent_arguments [Array] Arguments to launch the intent with. # @see https://developer.mozilla.org/en-US/docs/Web/WebDriver/Capabilities/firefoxOptions#android # - # source://selenium-webdriver//lib/selenium/webdriver/firefox/options.rb#156 + # source://selenium-webdriver//lib/selenium/webdriver/firefox/options.rb#141 def enable_android(package: T.unsafe(nil), serial_number: T.unsafe(nil), activity: T.unsafe(nil), intent_arguments: T.unsafe(nil)); end - # Run Firefox in headless mode. - # - # @example Enable headless mode - # options = Selenium::WebDriver::Firefox::Options.new - # options.headless! - # - # source://selenium-webdriver//lib/selenium/webdriver/firefox/options.rb#110 - def headless!; end - - # source://selenium-webdriver//lib/selenium/webdriver/firefox/options.rb#136 + # source://selenium-webdriver//lib/selenium/webdriver/firefox/options.rb#121 def log_level; end - # source://selenium-webdriver//lib/selenium/webdriver/firefox/options.rb#140 + # source://selenium-webdriver//lib/selenium/webdriver/firefox/options.rb#125 def log_level=(level); end # NOTE: special handling of 'profile' to validate when set instead of when used @@ -3414,20 +3383,20 @@ class Selenium::WebDriver::Firefox::Options < ::Selenium::WebDriver::Options # options.profile = 'myprofile' # @param profile [Profile, String] Profile to be used # - # source://selenium-webdriver//lib/selenium/webdriver/firefox/options.rb#132 + # source://selenium-webdriver//lib/selenium/webdriver/firefox/options.rb#117 def profile=(profile); end private # @return [Boolean] # - # source://selenium-webdriver//lib/selenium/webdriver/firefox/options.rb#183 + # source://selenium-webdriver//lib/selenium/webdriver/firefox/options.rb#168 def camelize?(key); end - # source://selenium-webdriver//lib/selenium/webdriver/firefox/options.rb#165 + # source://selenium-webdriver//lib/selenium/webdriver/firefox/options.rb#150 def process_browser_options(browser_options); end - # source://selenium-webdriver//lib/selenium/webdriver/firefox/options.rb#172 + # source://selenium-webdriver//lib/selenium/webdriver/firefox/options.rb#157 def process_profile(profile); end end @@ -3598,12 +3567,7 @@ class Selenium::WebDriver::Firefox::ProfilesIni end # source://selenium-webdriver//lib/selenium/webdriver/firefox/service.rb#23 -class Selenium::WebDriver::Firefox::Service < ::Selenium::WebDriver::Service - private - - # source://selenium-webdriver//lib/selenium/webdriver/firefox/service.rb#30 - def extract_service_args(driver_opts); end -end +class Selenium::WebDriver::Firefox::Service < ::Selenium::WebDriver::Service; end # source://selenium-webdriver//lib/selenium/webdriver/firefox/service.rb#24 Selenium::WebDriver::Firefox::Service::DEFAULT_PORT = T.let(T.unsafe(nil), Integer) @@ -3757,7 +3721,7 @@ class Selenium::WebDriver::IE::Driver < ::Selenium::WebDriver::Driver # @return [Driver] a new instance of Driver # # source://selenium-webdriver//lib/selenium/webdriver/ie/driver.rb#34 - def initialize(capabilities: T.unsafe(nil), options: T.unsafe(nil), service: T.unsafe(nil), url: T.unsafe(nil), **opts); end + def initialize(options: T.unsafe(nil), service: T.unsafe(nil), url: T.unsafe(nil), **opts); end # @api private # @@ -3770,17 +3734,26 @@ end # source://selenium-webdriver//lib/selenium/webdriver/ie/driver.rb#30 Selenium::WebDriver::IE::Driver::EXTENSIONS = T.let(T.unsafe(nil), Array) +# source://selenium-webdriver//lib/selenium/webdriver/ie/features.rb#23 +module Selenium::WebDriver::IE::Features + # source://selenium-webdriver//lib/selenium/webdriver/ie/features.rb#24 + def command_list; end + + # source://selenium-webdriver//lib/selenium/webdriver/ie/features.rb#28 + def commands(command); end +end + # source://selenium-webdriver//lib/selenium/webdriver/ie/options.rb#23 class Selenium::WebDriver::IE::Options < ::Selenium::WebDriver::Options # Create a new Options instance # # @example # options = Selenium::WebDriver::IE::Options.new(args: ['--host=127.0.0.1']) - # driver = Selenium::WebDriver.for(:ie, capabilities: options) + # driver = Selenium::WebDriver.for(:ie, options: options) # @example # options = Selenium::WebDriver::IE::Options.new # options.element_scroll_behavior = Selenium::WebDriver::IE::Options::SCROLL_BOTTOM - # driver = Selenium::WebDriver.for(:ie, capabilities: options) + # driver = Selenium::WebDriver.for(:ie, options: options) # @option opts # @option opts # @option opts @@ -3800,28 +3773,28 @@ class Selenium::WebDriver::IE::Options < ::Selenium::WebDriver::Options # @param opts [Hash] the pre-defined options # @return [Options] a new instance of Options # - # source://selenium-webdriver//lib/selenium/webdriver/ie/options.rb#81 + # source://selenium-webdriver//lib/selenium/webdriver/ie/options.rb#82 def initialize(**opts); end # Add a command-line argument to use when starting Internet Explorer. # # @param arg [String] The command-line argument to add # - # source://selenium-webdriver//lib/selenium/webdriver/ie/options.rb#94 + # source://selenium-webdriver//lib/selenium/webdriver/ie/options.rb#95 def add_argument(arg); end # Returns the value of attribute args. # - # source://selenium-webdriver//lib/selenium/webdriver/ie/options.rb#48 + # source://selenium-webdriver//lib/selenium/webdriver/ie/options.rb#49 def args; end private - # source://selenium-webdriver//lib/selenium/webdriver/ie/options.rb#100 + # source://selenium-webdriver//lib/selenium/webdriver/ie/options.rb#101 def process_browser_options(browser_options); end end -# source://selenium-webdriver//lib/selenium/webdriver/ie/options.rb#46 +# source://selenium-webdriver//lib/selenium/webdriver/ie/options.rb#47 Selenium::WebDriver::IE::Options::BROWSER = T.let(T.unsafe(nil), String) # source://selenium-webdriver//lib/selenium/webdriver/ie/options.rb#27 @@ -3837,12 +3810,7 @@ Selenium::WebDriver::IE::Options::SCROLL_BOTTOM = T.let(T.unsafe(nil), Integer) Selenium::WebDriver::IE::Options::SCROLL_TOP = T.let(T.unsafe(nil), Integer) # source://selenium-webdriver//lib/selenium/webdriver/ie/service.rb#23 -class Selenium::WebDriver::IE::Service < ::Selenium::WebDriver::Service - private - - # source://selenium-webdriver//lib/selenium/webdriver/ie/service.rb#30 - def extract_service_args(driver_opts); end -end +class Selenium::WebDriver::IE::Service < ::Selenium::WebDriver::Service; end # source://selenium-webdriver//lib/selenium/webdriver/ie/service.rb#24 Selenium::WebDriver::IE::Service::DEFAULT_PORT = T.let(T.unsafe(nil), Integer) @@ -4412,10 +4380,10 @@ module Selenium::WebDriver::LocalDriver # @raise [ArgumentError] # # source://selenium-webdriver//lib/selenium/webdriver/common/local_driver.rb#23 - def initialize_local_driver(capabilities, options, service, url); end + def initialize_local_driver(options, service, url); end # source://selenium-webdriver//lib/selenium/webdriver/common/local_driver.rb#33 - def process_options(options, capabilities, service); end + def process_options(options, service); end end # source://selenium-webdriver//lib/selenium/webdriver/common/log_entry.rb#22 @@ -4706,10 +4674,10 @@ end class Selenium::WebDriver::Options # @return [Options] a new instance of Options # - # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#69 + # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#71 def initialize(**opts); end - # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#98 + # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#94 def ==(other); end # Add a new option not yet handled by bindings. @@ -4720,93 +4688,97 @@ class Selenium::WebDriver::Options # @param name [String, Symbol] Name of the option # @param value [Boolean, String, Integer] Value of the option # - # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#87 + # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#89 def add_option(name, value = T.unsafe(nil)); end # @api private + # @raise [Error::WebDriverError] # - # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#110 + # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#106 def as_json(*_arg0); end - # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#98 + # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#94 def eql?(other); end # Returns the value of attribute options. # - # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#67 + # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#69 def options; end # Sets the attribute options # # @param value the value to set the attribute options to. # - # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#67 + # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#69 def options=(_arg0); end private - # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#194 + # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#179 def camel_case(str); end # @return [Boolean] # - # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#158 + # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#143 def camelize?(_key); end # @raise [TypeError] # - # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#186 + # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#171 def convert_json_key(key, camelize: T.unsafe(nil)); end - # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#162 + # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#147 def generate_as_json(value, camelize_keys: T.unsafe(nil)); end - # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#154 + # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#139 def process_browser_options(_browser_options); end - # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#176 + # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#161 def process_json_hash(value, camelize_keys); end - # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#147 + # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#132 def process_w3c_options(options); end # @return [Boolean] # - # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#143 + # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#128 def w3c?(key); end class << self - # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#30 + # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#32 def chrome(**opts); end # Returns the value of attribute driver_path. # - # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#28 + # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#30 def driver_path; end - # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#43 + # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#45 def edge(**opts); end - # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#34 + # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#36 def firefox(**opts); end - # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#38 + # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#40 def ie(**opts); end - # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#38 + # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#40 def internet_explorer(**opts); end - # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#43 + # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#45 def microsoftedge(**opts); end - # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#48 + # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#50 def safari(**opts); end - # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#52 + # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#54 def set_capabilities; end end end +# source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#27 +Selenium::WebDriver::Options::GRID_OPTIONS = T.let(T.unsafe(nil), Array) + # source://selenium-webdriver//lib/selenium/webdriver/common/options.rb#23 Selenium::WebDriver::Options::W3C_OPTIONS = T.let(T.unsafe(nil), Array) @@ -4818,19 +4790,14 @@ module Selenium::WebDriver::Platform # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#147 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#135 def assert_executable(path); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#141 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#129 def assert_file(path); end - # @api private - # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#65 - def bitsize; end - # @api private # # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#53 @@ -4838,12 +4805,12 @@ module Selenium::WebDriver::Platform # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#110 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#98 def cygwin?; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#122 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#110 def cygwin_path(path, **opts); end # @api private @@ -4853,19 +4820,9 @@ module Selenium::WebDriver::Platform # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#155 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#143 def exit_hook; end - # @api private - # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#161 - def find_binary(*binary_names); end - - # @api private - # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#181 - def find_in_program_files(*binary_names); end - # @api private # # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#29 @@ -4873,42 +4830,42 @@ module Selenium::WebDriver::Platform # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#222 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#173 def interfaces; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#206 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#157 def ip; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#77 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#65 def jruby?; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#97 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#85 def linux?; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#198 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#149 def localhost; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#93 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#81 def mac?; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#137 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#125 def make_writable(file); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#114 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#102 def null_device; end # @api private @@ -4918,57 +4875,52 @@ module Selenium::WebDriver::Platform # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#85 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#73 def ruby_version; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#81 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#69 def truffleruby?; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#129 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#117 def unix_path(path); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#89 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#77 def windows?; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#133 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#121 def windows_path(path); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#118 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#106 def wrap_in_quotes_if_necessary(str); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#101 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#89 def wsl?; end class << self # @api private # @raise [Error::WebDriverError] # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#147 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#135 def assert_executable(path); end # @api private # @raise [Error::WebDriverError] # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#141 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#129 def assert_file(path); end - # @api private - # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#65 - def bitsize; end - # @api private # # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#53 @@ -4977,12 +4929,12 @@ module Selenium::WebDriver::Platform # @api private # @return [Boolean] # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#110 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#98 def cygwin?; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#122 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#110 def cygwin_path(path, **opts); end # @api private @@ -4992,19 +4944,9 @@ module Selenium::WebDriver::Platform # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#155 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#143 def exit_hook; end - # @api private - # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#161 - def find_binary(*binary_names); end - - # @api private - # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#181 - def find_in_program_files(*binary_names); end - # @api private # # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#29 @@ -5012,46 +4954,46 @@ module Selenium::WebDriver::Platform # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#222 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#173 def interfaces; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#206 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#157 def ip; end # @api private # @return [Boolean] # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#77 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#65 def jruby?; end # @api private # @return [Boolean] # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#97 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#85 def linux?; end # @api private # @raise [Error::WebDriverError] # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#198 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#149 def localhost; end # @api private # @return [Boolean] # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#93 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#81 def mac?; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#137 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#125 def make_writable(file); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#114 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#102 def null_device; end # @api private @@ -5061,45 +5003,45 @@ module Selenium::WebDriver::Platform # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#85 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#73 def ruby_version; end # @api private # @return [Boolean] # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#81 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#69 def truffleruby?; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#129 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#117 def unix_path(path); end # @api private # @return [Boolean] # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#89 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#77 def windows?; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#133 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#121 def windows_path(path); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#118 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#106 def wrap_in_quotes_if_necessary(str); end # @api private # @return [Boolean] # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#101 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#89 def wsl?; end end end -# source://selenium-webdriver//lib/selenium/webdriver.rb#33 +# source://selenium-webdriver//lib/selenium/webdriver.rb#34 class Selenium::WebDriver::Point < ::Struct # Returns the value of attribute x # @@ -5547,7 +5489,7 @@ Selenium::WebDriver::Proxy::ALLOWED = T.let(T.unsafe(nil), Hash) # source://selenium-webdriver//lib/selenium/webdriver/common/proxy.rb#23 Selenium::WebDriver::Proxy::TYPES = T.let(T.unsafe(nil), Hash) -# source://selenium-webdriver//lib/selenium/webdriver.rb#35 +# source://selenium-webdriver//lib/selenium/webdriver.rb#36 class Selenium::WebDriver::Rectangle < ::Struct # Returns the value of attribute height # @@ -5648,7 +5590,7 @@ class Selenium::WebDriver::Remote::Bridge # # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#519 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#500 def active_element; end # @api private @@ -5658,14 +5600,14 @@ class Selenium::WebDriver::Remote::Bridge # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#579 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#560 def add_credential(credential, id); end # virtual-authenticator # # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#570 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#551 def add_virtual_authenticator(options); end # @api private @@ -5690,7 +5632,7 @@ class Selenium::WebDriver::Remote::Bridge # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#418 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#399 def clear_element(element); end # @api private @@ -5733,7 +5675,7 @@ class Selenium::WebDriver::Remote::Bridge # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#583 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#564 def credentials(authenticator_id); end # @api private @@ -5753,54 +5695,54 @@ class Selenium::WebDriver::Remote::Bridge # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#463 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#444 def element_aria_label(element); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#459 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#440 def element_aria_role(element); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#446 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#427 def element_attribute(element, name); end # @api private # @return [Boolean] # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#506 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#487 def element_displayed?(element); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#451 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#432 def element_dom_attribute(element, name); end # @api private # @return [Boolean] # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#498 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#479 def element_enabled?(element); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#475 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#456 def element_location(element); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#487 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#468 def element_location_once_scrolled_into_view(element); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#455 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#436 def element_property(element, name); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#481 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#462 def element_rect(element); end # @api private @@ -5811,34 +5753,34 @@ class Selenium::WebDriver::Remote::Bridge # @api private # @return [Boolean] # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#502 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#483 def element_selected?(element); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#492 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#473 def element_size(element); end # element properties # # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#442 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#423 def element_tag_name(element); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#471 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#452 def element_text(element); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#467 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#448 def element_value(element); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#511 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#492 def element_value_of_css_property(element, prop); end # @api private @@ -5865,12 +5807,12 @@ class Selenium::WebDriver::Remote::Bridge # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#525 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#506 def find_element_by(how, what, parent_ref = T.unsafe(nil)); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#543 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#524 def find_elements_by(how, what, parent_ref = T.unsafe(nil)); end # @api private @@ -5980,12 +5922,12 @@ class Selenium::WebDriver::Remote::Bridge # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#591 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#572 def remove_all_credentials(authenticator_id); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#587 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#568 def remove_credential(credential_id, authenticator_id); end # @api private @@ -6000,7 +5942,7 @@ class Selenium::WebDriver::Remote::Bridge # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#575 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#556 def remove_virtual_authenticator(id); end # @api private @@ -6058,7 +6000,7 @@ class Selenium::WebDriver::Remote::Bridge # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#561 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#542 def shadow_root(element); end # @api private @@ -6068,14 +6010,14 @@ class Selenium::WebDriver::Remote::Bridge # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#422 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#403 def submit_element(element); end # finding elements # # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#519 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#500 def switch_to_active_element; end # @api private @@ -6115,11 +6057,6 @@ class Selenium::WebDriver::Remote::Bridge # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#145 def title; end - # @api private - # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#408 - def upload(local_file); end - # @api private # # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#141 @@ -6127,7 +6064,7 @@ class Selenium::WebDriver::Remote::Bridge # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#595 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#576 def user_verified(verified, authenticator_id); end # @api private @@ -6161,17 +6098,17 @@ class Selenium::WebDriver::Remote::Bridge # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#627 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#608 def commands(command); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#661 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#642 def convert_locator(how, what); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#648 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#629 def element_id_from(id); end # Escapes invalid characters in CSS selector. @@ -6179,12 +6116,12 @@ class Selenium::WebDriver::Remote::Bridge # @api private # @see https://mathiasbynens.be/notes/css-escapes # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#691 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#672 def escape_css(string); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#623 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#604 def escaper; end # executes a command on the remote server. @@ -6192,22 +6129,22 @@ class Selenium::WebDriver::Remote::Bridge # @api private # @return [WebDriver::Remote::Response] # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#607 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#588 def execute(command, opts = T.unsafe(nil), command_hash = T.unsafe(nil)); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#656 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#637 def prepare_capabilities_payload(capabilities); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#652 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#633 def shadow_root_id_from(id); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#631 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#612 def unwrap_script_result(arg); end end @@ -6218,7 +6155,7 @@ Selenium::WebDriver::Remote::Bridge::COMMANDS = T.let(T.unsafe(nil), Hash) # @api private # -# source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#686 +# source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#667 Selenium::WebDriver::Remote::Bridge::ESCAPE_CSS_REGEXP = T.let(T.unsafe(nil), Regexp) # @api private @@ -6233,7 +6170,7 @@ Selenium::WebDriver::Remote::Bridge::QUIT_ERRORS = T.let(T.unsafe(nil), Array) # @api private # -# source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#687 +# source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#668 Selenium::WebDriver::Remote::Bridge::UNICODE_CODE_POINT = T.let(T.unsafe(nil), Integer) # Specification of the desired and/or actual capabilities of the browser that the @@ -6255,18 +6192,18 @@ class Selenium::WebDriver::Remote::Capabilities # @param :proxy [Hash] a customizable set of options # @return [Capabilities] a new instance of Capabilities # - # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#199 + # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#127 def initialize(opts = T.unsafe(nil)); end - # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#288 + # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#216 def ==(other); end - # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#213 + # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#141 def [](key); end # Allows setting arbitrary capabilities. # - # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#209 + # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#137 def []=(key, value); end # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#47 @@ -6277,7 +6214,7 @@ class Selenium::WebDriver::Remote::Capabilities # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#278 + # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#206 def as_json(*_arg0); end # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#47 @@ -6292,16 +6229,16 @@ class Selenium::WebDriver::Remote::Capabilities # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#51 def browser_version=(value); end - # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#288 + # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#216 def eql?(other); end - # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#250 + # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#178 def implicit_timeout; end - # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#254 + # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#182 def implicit_timeout=(timeout); end - # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#217 + # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#145 def merge!(other); end # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#47 @@ -6310,28 +6247,22 @@ class Selenium::WebDriver::Remote::Capabilities # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#51 def page_load_strategy=(value); end - # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#258 + # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#186 def page_load_timeout; end - # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#262 + # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#190 def page_load_timeout=(timeout); end - # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#70 - def platform; end - - # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#75 - def platform=(value); end - # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#47 def platform_name; end # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#51 def platform_name=(value); end - # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#227 + # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#155 def proxy; end - # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#231 + # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#159 def proxy=(proxy); end # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#47 @@ -6340,10 +6271,10 @@ class Selenium::WebDriver::Remote::Capabilities # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#51 def remote_session_id=(value); end - # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#266 + # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#194 def script_timeout; end - # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#270 + # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#198 def script_timeout=(timeout); end # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#47 @@ -6358,13 +6289,13 @@ class Selenium::WebDriver::Remote::Capabilities # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#51 def strict_file_interactability=(value); end - # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#242 + # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#170 def timeouts; end - # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#246 + # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#174 def timeouts=(timeouts); end - # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#284 + # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#212 def to_json(*_arg0); end # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#47 @@ -6373,14 +6304,6 @@ class Selenium::WebDriver::Remote::Capabilities # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#51 def unhandled_prompt_behavior=(value); end - # Backward compatibility - # - # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#60 - def version; end - - # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#65 - def version=(value); end - # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#47 def web_socket_url; end @@ -6391,65 +6314,38 @@ class Selenium::WebDriver::Remote::Capabilities # Returns the value of attribute capabilities. # - # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#298 + # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#226 def capabilities; end private - # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#317 + # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#245 def convert_key(key); end - # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#328 + # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#256 def convert_value(key, value); end - # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#302 + # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#230 def process_capabilities(key, value, hash); end class << self - # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#133 + # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#61 def always_match(capabilities); end - # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#173 + # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#101 def camel_case(str_or_sym); end - # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#85 - def chrome(opts = T.unsafe(nil)); end - - # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#92 - def edge(opts = T.unsafe(nil)); end - - # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#100 - def ff(opts = T.unsafe(nil)); end - - # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#100 - def firefox(opts = T.unsafe(nil)); end - - # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#137 + # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#65 def first_match(*capabilities); end - # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#115 - def htmlunit(opts = T.unsafe(nil)); end - - # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#124 - def ie(opts = T.unsafe(nil)); end - - # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#124 - def internet_explorer(opts = T.unsafe(nil)); end - # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#145 + # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#73 def json_create(data); end - # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#92 - def microsoftedge(opts = T.unsafe(nil)); end - - # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#108 - def safari(opts = T.unsafe(nil)); end - private - # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#179 + # source://selenium-webdriver//lib/selenium/webdriver/remote/capabilities.rb#107 def process_timeouts(caps, timeouts); end end end @@ -6465,34 +6361,70 @@ Selenium::WebDriver::Remote::Capabilities::KNOWN = T.let(T.unsafe(nil), Array) class Selenium::WebDriver::Remote::Driver < ::Selenium::WebDriver::Driver include ::Selenium::WebDriver::DriverExtensions::UploadsFiles include ::Selenium::WebDriver::DriverExtensions::HasSessionId + include ::Selenium::WebDriver::DriverExtensions::HasFileDownloads # @api private # @raise [ArgumentError] # @return [Driver] a new instance of Driver # - # source://selenium-webdriver//lib/selenium/webdriver/remote/driver.rb#32 + # source://selenium-webdriver//lib/selenium/webdriver/remote/driver.rb#33 def initialize(capabilities: T.unsafe(nil), options: T.unsafe(nil), service: T.unsafe(nil), url: T.unsafe(nil), **opts); end private # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/driver.rb#43 + # source://selenium-webdriver//lib/selenium/webdriver/remote/driver.rb#47 def devtools_url; end # @api private # @raise [Error::WebDriverError] # - # source://selenium-webdriver//lib/selenium/webdriver/remote/driver.rb#47 + # source://selenium-webdriver//lib/selenium/webdriver/remote/driver.rb#51 def devtools_version; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/driver.rb#54 + # source://selenium-webdriver//lib/selenium/webdriver/remote/driver.rb#68 + def generate_capabilities(capabilities); end + + # @api private + # + # source://selenium-webdriver//lib/selenium/webdriver/remote/driver.rb#58 def process_options(options, capabilities); end end -# source://selenium-webdriver//lib/selenium/webdriver/remote.rb#31 +# source://selenium-webdriver//lib/selenium/webdriver/remote/features.rb#23 +module Selenium::WebDriver::Remote::Features + # source://selenium-webdriver//lib/selenium/webdriver/remote/features.rb#31 + def add_commands(commands); end + + # source://selenium-webdriver//lib/selenium/webdriver/remote/features.rb#35 + def command_list; end + + # source://selenium-webdriver//lib/selenium/webdriver/remote/features.rb#39 + def commands(command); end + + # source://selenium-webdriver//lib/selenium/webdriver/remote/features.rb#69 + def delete_downloadable_files; end + + # source://selenium-webdriver//lib/selenium/webdriver/remote/features.rb#65 + def download_file(name); end + + # source://selenium-webdriver//lib/selenium/webdriver/remote/features.rb#61 + def downloadable_files; end + + # source://selenium-webdriver//lib/selenium/webdriver/remote/features.rb#43 + def upload(local_file); end + + # source://selenium-webdriver//lib/selenium/webdriver/remote/features.rb#53 + def upload_if_necessary(keys); end +end + +# source://selenium-webdriver//lib/selenium/webdriver/remote/features.rb#24 +Selenium::WebDriver::Remote::Features::REMOTE_COMMANDS = T.let(T.unsafe(nil), Hash) + +# source://selenium-webdriver//lib/selenium/webdriver/remote.rb#32 module Selenium::WebDriver::Remote::Http; end # source://selenium-webdriver//lib/selenium/webdriver/remote/http/common.rb#24 @@ -6542,7 +6474,7 @@ Selenium::WebDriver::Remote::Http::Common::MAX_REDIRECTS = T.let(T.unsafe(nil), # @api private # -# source://selenium-webdriver//lib/selenium/webdriver/remote/http/default.rb#28 +# source://selenium-webdriver//lib/selenium/webdriver/remote/http/default.rb#26 class Selenium::WebDriver::Remote::Http::Default < ::Selenium::WebDriver::Remote::Http::Common # Initializes object. # Warning: Setting {#open_timeout} to non-nil values will cause a separate thread to spawn. @@ -6553,86 +6485,86 @@ class Selenium::WebDriver::Remote::Http::Default < ::Selenium::WebDriver::Remote # @param read_timeout [Numeric] - Read timeout (seconds) to apply to HTTP client. # @return [Default] a new instance of Default # - # source://selenium-webdriver//lib/selenium/webdriver/remote/http/default.rb#38 + # source://selenium-webdriver//lib/selenium/webdriver/remote/http/default.rb#36 def initialize(open_timeout: T.unsafe(nil), read_timeout: T.unsafe(nil)); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/http/default.rb#44 + # source://selenium-webdriver//lib/selenium/webdriver/remote/http/default.rb#42 def close; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/http/default.rb#31 + # source://selenium-webdriver//lib/selenium/webdriver/remote/http/default.rb#29 def open_timeout; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/http/default.rb#31 + # source://selenium-webdriver//lib/selenium/webdriver/remote/http/default.rb#29 def open_timeout=(_arg0); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/http/default.rb#29 + # source://selenium-webdriver//lib/selenium/webdriver/remote/http/default.rb#27 def proxy=(_arg0); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/http/default.rb#31 + # source://selenium-webdriver//lib/selenium/webdriver/remote/http/default.rb#29 def read_timeout; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/http/default.rb#31 + # source://selenium-webdriver//lib/selenium/webdriver/remote/http/default.rb#29 def read_timeout=(_arg0); end private # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/http/default.rb#50 + # source://selenium-webdriver//lib/selenium/webdriver/remote/http/default.rb#48 def http; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/http/default.rb#122 + # source://selenium-webdriver//lib/selenium/webdriver/remote/http/default.rb#121 def new_http_client; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/http/default.rb#108 + # source://selenium-webdriver//lib/selenium/webdriver/remote/http/default.rb#107 def new_request_for(verb, url, headers, payload); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/http/default.rb#138 + # source://selenium-webdriver//lib/selenium/webdriver/remote/http/default.rb#137 def proxy; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/http/default.rb#72 + # source://selenium-webdriver//lib/selenium/webdriver/remote/http/default.rb#70 def request(verb, url, headers, payload, redirects = T.unsafe(nil)); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/http/default.rb#118 + # source://selenium-webdriver//lib/selenium/webdriver/remote/http/default.rb#117 def response_for(request); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/http/default.rb#66 + # source://selenium-webdriver//lib/selenium/webdriver/remote/http/default.rb#64 def start(http); end # @api private # @return [Boolean] # - # source://selenium-webdriver//lib/selenium/webdriver/remote/http/default.rb#150 + # source://selenium-webdriver//lib/selenium/webdriver/remote/http/default.rb#149 def use_proxy?; end end # @api private # -# source://selenium-webdriver//lib/selenium/webdriver/remote/http/default.rb#70 +# source://selenium-webdriver//lib/selenium/webdriver/remote/http/default.rb#68 Selenium::WebDriver::Remote::Http::Default::MAX_RETRIES = T.let(T.unsafe(nil), Integer) # @api private @@ -6737,7 +6669,7 @@ class Selenium::WebDriver::Safari::Driver < ::Selenium::WebDriver::Driver # @return [Driver] a new instance of Driver # # source://selenium-webdriver//lib/selenium/webdriver/safari/driver.rb#35 - def initialize(capabilities: T.unsafe(nil), options: T.unsafe(nil), service: T.unsafe(nil), url: T.unsafe(nil), **opts); end + def initialize(options: T.unsafe(nil), service: T.unsafe(nil), url: T.unsafe(nil), **opts); end # @api private # @@ -6752,16 +6684,19 @@ Selenium::WebDriver::Safari::Driver::EXTENSIONS = T.let(T.unsafe(nil), Array) # source://selenium-webdriver//lib/selenium/webdriver/safari/features.rb#23 module Selenium::WebDriver::Safari::Features - # source://selenium-webdriver//lib/selenium/webdriver/safari/features.rb#43 + # source://selenium-webdriver//lib/selenium/webdriver/safari/features.rb#47 def attach_debugger; end # source://selenium-webdriver//lib/selenium/webdriver/safari/features.rb#31 - def commands(command); end + def command_list; end # source://selenium-webdriver//lib/selenium/webdriver/safari/features.rb#35 - def permissions; end + def commands(command); end # source://selenium-webdriver//lib/selenium/webdriver/safari/features.rb#39 + def permissions; end + + # source://selenium-webdriver//lib/selenium/webdriver/safari/features.rb#43 def permissions=(permissions); end end @@ -6890,18 +6825,24 @@ class Selenium::WebDriver::SeleniumManager # @api private # @return [String] the path to the correct selenium manager # - # source://selenium-webdriver//lib/selenium/webdriver/common/selenium_manager.rb#73 + # source://selenium-webdriver//lib/selenium/webdriver/common/selenium_manager.rb#76 def binary; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/selenium_manager.rb#54 + # source://selenium-webdriver//lib/selenium/webdriver/common/selenium_manager.rb#58 def generate_command(binary, options); end # @api private + # @raise [Error::WebDriverError] # - # source://selenium-webdriver//lib/selenium/webdriver/common/selenium_manager.rb#100 + # source://selenium-webdriver//lib/selenium/webdriver/common/selenium_manager.rb#108 def run(*command); end + + # @api private + # + # source://selenium-webdriver//lib/selenium/webdriver/common/selenium_manager.rb#94 + def validate_location(location); end end end @@ -6960,7 +6901,7 @@ class Selenium::WebDriver::Service # source://selenium-webdriver//lib/selenium/webdriver/common/service.rb#60 def host=(_arg0); end - # source://selenium-webdriver//lib/selenium/webdriver/common/service.rb#90 + # source://selenium-webdriver//lib/selenium/webdriver/common/service.rb#89 def launch; end # Returns the value of attribute log. @@ -6987,14 +6928,9 @@ class Selenium::WebDriver::Service # source://selenium-webdriver//lib/selenium/webdriver/common/service.rb#60 def port=(_arg0); end - # source://selenium-webdriver//lib/selenium/webdriver/common/service.rb#94 + # source://selenium-webdriver//lib/selenium/webdriver/common/service.rb#97 def shutdown_supported; end - protected - - # source://selenium-webdriver//lib/selenium/webdriver/common/service.rb#100 - def extract_service_args(driver_opts); end - class << self # source://selenium-webdriver//lib/selenium/webdriver/common/service.rb#31 def chrome(**opts); end diff --git a/sorbet/rbi/gems/skylight@6.0.1.rbi b/sorbet/rbi/gems/skylight@6.0.1.rbi new file mode 100644 index 000000000..dd715565d --- /dev/null +++ b/sorbet/rbi/gems/skylight@6.0.1.rbi @@ -0,0 +1,5734 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `skylight` gem. +# Please instead update this file by running `bin/tapioca gem skylight`. + +# A HighLine object is a "high-level line oriented" shell over an input and an +# output stream. HighLine simplifies common console interaction, effectively +# replacing puts() and gets(). User code can simply specify the question to ask +# and any details about user interaction, then leave the rest of the work to +# HighLine. When HighLine.ask() returns, you'll have the answer you requested, +# even if HighLine had to ask many times, validate results, perform range +# checking, convert types, etc. +# +# source://skylight//lib/skylight/vendor/cli/highline/system_extensions.rb#10 +class HighLine + include ::HighLine::SystemExtensions + + # Create an instance of HighLine, connected to the streams _input_ + # and _output_. + # + # @return [HighLine] a new instance of HighLine + # + # source://skylight//lib/skylight/vendor/cli/highline.rb#176 + def initialize(input = T.unsafe(nil), output = T.unsafe(nil), wrap_at = T.unsafe(nil), page_at = T.unsafe(nil), indent_size = T.unsafe(nil), indent_level = T.unsafe(nil)); end + + # A shortcut to HighLine.ask() a question that only accepts "yes" or "no" + # answers ("y" and "n" are allowed) and returns +true+ or +false+ + # (+true+ for "yes"). If provided a +true+ value, _character_ will cause + # HighLine to fetch a single character response. A block can be provided + # to further configure the question as in HighLine.ask() + # + # Raises EOFError if input is exhausted. + # + # source://skylight//lib/skylight/vendor/cli/highline.rb#222 + def agree(yes_or_no_question, character = T.unsafe(nil)); end + + # This method is the primary interface for user input. Just provide a + # _question_ to ask the user, the _answer_type_ you want returned, and + # optionally a code block setting up details of how you want the question + # handled. See HighLine.say() for details on the format of _question_, and + # HighLine::Question for more information about _answer_type_ and what's + # valid in the code block. + # + # If @question is set before ask() is called, parameters are + # ignored and that object (must be a HighLine::Question) is used to drive + # the process instead. + # + # Raises EOFError if input is exhausted. + # + # source://skylight//lib/skylight/vendor/cli/highline.rb#247 + def ask(question, answer_type = T.unsafe(nil), &details); end + + # This method is HighLine's menu handler. For simple usage, you can just + # pass all the menu items you wish to display. At that point, choose() will + # build and display a menu, walk the user through selection, and return + # their choice among the provided items. You might use this in a case + # statement for quick and dirty menus. + # + # However, choose() is capable of much more. If provided, a block will be + # passed a HighLine::Menu object to configure. Using this method, you can + # customize all the details of menu handling from index display, to building + # a complete shell-like menuing system. See HighLine::Menu for all the + # methods it responds to. + # + # Raises EOFError if input is exhausted. + # + # source://skylight//lib/skylight/vendor/cli/highline.rb#328 + def choose(*items, &details); end + + # Works as an instance method, same as the class method + # + # source://skylight//lib/skylight/vendor/cli/highline.rb#393 + def color(*args); end + + # Works as an instance method, same as the class method + # + # source://skylight//lib/skylight/vendor/cli/highline.rb#388 + def color_code(*colors); end + + # Executes block or outputs statement with indentation + # + # source://skylight//lib/skylight/vendor/cli/highline.rb#660 + def indent(increase = T.unsafe(nil), statement = T.unsafe(nil), multiline = T.unsafe(nil)); end + + # The indentation level + # + # source://skylight//lib/skylight/vendor/cli/highline.rb#211 + def indent_level; end + + # The indentation level + # + # source://skylight//lib/skylight/vendor/cli/highline.rb#211 + def indent_level=(_arg0); end + + # The indentation size + # + # source://skylight//lib/skylight/vendor/cli/highline.rb#209 + def indent_size; end + + # The indentation size + # + # source://skylight//lib/skylight/vendor/cli/highline.rb#209 + def indent_size=(_arg0); end + + # Outputs indentation with current settings + # + # source://skylight//lib/skylight/vendor/cli/highline.rb#653 + def indentation; end + + # This method is a utility for quickly and easily laying out lists. It can + # be accessed within ERb replacements of any text that will be sent to the + # user. + # + # The only required parameter is _items_, which should be the Array of items + # to list. A specified _mode_ controls how that list is formed and _option_ + # has different effects, depending on the _mode_. Recognized modes are: + # + # :columns_across:: _items_ will be placed in columns, + # flowing from left to right. If given, + # _option_ is the number of columns to be + # used. When absent, columns will be + # determined based on _wrap_at_ or a + # default of 80 characters. + # :columns_down:: Identical to :columns_across, + # save flow goes down. + # :uneven_columns_across:: Like :columns_across but each + # column is sized independently. + # :uneven_columns_down:: Like :columns_down but each + # column is sized independently. + # :inline:: All _items_ are placed on a single line. + # The last two _items_ are separated by + # _option_ or a default of " or ". All + # other _items_ are separated by ", ". + # :rows:: The default mode. Each of the _items_ is + # placed on its own line. The _option_ + # parameter is ignored in this mode. + # + # Each member of the _items_ Array is passed through ERb and thus can contain + # their own expansions. Color escape expansions do not contribute to the + # final field width. + # + # source://skylight//lib/skylight/vendor/cli/highline.rb#440 + def list(items, mode = T.unsafe(nil), option = T.unsafe(nil)); end + + # Indentation over multiple lines + # + # source://skylight//lib/skylight/vendor/cli/highline.rb#207 + def multi_indent; end + + # Indentation over multiple lines + # + # source://skylight//lib/skylight/vendor/cli/highline.rb#207 + def multi_indent=(_arg0); end + + # Outputs newline + # + # source://skylight//lib/skylight/vendor/cli/highline.rb#682 + def newline; end + + # Returns the number of columns for the console, or a default it they cannot + # be determined. + # + # source://skylight//lib/skylight/vendor/cli/highline.rb#690 + def output_cols; end + + # Returns the number of rows for the console, or a default if they cannot be + # determined. + # + # source://skylight//lib/skylight/vendor/cli/highline.rb#701 + def output_rows; end + + # The current row setting for paging output. + # + # source://skylight//lib/skylight/vendor/cli/highline.rb#205 + def page_at; end + + # Set to an integer value to cause HighLine to page output lines over the + # indicated line limit. When +nil+, the default, no paging occurs. If + # set to :auto, HighLine will attempt to determine the rows available + # for the @output or use a sensible default. + # + # source://skylight//lib/skylight/vendor/cli/highline.rb#646 + def page_at=(setting); end + + # The basic output method for HighLine objects. If the provided _statement_ + # ends with a space or tab character, a newline will not be appended (output + # will be flush()ed). All other cases are passed straight to Kernel.puts(). + # + # The _statement_ parameter is processed as an ERb template, supporting + # embedded Ruby code. The template is evaluated with a binding inside + # the HighLine instance, providing easy access to the ANSI color constants + # and the HighLine.color() method. + # + # source://skylight//lib/skylight/vendor/cli/highline.rb#616 + def say(statement); end + + # Works as an instance method, same as the class method + # + # source://skylight//lib/skylight/vendor/cli/highline.rb#403 + def uncolor(string); end + + # The current column setting for wrapping output. + # + # source://skylight//lib/skylight/vendor/cli/highline.rb#203 + def wrap_at; end + + # Set to an integer value to cause HighLine to wrap output lines at the + # indicated character limit. When +nil+, the default, no wrapping occurs. If + # set to :auto, HighLine will attempt to determine the columns + # available for the @output or use a sensible default. + # + # source://skylight//lib/skylight/vendor/cli/highline.rb#636 + def wrap_at=(setting); end + + private + + # Returns the length of the passed +string_with_escapes+, minus and color + # sequence escapes. + # + # source://skylight//lib/skylight/vendor/cli/highline.rb#1029 + def actual_length(string_with_escapes); end + + # Ask user if they wish to continue paging output. Allows them to type "q" to + # cancel the paging process. + # + # @return [Boolean] + # + # source://skylight//lib/skylight/vendor/cli/highline.rb#992 + def continue_paging?; end + + # A helper method for sending the output stream and error and repeat + # of the question. + # + # source://skylight//lib/skylight/vendor/cli/highline.rb#733 + def explain_error(error); end + + # source://skylight//lib/skylight/vendor/cli/highline.rb#710 + def format_statement(statement); end + + # Collects an Array/Hash full of answers as described in + # HighLine::Question.gather(). + # + # Raises EOFError if input is exhausted. + # + # source://skylight//lib/skylight/vendor/cli/highline.rb#748 + def gather; end + + # Read a line of input from the input stream and process whitespace as + # requested by the Question object. + # + # If Question's _readline_ property is set, that library will be used to + # fetch input. *WARNING*: This ignores the currently set input stream. + # + # Raises EOFError if input is exhausted. + # + # source://skylight//lib/skylight/vendor/cli/highline.rb#822 + def get_line; end + + # Return a line or character of input, as requested for this question. + # Character input will be returned as a single character String, + # not an Integer. + # + # This question's _first_answer_ will be returned instead of input, if set. + # + # Raises EOFError if input is exhausted. + # + # source://skylight//lib/skylight/vendor/cli/highline.rb#880 + def get_response; end + + # Page print a series of at most _page_at_ lines for _output_. After each + # page is printed, HighLine will pause until the user presses enter/return + # then display the next page of data. + # + # Note that the final page of _output_ is *not* printed, but returned + # instead. This is to support any special handling for the final sequence. + # + # source://skylight//lib/skylight/vendor/cli/highline.rb#977 + def page_print(output); end + + # A helper method used by HighLine::Question.verify_match + # for finding whether a list of answers match or differ + # from each other. + # + # source://skylight//lib/skylight/vendor/cli/highline.rb#809 + def unique_answers(list = T.unsafe(nil)); end + + # Wrap a sequence of _lines_ at _wrap_at_ characters per line. Existing + # newlines will not be affected by this process, but additional newlines + # may be added. + # + # source://skylight//lib/skylight/vendor/cli/highline.rb#1004 + def wrap(text); end + + class << self + # source://skylight//lib/skylight/vendor/cli/highline/string_extensions.rb#27 + def String(s); end + + # source://skylight//lib/skylight/vendor/cli/highline/style.rb#10 + def Style(*args); end + + # This method provides easy access to ANSI color sequences, without the user + # needing to remember to CLEAR at the end of each sequence. Just pass the + # _string_ to color, followed by a list of _colors_ you would like it to be + # affected by. The _colors_ can be HighLine class constants, or symbols + # (:blue for BLUE, for example). A CLEAR will automatically be embedded to + # the end of the returned String. + # + # This method returns the original _string_ unchanged if HighLine::use_color? + # is +false+. + # + # source://skylight//lib/skylight/vendor/cli/highline.rb#377 + def color(string, *colors); end + + # In case you just want the color code, without the embedding and the CLEAR + # + # source://skylight//lib/skylight/vendor/cli/highline.rb#383 + def color_code(*colors); end + + # Returns the current color scheme. + # + # source://skylight//lib/skylight/vendor/cli/highline.rb#80 + def color_scheme; end + + # Pass ColorScheme to _setting_ to set a HighLine color scheme. + # + # source://skylight//lib/skylight/vendor/cli/highline.rb#75 + def color_scheme=(setting); end + + # source://skylight//lib/skylight/vendor/cli/highline/string_extensions.rb#108 + def colorize_strings; end + + # For RGB colors: + # + # source://skylight//lib/skylight/vendor/cli/highline.rb#148 + def const_missing(name); end + + # For checking if the current version of HighLine supports RGB colors + # Usage: HighLine.supports_rgb_color? rescue false # rescue for compatibility with older versions + # Note: color usage also depends on HighLine.use_color being set + # + # @return [Boolean] + # + # source://skylight//lib/skylight/vendor/cli/highline.rb#54 + def supports_rgb_color?; end + + # Pass +false+ to _setting_ to turn off HighLine's EOF tracking. + # + # source://skylight//lib/skylight/vendor/cli/highline.rb#62 + def track_eof=(setting); end + + # Returns true if HighLine is currently tracking EOF for input. + # + # @return [Boolean] + # + # source://skylight//lib/skylight/vendor/cli/highline.rb#67 + def track_eof?; end + + # Remove color codes from a string + # + # source://skylight//lib/skylight/vendor/cli/highline.rb#398 + def uncolor(string); end + + # Pass +false+ to _setting_ to turn off HighLine's color escapes. + # + # source://skylight//lib/skylight/vendor/cli/highline.rb#42 + def use_color=(setting); end + + # Returns true if HighLine is currently using color escapes. + # + # @return [Boolean] + # + # source://skylight//lib/skylight/vendor/cli/highline.rb#47 + def use_color?; end + + # Returns +true+ if HighLine is currently using a color scheme. + # + # @return [Boolean] + # + # source://skylight//lib/skylight/vendor/cli/highline.rb#85 + def using_color_scheme?; end + end +end + +# source://skylight//lib/skylight/vendor/cli/highline.rb#126 +HighLine::BASIC_COLORS = T.let(T.unsafe(nil), Array) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#137 +HighLine::BLACK = T.let(T.unsafe(nil), String) + +# These RGB colors are approximate; see http://en.wikipedia.org/wiki/ANSI_escape_code +# +# source://skylight//lib/skylight/vendor/cli/highline.rb#111 +HighLine::BLACK_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#144 +HighLine::BLINK = T.let(T.unsafe(nil), String) + +# Blink; support uncommon +# +# source://skylight//lib/skylight/vendor/cli/highline.rb#104 +HighLine::BLINK_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#137 +HighLine::BLUE = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#114 +HighLine::BLUE_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#144 +HighLine::BOLD = T.let(T.unsafe(nil), String) + +# Bold; Note: bold + a color works as you'd expect, +# +# source://skylight//lib/skylight/vendor/cli/highline.rb#98 +HighLine::BOLD_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#137 +HighLine::BRIGHT_BLACK = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#132 +HighLine::BRIGHT_BLACK_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#137 +HighLine::BRIGHT_BLUE = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#132 +HighLine::BRIGHT_BLUE_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#137 +HighLine::BRIGHT_CYAN = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#132 +HighLine::BRIGHT_CYAN_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#137 +HighLine::BRIGHT_GRAY = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#132 +HighLine::BRIGHT_GRAY_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#137 +HighLine::BRIGHT_GREEN = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#132 +HighLine::BRIGHT_GREEN_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#137 +HighLine::BRIGHT_MAGENTA = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#132 +HighLine::BRIGHT_MAGENTA_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#137 +HighLine::BRIGHT_NONE = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#132 +HighLine::BRIGHT_NONE_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#137 +HighLine::BRIGHT_RED = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#132 +HighLine::BRIGHT_RED_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#137 +HighLine::BRIGHT_WHITE = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#132 +HighLine::BRIGHT_WHITE_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#137 +HighLine::BRIGHT_YELLOW = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#132 +HighLine::BRIGHT_YELLOW_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#144 +HighLine::CLEAR = T.let(T.unsafe(nil), String) + +# Clear color settings +# +# source://skylight//lib/skylight/vendor/cli/highline.rb#96 +HighLine::CLEAR_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#134 +HighLine::COLORS = T.let(T.unsafe(nil), Array) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#144 +HighLine::CONCEALED = T.let(T.unsafe(nil), String) + +# Concealed; support uncommon +# +# source://skylight//lib/skylight/vendor/cli/highline.rb#106 +HighLine::CONCEALED_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#137 +HighLine::CYAN = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#117 +HighLine::CYAN_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# ColorScheme objects encapsulate a named set of colors to be used in the +# HighLine.colors() method call. For example, by applying a ColorScheme that +# has a :warning color then the following could be used: +# +# colors("This is a warning", :warning) +# +# A ColorScheme contains named sets of HighLine color constants. +# +# Example: Instantiating a color scheme, applying it to HighLine, +# and using it: +# +# ft = HighLine::ColorScheme.new do |cs| +# cs[:headline] = [ :bold, :yellow, :on_black ] +# cs[:horizontal_line] = [ :bold, :white ] +# cs[:even_row] = [ :green ] +# cs[:odd_row] = [ :magenta ] +# end +# +# HighLine.color_scheme = ft +# say("<%= color('Headline', :headline) %>") +# say("<%= color('-'*20, :horizontal_line) %>") +# i = true +# ("A".."D").each do |row| +# if i then +# say("<%= color('#{row}', :even_row ) %>") +# else +# say("<%= color('#{row}', :odd_row) %>") +# end +# i = !i +# end +# +# source://skylight//lib/skylight/vendor/cli/highline/color_scheme.rb#42 +class HighLine::ColorScheme + # Create an instance of HighLine::ColorScheme. The customization can + # happen as a passed in Hash or via the yielded block. Keys are + # converted to :symbols and values are converted to HighLine + # constants. + # + # @return [ColorScheme] a new instance of ColorScheme + # @yield [_self] + # @yieldparam _self [HighLine::ColorScheme] the object that the method was called on + # + # source://skylight//lib/skylight/vendor/cli/highline/color_scheme.rb#49 + def initialize(h = T.unsafe(nil)); end + + # Allow the scheme to be accessed like a Hash. + # + # source://skylight//lib/skylight/vendor/cli/highline/color_scheme.rb#68 + def [](color_tag); end + + # Allow the scheme to be set like a Hash. + # + # source://skylight//lib/skylight/vendor/cli/highline/color_scheme.rb#84 + def []=(color_tag, constants); end + + # Retrieve the original form of the scheme + # + # source://skylight//lib/skylight/vendor/cli/highline/color_scheme.rb#73 + def definition(color_tag); end + + # Does this color scheme include the given tag name? + # + # @return [Boolean] + # + # source://skylight//lib/skylight/vendor/cli/highline/color_scheme.rb#63 + def include?(color_tag); end + + # Retrieve the keys in the scheme + # + # source://skylight//lib/skylight/vendor/cli/highline/color_scheme.rb#79 + def keys; end + + # Load multiple colors from key/value pairs. + # + # source://skylight//lib/skylight/vendor/cli/highline/color_scheme.rb#56 + def load_from_hash(h); end + + # Retrieve the color scheme hash (in original definition format) + # + # source://skylight//lib/skylight/vendor/cli/highline/color_scheme.rb#90 + def to_hash; end + + private + + # Return a normalized representation of a color setting. + # + # source://skylight//lib/skylight/vendor/cli/highline/color_scheme.rb#103 + def to_constant(v); end + + # Return a normalized representation of a color name. + # + # source://skylight//lib/skylight/vendor/cli/highline/color_scheme.rb#98 + def to_symbol(t); end +end + +# source://skylight//lib/skylight/vendor/cli/highline.rb#144 +HighLine::DARK = T.let(T.unsafe(nil), String) + +# for example bold black. Bold without a color displays +# the system-defined bold color (e.g. red on Mac iTerm) +# +# source://skylight//lib/skylight/vendor/cli/highline.rb#101 +HighLine::DARK_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# Erase the character under the cursor. +# +# source://skylight//lib/skylight/vendor/cli/highline.rb#95 +HighLine::ERASE_CHAR_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# Embed in a String to clear all previous ANSI sequences. This *MUST* be +# done before the program exits! +# +# source://skylight//lib/skylight/vendor/cli/highline.rb#94 +HighLine::ERASE_LINE_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#137 +HighLine::GRAY = T.let(T.unsafe(nil), String) + +# Alias for WHITE, since WHITE is actually a light gray on Macs +# +# source://skylight//lib/skylight/vendor/cli/highline.rb#121 +HighLine::GRAY_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#137 +HighLine::GREEN = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#113 +HighLine::GREEN_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#137 +HighLine::MAGENTA = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#116 +HighLine::MAGENTA_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# Menu objects encapsulate all the details of a call to HighLine.choose(). +# Using the accessors and Menu.choice() and Menu.choices(), the block passed +# to HighLine.choose() can detail all aspects of menu display and control. +# +# source://skylight//lib/skylight/vendor/cli/highline/menu.rb#16 +class HighLine::Menu < ::HighLine::Question + # Create an instance of HighLine::Menu. All customization is done + # through the passed block, which should call accessors and choice() and + # choices() as needed to define the Menu. Note that Menus are also + # Questions, so all that functionality is available to the block as + # well. + # + # @return [Menu] a new instance of Menu + # @yield [_self] + # @yieldparam _self [HighLine::Menu] the object that the method was called on + # + # source://skylight//lib/skylight/vendor/cli/highline/menu.rb#24 + def initialize; end + + # Adds _name_ to the list of available menu items. Menu items will be + # displayed in the order they are added. + # + # An optional _action_ can be associated with this name and if provided, + # it will be called if the item is selected. The result of the method + # will be returned, unless _nil_on_handled_ is set (when you would get + # +nil+ instead). In _shell_ mode, a provided block will be passed the + # command chosen and any details that followed the command. Otherwise, + # just the command is passed. The @highline variable is set to + # the current HighLine context before the action code is called and can + # thus be used for adding output and the like. + # + # source://skylight//lib/skylight/vendor/cli/highline/menu.rb#136 + def choice(name, help = T.unsafe(nil), &action); end + + # A shortcut for multiple calls to the sister method choice(). Be + # warned: An _action_ set here will apply to *all* provided + # _names_. This is considered to be a feature, so you can easily + # hand-off interface processing to a different chunk of code. + # + # source://skylight//lib/skylight/vendor/cli/highline/menu.rb#149 + def choices(*names, &action); end + + # This attribute is passed directly on as the mode to HighLine.list() by + # all the preset layouts. See that method for appropriate settings. + # + # source://skylight//lib/skylight/vendor/cli/highline/menu.rb#84 + def flow; end + + # This attribute is passed directly on as the mode to HighLine.list() by + # all the preset layouts. See that method for appropriate settings. + # + # source://skylight//lib/skylight/vendor/cli/highline/menu.rb#84 + def flow=(_arg0); end + + # Used by all the preset layouts to display title and/or introductory + # information, when set. Defaults to +nil+. + # + # source://skylight//lib/skylight/vendor/cli/highline/menu.rb#95 + def header; end + + # Used by all the preset layouts to display title and/or introductory + # information, when set. Defaults to +nil+. + # + # source://skylight//lib/skylight/vendor/cli/highline/menu.rb#95 + def header=(_arg0); end + + # Used to set help for arbitrary topics. Use the topic "help" + # to override the default message. + # + # source://skylight//lib/skylight/vendor/cli/highline/menu.rb#214 + def help(topic, help); end + + # Identical to choice(), but the item will not be listed for the user. + # + # source://skylight//lib/skylight/vendor/cli/highline/menu.rb#154 + def hidden(name, help = T.unsafe(nil), &action); end + + # An _index_ to append to each menu item in display. See + # Menu.index=() for details. + # + # source://skylight//lib/skylight/vendor/cli/highline/menu.rb#60 + def index; end + + # Sets the indexing style for this Menu object. Indexes are appended to + # menu items, when displayed in list form. The available settings are: + # + # :number:: Menu items will be indexed numerically, starting + # with 1. This is the default method of indexing. + # :letter:: Items will be indexed alphabetically, starting + # with a. + # :none:: No index will be appended to menu items. + # any String:: Will be used as the literal _index_. + # + # Setting the _index_ to :none or a literal String also adjusts + # _index_suffix_ to a single space and _select_by_ to :name. + # Because of this, you should make a habit of setting the _index_ first. + # + # source://skylight//lib/skylight/vendor/cli/highline/menu.rb#175 + def index=(style); end + + # The String placed between an _index_ and a menu item. Defaults to + # ". ". Switches to " ", when _index_ is set to a String (like "-"). + # + # source://skylight//lib/skylight/vendor/cli/highline/menu.rb#65 + def index_suffix; end + + # The String placed between an _index_ and a menu item. Defaults to + # ". ". Switches to " ", when _index_ is set to a String (like "-"). + # + # source://skylight//lib/skylight/vendor/cli/highline/menu.rb#65 + def index_suffix=(_arg0); end + + # Initializes the help system by adding a :help choice, some + # action code, and the default help listing. + # + # source://skylight//lib/skylight/vendor/cli/highline/menu.rb#189 + def init_help; end + + # An ERb _layout_ to use when displaying this Menu object. See + # Menu.layout=() for details. + # + # source://skylight//lib/skylight/vendor/cli/highline/menu.rb#105 + def layout; end + + # Setting a _layout_ with this method also adjusts some other attributes + # of the Menu object, to ideal defaults for the chosen _layout_. To + # account for that, you probably want to set a _layout_ first in your + # configuration block, if needed. + # + # Accepted settings for _layout_ are: + # + # :list:: The default _layout_. The _header_ if set + # will appear at the top on its own line with + # a trailing colon. Then the list of menu + # items will follow. Finally, the _prompt_ + # will be used as the ask()-like question. + # :one_line:: A shorter _layout_ that fits on one line. + # The _header_ comes first followed by a + # colon and spaces, then the _prompt_ with menu + # items between trailing parenthesis. + # :menu_only:: Just the menu items, followed up by a likely + # short _prompt_. + # any ERb String:: Will be taken as the literal _layout_. This + # String can access @header, + # @menu and @prompt, but is + # otherwise evaluated in the typical HighLine + # context, to provide access to utilities like + # HighLine.list() primarily. + # + # If set to either :one_line, or :menu_only, _index_ + # will default to :none and _flow_ will default to + # :inline. + # + # source://skylight//lib/skylight/vendor/cli/highline/menu.rb#248 + def layout=(new_layout); end + + # This setting is passed on as the third parameter to HighLine.list() + # by all the preset layouts. See that method for details of its + # effects. Defaults to +nil+. + # + # source://skylight//lib/skylight/vendor/cli/highline/menu.rb#90 + def list_option; end + + # This setting is passed on as the third parameter to HighLine.list() + # by all the preset layouts. See that method for details of its + # effects. Defaults to +nil+. + # + # source://skylight//lib/skylight/vendor/cli/highline/menu.rb#90 + def list_option=(_arg0); end + + # When +true+, any selected item handled by provided action code will + # return +nil+, instead of the results to the action code. This may + # prove handy when dealing with mixed menus where only the names of + # items without any code (and +nil+, of course) will be returned. + # Defaults to +false+. + # + # source://skylight//lib/skylight/vendor/cli/highline/menu.rb#121 + def nil_on_handled; end + + # When +true+, any selected item handled by provided action code will + # return +nil+, instead of the results to the action code. This may + # prove handy when dealing with mixed menus where only the names of + # items without any code (and +nil+, of course) will be returned. + # Defaults to +false+. + # + # source://skylight//lib/skylight/vendor/cli/highline/menu.rb#121 + def nil_on_handled=(_arg0); end + + # This method returns all possible options for auto-completion, based + # on the settings of _index_ and _select_by_. + # + # source://skylight//lib/skylight/vendor/cli/highline/menu.rb#263 + def options; end + + # Used by all the preset layouts to ask the actual question to fetch a + # menu selection from the user. Defaults to "? ". + # + # source://skylight//lib/skylight/vendor/cli/highline/menu.rb#100 + def prompt; end + + # Used by all the preset layouts to ask the actual question to fetch a + # menu selection from the user. Defaults to "? ". + # + # source://skylight//lib/skylight/vendor/cli/highline/menu.rb#100 + def prompt=(_arg0); end + + # This method processes the auto-completed user selection, based on the + # rules for this Menu object. If an action was provided for the + # selection, it will be executed as described in Menu.choice(). + # + # source://skylight//lib/skylight/vendor/cli/highline/menu.rb#293 + def select(highline_context, selection, details = T.unsafe(nil)); end + + # The _select_by_ attribute controls how the user is allowed to pick a + # menu item. The available choices are: + # + # :index:: The user is allowed to type the numerical + # or alphabetical index for their selection. + # :index_or_name:: Allows both methods from the + # :index option and the + # :name option. + # :name:: Menu items are selected by typing a portion + # of the item name that will be + # auto-completed. + # + # source://skylight//lib/skylight/vendor/cli/highline/menu.rb#79 + def select_by; end + + # The _select_by_ attribute controls how the user is allowed to pick a + # menu item. The available choices are: + # + # :index:: The user is allowed to type the numerical + # or alphabetical index for their selection. + # :index_or_name:: Allows both methods from the + # :index option and the + # :name option. + # :name:: Menu items are selected by typing a portion + # of the item name that will be + # auto-completed. + # + # source://skylight//lib/skylight/vendor/cli/highline/menu.rb#79 + def select_by=(_arg0); end + + # When set to +true+, responses are allowed to be an entire line of + # input, including details beyond the command itself. Only the first + # "word" of input will be matched against the menu choices, but both the + # command selected and the rest of the line will be passed to provided + # action blocks. Defaults to +false+. + # + # source://skylight//lib/skylight/vendor/cli/highline/menu.rb#113 + def shell; end + + # When set to +true+, responses are allowed to be an entire line of + # input, including details beyond the command itself. Only the first + # "word" of input will be matched against the menu choices, but both the + # command selected and the rest of the line will be passed to provided + # action blocks. Defaults to +false+. + # + # source://skylight//lib/skylight/vendor/cli/highline/menu.rb#113 + def shell=(_arg0); end + + # Allows Menu objects to pass as Arrays, for use with HighLine.list(). + # This method returns all menu items to be displayed, complete with + # indexes. + # + # source://skylight//lib/skylight/vendor/cli/highline/menu.rb#330 + def to_ary; end + + # Allows Menu to behave as a String, just like Question. Returns the + # _layout_ to be rendered, which is used by HighLine.say(). + # + # source://skylight//lib/skylight/vendor/cli/highline/menu.rb#348 + def to_str; end + + # This method will update the intelligent responses to account for + # Menu specific differences. Calls the superclass' (Question's) + # build_responses method, overriding its default arguments to specify + # 'options' will be used to populate choice lists, and that + # the newly built hash will predominate over the preexisting hash + # for any keys that are the same. + # + # source://skylight//lib/skylight/vendor/cli/highline/menu.rb#377 + def update_responses; end +end + +# source://skylight//lib/skylight/vendor/cli/highline.rb#137 +HighLine::NONE = T.let(T.unsafe(nil), String) + +# On Mac OSX Terminal, this is black foreground, or bright white background. +# Also used as base for RGB colors, if available +# +# source://skylight//lib/skylight/vendor/cli/highline.rb#124 +HighLine::NONE_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#139 +HighLine::ON_BLACK = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#138 +HighLine::ON_BLACK_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#139 +HighLine::ON_BLUE = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#138 +HighLine::ON_BLUE_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#139 +HighLine::ON_BRIGHT_BLACK = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#138 +HighLine::ON_BRIGHT_BLACK_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#139 +HighLine::ON_BRIGHT_BLUE = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#138 +HighLine::ON_BRIGHT_BLUE_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#139 +HighLine::ON_BRIGHT_CYAN = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#138 +HighLine::ON_BRIGHT_CYAN_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#139 +HighLine::ON_BRIGHT_GRAY = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#138 +HighLine::ON_BRIGHT_GRAY_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#139 +HighLine::ON_BRIGHT_GREEN = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#138 +HighLine::ON_BRIGHT_GREEN_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#139 +HighLine::ON_BRIGHT_MAGENTA = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#138 +HighLine::ON_BRIGHT_MAGENTA_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#139 +HighLine::ON_BRIGHT_NONE = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#138 +HighLine::ON_BRIGHT_NONE_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#139 +HighLine::ON_BRIGHT_RED = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#138 +HighLine::ON_BRIGHT_RED_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#139 +HighLine::ON_BRIGHT_WHITE = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#138 +HighLine::ON_BRIGHT_WHITE_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#139 +HighLine::ON_BRIGHT_YELLOW = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#138 +HighLine::ON_BRIGHT_YELLOW_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#139 +HighLine::ON_CYAN = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#138 +HighLine::ON_CYAN_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#139 +HighLine::ON_GRAY = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#138 +HighLine::ON_GRAY_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#139 +HighLine::ON_GREEN = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#138 +HighLine::ON_GREEN_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#139 +HighLine::ON_MAGENTA = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#138 +HighLine::ON_MAGENTA_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#139 +HighLine::ON_NONE = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#138 +HighLine::ON_NONE_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#139 +HighLine::ON_RED = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#138 +HighLine::ON_RED_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#139 +HighLine::ON_WHITE = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#138 +HighLine::ON_WHITE_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#139 +HighLine::ON_YELLOW = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#138 +HighLine::ON_YELLOW_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# Question objects contain all the details of a single invocation of +# HighLine.ask(). The object is initialized by the parameters passed to +# HighLine.ask() and then queried to make sure each step of the input +# process is handled according to the users wishes. +# +# source://skylight//lib/skylight/vendor/cli/highline/question.rb#19 +class HighLine::Question + # Create an instance of HighLine::Question. Expects a _question_ to ask + # (can be "") and an _answer_type_ to convert the answer to. + # The _answer_type_ parameter must be a type recognized by + # Question.convert(). If given, a block is yielded the new Question + # object to allow custom initialization. + # + # @return [Question] a new instance of Question + # @yield [_self] + # @yieldparam _self [HighLine::Question] the object that the method was called on + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#32 + def initialize(question, answer_type); end + + # Used to control range checks for answer. + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#131 + def above; end + + # Used to control range checks for answer. + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#131 + def above=(_arg0); end + + # Returns the provided _answer_string_ or the default answer for this + # Question if a default was set and the answer is empty. + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#217 + def answer_or_default(answer_string); end + + # The type that will be used to convert this answer. + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#68 + def answer_type; end + + # The type that will be used to convert this answer. + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#68 + def answer_type=(_arg0); end + + # Used to control range checks for answer. + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#131 + def below; end + + # Used to control range checks for answer. + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#131 + def below=(_arg0); end + + # Called late in the initialization process to build intelligent + # responses based on the details of this Question object. + # Also used by Menu#update_responses. + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#230 + def build_responses(message_source = T.unsafe(nil), new_hash_wins = T.unsafe(nil)); end + + # Used to control character case processing for the answer to this question. + # See HighLine::Question.change_case() for acceptable settings. + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#121 + def case; end + + # Used to control character case processing for the answer to this question. + # See HighLine::Question.change_case() for acceptable settings. + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#121 + def case=(_arg0); end + + # Returns the provided _answer_string_ after changing character case by + # the rules of this Question. Valid settings for whitespace are: + # + # +nil+:: Do not alter character case. + # (Default.) + # :up:: Calls upcase(). + # :upcase:: Calls upcase(). + # :down:: Calls downcase(). + # :downcase:: Calls downcase(). + # :capitalize:: Calls capitalize(). + # + # An unrecognized choice (like :none) is treated as +nil+. + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#277 + def change_case(answer_string); end + + # Can be set to +true+ to use HighLine's cross-platform character reader + # instead of fetching an entire line of input. (Note: HighLine's character + # reader *ONLY* supports STDIN on Windows and Unix.) Can also be set to + # :getc to use that method on the input stream. + # + # *WARNING*: The _echo_ and _overwrite_ attributes for a question are + # ignored when using the :getc method. + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#80 + def character; end + + # Can be set to +true+ to use HighLine's cross-platform character reader + # instead of fetching an entire line of input. (Note: HighLine's character + # reader *ONLY* supports STDIN on Windows and Unix.) Can also be set to + # :getc to use that method on the input stream. + # + # *WARNING*: The _echo_ and _overwrite_ attributes for a question are + # ignored when using the :getc method. + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#80 + def character=(_arg0); end + + # For Auto-completion + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#70 + def completion; end + + # For Auto-completion + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#70 + def completion=(_arg0); end + + # Asks a yes or no confirmation question, to ensure a user knows what + # they have just agreed to. If set to +true+ the question will be, + # "Are you sure? " Any other true value for this attribute is assumed + # to be the question to ask. When +false+ or +nil+ (the default), + # answers are not confirmed. + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#141 + def confirm; end + + # Asks a yes or no confirmation question, to ensure a user knows what + # they have just agreed to. If set to +true+ the question will be, + # "Are you sure? " Any other true value for this attribute is assumed + # to be the question to ask. When +false+ or +nil+ (the default), + # answers are not confirmed. + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#141 + def confirm=(_arg0); end + + # Transforms the given _answer_string_ into the expected type for this + # Question. Currently supported conversions are: + # + # [...]:: Answer must be a member of the passed Array. + # Auto-completion is used to expand partial + # answers. + # lambda {...}:: Answer is passed to lambda for conversion. + # Date:: Date.parse() is called with answer. + # DateTime:: DateTime.parse() is called with answer. + # File:: The entered file name is auto-completed in + # terms of _directory_ + _glob_, opened, and + # returned. + # Float:: Answer is converted with Kernel.Float(). + # Integer:: Answer is converted with Kernel.Integer(). + # +nil+:: Answer is left in String format. (Default.) + # Pathname:: Same as File, save that a Pathname object is + # returned. + # String:: Answer is converted with Kernel.String(). + # HighLine::String:: Answer is converted with HighLine::String() + # Regexp:: Answer is fed to Regexp.new(). + # Symbol:: The method to_sym() is called on answer and + # the result returned. + # any other Class:: The answer is passed on to + # Class.parse(). + # + # This method throws ArgumentError, if the conversion cannot be + # completed for any reason. + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#318 + def convert(answer_string); end + + # Used to provide a default answer to this question. + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#123 + def default; end + + # Used to provide a default answer to this question. + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#123 + def default=(_arg0); end + + # The directory from which a user will be allowed to select files, when + # File or Pathname is specified as an _answer_type_. Initially set to + # Pathname.new(File.expand_path(File.dirname($0))). + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#174 + def directory; end + + # The directory from which a user will be allowed to select files, when + # File or Pathname is specified as an _answer_type_. Initially set to + # Pathname.new(File.expand_path(File.dirname($0))). + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#174 + def directory=(_arg0); end + + # Can be set to +true+ or +false+ to control whether or not input will + # be echoed back to the user. A setting of +true+ will cause echo to + # match input, but any other true value will be treated as a String to + # echo for each character typed. + # + # This requires HighLine's character reader. See the _character_ + # attribute for details. + # + # *Note*: When using HighLine to manage echo on Unix based systems, we + # recommend installing the termios gem. Without it, it's possible to type + # fast enough to have letters still show up (when reading character by + # character only). + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#101 + def echo; end + + # Can be set to +true+ or +false+ to control whether or not input will + # be echoed back to the user. A setting of +true+ will cause echo to + # match input, but any other true value will be treated as a String to + # echo for each character typed. + # + # This requires HighLine's character reader. See the _character_ + # attribute for details. + # + # *Note*: When using HighLine to manage echo on Unix based systems, we + # recommend installing the termios gem. Without it, it's possible to type + # fast enough to have letters still show up (when reading character by + # character only). + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#101 + def echo=(_arg0); end + + # Returns an English explanation of the current range settings. + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#352 + def expected_range; end + + # Returns _first_answer_, which will be unset following this call. + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#368 + def first_answer; end + + # When set to a non *nil* value, this will be tried as an answer to the + # question. If this answer passes validations, it will become the result + # without the user ever being prompted. Otherwise this value is discarded, + # and this Question is resolved as a normal call to HighLine.ask(). + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#168 + def first_answer=(_arg0); end + + # Returns true if _first_answer_ is set. + # + # @return [Boolean] + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#375 + def first_answer?; end + + # When set, the user will be prompted for multiple answers which will + # be collected into an Array or Hash and returned as the final answer. + # + # You can set _gather_ to an Integer to have an Array of exactly that + # many answers collected, or a String/Regexp to match an end input which + # will not be returned in the Array. + # + # Optionally _gather_ can be set to a Hash. In this case, the question + # will be asked once for each key and the answers will be returned in a + # Hash, mapped by key. The @key variable is set before each + # question is evaluated, so you can use it in your question. + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#155 + def gather; end + + # When set, the user will be prompted for multiple answers which will + # be collected into an Array or Hash and returned as the final answer. + # + # You can set _gather_ to an Integer to have an Array of exactly that + # many answers collected, or a String/Regexp to match an end input which + # will not be returned in the Array. + # + # Optionally _gather_ can be set to a Hash. In this case, the question + # will be asked once for each key and the answers will be returned in a + # Hash, mapped by key. The @key variable is set before each + # question is evaluated, so you can use it in your question. + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#155 + def gather=(_arg0); end + + # The glob pattern used to limit file selection when File or Pathname is + # specified as an _answer_type_. Initially set to "*". + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#179 + def glob; end + + # The glob pattern used to limit file selection when File or Pathname is + # specified as an _answer_type_. Initially set to "*". + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#179 + def glob=(_arg0); end + + # If set, answer must pass an include?() check on this object. + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#133 + def in; end + + # If set, answer must pass an include?() check on this object. + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#133 + def in=(_arg0); end + + # Returns +true+ if the _answer_object_ is greater than the _above_ + # attribute, less than the _below_ attribute and include?()ed in the + # _in_ attribute. Otherwise, +false+ is returned. Any +nil+ attributes + # are not checked. + # + # @return [Boolean] + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#385 + def in_range?(answer_object); end + + # Allows you to set a character limit for input. + # + # *WARNING*: This option forces a character by character read. + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#86 + def limit; end + + # Allows you to set a character limit for input. + # + # *WARNING*: This option forces a character by character read. + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#86 + def limit=(_arg0); end + + # When set to +true+ the question is asked, but output does not progress to + # the next line. The Cursor is moved back to the beginning of the question + # line and it is cleared so that all the contents of the line disappear from + # the screen. + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#211 + def overwrite; end + + # When set to +true+ the question is asked, but output does not progress to + # the next line. The Cursor is moved back to the beginning of the question + # line and it is cleared so that all the contents of the line disappear from + # the screen. + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#211 + def overwrite=(_arg0); end + + # The ERb template of the question to be asked. + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#66 + def question; end + + # The ERb template of the question to be asked. + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#66 + def question=(_arg0); end + + # Use the Readline library to fetch input. This allows input editing as + # well as keeping a history. In addition, tab will auto-complete + # within an Array of choices or a file listing. + # + # *WARNING*: This option is incompatible with all of HighLine's + # character reading modes and it causes HighLine to ignore the + # specified _input_ stream. + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#111 + def readline; end + + # Use the Readline library to fetch input. This allows input editing as + # well as keeping a history. In addition, tab will auto-complete + # within an Array of choices or a file listing. + # + # *WARNING*: This option is incompatible with all of HighLine's + # character reading modes and it causes HighLine to ignore the + # specified _input_ stream. + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#111 + def readline=(_arg0); end + + # Returns the provided _answer_string_ after processing whitespace by + # the rules of this Question. Valid settings for whitespace are: + # + # +nil+:: Do not alter whitespace. + # :strip:: Calls strip(). (Default.) + # :chomp:: Calls chomp(). + # :collapse:: Collapses all whitespace runs to a + # single space. + # :strip_and_collapse:: Calls strip(), then collapses all + # whitespace runs to a single space. + # :chomp_and_collapse:: Calls chomp(), then collapses all + # whitespace runs to a single space. + # :remove:: Removes all whitespace. + # + # An unrecognized choice (like :none) is treated as +nil+. + # + # This process is skipped for single character input. + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#410 + def remove_whitespace(answer_string); end + + # A Hash that stores the various responses used by HighLine to notify + # the user. The currently used responses and their purpose are as + # follows: + # + # :ambiguous_completion:: Used to notify the user of an + # ambiguous answer the auto-completion + # system cannot resolve. + # :ask_on_error:: This is the question that will be + # redisplayed to the user in the event + # of an error. Can be set to + # :question to repeat the + # original question. + # :invalid_type:: The error message shown when a type + # conversion fails. + # :no_completion:: Used to notify the user that their + # selection does not have a valid + # auto-completion match. + # :not_in_range:: Used to notify the user that a + # provided answer did not satisfy + # the range requirement tests. + # :not_valid:: The error message shown when + # validation checks fail. + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#204 + def responses; end + + # Returns an Array of valid answers to this question. These answers are + # only known when _answer_type_ is set to an Array of choices, File, or + # Pathname. Any other time, this method will return an empty Array. + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#432 + def selection; end + + # Stringifies the question to be asked. + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#445 + def to_str; end + + # Returns +true+ if the provided _answer_string_ is accepted by the + # _validate_ attribute or +false+ if it's not. + # + # It's important to realize that an answer is validated after whitespace + # and case handling. + # + # @return [Boolean] + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#456 + def valid_answer?(answer_string); end + + # If set to a Regexp, the answer must match (before type conversion). + # Can also be set to a Proc which will be called with the provided + # answer to validate with a +true+ or +false+ return. + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#129 + def validate; end + + # If set to a Regexp, the answer must match (before type conversion). + # Can also be set to a Proc which will be called with the provided + # answer to validate with a +true+ or +false+ return. + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#129 + def validate=(_arg0); end + + # When set to +true+ multiple entries will be collected according to + # the setting for _gather_, except they will be required to match + # each other. Multiple identical entries will return a single answer. + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#161 + def verify_match; end + + # When set to +true+ multiple entries will be collected according to + # the setting for _gather_, except they will be required to match + # each other. Multiple identical entries will return a single answer. + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#161 + def verify_match=(_arg0); end + + # Used to control whitespace processing for the answer to this question. + # See HighLine::Question.remove_whitespace() for acceptable settings. + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#116 + def whitespace; end + + # Used to control whitespace processing for the answer to this question. + # See HighLine::Question.remove_whitespace() for acceptable settings. + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#116 + def whitespace=(_arg0); end + + private + + # Adds the default choice to the end of question between |...|. + # Trailing whitespace is preserved so the function of HighLine.say() is + # not affected. + # + # source://skylight//lib/skylight/vendor/cli/highline/question.rb#469 + def append_default; end +end + +# An internal HighLine error. User code does not need to trap this. +# +# source://skylight//lib/skylight/vendor/cli/highline/question.rb#21 +class HighLine::Question::NoAutoCompleteMatch < ::StandardError; end + +# An internal HighLine error. User code does not need to trap this. +# +# source://skylight//lib/skylight/vendor/cli/highline.rb#34 +class HighLine::QuestionError < ::StandardError; end + +# source://skylight//lib/skylight/vendor/cli/highline.rb#137 +HighLine::RED = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#112 +HighLine::RED_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#144 +HighLine::RESET = T.let(T.unsafe(nil), String) + +# Alias for CLEAR. +# +# source://skylight//lib/skylight/vendor/cli/highline.rb#97 +HighLine::RESET_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#144 +HighLine::REVERSE = T.let(T.unsafe(nil), String) + +# Reverse foreground and background +# +# source://skylight//lib/skylight/vendor/cli/highline.rb#105 +HighLine::REVERSE_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#108 +HighLine::STYLES = T.let(T.unsafe(nil), Array) + +# A sample ColorScheme. +# +# source://skylight//lib/skylight/vendor/cli/highline/color_scheme.rb#114 +class HighLine::SampleColorScheme < ::HighLine::ColorScheme + # Builds the sample scheme with settings for :critical, + # :error, :warning, :notice, :info, + # :debug, :row_even, and :row_odd colors. + # + # @return [SampleColorScheme] a new instance of SampleColorScheme + # + # source://skylight//lib/skylight/vendor/cli/highline/color_scheme.rb#120 + def initialize(h = T.unsafe(nil)); end +end + +# source://skylight//lib/skylight/vendor/cli/highline/string_extensions.rb#104 +class HighLine::String < ::String + include ::HighLine::StringExtensions + + def black; end + def blink; end + def blue; end + def bold; end + def bright_black; end + def bright_blue; end + def bright_cyan; end + def bright_gray; end + def bright_green; end + def bright_magenta; end + def bright_none; end + def bright_red; end + def bright_white; end + def bright_yellow; end + def clear; end + + # source://skylight//lib/skylight/vendor/cli/highline/string_extensions.rb#62 + def color(*args); end + + def concealed; end + def cyan; end + def dark; end + + # source://skylight//lib/skylight/vendor/cli/highline/string_extensions.rb#62 + def foreground(*args); end + + def gray; end + def green; end + def magenta; end + + # source://skylight//lib/skylight/vendor/cli/highline/string_extensions.rb#93 + def method_missing(method, *args, &blk); end + + def none; end + + # source://skylight//lib/skylight/vendor/cli/highline/string_extensions.rb#68 + def on(arg); end + + def on_black; end + def on_blue; end + def on_bright_black; end + def on_bright_blue; end + def on_bright_cyan; end + def on_bright_gray; end + def on_bright_green; end + def on_bright_magenta; end + def on_bright_none; end + def on_bright_red; end + def on_bright_white; end + def on_bright_yellow; end + def on_cyan; end + def on_gray; end + def on_green; end + def on_magenta; end + def on_none; end + def on_red; end + + # source://skylight//lib/skylight/vendor/cli/highline/string_extensions.rb#85 + def on_rgb(*colors); end + + def on_white; end + def on_yellow; end + def red; end + def reset; end + def reverse; end + + # source://skylight//lib/skylight/vendor/cli/highline/string_extensions.rb#78 + def rgb(*colors); end + + # source://skylight//lib/skylight/vendor/cli/highline/string_extensions.rb#73 + def uncolor; end + + def underline; end + def underscore; end + def white; end + def yellow; end +end + +# source://skylight//lib/skylight/vendor/cli/highline/string_extensions.rb#31 +module HighLine::StringExtensions + class << self + # @private + # + # source://skylight//lib/skylight/vendor/cli/highline/string_extensions.rb#32 + def included(base); end + end +end + +# source://skylight//lib/skylight/vendor/cli/highline/style.rb#41 +class HighLine::Style + # Single color/styles have :name, :code, :rgb (possibly), :builtin + # Compound styles have :name, :list, :builtin + # + # @return [Style] a new instance of Style + # + # source://skylight//lib/skylight/vendor/cli/highline/style.rb#106 + def initialize(defn = T.unsafe(nil)); end + + # source://skylight//lib/skylight/vendor/cli/highline/style.rb#150 + def blue; end + + # source://skylight//lib/skylight/vendor/cli/highline/style.rb#170 + def bright; end + + # Returns the value of attribute builtin. + # + # source://skylight//lib/skylight/vendor/cli/highline/style.rb#102 + def builtin; end + + # Sets the attribute builtin + # + # @param value the value to set the attribute builtin to. + # + # source://skylight//lib/skylight/vendor/cli/highline/style.rb#102 + def builtin=(_arg0); end + + # source://skylight//lib/skylight/vendor/cli/highline/style.rb#134 + def code; end + + # source://skylight//lib/skylight/vendor/cli/highline/style.rb#130 + def color(string); end + + # source://skylight//lib/skylight/vendor/cli/highline/style.rb#122 + def dup; end + + # source://skylight//lib/skylight/vendor/cli/highline/style.rb#146 + def green; end + + # Returns the value of attribute list. + # + # source://skylight//lib/skylight/vendor/cli/highline/style.rb#101 + def list; end + + # Returns the value of attribute name. + # + # source://skylight//lib/skylight/vendor/cli/highline/style.rb#101 + def name; end + + # source://skylight//lib/skylight/vendor/cli/highline/style.rb#165 + def on; end + + # source://skylight//lib/skylight/vendor/cli/highline/style.rb#142 + def red; end + + # Returns the value of attribute rgb. + # + # source://skylight//lib/skylight/vendor/cli/highline/style.rb#102 + def rgb; end + + # Sets the attribute rgb + # + # @param value the value to set the attribute rgb to. + # + # source://skylight//lib/skylight/vendor/cli/highline/style.rb#102 + def rgb=(_arg0); end + + # source://skylight//lib/skylight/vendor/cli/highline/style.rb#126 + def to_hash; end + + # source://skylight//lib/skylight/vendor/cli/highline/style.rb#154 + def variant(new_name, options = T.unsafe(nil)); end + + class << self + # source://skylight//lib/skylight/vendor/cli/highline/style.rb#83 + def ansi_rgb_to_hex(ansi_number); end + + # source://skylight//lib/skylight/vendor/cli/highline/style.rb#93 + def code_index; end + + # source://skylight//lib/skylight/vendor/cli/highline/style.rb#43 + def index(style); end + + # source://skylight//lib/skylight/vendor/cli/highline/style.rb#89 + def list; end + + # source://skylight//lib/skylight/vendor/cli/highline/style.rb#67 + def rgb(*colors); end + + # source://skylight//lib/skylight/vendor/cli/highline/style.rb#57 + def rgb_hex(*colors); end + + # source://skylight//lib/skylight/vendor/cli/highline/style.rb#78 + def rgb_number(*parts); end + + # source://skylight//lib/skylight/vendor/cli/highline/style.rb#63 + def rgb_parts(hex); end + + # source://skylight//lib/skylight/vendor/cli/highline/style.rb#97 + def uncolor(string); end + end +end + +# source://skylight//lib/skylight/vendor/cli/highline/system_extensions.rb#11 +module HighLine::SystemExtensions + extend ::HighLine::SystemExtensions + + # Windows savvy getc(). + # + # *WARNING*: This method ignores input and reads one + # character from +STDIN+! + # + # source://skylight//lib/skylight/vendor/cli/highline/system_extensions.rb#237 + def get_character(input = T.unsafe(nil)); end + + # We do not define a raw_no_echo_mode for Windows as _getch turns off echo + # + # source://skylight//lib/skylight/vendor/cli/highline/system_extensions.rb#209 + def raw_no_echo_mode; end + + # source://skylight//lib/skylight/vendor/cli/highline/system_extensions.rb#214 + def restore_mode; end + + # A Unix savvy method using stty to fetch the console columns, and rows. + # ... stty does not work in JRuby + # + # source://skylight//lib/skylight/vendor/cli/highline/system_extensions.rb#225 + def terminal_size; end +end + +# For Debugging purposes only. +# +# source://skylight//lib/skylight/vendor/cli/highline/system_extensions.rb#207 +HighLine::SystemExtensions::CHARACTER_MODE = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/vendor/cli/highline/system_extensions.rb#12 +HighLine::SystemExtensions::JRUBY = T.let(T.unsafe(nil), FalseClass) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#144 +HighLine::UNDERLINE = T.let(T.unsafe(nil), String) + +# Underline +# +# source://skylight//lib/skylight/vendor/cli/highline.rb#102 +HighLine::UNDERLINE_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#144 +HighLine::UNDERSCORE = T.let(T.unsafe(nil), String) + +# Alias for UNDERLINE +# +# source://skylight//lib/skylight/vendor/cli/highline.rb#103 +HighLine::UNDERSCORE_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# The version of the installed library. +# +# source://skylight//lib/skylight/vendor/cli/highline.rb#31 +HighLine::VERSION = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#137 +HighLine::WHITE = T.let(T.unsafe(nil), String) + +# On Mac OSX Terminal, white is actually gray +# +# source://skylight//lib/skylight/vendor/cli/highline.rb#119 +HighLine::WHITE_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#137 +HighLine::YELLOW = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/vendor/cli/highline.rb#115 +HighLine::YELLOW_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# require "highline/import" adds shortcut methods to Kernel, making +# agree(), ask(), choose() and say() globally available. This is handy for +# quick and dirty input and output. These methods use the HighLine object in +# the global variable $terminal, which is initialized to used +# $stdin and $stdout (you are free to change this). +# Otherwise, these methods are identical to their HighLine counterparts, see that +# class for detailed explanations. +# +# source://skylight//lib/skylight/probes.rb#161 +module Kernel + # @api private + # + # source://skylight//lib/skylight/probes.rb#165 + def require(name); end +end + +# Used from extconf and to load libskylight +# +# source://skylight//lib/skylight/version.rb#1 +module Skylight + extend ::Skylight::Util::Logging + + class << self + # source://skylight//lib/skylight/util/instrumenter_method.rb#18 + def broken!(*_arg0, **_arg1, &_arg2); end + + # @api private + # + # source://skylight//lib/skylight/native.rb#103 + def check_install_errors(config); end + + # source://skylight//lib/skylight/util/instrumenter_method.rb#18 + def config(*_arg0, **_arg1, &_arg2); end + + # source://skylight//lib/skylight/util/instrumenter_method.rb#7 + def disable(*_arg0, **_arg1, &_arg2); end + + # source://skylight//lib/skylight/util/instrumenter_method.rb#18 + def done(*_arg0, **_arg1, &_arg2); end + + # source://skylight//lib/skylight.rb#67 + def enable_normalizer(*names); end + + # source://skylight//lib/skylight/util/instrumenter_method.rb#18 + def endpoint_assignment_muted?(*_arg0, **_arg1, &_arg2); end + + # @overload instrument + # @overload instrument + # + # source://skylight//lib/skylight.rb#169 + def instrument(opts = T.unsafe(nil), &block); end + + # source://skylight//lib/skylight.rb#59 + def instrumenter; end + + # source://skylight//lib/skylight/native.rb#61 + def libskylight_path; end + + def load_libskylight(_arg0); end + + # source://skylight//lib/skylight/util/instrumenter_method.rb#7 + def mute(*_arg0, **_arg1, &_arg2); end + + # @return [Boolean] + # + # source://skylight//lib/skylight/native.rb#57 + def native?; end + + # source://skylight//lib/skylight.rb#63 + def probe(*args); end + + # Runs the shutdown procedure in the background. + # This should do little more than unsubscribe from all ActiveSupport::Notifications + # + # source://skylight//lib/skylight.rb#220 + def spawn_shutdown_thread!; end + + # Start instrumenting + # + # source://skylight//lib/skylight.rb#72 + def start!(config = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://skylight//lib/skylight.rb#105 + def started?; end + + # Stop instrumenting + # + # source://skylight//lib/skylight.rb#110 + def stop!; end + + # Start a trace + # + # source://skylight//lib/skylight.rb#132 + def trace(endpoint = T.unsafe(nil), cat = T.unsafe(nil), title = T.unsafe(nil), meta: T.unsafe(nil), segment: T.unsafe(nil), component: T.unsafe(nil)); end + + # Check tracing + # + # @return [Boolean] + # + # source://skylight//lib/skylight.rb#126 + def tracing?; end + + # source://skylight//lib/skylight/util/instrumenter_method.rb#18 + def tracing_muted?(*_arg0, **_arg1, &_arg2); end + + # source://skylight//lib/skylight/util/instrumenter_method.rb#7 + def unmute(*_arg0, **_arg1, &_arg2); end + + # @api private + # + # source://skylight//lib/skylight/native.rb#115 + def warn_skylight_native_missing(config); end + end +end + +# @api private +# +# source://skylight//lib/skylight/api.rb#6 +class Skylight::Api + include ::Skylight::Util::Logging + + # @api private + # @return [Api] a new instance of Api + # + # source://skylight//lib/skylight/api.rb#109 + def initialize(config); end + + # @api private + # + # source://skylight//lib/skylight/api.rb#9 + def config; end + + # @api private + # @raise [CreateFailed] + # + # source://skylight//lib/skylight/api.rb#113 + def create_app(name, token = T.unsafe(nil)); end + + # @api private + # + # source://skylight//lib/skylight/api.rb#124 + def fetch_mergeable_apps(token); end + + # @api private + # + # source://skylight//lib/skylight/api.rb#131 + def merge_apps!(token, app_guid:, component_guid:, environment:); end + + # @api private + # + # source://skylight//lib/skylight/api.rb#139 + def validate_config; end + + private + + # @api private + # + # source://skylight//lib/skylight/api.rb#153 + def error_for_status(code); end + + # TODO: Improve handling here: https://github.com/tildeio/direwolf-agent/issues/274 + # + # @api private + # + # source://skylight//lib/skylight/api.rb#147 + def http_request(service, method, *args); end +end + +# @api private +# +# source://skylight//lib/skylight/api.rb#45 +class Skylight::Api::ConfigValidationResults + include ::Skylight::Util::Logging + + # @api private + # @return [ConfigValidationResults] a new instance of ConfigValidationResults + # + # source://skylight//lib/skylight/api.rb#50 + def initialize(config, raw_response); end + + # @api private + # + # source://skylight//lib/skylight/api.rb#63 + def body; end + + # @api private + # @return [Boolean] + # + # source://skylight//lib/skylight/api.rb#87 + def config_valid?; end + + # @api private + # + # source://skylight//lib/skylight/api.rb#102 + def corrected_config; end + + # @api private + # @return [Boolean] + # + # source://skylight//lib/skylight/api.rb#55 + def error_response?; end + + # @api private + # @return [Boolean] + # + # source://skylight//lib/skylight/api.rb#92 + def forbidden?; end + + # @api private + # + # source://skylight//lib/skylight/api.rb#48 + def raw_response; end + + # @api private + # + # source://skylight//lib/skylight/api.rb#59 + def status; end + + # @api private + # @return [Boolean] + # + # source://skylight//lib/skylight/api.rb#74 + def token_valid?; end + + # @api private + # + # source://skylight//lib/skylight/api.rb#96 + def validation_errors; end +end + +# @api private +# +# source://skylight//lib/skylight/api.rb#17 +class Skylight::Api::Conflict < ::Skylight::Api::Error; end + +# @api private +# +# source://skylight//lib/skylight/api.rb#20 +class Skylight::Api::CreateFailed < ::Skylight::Api::Error + # @api private + # @return [CreateFailed] a new instance of CreateFailed + # + # source://skylight//lib/skylight/api.rb#23 + def initialize(res); end + + # @api private + # + # source://skylight//lib/skylight/api.rb#28 + def errors; end + + # @api private + # + # source://skylight//lib/skylight/api.rb#21 + def res; end + + # @api private + # + # source://skylight//lib/skylight/api.rb#34 + def to_s; end +end + +# @api private +# +# source://skylight//lib/skylight/api.rb#11 +class Skylight::Api::Error < ::StandardError; end + +# @api private +# +# source://skylight//lib/skylight/api.rb#14 +class Skylight::Api::Unauthorized < ::Skylight::Api::Error; end + +# @api private +# +# source://skylight//lib/skylight.rb#46 +Skylight::CATEGORY_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://skylight//lib/skylight/cli/helpers.rb#2 +module Skylight::CLI; end + +# @api private +# +# source://skylight//lib/skylight/cli.rb#16 +class Skylight::CLI::Base < ::Thor + include ::Skylight::CLI::Helpers + + # @api private + # + # source://skylight//lib/skylight/cli.rb#68 + def disable_dev_warning; end + + # @api private + # + # source://skylight//lib/skylight/cli.rb#78 + def disable_env_warning; end + + # source://thor/1.3.0/lib/thor.rb#40 + def doctor(*args); end + + # source://thor/1.3.0/lib/thor.rb#40 + def merge(*args); end + + # @api private + # + # source://skylight//lib/skylight/cli.rb#23 + def setup(token); end + + private + + # @api private + # + # source://skylight//lib/skylight/cli.rb#132 + def api; end + + # @api private + # + # source://skylight//lib/skylight/cli.rb#87 + def app_name; end + + # @api private + # + # source://skylight//lib/skylight/cli.rb#128 + def config_path; end + + # Is this duplicated? + # + # @api private + # + # source://skylight//lib/skylight/cli.rb#124 + def relative_config_path; end + + # @api private + # + # source://skylight//lib/skylight/cli.rb#136 + def user_config; end +end + +# source://skylight//lib/skylight/cli/doctor.rb#5 +class Skylight::CLI::Doctor < ::Thor::Group + include ::Skylight::CLI::Helpers + + # source://skylight//lib/skylight/cli/doctor.rb#83 + def check_config; end + + # source://skylight//lib/skylight/cli/doctor.rb#104 + def check_daemon; end + + # source://skylight//lib/skylight/cli/doctor.rb#56 + def check_native; end + + # source://skylight//lib/skylight/cli/doctor.rb#40 + def check_rails; end + + # source://skylight//lib/skylight/cli/doctor.rb#10 + def check_ssl; end + + # source://skylight//lib/skylight/cli/doctor.rb#164 + def wrap_up; end + + private + + # Overwrite the default helper method to load from Rails + # + # source://skylight//lib/skylight/cli/doctor.rb#171 + def config; end + + # source://skylight//lib/skylight/cli/doctor.rb#205 + def done!; end + + # source://skylight//lib/skylight/cli/doctor.rb#197 + def encountered_error!; end + + # @return [Boolean] + # + # source://skylight//lib/skylight/cli/doctor.rb#201 + def has_errors?; end + + # @return [Boolean] + # + # source://skylight//lib/skylight/cli/doctor.rb#187 + def mac?; end + + # NOTE: This check won't work correctly on Windows + # + # @return [Boolean] + # + # source://skylight//lib/skylight/cli/doctor.rb#192 + def rvm_present?; end +end + +# source://skylight//lib/skylight/cli/helpers.rb#3 +module Skylight::CLI::Helpers + private + + # source://skylight//lib/skylight/cli/helpers.rb#15 + def config; end + + # Sets the output padding while executing a block and resets it. + # + # source://skylight//lib/skylight/cli/helpers.rb#22 + def indent(count = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://skylight//lib/skylight/cli/helpers.rb#11 + def rails?; end + + # Duplicated below + # + # source://skylight//lib/skylight/cli/helpers.rb#7 + def rails_rb; end +end + +# source://skylight//lib/skylight/cli/merger.rb#8 +class Skylight::CLI::Merger < ::Thor::Group + include ::Skylight::CLI::Helpers + + # source://skylight//lib/skylight/cli/merger.rb#69 + def ask_for_child_app; end + + # source://skylight//lib/skylight/cli/merger.rb#78 + def ask_for_child_env; end + + # source://skylight//lib/skylight/cli/merger.rb#50 + def ask_for_parent_app; end + + # source://skylight//lib/skylight/cli/merger.rb#74 + def confirm_child; end + + # source://skylight//lib/skylight/cli/merger.rb#104 + def confirm_child_env; end + + # source://skylight//lib/skylight/cli/merger.rb#108 + def confirm_everything; end + + # source://skylight//lib/skylight/cli/merger.rb#65 + def confirm_parent; end + + # source://skylight//lib/skylight/cli/merger.rb#113 + def do_confirm; end + + # source://skylight//lib/skylight/cli/merger.rb#30 + def fetch_apps; end + + # source://thor/1.3.0/lib/thor/base.rb#163 + def merge_token; end + + # source://thor/1.3.0/lib/thor/base.rb#163 + def merge_token=(_arg0); end + + # source://skylight//lib/skylight/cli/merger.rb#127 + def print_new_config_instructions; end + + # source://skylight//lib/skylight/cli/merger.rb#22 + def welcome; end + + private + + # source://skylight//lib/skylight/cli/merger.rb#223 + def api; end + + # source://skylight//lib/skylight/cli/merger.rb#207 + def ask_for_app(app_list, &formatter); end + + # source://skylight//lib/skylight/cli/merger.rb#271 + def children; end + + # source://skylight//lib/skylight/cli/merger.rb#178 + def do_merge; end + + # source://skylight//lib/skylight/cli/merger.rb#192 + def done!(message: T.unsafe(nil), success: T.unsafe(nil)); end + + # source://skylight//lib/skylight/cli/merger.rb#227 + def format_component(component); end + + # source://skylight//lib/skylight/cli/merger.rb#267 + def parent_component_fingerprints; end + + # source://skylight//lib/skylight/cli/merger.rb#295 + def specify_child_env; end + + # @return [Boolean] + # + # source://skylight//lib/skylight/cli/merger.rb#259 + def valid_component?(component_name, env); end + + # source://skylight//lib/skylight/cli/merger.rb#240 + def validate_mergeability(child_app, child_env); end + + class << self + # source://skylight//lib/skylight/cli/merger.rb#11 + def banner; end + end +end + +# source://skylight//lib/skylight/cli/merger.rb#15 +Skylight::CLI::Merger::STRINGS = T.let(T.unsafe(nil), Hash) + +# source://skylight//lib/skylight/config.rb#16 +class Skylight::Config + include ::Skylight::Util::Logging + + # @api private + # @return [Config] a new instance of Config + # + # source://skylight//lib/skylight/config.rb#230 + def initialize(*args); end + + # source://skylight//lib/skylight/config.rb#382 + def [](key, default = T.unsafe(nil)); end + + # source://skylight//lib/skylight/config.rb#400 + def []=(key, val, scope = T.unsafe(nil)); end + + # source://skylight//lib/skylight/config.rb#556 + def alert_logger; end + + # Sets the attribute alert_logger + # + # @param value the value to set the attribute alert_logger to. + # + # source://skylight//lib/skylight/config.rb#554 + def alert_logger=(_arg0); end + + # @api private + # + # source://skylight//lib/skylight/config.rb#635 + def api; end + + # source://skylight//lib/skylight/config.rb#752 + def as_json(*_arg0); end + + # ===== Helpers ===== + # + # source://skylight//lib/skylight/config.rb#715 + def authentication_with_meta; end + + # source://skylight//lib/skylight/config.rb#349 + def check_file_permissions(file, key); end + + # source://skylight//lib/skylight/config.rb#370 + def check_logfile_permissions(log_file, key); end + + # source://skylight//lib/skylight/config.rb#678 + def check_sockdir_permissions(sockdir_path); end + + # source://skylight//lib/skylight/config.rb#744 + def component; end + + # source://skylight//lib/skylight/config.rb#735 + def components; end + + # source://skylight//lib/skylight/config.rb#731 + def deploy; end + + # source://skylight//lib/skylight/config.rb#430 + def duration_ms(key, default = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://skylight//lib/skylight/config.rb#570 + def enable_segments?; end + + # @return [Boolean] + # + # source://skylight//lib/skylight/config.rb#574 + def enable_sidekiq?; end + + # @return [Boolean] + # + # source://skylight//lib/skylight/config.rb#582 + def enable_source_locations?; end + + # @api private + # + # source://skylight//lib/skylight/config.rb#477 + def gc; end + + # source://skylight//lib/skylight/config.rb#382 + def get(key, default = T.unsafe(nil)); end + + # @api private + # + # source://skylight//lib/skylight/config.rb#482 + def ignored_endpoints; end + + # @return [Boolean] + # + # source://skylight//lib/skylight/config.rb#377 + def key?(key); end + + # source://skylight//lib/skylight/config.rb#512 + def log_level; end + + # source://skylight//lib/skylight/config.rb#538 + def logger; end + + # Sets the attribute logger + # + # @param value the value to set the attribute logger to. + # + # source://skylight//lib/skylight/config.rb#554 + def logger=(_arg0); end + + # source://skylight//lib/skylight/config.rb#542 + def native_log_file; end + + # source://skylight//lib/skylight/config.rb#534 + def native_log_level; end + + # @return [Boolean] + # + # source://skylight//lib/skylight/config.rb#590 + def on_heroku?; end + + # @api private + # + # source://skylight//lib/skylight/config.rb#227 + def priority_key; end + + # source://skylight//lib/skylight/config.rb#508 + def root; end + + # source://skylight//lib/skylight/config.rb#426 + def send_or_get(val); end + + # source://skylight//lib/skylight/config.rb#400 + def set(key, val, scope = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://skylight//lib/skylight/config.rb#578 + def sinatra_route_prefixes?; end + + # @api private + # + # source://skylight//lib/skylight/config.rb#498 + def source_location_ignored_gems; end + + # source://skylight//lib/skylight/config.rb#748 + def to_json(*_arg0); end + + # source://skylight//lib/skylight/config.rb#449 + def to_native_env; end + + # source://skylight//lib/skylight/config.rb#586 + def user_config; end + + # @api private + # + # source://skylight//lib/skylight/config.rb#324 + def validate!; end + + # source://skylight//lib/skylight/config.rb#639 + def validate_with_server; end + + # ===== Helpers ===== + # + # source://skylight//lib/skylight/config.rb#472 + def version; end + + # source://skylight//lib/skylight/config.rb#699 + def write(path); end + + private + + # source://skylight//lib/skylight/config.rb#619 + def cast_for_env(val); end + + # source://skylight//lib/skylight/config.rb#758 + def check_nfs(path); end + + # source://skylight//lib/skylight/config.rb#596 + def create_logger(out, level: T.unsafe(nil)); end + + # source://skylight//lib/skylight/config.rb#609 + def load_logger; end + + # @return [Boolean] + # + # source://skylight//lib/skylight/config.rb#763 + def reporting_env?; end + + class << self + # Default values for Skylight configuration keys + # + # source://skylight//lib/skylight/config.rb#119 + def default_values; end + + # Maps legacy config keys to new config keys + # + # source://skylight//lib/skylight/config.rb#216 + def legacy_keys; end + + # source://skylight//lib/skylight/config.rb#252 + def load(opts = T.unsafe(nil), env = T.unsafe(nil)); end + + # source://skylight//lib/skylight/config.rb#169 + def native_env_keys; end + + # @api private + # + # source://skylight//lib/skylight/config.rb#290 + def remap_env(env); end + + # source://skylight//lib/skylight/config.rb#284 + def remap_key(key); end + + # source://skylight//lib/skylight/config.rb#220 + def validators; end + end +end + +# source://skylight//lib/skylight/config.rb#116 +Skylight::Config::DEFAULT_IGNORED_SOURCE_LOCATION_GEMS = T.let(T.unsafe(nil), Array) + +# Map environment variable keys with Skylight configuration keys +# +# source://skylight//lib/skylight/config.rb#23 +Skylight::Config::ENV_TO_KEY = T.let(T.unsafe(nil), Hash) + +# source://skylight//lib/skylight/config.rb#108 +Skylight::Config::KEY_TO_NATIVE_ENV = T.let(T.unsafe(nil), Hash) + +# @api private +# +# source://skylight//lib/skylight/config.rb#20 +Skylight::Config::MUTEX = T.let(T.unsafe(nil), Thread::Mutex) + +# source://skylight//lib/skylight/config.rb#162 +Skylight::Config::REQUIRED_KEYS = T.let(T.unsafe(nil), Hash) + +# source://skylight//lib/skylight/config.rb#114 +Skylight::Config::SERVER_VALIDATE = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://skylight//lib/skylight/errors.rb#5 +class Skylight::ConfigError < ::RuntimeError; end + +# @api private +# +# source://skylight//lib/skylight.rb#49 +Skylight::DEFAULT_CATEGORY = T.let(T.unsafe(nil), String) + +# @api private +# +# source://skylight//lib/skylight.rb#52 +Skylight::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# source://skylight//lib/skylight/deprecation.rb#16 +Skylight::DEPRECATOR = T.let(T.unsafe(nil), Skylight::Deprecation) + +# source://skylight//lib/skylight/deprecation.rb#8 +class Skylight::Deprecation < ::ActiveSupport::Deprecation + private + + # source://skylight//lib/skylight/deprecation.rb#11 + def ignored_callstack(path); end + + class << self + # source://activesupport/7.1.1/lib/active_support/deprecation/instance_delegator.rb#34 + def ignored_callstack(*_arg0, **_arg1, &_arg2); end + end +end + +# source://skylight//lib/skylight/extensions.rb#6 +module Skylight::Extensions; end + +# source://skylight//lib/skylight/extensions.rb#7 +class Skylight::Extensions::Collection + # @return [Collection] a new instance of Collection + # + # source://skylight//lib/skylight/extensions.rb#8 + def initialize(config, extensions = T.unsafe(nil)); end + + # source://skylight//lib/skylight/extensions.rb#53 + def allowed_meta_keys; end + + # source://skylight//lib/skylight/extensions.rb#22 + def disable!(ext_name); end + + # source://skylight//lib/skylight/extensions.rb#13 + def enable!(ext_name); end + + # @return [Boolean] + # + # source://skylight//lib/skylight/extensions.rb#29 + def enabled?(ext_name); end + + # meta is a mutable hash that will be passed to the instrumenter. + # This method bridges Skylight.instrument and instrumenter.instrument. + # + # source://skylight//lib/skylight/extensions.rb#41 + def process_instrument_options(opts, meta); end + + # source://skylight//lib/skylight/extensions.rb#45 + def process_normalizer_meta(payload, meta, **opts); end + + # source://skylight//lib/skylight/extensions.rb#35 + def process_trace_meta(meta); end + + # source://skylight//lib/skylight/extensions.rb#49 + def trace_preprocess_meta(meta); end + + private + + # Returns the value of attribute config. + # + # source://skylight//lib/skylight/extensions.rb#59 + def config; end + + # Returns the value of attribute extensions. + # + # source://skylight//lib/skylight/extensions.rb#59 + def extensions; end + + # source://skylight//lib/skylight/extensions.rb#61 + def find_by_name(ext_name); end + + # source://skylight//lib/skylight/extensions.rb#69 + def rememoize!; end +end + +# source://skylight//lib/skylight/extensions.rb#75 +class Skylight::Extensions::Extension + # @return [Extension] a new instance of Extension + # + # source://skylight//lib/skylight/extensions.rb#76 + def initialize(config); end + + # source://skylight//lib/skylight/extensions.rb#92 + def allowed_meta_keys; end + + # source://skylight//lib/skylight/extensions.rb#83 + def process_instrument_options(_opts, _meta); end + + # source://skylight//lib/skylight/extensions.rb#86 + def process_normalizer_meta(_payload, _meta, **opts); end + + # source://skylight//lib/skylight/extensions.rb#80 + def process_trace_meta(_meta); end + + # source://skylight//lib/skylight/extensions.rb#89 + def trace_preprocess_meta(_meta); end +end + +# source://skylight//lib/skylight/extensions/source_location.rb#8 +class Skylight::Extensions::SourceLocation < ::Skylight::Extensions::Extension + include ::Skylight::Util::Logging + + # @return [SourceLocation] a new instance of SourceLocation + # + # source://skylight//lib/skylight/extensions/source_location.rb#16 + def initialize(*_arg0); end + + # source://skylight//lib/skylight/extensions/source_location.rb#111 + def allowed_meta_keys; end + + # Returns the value of attribute config. + # + # source://skylight//lib/skylight/extensions/source_location.rb#9 + def config; end + + # source://skylight//lib/skylight/extensions/source_location.rb#34 + def process_instrument_options(opts, meta); end + + # source://skylight//lib/skylight/extensions/source_location.rb#65 + def process_normalizer_meta(payload, meta, **opts); end + + # source://skylight//lib/skylight/extensions/source_location.rb#24 + def process_trace_meta(meta); end + + # source://skylight//lib/skylight/extensions/source_location.rb#88 + def trace_preprocess_meta(meta); end + + protected + + # source://skylight//lib/skylight/extensions/source_location.rb#117 + def dispatch_hinted_source_location(source_name, const_name, method_name); end + + # source://skylight//lib/skylight/extensions/source_location.rb#136 + def find_caller(cache_key: T.unsafe(nil)); end + + # source://skylight//lib/skylight/extensions/source_location.rb#164 + def instance_method_source_location(constant_name, method_name, source_name: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://skylight//lib/skylight/extensions/source_location.rb#148 + def project_path?(path); end + + # source://skylight//lib/skylight/extensions/source_location.rb#191 + def sanitize_source_location(path, line); end + + # from normalizers.rb + # Returns an array of file and line + # + # source://skylight//lib/skylight/extensions/source_location.rb#125 + def source_location(payload, meta, cache_key: T.unsafe(nil)); end + + private + + # source://skylight//lib/skylight/extensions/source_location.rb#251 + def find_caller_inner(locations); end + + # source://skylight//lib/skylight/extensions/source_location.rb#286 + def find_class_method(constant, method_name); end + + # source://skylight//lib/skylight/extensions/source_location.rb#282 + def find_instance_method(constant, method_name); end + + # walks up the inheritance tree until it finds the last method + # without a super_method definition. + # + # source://skylight//lib/skylight/extensions/source_location.rb#262 + def find_instance_method_super(constant, method_name); end + + # walks up the inheritance tree until it finds the instance method + # belonging to the constant given (skip prepended modules) + # + # source://skylight//lib/skylight/extensions/source_location.rb#272 + def find_own_instance_method(constant, method_name); end + + # source://skylight//lib/skylight/extensions/source_location.rb#235 + def find_source_gem(path); end + + # source://skylight//lib/skylight/extensions/source_location.rb#209 + def gem_require_trie; end +end + +# source://skylight//lib/skylight/extensions/source_location.rb#14 +Skylight::Extensions::SourceLocation::MAX_CALLER_DEPTH = T.let(T.unsafe(nil), Integer) + +# source://skylight//lib/skylight/extensions/source_location.rb#13 +Skylight::Extensions::SourceLocation::META_KEYS = T.let(T.unsafe(nil), Array) + +# source://skylight//lib/skylight/formatters/http.rb#2 +module Skylight::Formatters; end + +# source://skylight//lib/skylight/formatters/http.rb#3 +module Skylight::Formatters::HTTP + class << self + # Build instrumentation options for HTTP queries + # + # @param method [String] HTTP method, e.g. get, post + # @param scheme [String] HTTP scheme, e.g. http, https + # @param host [String] Request host, e.g. example.com + # @param port [String, Integer] Request port + # @param path [String] Request path + # @param query [String] Request query string + # @return [Hash] a hash containing `:category`, `:title`, and `:annotations` + # + # source://skylight//lib/skylight/formatters/http.rb#13 + def build_opts(method, _scheme, host, _port, _path, _query); end + end +end + +# @api private +# +# source://skylight//lib/skylight/gc.rb#5 +class Skylight::GC + include ::Skylight::Util::Logging + + # @api private + # @return [GC] a new instance of GC + # + # source://skylight//lib/skylight/gc.rb#15 + def initialize(config, profiler); end + + # @api private + # + # source://skylight//lib/skylight/gc.rb#13 + def config; end + + # @api private + # + # source://skylight//lib/skylight/gc.rb#29 + def enable; end + + # @api private + # + # source://skylight//lib/skylight/gc.rb#58 + def release(win); end + + # Total time in microseconds for GC over entire process lifetime + # + # @api private + # + # source://skylight//lib/skylight/gc.rb#34 + def total_time; end + + # @api private + # + # source://skylight//lib/skylight/gc.rb#38 + def track; end + + # @api private + # + # source://skylight//lib/skylight/gc.rb#62 + def update; end + + private + + # @api private + # + # source://skylight//lib/skylight/gc.rb#70 + def __update; end +end + +# @api private +# +# source://skylight//lib/skylight/gc.rb#8 +Skylight::GC::MAX_COUNT = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://skylight//lib/skylight/gc.rb#9 +Skylight::GC::MAX_TIME = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://skylight//lib/skylight/gc.rb#6 +Skylight::GC::METHODS = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://skylight//lib/skylight/gc.rb#7 +Skylight::GC::TH_KEY = T.let(T.unsafe(nil), Symbol) + +# @api private +# +# source://skylight//lib/skylight/gc.rb#78 +class Skylight::GC::Window + # @api private + # @return [Window] a new instance of Window + # + # source://skylight//lib/skylight/gc.rb#81 + def initialize(global); end + + # @api private + # + # source://skylight//lib/skylight/gc.rb#90 + def add(time); end + + # @api private + # + # source://skylight//lib/skylight/gc.rb#94 + def release; end + + # @api private + # + # source://skylight//lib/skylight/gc.rb#79 + def time; end + + # @api private + # + # source://skylight//lib/skylight/gc.rb#86 + def update; end +end + +# source://skylight//lib/skylight/errors.rb#15 +class Skylight::GrpcConnectError < ::Skylight::NativeError + class << self + # source://skylight//lib/skylight/errors.rb#16 + def code; end + + # source://skylight//lib/skylight/errors.rb#17 + def message; end + end +end + +# Instrumenting a specific method will cause an event to be created every time that method is called. +# The event will be inserted at the appropriate place in the Skylight trace. +# +# To instrument a method, the first thing to do is include {Skylight::Helpers Skylight::Helpers} +# into the class that you will be instrumenting. Then, annotate each method that +# you wish to instrument with {Skylight::Helpers::ClassMethods#instrument_method instrument_method}. +# +# source://skylight//lib/skylight/helpers.rb#8 +module Skylight::Helpers + mixes_in_class_methods ::Skylight::Helpers::ClassMethods + + class << self + # @api private + # @private + # + # source://skylight//lib/skylight/helpers.rb#213 + def included(base); end + end +end + +# @see Skylight::Helpers +# +# source://skylight//lib/skylight/helpers.rb#10 +module Skylight::Helpers::ClassMethods + def __sk_singleton_class; end + + # @overload instrument_class_method + # + # source://skylight//lib/skylight/helpers.rb#129 + def instrument_class_method(name, **opts); end + + # @overload instrument_method + # @overload instrument_method + # + # source://skylight//lib/skylight/helpers.rb#85 + def instrument_method(*args, **opts); end + + # @api private + # + # source://skylight//lib/skylight/helpers.rb#12 + def method_added(name); end + + # @api private + # + # source://skylight//lib/skylight/helpers.rb#22 + def singleton_method_added(name); end + + private + + # source://skylight//lib/skylight/helpers.rb#138 + def __sk_instrument_method_on(klass, name, title, **opts); end +end + +# @api private +# +# source://skylight//lib/skylight/instrumenter.rb#8 +class Skylight::Instrumenter + include ::Skylight::Util::Logging + + # @api private + # @return [Instrumenter] a new instance of Instrumenter + # + # source://skylight//lib/skylight/instrumenter.rb#63 + def initialize(uuid, config); end + + # @api private + # + # source://skylight//lib/skylight/instrumenter.rb#299 + def broken!; end + + # @api private + # + # source://skylight//lib/skylight/instrumenter.rb#48 + def config; end + + # @api private + # + # source://skylight//lib/skylight/instrumenter.rb#106 + def current_trace; end + + # @api private + # + # source://skylight//lib/skylight/instrumenter.rb#110 + def current_trace=(trace); end + + # possible values: + # ignore: :all + # ignore: :endpoint_assignment + # ignore: false | nil + # + # @api private + # + # source://skylight//lib/skylight/instrumenter.rb#148 + def disable(ignore: T.unsafe(nil)); end + + # @api private + # + # source://skylight//lib/skylight/instrumenter.rb#78 + def disable_extension!(name); end + + # @api private + # @return [Boolean] + # + # source://skylight//lib/skylight/instrumenter.rb#136 + def disabled?; end + + # @api private + # + # source://skylight//lib/skylight/instrumenter.rb#313 + def done(span, meta = T.unsafe(nil)); end + + # @api private + # + # source://skylight//lib/skylight/instrumenter.rb#74 + def enable_extension!(name); end + + # @api private + # @return [Boolean] + # + # source://skylight//lib/skylight/instrumenter.rb#140 + def endpoint_assignment_muted?; end + + # @api private + # @return [Boolean] + # + # source://skylight//lib/skylight/instrumenter.rb#82 + def extension_enabled?(name); end + + # @api private + # + # source://skylight//lib/skylight/instrumenter.rb#48 + def extensions; end + + # Because GraphQL can return multiple results, each of which + # may have their own success/error states, we need to set the + # skylight segment as follows: + # + # - when all queries have errors: "error" + # - when some queries have errors: "+error" + # - when no queries have errors: "" + # + # will be determined by the Rails controller as usual. + # See Instrumenter#finalize_endpoint_segment for the actual segment/error assignment. + # + # @api private + # + # source://skylight//lib/skylight/instrumenter.rb#359 + def finalize_endpoint_segment(trace); end + + # @api private + # + # source://skylight//lib/skylight/instrumenter.rb#48 + def gc; end + + # @api private + # + # source://skylight//lib/skylight/instrumenter.rb#336 + def handle_instrumenter_error(trace, err); end + + # @api private + # @return [Boolean] + # + # source://skylight//lib/skylight/instrumenter.rb#345 + def ignore?(trace); end + + # @api private + # @raise [ArgumentError] + # + # source://skylight//lib/skylight/instrumenter.rb#253 + def instrument(cat, title = T.unsafe(nil), desc = T.unsafe(nil), meta = T.unsafe(nil)); end + + # @api private + # + # source://skylight//lib/skylight/instrumenter.rb#86 + def log_context; end + + # possible values: + # ignore: :all + # ignore: :endpoint_assignment + # ignore: false | nil + # + # @api private + # + # source://skylight//lib/skylight/instrumenter.rb#148 + def mute(ignore: T.unsafe(nil)); end + + # @api private + # + # source://skylight//lib/skylight/instrumenter.rb#132 + def muted; end + + # @api private + # + # source://skylight//lib/skylight/instrumenter.rb#128 + def muted=(val); end + + # @api private + def native_start; end + + # @api private + def native_stop; end + + # @api private + def native_submit_trace(_arg0); end + + # @api private + # + # source://skylight//lib/skylight/instrumenter.rb#98 + def native_track_desc(_endpoint, _description); end + + # @api private + # + # source://skylight//lib/skylight/instrumenter.rb#305 + def poison!; end + + # @api private + # @return [Boolean] + # + # source://skylight//lib/skylight/instrumenter.rb#309 + def poisoned?; end + + # @api private + # + # source://skylight//lib/skylight/instrumenter.rb#319 + def process(trace); end + + # @api private + # + # source://skylight//lib/skylight/instrumenter.rb#207 + def shutdown; end + + # @api private + # + # source://skylight//lib/skylight/instrumenter.rb#164 + def silence_warnings(context); end + + # @api private + # + # source://skylight//lib/skylight/instrumenter.rb#177 + def start!; end + + # @api private + # + # source://skylight//lib/skylight/instrumenter.rb#48 + def subscriber; end + + # @api private + # + # source://skylight//lib/skylight/instrumenter.rb#212 + def trace(endpoint, cat, title = T.unsafe(nil), desc = T.unsafe(nil), meta: T.unsafe(nil), segment: T.unsafe(nil), component: T.unsafe(nil)); end + + # @api private + # @return [Boolean] + # + # source://skylight//lib/skylight/instrumenter.rb#136 + def tracing_muted?; end + + # @api private + # + # source://skylight//lib/skylight/instrumenter.rb#156 + def unmute; end + + # @api private + # + # source://skylight//lib/skylight/instrumenter.rb#48 + def uuid; end + + # @api private + # + # source://skylight//lib/skylight/instrumenter.rb#115 + def validate_installation; end + + # @api private + # @return [Boolean] + # + # source://skylight//lib/skylight/instrumenter.rb#170 + def warnings_silenced?(context); end + + class << self + # @api private + def native_new(_arg0, _arg1); end + + # @api private + # + # source://skylight//lib/skylight/instrumenter.rb#54 + def new(config); end + end +end + +# @api private +# +# source://skylight//lib/skylight/instrumenter.rb#9 +Skylight::Instrumenter::KEY = T.let(T.unsafe(nil), Symbol) + +# @api private +# +# source://skylight//lib/skylight/instrumenter.rb#13 +class Skylight::Instrumenter::TraceInfo + # @api private + # @return [TraceInfo] a new instance of TraceInfo + # + # source://skylight//lib/skylight/instrumenter.rb#14 + def initialize(key = T.unsafe(nil)); end + + # @api private + # + # source://skylight//lib/skylight/instrumenter.rb#19 + def current; end + + # @api private + # + # source://skylight//lib/skylight/instrumenter.rb#23 + def current=(trace); end + + # @api private + # @return [Boolean] + # + # source://skylight//lib/skylight/instrumenter.rb#42 + def endpoint_assignment_muted?; end + + # @api private + # + # source://skylight//lib/skylight/instrumenter.rb#34 + def muted; end + + # NOTE: This should only be set by the instrumenter, and only + # in the context of a `mute` block. Do not try to turn this + # flag on and off directly. + # + # @api private + # + # source://skylight//lib/skylight/instrumenter.rb#30 + def muted=(val); end + + # @api private + # @return [Boolean] + # + # source://skylight//lib/skylight/instrumenter.rb#38 + def tracing_muted?; end +end + +# source://skylight//lib/skylight/errors.rb#15 +class Skylight::InstrumenterUnrecoverableError < ::Skylight::NativeError + class << self + # source://skylight//lib/skylight/errors.rb#16 + def code; end + + # source://skylight//lib/skylight/errors.rb#17 + def message; end + end +end + +# source://skylight//lib/skylight/errors.rb#15 +class Skylight::InvalidUtf8Error < ::Skylight::NativeError + class << self + # source://skylight//lib/skylight/errors.rb#16 + def code; end + + # source://skylight//lib/skylight/errors.rb#17 + def message; end + end +end + +# source://skylight//lib/skylight.rb#37 +Skylight::LOCK = T.let(T.unsafe(nil), Thread::Mutex) + +# source://skylight//lib/skylight/errors.rb#15 +class Skylight::MaximumTraceSpansError < ::Skylight::NativeError + class << self + # source://skylight//lib/skylight/errors.rb#16 + def code; end + + # source://skylight//lib/skylight/errors.rb#17 + def message; end + end +end + +# @api private +# +# source://skylight//lib/skylight/middleware.rb#5 +class Skylight::Middleware + include ::Skylight::Util::Logging + + # @api private + # @return [Middleware] a new instance of Middleware + # + # source://skylight//lib/skylight/middleware.rb#77 + def initialize(app, opts = T.unsafe(nil)); end + + # @api private + # + # source://skylight//lib/skylight/middleware.rb#82 + def call(env); end + + # For Util::Logging + # + # @api private + # + # source://skylight//lib/skylight/middleware.rb#75 + def config; end + + private + + # @api private + # + # source://skylight//lib/skylight/middleware.rb#142 + def current_request_id; end + + # @api private + # + # source://skylight//lib/skylight/middleware.rb#146 + def current_request_id=(request_id); end + + # @api private + # + # source://skylight//lib/skylight/middleware.rb#122 + def endpoint_meta(_env); end + + # Allow for overwriting + # + # @api private + # + # source://skylight//lib/skylight/middleware.rb#118 + def endpoint_name(_env); end + + # @api private + # + # source://skylight//lib/skylight/middleware.rb#138 + def internal_request_id; end + + # @api private + # + # source://skylight//lib/skylight/middleware.rb#112 + def log_context; end + + # @api private + # + # source://skylight//lib/skylight/middleware.rb#134 + def make_request_id(request_id); end + + # Request ID code based on ActionDispatch::RequestId + # + # @api private + # + # source://skylight//lib/skylight/middleware.rb#127 + def set_request_id(env); end + + class << self + # @api private + # + # source://skylight//lib/skylight/middleware.rb#51 + def with_after_close(resp, debug_identifier: T.unsafe(nil), &block); end + end +end + +# @api private +# +# source://skylight//lib/skylight/middleware.rb#8 +class Skylight::Middleware::BodyProxy + # @api private + # @return [BodyProxy] a new instance of BodyProxy + # + # source://skylight//lib/skylight/middleware.rb#9 + def initialize(body, &block); end + + # @api private + # + # source://skylight//lib/skylight/middleware.rb#21 + def close; end + + # @api private + # @return [Boolean] + # + # source://skylight//lib/skylight/middleware.rb#32 + def closed?; end + + # N.B. This method is a special case to address the bug described by + # https://github.com/rack/rack/issues/434. + # We are applying this special case for #each only. Future bugs of this + # class will be handled by requesting users to patch their ruby + # implementation, to save adding too many methods in this class. + # + # @api private + # + # source://skylight//lib/skylight/middleware.rb#41 + def each(*_arg0, **_arg1, &_arg2); end + + # @api private + # + # source://skylight//lib/skylight/middleware.rb#45 + def method_missing(*args, &block); end + + private + + # @api private + # @return [Boolean] + # + # source://skylight//lib/skylight/middleware.rb#15 + def respond_to_missing?(name, include_all = T.unsafe(nil)); end +end + +# @api private +# +# source://skylight//lib/skylight/middleware.rb#6 +Skylight::Middleware::SKYLIGHT_REQUEST_ID = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/errors.rb#8 +class Skylight::NativeError < ::StandardError + # @return [NativeError] a new instance of NativeError + # + # source://skylight//lib/skylight/errors.rb#44 + def initialize(method_name); end + + # source://skylight//lib/skylight/errors.rb#49 + def code; end + + # source://skylight//lib/skylight/errors.rb#53 + def formatted_code; end + + # Returns the value of attribute method_name. + # + # source://skylight//lib/skylight/errors.rb#30 + def method_name; end + + class << self + # source://skylight//lib/skylight/errors.rb#32 + def code; end + + # source://skylight//lib/skylight/errors.rb#26 + def for_code(code); end + + # source://skylight//lib/skylight/errors.rb#36 + def formatted_code; end + + # source://skylight//lib/skylight/errors.rb#40 + def message; end + + # source://skylight//lib/skylight/errors.rb#11 + def register(code, name, message); end + end +end + +# Convert AS::N events to Skylight events +# +# @api private +# +# source://skylight//lib/skylight/normalizers.rb#4 +module Skylight::Normalizers + class << self + # @api private + # + # source://skylight//lib/skylight/normalizers.rb#31 + def build(config); end + + # @api private + # + # source://skylight//lib/skylight/normalizers.rb#27 + def disable(*names); end + + # @api private + # + # source://skylight//lib/skylight/normalizers.rb#18 + def enable(*names, enabled: T.unsafe(nil)); end + + # @api private + # + # source://skylight//lib/skylight/normalizers.rb#9 + def register(name, klass, opts = T.unsafe(nil)); end + + # @api private + # + # source://skylight//lib/skylight/normalizers.rb#5 + def registry; end + + # @api private + # + # source://skylight//lib/skylight/normalizers.rb#14 + def unregister(name); end + end +end + +# source://skylight//lib/skylight/normalizers/action_controller/process_action.rb#3 +module Skylight::Normalizers::ActionController; end + +# Normalizer for processing a Rails controller action +# +# source://skylight//lib/skylight/normalizers/action_controller/process_action.rb#5 +class Skylight::Normalizers::ActionController::ProcessAction < ::Skylight::Normalizers::Normalizer + # @option payload + # @option payload + # @param trace [Skylight::Messages::Trace::Builder] + # @param name [String] ignored, only present to match API + # @param payload [Hash] + # @return [Array] + # + # source://skylight//lib/skylight/normalizers/action_controller/process_action.rb#20 + def normalize(trace, _name, payload); end + + # source://skylight//lib/skylight/normalizers/action_controller/process_action.rb#26 + def normalize_after(trace, _span, _name, payload); end + + private + + # source://skylight//lib/skylight/normalizers/action_controller/process_action.rb#36 + def controller_action(payload); end + + # source://skylight//lib/skylight/normalizers/action_controller/process_action.rb#40 + def process_meta_options(payload); end + + # source://skylight//lib/skylight/normalizers/action_controller/process_action.rb#45 + def segment_from_payload(payload); end + + # source://skylight//lib/skylight/normalizers/action_controller/process_action.rb#57 + def segment_from_status(status); end +end + +# source://skylight//lib/skylight/normalizers/action_controller/process_action.rb#8 +Skylight::Normalizers::ActionController::ProcessAction::CAT = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/action_controller/send_file.rb#16 +class Skylight::Normalizers::ActionController::SendFile < ::Skylight::Normalizers::Normalizer + # @return [SendFile] a new instance of SendFile + # + # source://skylight//lib/skylight/normalizers/action_controller/send_file.rb#38 + def initialize(*_arg0); end + + # source://skylight//lib/skylight/normalizers/action_controller/send_file.rb#22 + def normalize(_trace, _name, _payload); end +end + +# source://skylight//lib/skylight/normalizers/action_controller/send_file.rb#36 +Skylight::Normalizers::ActionController::SendFile::ATTACHMENT = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/action_controller/send_file.rb#19 +Skylight::Normalizers::ActionController::SendFile::CAT = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/action_controller/send_file.rb#35 +Skylight::Normalizers::ActionController::SendFile::OCTET_STREAM = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/action_controller/send_file.rb#20 +Skylight::Normalizers::ActionController::SendFile::TITLE = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/action_dispatch/process_middleware.rb#5 +module Skylight::Normalizers::ActionDispatch; end + +# source://skylight//lib/skylight/normalizers/action_dispatch/process_middleware.rb#6 +class Skylight::Normalizers::ActionDispatch::ProcessMiddleware < ::Skylight::Normalizers::Normalizer + # source://skylight//lib/skylight/normalizers/action_dispatch/process_middleware.rb#13 + def normalize(trace, _name, payload); end +end + +# source://skylight//lib/skylight/normalizers/action_dispatch/process_middleware.rb#11 +Skylight::Normalizers::ActionDispatch::ProcessMiddleware::ANONYMOUS = T.let(T.unsafe(nil), Regexp) + +# source://skylight//lib/skylight/normalizers/action_dispatch/process_middleware.rb#10 +Skylight::Normalizers::ActionDispatch::ProcessMiddleware::ANONYMOUS_MIDDLEWARE = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/action_dispatch/process_middleware.rb#9 +Skylight::Normalizers::ActionDispatch::ProcessMiddleware::CAT = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/action_dispatch/route_set.rb#4 +class Skylight::Normalizers::ActionDispatch::RouteSet < ::Skylight::Normalizers::Normalizer + # source://skylight//lib/skylight/normalizers/action_dispatch/route_set.rb#9 + def normalize(trace, _name, _payload); end + + private + + # source://skylight//lib/skylight/normalizers/action_dispatch/route_set.rb#20 + def process_meta_options(_payload); end + + # source://skylight//lib/skylight/normalizers/action_dispatch/route_set.rb#16 + def router_class_name; end +end + +# source://skylight//lib/skylight/normalizers/action_dispatch/route_set.rb#7 +Skylight::Normalizers::ActionDispatch::RouteSet::CAT = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/action_view/render_collection.rb#5 +module Skylight::Normalizers::ActionView; end + +# Normalizer for Rails collection rendering +# +# source://skylight//lib/skylight/normalizers/action_view/render_collection.rb#7 +class Skylight::Normalizers::ActionView::RenderCollection < ::Skylight::Normalizers::RenderNormalizer + # @option payload + # @option payload + # @param trace [Skylight::Messages::Trace::Builder] ignored, only present to match API + # @param name [String] ignored, only present to match API + # @param payload [Hash] a customizable set of options + # @param payload [Hash] + # @return [Array] + # + # source://skylight//lib/skylight/normalizers/action_view/render_collection.rb#18 + def normalize(_trace, _name, payload); end +end + +# source://skylight//lib/skylight/normalizers/action_view/render_collection.rb#10 +Skylight::Normalizers::ActionView::RenderCollection::CAT = T.let(T.unsafe(nil), String) + +# Normalizer for Rails layout rendering +# +# source://skylight//lib/skylight/normalizers/action_view/render_layout.rb#9 +class Skylight::Normalizers::ActionView::RenderLayout < ::Skylight::Normalizers::RenderNormalizer + # @option payload + # @param trace [Skylight::Messages::Trace::Builder] ignored, only present to match API + # @param name [String] ignored, only present to match API + # @param payload [Hash] + # @return [Array] + # + # source://skylight//lib/skylight/normalizers/action_view/render_layout.rb#19 + def normalize(_trace, _name, payload); end +end + +# source://skylight//lib/skylight/normalizers/action_view/render_layout.rb#12 +Skylight::Normalizers::ActionView::RenderLayout::CAT = T.let(T.unsafe(nil), String) + +# Normalizer for Rails partial rendering +# +# source://skylight//lib/skylight/normalizers/action_view/render_partial.rb#7 +class Skylight::Normalizers::ActionView::RenderPartial < ::Skylight::Normalizers::RenderNormalizer + # @option payload + # @param trace [Skylight::Messages::Trace::Builder] ignored, only present to match API + # @param name [String] ignored, only present to match API + # @param payload [Hash] + # @return [Array] + # + # source://skylight//lib/skylight/normalizers/action_view/render_partial.rb#17 + def normalize(_trace, _name, payload); end +end + +# source://skylight//lib/skylight/normalizers/action_view/render_partial.rb#10 +Skylight::Normalizers::ActionView::RenderPartial::CAT = T.let(T.unsafe(nil), String) + +# Normalizer for Rails template rendering +# +# source://skylight//lib/skylight/normalizers/action_view/render_template.rb#7 +class Skylight::Normalizers::ActionView::RenderTemplate < ::Skylight::Normalizers::RenderNormalizer + # @option payload + # @param trace [Skylight::Messages::Trace::Builder] ignored, only present to match API + # @param name [String] ignored, only present to match API + # @param payload [Hash] + # @return [Array] + # + # source://skylight//lib/skylight/normalizers/action_view/render_template.rb#17 + def normalize(_trace, _name, payload); end +end + +# source://skylight//lib/skylight/normalizers/action_view/render_template.rb#10 +Skylight::Normalizers::ActionView::RenderTemplate::CAT = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/active_job/perform.rb#3 +module Skylight::Normalizers::ActiveJob; end + +# source://skylight//lib/skylight/normalizers/active_job/perform.rb#4 +class Skylight::Normalizers::ActiveJob::Perform < ::Skylight::Normalizers::Normalizer + # source://skylight//lib/skylight/normalizers/active_job/perform.rb#21 + def normalize(trace, _name, payload); end + + # source://skylight//lib/skylight/normalizers/active_job/perform.rb#31 + def normalize_after(trace, _span, _name, payload); end + + private + + # source://skylight//lib/skylight/normalizers/active_job/perform.rb#49 + def maybe_set_endpoint(trace, payload); end + + # source://skylight//lib/skylight/normalizers/active_job/perform.rb#42 + def normalize_adapter_name(adapter); end + + # source://skylight//lib/skylight/normalizers/active_job/perform.rb#76 + def normalize_title(job_instance); end + + # source://skylight//lib/skylight/normalizers/active_job/perform.rb#37 + def process_meta_options(payload); end + + class << self + # source://skylight//lib/skylight/normalizers/active_job/perform.rb#10 + def normalize_title(job_instance); end + end +end + +# source://skylight//lib/skylight/normalizers/active_job/perform.rb#19 +Skylight::Normalizers::ActiveJob::Perform::CAT = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/active_job/perform.rb#8 +Skylight::Normalizers::ActiveJob::Perform::DELAYED_JOB_WRAPPER = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/active_job/perform.rb#7 +Skylight::Normalizers::ActiveJob::Perform::DELIVERY_JOB = T.let(T.unsafe(nil), Regexp) + +# source://skylight//lib/skylight/normalizers/active_model_serializers/render.rb#3 +module Skylight::Normalizers::ActiveModelSerializers; end + +# source://skylight//lib/skylight/normalizers/active_model_serializers/render.rb#4 +class Skylight::Normalizers::ActiveModelSerializers::Render < ::Skylight::Normalizers::Normalizer + # source://skylight//lib/skylight/normalizers/active_model_serializers/render.rb#10 + def normalize(_trace, _name, payload); end +end + +# source://skylight//lib/skylight/normalizers/active_model_serializers/render.rb#8 +Skylight::Normalizers::ActiveModelSerializers::Render::ANONYMOUS = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/active_model_serializers/render.rb#7 +Skylight::Normalizers::ActiveModelSerializers::Render::CAT = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/active_record/instantiation.rb#3 +module Skylight::Normalizers::ActiveRecord; end + +# source://skylight//lib/skylight/normalizers/active_record/sql.rb#11 +class Skylight::Normalizers::ActiveRecord::FutureResult < ::Skylight::Normalizers::Normalizer + # source://skylight//lib/skylight/normalizers/active_record/sql.rb#14 + def normalize(_trace, _name, payload); end +end + +# source://skylight//lib/skylight/normalizers/active_record/instantiation.rb#4 +class Skylight::Normalizers::ActiveRecord::Instantiation < ::Skylight::Normalizers::Normalizer + # source://skylight//lib/skylight/normalizers/active_record/instantiation.rb#9 + def normalize(_trace, _name, payload); end +end + +# source://skylight//lib/skylight/normalizers/active_record/instantiation.rb#7 +Skylight::Normalizers::ActiveRecord::Instantiation::CAT = T.let(T.unsafe(nil), String) + +# Normalizer for SQL requests +# +# source://skylight//lib/skylight/normalizers/active_record/sql.rb#7 +class Skylight::Normalizers::ActiveRecord::SQL < ::Skylight::Normalizers::SQL; end + +# source://skylight//lib/skylight/normalizers/active_storage.rb#3 +class Skylight::Normalizers::ActiveStorage < ::Skylight::Normalizers::Normalizer + # source://skylight//lib/skylight/normalizers/active_storage.rb#19 + def normalize(_trace, name, _payload); end +end + +# source://skylight//lib/skylight/normalizers/active_storage.rb#4 +Skylight::Normalizers::ActiveStorage::TITLES = T.let(T.unsafe(nil), Hash) + +# source://skylight//lib/skylight/normalizers/active_support/cache.rb#3 +module Skylight::Normalizers::ActiveSupport; end + +# source://skylight//lib/skylight/normalizers/active_support/cache.rb#4 +class Skylight::Normalizers::ActiveSupport::Cache < ::Skylight::Normalizers::Normalizer; end + +# source://skylight//lib/skylight/normalizers/active_support/cache_clear.rb#4 +class Skylight::Normalizers::ActiveSupport::CacheClear < ::Skylight::Normalizers::ActiveSupport::Cache + # source://skylight//lib/skylight/normalizers/active_support/cache_clear.rb#10 + def normalize(_trace, _name, _payload); end +end + +# source://skylight//lib/skylight/normalizers/active_support/cache_clear.rb#7 +Skylight::Normalizers::ActiveSupport::CacheClear::CAT = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/active_support/cache_clear.rb#8 +Skylight::Normalizers::ActiveSupport::CacheClear::TITLE = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/active_support/cache_decrement.rb#4 +class Skylight::Normalizers::ActiveSupport::CacheDecrement < ::Skylight::Normalizers::ActiveSupport::Cache + # source://skylight//lib/skylight/normalizers/active_support/cache_decrement.rb#10 + def normalize(_trace, _name, _payload); end +end + +# source://skylight//lib/skylight/normalizers/active_support/cache_decrement.rb#7 +Skylight::Normalizers::ActiveSupport::CacheDecrement::CAT = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/active_support/cache_decrement.rb#8 +Skylight::Normalizers::ActiveSupport::CacheDecrement::TITLE = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/active_support/cache_delete.rb#4 +class Skylight::Normalizers::ActiveSupport::CacheDelete < ::Skylight::Normalizers::ActiveSupport::Cache + # source://skylight//lib/skylight/normalizers/active_support/cache_delete.rb#10 + def normalize(_trace, _name, _payload); end +end + +# source://skylight//lib/skylight/normalizers/active_support/cache_delete.rb#7 +Skylight::Normalizers::ActiveSupport::CacheDelete::CAT = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/active_support/cache_delete.rb#8 +Skylight::Normalizers::ActiveSupport::CacheDelete::TITLE = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/active_support/cache_exist.rb#4 +class Skylight::Normalizers::ActiveSupport::CacheExist < ::Skylight::Normalizers::ActiveSupport::Cache + # source://skylight//lib/skylight/normalizers/active_support/cache_exist.rb#10 + def normalize(_trace, _name, _payload); end +end + +# source://skylight//lib/skylight/normalizers/active_support/cache_exist.rb#7 +Skylight::Normalizers::ActiveSupport::CacheExist::CAT = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/active_support/cache_exist.rb#8 +Skylight::Normalizers::ActiveSupport::CacheExist::TITLE = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/active_support/cache_fetch_hit.rb#4 +class Skylight::Normalizers::ActiveSupport::CacheFetchHit < ::Skylight::Normalizers::ActiveSupport::Cache + # source://skylight//lib/skylight/normalizers/active_support/cache_fetch_hit.rb#10 + def normalize(_trace, _name, _payload); end +end + +# source://skylight//lib/skylight/normalizers/active_support/cache_fetch_hit.rb#7 +Skylight::Normalizers::ActiveSupport::CacheFetchHit::CAT = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/active_support/cache_fetch_hit.rb#8 +Skylight::Normalizers::ActiveSupport::CacheFetchHit::TITLE = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/active_support/cache_generate.rb#4 +class Skylight::Normalizers::ActiveSupport::CacheGenerate < ::Skylight::Normalizers::ActiveSupport::Cache + # source://skylight//lib/skylight/normalizers/active_support/cache_generate.rb#10 + def normalize(_trace, _name, _payload); end +end + +# source://skylight//lib/skylight/normalizers/active_support/cache_generate.rb#7 +Skylight::Normalizers::ActiveSupport::CacheGenerate::CAT = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/active_support/cache_generate.rb#8 +Skylight::Normalizers::ActiveSupport::CacheGenerate::TITLE = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/active_support/cache_increment.rb#4 +class Skylight::Normalizers::ActiveSupport::CacheIncrement < ::Skylight::Normalizers::ActiveSupport::Cache + # source://skylight//lib/skylight/normalizers/active_support/cache_increment.rb#10 + def normalize(_trace, _name, _payload); end +end + +# source://skylight//lib/skylight/normalizers/active_support/cache_increment.rb#7 +Skylight::Normalizers::ActiveSupport::CacheIncrement::CAT = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/active_support/cache_increment.rb#8 +Skylight::Normalizers::ActiveSupport::CacheIncrement::TITLE = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/active_support/cache_read.rb#4 +class Skylight::Normalizers::ActiveSupport::CacheRead < ::Skylight::Normalizers::ActiveSupport::Cache + # source://skylight//lib/skylight/normalizers/active_support/cache_read.rb#10 + def normalize(_trace, _name, _payload); end +end + +# source://skylight//lib/skylight/normalizers/active_support/cache_read.rb#7 +Skylight::Normalizers::ActiveSupport::CacheRead::CAT = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/active_support/cache_read.rb#8 +Skylight::Normalizers::ActiveSupport::CacheRead::TITLE = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/active_support/cache_read_multi.rb#4 +class Skylight::Normalizers::ActiveSupport::CacheReadMulti < ::Skylight::Normalizers::ActiveSupport::Cache + # source://skylight//lib/skylight/normalizers/active_support/cache_read_multi.rb#10 + def normalize(_trace, _name, _payload); end +end + +# source://skylight//lib/skylight/normalizers/active_support/cache_read_multi.rb#7 +Skylight::Normalizers::ActiveSupport::CacheReadMulti::CAT = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/active_support/cache_read_multi.rb#8 +Skylight::Normalizers::ActiveSupport::CacheReadMulti::TITLE = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/active_support/cache_write.rb#4 +class Skylight::Normalizers::ActiveSupport::CacheWrite < ::Skylight::Normalizers::ActiveSupport::Cache + # source://skylight//lib/skylight/normalizers/active_support/cache_write.rb#10 + def normalize(_trace, _name, _payload); end +end + +# source://skylight//lib/skylight/normalizers/active_support/cache_write.rb#7 +Skylight::Normalizers::ActiveSupport::CacheWrite::CAT = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/active_support/cache_write.rb#8 +Skylight::Normalizers::ActiveSupport::CacheWrite::TITLE = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/coach/handler_finish.rb#3 +module Skylight::Normalizers::Coach; end + +# source://skylight//lib/skylight/normalizers/coach/handler_finish.rb#4 +class Skylight::Normalizers::Coach::HandlerFinish < ::Skylight::Normalizers::Normalizer + # Run when the handler first starts, we need to set the trace endpoint to be the + # handler name. + # + # We can expect the payload to have the :middleware key. + # + # source://skylight//lib/skylight/normalizers/coach/handler_finish.rb#26 + def normalize(trace, _name, payload); end + + # source://skylight//lib/skylight/normalizers/coach/handler_finish.rb#31 + def normalize_after(trace, _span, _name, payload); end +end + +# source://skylight//lib/skylight/normalizers/coach/handler_finish.rb#17 +Skylight::Normalizers::Coach::HandlerFinish::CAT = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/coach/middleware_finish.rb#4 +class Skylight::Normalizers::Coach::MiddlewareFinish < ::Skylight::Normalizers::Normalizer + # Called whenever a new middleware is executed. We can expect this to happen + # within a Coach::Handler. + # + # We can expect the payload to have the :middleware key. + # + # source://skylight//lib/skylight/normalizers/coach/middleware_finish.rb#26 + def normalize(trace, _name, payload); end +end + +# source://skylight//lib/skylight/normalizers/coach/middleware_finish.rb#17 +Skylight::Normalizers::Coach::MiddlewareFinish::CAT = T.let(T.unsafe(nil), String) + +# @api private +# +# source://skylight//lib/skylight/normalizers.rb#100 +class Skylight::Normalizers::Container + # @api private + # @return [Container] a new instance of Container + # + # source://skylight//lib/skylight/normalizers.rb#101 + def initialize(normalizers); end + + # @api private + # + # source://skylight//lib/skylight/normalizers.rb#109 + def each_key(&block); end + + # @api private + # + # source://skylight//lib/skylight/normalizers.rb#105 + def keys; end + + # @api private + # + # source://skylight//lib/skylight/normalizers.rb#113 + def normalize(trace, name, payload); end + + # @api private + # + # source://skylight//lib/skylight/normalizers.rb#117 + def normalize_after(trace, span, name, payload); end + + # @api private + # + # source://skylight//lib/skylight/normalizers.rb#121 + def normalizer_for(name); end +end + +# source://skylight//lib/skylight/normalizers/couch_potato/query.rb#5 +module Skylight::Normalizers::CouchPotato; end + +# source://skylight//lib/skylight/normalizers/couch_potato/query.rb#6 +class Skylight::Normalizers::CouchPotato::Query < ::Skylight::Normalizers::Normalizer + # source://skylight//lib/skylight/normalizers/couch_potato/query.rb#12 + def normalize(_trace, name, payload); end +end + +# source://skylight//lib/skylight/normalizers/couch_potato/query.rb#10 +Skylight::Normalizers::CouchPotato::Query::CAT = T.let(T.unsafe(nil), String) + +# @api private +# +# source://skylight//lib/skylight/normalizers.rb#98 +Skylight::Normalizers::DEFAULT = T.let(T.unsafe(nil), Skylight::Normalizers::Default) + +# source://skylight//lib/skylight/normalizers/data_mapper/sql.rb#5 +module Skylight::Normalizers::DataMapper; end + +# Normalizer for SQL requests +# +# source://skylight//lib/skylight/normalizers/data_mapper/sql.rb#7 +class Skylight::Normalizers::DataMapper::SQL < ::Skylight::Normalizers::SQL; end + +# The default normalizer, used if no other is found. +# +# source://skylight//lib/skylight/normalizers/default.rb#4 +class Skylight::Normalizers::Default < ::Skylight::Normalizers::Normalizer + # @return [Default] a new instance of Default + # + # source://skylight//lib/skylight/normalizers/default.rb#5 + def initialize; end + + # source://skylight//lib/skylight/normalizers/default.rb#9 + def config; end + + # @option payload + # @option payload + # @param trace [Skylight::Messages::Trace::Builder] ignored, only present to match API + # @param name [String] + # @param payload [Hash] + # @return [Array, :skip] the normalized array or `:skip` if `name` is not part of a known {Skylight::TIERS tier} + # + # source://skylight//lib/skylight/normalizers/default.rb#19 + def normalize(_trace, name, payload); end +end + +# source://skylight//lib/skylight/normalizers/elasticsearch/request.rb#3 +module Skylight::Normalizers::Elasticsearch; end + +# source://skylight//lib/skylight/normalizers/elasticsearch/request.rb#4 +class Skylight::Normalizers::Elasticsearch::Request < ::Skylight::Normalizers::Normalizer + # source://skylight//lib/skylight/normalizers/elasticsearch/request.rb#9 + def normalize(_trace, _name, payload); end +end + +# source://skylight//lib/skylight/normalizers/elasticsearch/request.rb#7 +Skylight::Normalizers::Elasticsearch::Request::CAT = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/faraday/request.rb#5 +module Skylight::Normalizers::Faraday; end + +# source://skylight//lib/skylight/normalizers/faraday/request.rb#6 +class Skylight::Normalizers::Faraday::Request < ::Skylight::Normalizers::Normalizer + # @return [Boolean] + # + # source://skylight//lib/skylight/normalizers/faraday/request.rb#19 + def disabled?; end + + # source://skylight//lib/skylight/normalizers/faraday/request.rb#23 + def normalize(_trace, _name, payload); end + + class << self + # source://skylight//lib/skylight/normalizers/faraday/request.rb#11 + def disable; end + end +end + +# source://skylight//lib/skylight/normalizers/faraday/request.rb#9 +Skylight::Normalizers::Faraday::Request::DISABLED_KEY = T.let(T.unsafe(nil), Symbol) + +# source://skylight//lib/skylight/normalizers/grape/endpoint.rb#3 +module Skylight::Normalizers::Grape; end + +# source://skylight//lib/skylight/normalizers/grape/endpoint.rb#4 +class Skylight::Normalizers::Grape::Endpoint < ::Skylight::Normalizers::Normalizer + private + + # source://skylight//lib/skylight/normalizers/grape/endpoint.rb#11 + def get_method(endpoint); end + + # source://skylight//lib/skylight/normalizers/grape/endpoint.rb#21 + def get_namespace(endpoint); end + + # source://skylight//lib/skylight/normalizers/grape/endpoint.rb#17 + def get_path(endpoint); end +end + +# source://skylight//lib/skylight/normalizers/grape/endpoint_render.rb#4 +class Skylight::Normalizers::Grape::EndpointRender < ::Skylight::Normalizers::Grape::Endpoint + # source://skylight//lib/skylight/normalizers/grape/endpoint_render.rb#9 + def normalize(_trace, _name, payload); end +end + +# source://skylight//lib/skylight/normalizers/grape/endpoint_render.rb#7 +Skylight::Normalizers::Grape::EndpointRender::CAT = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/grape/endpoint_run.rb#4 +class Skylight::Normalizers::Grape::EndpointRun < ::Skylight::Normalizers::Grape::Endpoint + # source://skylight//lib/skylight/normalizers/grape/endpoint_run.rb#7 + def normalize(trace, _name, payload); end + + private + + # source://skylight//lib/skylight/normalizers/grape/endpoint_run.rb#30 + def base_app_name(endpoint); end + + # source://skylight//lib/skylight/normalizers/grape/endpoint_run.rb#17 + def get_endpoint_name(endpoint); end +end + +# source://skylight//lib/skylight/normalizers/grape/endpoint_run_filters.rb#4 +class Skylight::Normalizers::Grape::EndpointRunFilters < ::Skylight::Normalizers::Grape::Endpoint + # source://skylight//lib/skylight/normalizers/grape/endpoint_run_filters.rb#9 + def normalize(_trace, _name, payload); end +end + +# source://skylight//lib/skylight/normalizers/grape/endpoint_run_filters.rb#7 +Skylight::Normalizers::Grape::EndpointRunFilters::CAT = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/grape/format_response.rb#4 +class Skylight::Normalizers::Grape::FormatResponse < ::Skylight::Normalizers::Normalizer + # source://skylight//lib/skylight/normalizers/grape/format_response.rb#9 + def normalize(_trace, _name, payload); end +end + +# source://skylight//lib/skylight/normalizers/grape/format_response.rb#7 +Skylight::Normalizers::Grape::FormatResponse::CAT = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/graphql/base.rb#5 +module Skylight::Normalizers::GraphQL; end + +# source://skylight//lib/skylight/normalizers/graphql/base.rb#96 +class Skylight::Normalizers::GraphQL::AnalyzeQuery < ::Skylight::Normalizers::GraphQL::Base; end + +# source://skylight//lib/skylight/normalizers/graphql/base.rb#28 +Skylight::Normalizers::GraphQL::AnalyzeQuery::KEY = T.let(T.unsafe(nil), String) + +# Some AS::N events in GraphQL are not super useful. +# We are purposefully ignoring the following keys (and you probably shouldn't add them): +# - "graphql.analyze_multiplex" +# - "graphql.execute_field" (very frequently called) +# - "graphql.execute_field_lazy" +# +# source://skylight//lib/skylight/normalizers/graphql/base.rb#12 +class Skylight::Normalizers::GraphQL::Base < ::Skylight::Normalizers::Normalizer + # source://skylight//lib/skylight/normalizers/graphql/base.rb#35 + def normalize(_trace, _name, _payload); end + + private + + # source://skylight//lib/skylight/normalizers/graphql/base.rb#45 + def extract_query_name(query); end + + # source://skylight//lib/skylight/normalizers/graphql/base.rb#41 + def key; end + + class << self + # @private + # + # source://skylight//lib/skylight/normalizers/graphql/base.rb#26 + def inherited(klass); end + + # source://skylight//lib/skylight/normalizers/graphql/base.rb#31 + def key; end + + # source://skylight//lib/skylight/normalizers/graphql/base.rb#21 + def register_graphql; end + end +end + +# source://skylight//lib/skylight/normalizers/graphql/base.rb#13 +Skylight::Normalizers::GraphQL::Base::ANONYMOUS = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/graphql/base.rb#14 +Skylight::Normalizers::GraphQL::Base::CAT = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/graphql/base.rb#62 +class Skylight::Normalizers::GraphQL::ExecuteMultiplex < ::Skylight::Normalizers::GraphQL::Base + # source://skylight//lib/skylight/normalizers/graphql/base.rb#65 + def normalize_after(trace, _span, _name, payload); end +end + +# source://skylight//lib/skylight/normalizers/graphql/base.rb#28 +Skylight::Normalizers::GraphQL::ExecuteMultiplex::KEY = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/graphql/base.rb#100 +class Skylight::Normalizers::GraphQL::ExecuteQuery < ::Skylight::Normalizers::GraphQL::Base + # source://skylight//lib/skylight/normalizers/graphql/base.rb#103 + def normalize(trace, _name, payload); end +end + +# source://skylight//lib/skylight/normalizers/graphql/base.rb#28 +Skylight::Normalizers::GraphQL::ExecuteQuery::KEY = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/graphql/base.rb#116 +class Skylight::Normalizers::GraphQL::ExecuteQueryLazy < ::Skylight::Normalizers::GraphQL::ExecuteQuery + # source://skylight//lib/skylight/normalizers/graphql/base.rb#119 + def normalize(trace, _name, payload); end +end + +# source://skylight//lib/skylight/normalizers/graphql/base.rb#28 +Skylight::Normalizers::GraphQL::ExecuteQueryLazy::KEY = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/graphql/base.rb#50 +class Skylight::Normalizers::GraphQL::Lex < ::Skylight::Normalizers::GraphQL::Base; end + +# source://skylight//lib/skylight/normalizers/graphql/base.rb#28 +Skylight::Normalizers::GraphQL::Lex::KEY = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/graphql/base.rb#54 +class Skylight::Normalizers::GraphQL::Parse < ::Skylight::Normalizers::GraphQL::Base; end + +# source://skylight//lib/skylight/normalizers/graphql/base.rb#28 +Skylight::Normalizers::GraphQL::Parse::KEY = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/graphql/base.rb#58 +class Skylight::Normalizers::GraphQL::Validate < ::Skylight::Normalizers::GraphQL::Base; end + +# source://skylight//lib/skylight/normalizers/graphql/base.rb#28 +Skylight::Normalizers::GraphQL::Validate::KEY = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/graphiti/resolve.rb#5 +module Skylight::Normalizers::Graphiti; end + +# source://skylight//lib/skylight/normalizers/graphiti/render.rb#6 +class Skylight::Normalizers::Graphiti::Render < ::Skylight::Normalizers::Normalizer + # source://skylight//lib/skylight/normalizers/graphiti/render.rb#12 + def normalize(_trace, _name, payload); end +end + +# source://skylight//lib/skylight/normalizers/graphiti/render.rb#10 +Skylight::Normalizers::Graphiti::Render::ANONYMOUS = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/graphiti/render.rb#9 +Skylight::Normalizers::Graphiti::Render::CAT = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/graphiti/resolve.rb#6 +class Skylight::Normalizers::Graphiti::Resolve < ::Skylight::Normalizers::Normalizer + # source://skylight//lib/skylight/normalizers/graphiti/resolve.rb#14 + def normalize(_trace, _name, payload); end +end + +# source://skylight//lib/skylight/normalizers/graphiti/resolve.rb#12 +Skylight::Normalizers::Graphiti::Resolve::ANONYMOUS_ADAPTER = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/graphiti/resolve.rb#11 +Skylight::Normalizers::Graphiti::Resolve::ANONYMOUS_RESOURCE = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/graphiti/resolve.rb#9 +Skylight::Normalizers::Graphiti::Resolve::CAT = T.let(T.unsafe(nil), String) + +# @api private +# +# source://skylight//lib/skylight/normalizers.rb#48 +class Skylight::Normalizers::Normalizer + include ::Skylight::Util::Logging + + # @api private + # @return [Normalizer] a new instance of Normalizer + # + # source://skylight//lib/skylight/normalizers.rb#57 + def initialize(config); end + + # @api private + # + # source://skylight//lib/skylight/normalizers.rb#53 + def config; end + + # @api private + # + # source://skylight//lib/skylight/normalizers.rb#62 + def normalize(_trace, _name, _payload); end + + # @api private + # + # source://skylight//lib/skylight/normalizers.rb#78 + def normalize_after(trace, span, name, payload); end + + # @api private + # + # source://skylight//lib/skylight/normalizers.rb#66 + def normalize_with_meta(trace, name, payload); end + + private + + # @api private + # + # source://skylight//lib/skylight/normalizers.rb#83 + def process_meta(trace, _name, payload, meta, cache_key: T.unsafe(nil)); end + + # @api private + # + # source://skylight//lib/skylight/normalizers.rb#92 + def process_meta_options(_payload); end + + class << self + # @api private + # + # source://skylight//lib/skylight/normalizers.rb#49 + def register(name, opts = T.unsafe(nil)); end + end +end + +# Base Normalizer for Rails rendering +# +# source://skylight//lib/skylight/normalizers/render.rb#4 +class Skylight::Normalizers::RenderNormalizer < ::Skylight::Normalizers::Normalizer + include ::Skylight::Util::AllocationFree + + # Generic normalizer for renders + # + # @option payload + # @param category [String] + # @param payload [Hash] + # @return [Array] + # + # source://skylight//lib/skylight/normalizers/render.rb#24 + def normalize_render(category, payload); end + + # source://skylight//lib/skylight/normalizers/render.rb#32 + def relative_path(path); end + + # source://skylight//lib/skylight/normalizers/render.rb#7 + def setup; end + + private + + # @return [Boolean] + # + # source://skylight//lib/skylight/normalizers/render.rb#73 + def absolute_path?(path); end + + # @return [Boolean] + # + # source://skylight//lib/skylight/normalizers/render.rb#53 + def relative_path?(path); end +end + +# source://skylight//lib/skylight/normalizers/render.rb#57 +Skylight::Normalizers::RenderNormalizer::SEPARATOR_BYTE = T.let(T.unsafe(nil), Integer) + +# Normalizer for SQL requests +# +# source://skylight//lib/skylight/normalizers/sql.rb#8 +class Skylight::Normalizers::SQL < ::Skylight::Normalizers::Normalizer + # @option payload + # @option payload + # @param trace [Skylight::Messages::Trace::Builder] ignored, only present to match API + # @param name [String] ignored, only present to match API + # @param payload [Hash] + # @return [Array] + # + # source://skylight//lib/skylight/normalizers/sql.rb#17 + def normalize(_trace, _name, payload); end +end + +# source://skylight//lib/skylight/normalizers/sql.rb#9 +Skylight::Normalizers::SQL::CAT = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/normalizers/sequel/sql.rb#5 +module Skylight::Normalizers::Sequel; end + +# Normalizer for SQL requests +# +# source://skylight//lib/skylight/normalizers/sequel/sql.rb#7 +class Skylight::Normalizers::Sequel::SQL < ::Skylight::Normalizers::SQL; end + +# source://skylight//lib/skylight/normalizers/shrine.rb#3 +class Skylight::Normalizers::Shrine < ::Skylight::Normalizers::Normalizer + # source://skylight//lib/skylight/normalizers/shrine.rb#23 + def normalize(_trace, name, _payload); end +end + +# source://skylight//lib/skylight/normalizers/shrine.rb#4 +Skylight::Normalizers::Shrine::TITLES = T.let(T.unsafe(nil), Hash) + +# @api private +# +# source://skylight//lib/skylight/probes.rb#6 +module Skylight::Probes + class << self + # @api private + # + # source://skylight//lib/skylight/probes.rb#80 + def add_path(path); end + + # @api private + # + # source://skylight//lib/skylight/probes.rb#91 + def available; end + + # @api private + # @return [Boolean] + # + # source://skylight//lib/skylight/probes.rb#61 + def constant_available?(const_name); end + + # @api private + # + # source://skylight//lib/skylight/probes.rb#148 + def each_by_require_path(require_path); end + + # @api private + # + # source://skylight//lib/skylight/probes.rb#65 + def install!; end + + # @api private + # + # source://skylight//lib/skylight/probes.rb#73 + def install_probe(registration); end + + # @api private + # + # source://skylight//lib/skylight/probes.rb#110 + def installed; end + + # @api private + # @raise [ArgumentError] + # + # source://skylight//lib/skylight/probes.rb#95 + def probe(*probes); end + + # @api private + # + # source://skylight//lib/skylight/probes.rb#114 + def register(name, *args); end + + # @api private + # + # source://skylight//lib/skylight/probes.rb#134 + def register_require_hook(registration); end + + # @api private + # + # source://skylight//lib/skylight/probes.rb#102 + def registered; end + + # @api private + # + # source://skylight//lib/skylight/probes.rb#122 + def require_hook(require_path); end + + # @api private + # + # source://skylight//lib/skylight/probes.rb#106 + def require_hooks; end + + # @api private + # + # source://skylight//lib/skylight/probes.rb#141 + def unregister_require_hook(registration); end + end +end + +# @api private +# +# source://skylight//lib/skylight/probes.rb#7 +class Skylight::Probes::ProbeRegistration + # @api private + # @return [ProbeRegistration] a new instance of ProbeRegistration + # + # source://skylight//lib/skylight/probes.rb#10 + def initialize(name, const_name, require_paths, probe); end + + # @api private + # + # source://skylight//lib/skylight/probes.rb#8 + def const_name; end + + # @api private + # @return [Boolean] + # + # source://skylight//lib/skylight/probes.rb#23 + def constant_available?; end + + # @api private + # + # source://skylight//lib/skylight/probes.rb#17 + def install; end + + # @api private + # + # source://skylight//lib/skylight/probes.rb#8 + def name; end + + # @api private + # + # source://skylight//lib/skylight/probes.rb#8 + def probe; end + + # @api private + # + # source://skylight//lib/skylight/probes.rb#8 + def require_paths; end + + private + + # @api private + # + # source://skylight//lib/skylight/probes.rb#29 + def log_install_exception(err); end +end + +# @api private +# +# source://skylight//lib/skylight/railtie.rb#6 +class Skylight::Railtie < ::Rails::Railtie + private + + # @api private + # @return [Boolean] + # + # source://skylight//lib/skylight/railtie.rb#152 + def activate?(sk_config); end + + # @api private + # + # source://skylight//lib/skylight/railtie.rb#144 + def config_path(app); end + + # @api private + # + # source://skylight//lib/skylight/railtie.rb#118 + def configure_logging(config, app); end + + # @api private + # + # source://skylight//lib/skylight/railtie.rb#55 + def development_warning; end + + # @api private + # + # source://skylight//lib/skylight/railtie.rb#148 + def environments; end + + # @api private + # + # source://skylight//lib/skylight/railtie.rb#92 + def existent_paths(paths); end + + # @api private + # + # source://skylight//lib/skylight/railtie.rb#176 + def insert_middleware(app, config); end + + # @api private + # + # source://skylight//lib/skylight/railtie.rb#163 + def load_probes; end + + # @api private + # + # source://skylight//lib/skylight/railtie.rb#96 + def load_skylight_config(app); end + + # @api private + # + # source://skylight//lib/skylight/railtie.rb#51 + def log_prefix; end + + # @api private + # + # source://skylight//lib/skylight/railtie.rb#88 + def log_warning(config, msg); end + + # @api private + # + # source://skylight//lib/skylight/railtie.rb#168 + def middleware_position; end + + # @api private + # + # source://skylight//lib/skylight/railtie.rb#60 + def run_initializer(app); end + + # @api private + # + # source://skylight//lib/skylight/railtie.rb#187 + def set_middleware_position(app, config); end + + # We must have an opt-in signal + # + # @api private + # + # source://skylight//lib/skylight/railtie.rb#40 + def show_worker_activation_warning(sk_config); end + + # @api private + # + # source://skylight//lib/skylight/railtie.rb#200 + def sk_rails_config(target = T.unsafe(nil)); end +end + +# source://skylight//lib/skylight/deprecation.rb#6 +Skylight::SKYLIGHT_GEM_ROOT = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/sidekiq.rb#2 +module Skylight::Sidekiq + class << self + # source://skylight//lib/skylight/sidekiq.rb#3 + def add_middleware; end + end +end + +# source://skylight//lib/skylight/sidekiq.rb#19 +class Skylight::Sidekiq::ServerMiddleware + include ::Skylight::Util::Logging + + # source://skylight//lib/skylight/sidekiq.rb#22 + def call(worker, job, queue); end +end + +# source://skylight//lib/skylight/errors.rb#15 +class Skylight::SqlLexError < ::Skylight::NativeError + class << self + # source://skylight//lib/skylight/errors.rb#16 + def code; end + + # source://skylight//lib/skylight/errors.rb#17 + def message; end + end +end + +# @api private +# +# source://skylight//lib/skylight/subscriber.rb#3 +class Skylight::Subscriber + include ::Skylight::Util::Logging + + # @api private + # @return [Subscriber] a new instance of Subscriber + # + # source://skylight//lib/skylight/subscriber.rb#8 + def initialize(config, instrumenter); end + + # @api private + # + # source://skylight//lib/skylight/subscriber.rb#6 + def config; end + + # @api private + # + # source://skylight//lib/skylight/subscriber.rb#60 + def finish(name, _id, payload); end + + # @api private + # + # source://skylight//lib/skylight/subscriber.rb#6 + def normalizers; end + + # @api private + # + # source://skylight//lib/skylight/subscriber.rb#83 + def publish(name, *args); end + + # @api private + # + # source://skylight//lib/skylight/subscriber.rb#87 + def publish_event(event); end + + # @api private + # + # source://skylight//lib/skylight/subscriber.rb#15 + def register!; end + + # @api private + # + # source://skylight//lib/skylight/subscriber.rb#53 + def start(name, _id, payload); end + + # @api private + # + # source://skylight//lib/skylight/subscriber.rb#20 + def unregister!; end + + # @api private + # + # source://skylight//lib/skylight/subscriber.rb#43 + def with_trace(trace, &block); end + + private + + # @api private + # + # source://skylight//lib/skylight/subscriber.rb#105 + def _start(trace, name, payload); end + + # @api private + # + # source://skylight//lib/skylight/subscriber.rb#93 + def current_trace; end + + # @api private + # + # source://skylight//lib/skylight/subscriber.rb#97 + def normalize(*args); end + + # @api private + # + # source://skylight//lib/skylight/subscriber.rb#101 + def normalize_after(*args); end +end + +# @api private +# +# source://skylight//lib/skylight/subscriber.rb#41 +Skylight::Subscriber::EXCEPTION_IMMEDIATE = T.let(T.unsafe(nil), Hash) + +# cargo-culted from Rails's ConnectionAdapter +# +# @api private +# +# source://skylight//lib/skylight/subscriber.rb#40 +Skylight::Subscriber::EXCEPTION_NEVER = T.let(T.unsafe(nil), Hash) + +# ===== ActiveSupport::Notifications API +# +# @api private +# +# source://skylight//lib/skylight/subscriber.rb#30 +class Skylight::Subscriber::Notification + # @api private + # @return [Notification] a new instance of Notification + # + # source://skylight//lib/skylight/subscriber.rb#33 + def initialize(name, span); end + + # @api private + # + # source://skylight//lib/skylight/subscriber.rb#31 + def name; end + + # @api private + # + # source://skylight//lib/skylight/subscriber.rb#31 + def span; end +end + +# @api private +# +# source://skylight//lib/skylight.rb#40 +Skylight::TIERS = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://skylight//lib/skylight.rb#43 +Skylight::TIER_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://skylight//lib/skylight/trace.rb#5 +class Skylight::Trace + include ::Skylight::Util::Logging + + # @raise [ArgumentError] + # @return [Trace] a new instance of Trace + # + # source://skylight//lib/skylight/trace.rb#32 + def initialize(instrumenter, cat, title, desc, meta, component: T.unsafe(nil)); end + + # source://skylight//lib/skylight/trace.rb#174 + def broken!; end + + # @return [Boolean] + # + # source://skylight//lib/skylight/trace.rb#108 + def broken?; end + + # Returns the value of attribute component. + # + # source://skylight//lib/skylight/trace.rb#13 + def component; end + + # Returns the value of attribute compound_response_error_status. + # + # source://skylight//lib/skylight/trace.rb#90 + def compound_response_error_status; end + + # Sets the attribute compound_response_error_status + # + # @param value the value to set the attribute compound_response_error_status to. + # + # source://skylight//lib/skylight/trace.rb#90 + def compound_response_error_status=(_arg0); end + + # source://skylight//lib/skylight/trace.rb#92 + def config; end + + # source://skylight//lib/skylight/trace.rb#140 + def done(span, meta = T.unsafe(nil)); end + + # Returns the value of attribute endpoint. + # + # source://skylight//lib/skylight/trace.rb#13 + def endpoint; end + + # source://skylight//lib/skylight/trace.rb#79 + def endpoint=(value); end + + # @return [Boolean] + # + # source://skylight//lib/skylight/trace.rb#104 + def endpoint_assignment_muted?; end + + # source://skylight//lib/skylight/trace.rb#163 + def inspect; end + + # source://skylight//lib/skylight/trace.rb#121 + def instrument(cat, title = T.unsafe(nil), desc = T.unsafe(nil), meta = T.unsafe(nil)); end + + # Returns the value of attribute instrumenter. + # + # source://skylight//lib/skylight/trace.rb#13 + def instrumenter; end + + # source://skylight//lib/skylight/trace.rb#75 + def log_context; end + + # source://skylight//lib/skylight/trace.rb#112 + def maybe_broken(err); end + + # Returns the value of attribute meta. + # + # source://skylight//lib/skylight/trace.rb#13 + def meta; end + + # source://skylight//lib/skylight/trace.rb#96 + def muted; end + + def native_get_component; end + def native_get_endpoint; end + def native_get_started_at; end + def native_get_uuid; end + def native_set_component(_arg0); end + def native_set_endpoint(_arg0); end + def native_set_exception(_arg0); end + def native_span_get_category(_arg0); end + def native_span_get_title(_arg0); end + def native_span_set_description(_arg0, _arg1); end + def native_span_set_exception(_arg0, _arg1, _arg2); end + def native_span_set_meta(_arg0, _arg1); end + def native_span_set_title(_arg0, _arg1); end + def native_span_started(_arg0); end + def native_start_span(_arg0, _arg1); end + def native_stop_span(_arg0, _arg1); end + def native_use_pruning; end + + # Returns the value of attribute notifications. + # + # source://skylight//lib/skylight/trace.rb#13 + def notifications; end + + # source://skylight//lib/skylight/trace.rb#167 + def release; end + + # Returns the value of attribute segment. + # + # source://skylight//lib/skylight/trace.rb#13 + def segment; end + + # source://skylight//lib/skylight/trace.rb#85 + def segment=(value); end + + # source://skylight//lib/skylight/trace.rb#195 + def submit; end + + # source://skylight//lib/skylight/trace.rb#67 + def too_many_spans!; end + + # @return [Boolean] + # + # source://skylight//lib/skylight/trace.rb#71 + def too_many_spans?; end + + # source://skylight//lib/skylight/trace.rb#179 + def traced; end + + # @return [Boolean] + # + # source://skylight//lib/skylight/trace.rb#100 + def tracing_muted?; end + + # source://skylight//lib/skylight/trace.rb#58 + def uuid; end + + # source://skylight//lib/skylight/trace.rb#62 + def uuid=(value); end + + private + + # source://skylight//lib/skylight/trace.rb#357 + def allowed_meta_keys; end + + # source://skylight//lib/skylight/trace.rb#334 + def component=(component); end + + # Middleware spans that were interrupted by a throw/catch should be cached here. + # keys: span ids + # values: nsec timestamp at which the span was cached here. + # + # source://skylight//lib/skylight/trace.rb#263 + def deferred_spans; end + + # source://skylight//lib/skylight/trace.rb#319 + def gc_time; end + + # Originally extracted from `stop`. + # If we attempt to close spans out of order, and it appears to be a middleware issue, + # disable the middleware probe and mark trace as broken. + # + # source://skylight//lib/skylight/trace.rb#295 + def handle_unexpected_stop(expected, span); end + + # source://skylight//lib/skylight/trace.rb#361 + def maybe_warn(context, msg); end + + # source://skylight//lib/skylight/trace.rb#256 + def mute_child_instrumentation(span); end + + # source://skylight//lib/skylight/trace.rb#283 + def normalized_stop(span, time); end + + # source://skylight//lib/skylight/trace.rb#342 + def preprocess_meta(meta); end + + # source://skylight//lib/skylight/trace.rb#330 + def resolve_component(component); end + + # source://skylight//lib/skylight/trace.rb#234 + def start(time, cat, title, desc, meta, opts = T.unsafe(nil)); end + + # source://skylight//lib/skylight/trace.rb#267 + def stop(span, time); end + + # source://skylight//lib/skylight/trace.rb#223 + def track_gc(time, now); end + + # @return [Boolean] + # + # source://skylight//lib/skylight/trace.rb#326 + def use_pruning?; end + + # source://skylight//lib/skylight/trace.rb#347 + def validate_meta(meta); end + + # @return [Boolean] + # + # source://skylight//lib/skylight/trace.rb#369 + def warnings_silenced?(context); end + + class << self + def native_new(_arg0, _arg1, _arg2, _arg3); end + + # source://skylight//lib/skylight/trace.rb#15 + def new(instrumenter, endpoint, start, cat, title = T.unsafe(nil), desc = T.unsafe(nil), meta: T.unsafe(nil), segment: T.unsafe(nil), component: T.unsafe(nil)); end + + # TODO: Move this into native + # + # source://skylight//lib/skylight/trace.rb#26 + def normalize_time(time); end + end +end + +# source://skylight//lib/skylight/trace.rb#6 +Skylight::Trace::GC_CAT = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/trace.rb#9 +Skylight::Trace::META_KEYS = T.let(T.unsafe(nil), Array) + +# source://skylight//lib/skylight/trace.rb#7 +Skylight::Trace::SYNTHETIC = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/user_config.rb#5 +class Skylight::UserConfig + # @return [UserConfig] a new instance of UserConfig + # + # source://skylight//lib/skylight/user_config.rb#8 + def initialize(config); end + + # Returns the value of attribute disable_dev_warning. + # + # source://skylight//lib/skylight/user_config.rb#6 + def disable_dev_warning; end + + # Sets the attribute disable_dev_warning + # + # @param value the value to set the attribute disable_dev_warning to. + # + # source://skylight//lib/skylight/user_config.rb#6 + def disable_dev_warning=(_arg0); end + + # @return [Boolean] + # + # source://skylight//lib/skylight/user_config.rb#35 + def disable_dev_warning?; end + + # Returns the value of attribute disable_env_warning. + # + # source://skylight//lib/skylight/user_config.rb#6 + def disable_env_warning; end + + # Sets the attribute disable_env_warning + # + # @param value the value to set the attribute disable_env_warning to. + # + # source://skylight//lib/skylight/user_config.rb#6 + def disable_env_warning=(_arg0); end + + # @return [Boolean] + # + # source://skylight//lib/skylight/user_config.rb#39 + def disable_env_warning?; end + + # source://skylight//lib/skylight/user_config.rb#14 + def file_path; end + + # source://skylight//lib/skylight/user_config.rb#43 + def reload; end + + # source://skylight//lib/skylight/user_config.rb#51 + def save; end + + # source://skylight//lib/skylight/user_config.rb#56 + def to_hash; end +end + +# @api private +# +# source://skylight//lib/skylight/util/logging.rb#4 +module Skylight::Util; end + +# Log both to the specified logger and STDOUT +# +# source://skylight//lib/skylight/util/logging.rb#6 +class Skylight::Util::AlertLogger + # @return [AlertLogger] a new instance of AlertLogger + # + # source://skylight//lib/skylight/util/logging.rb#7 + def initialize(logger); end + + # source://skylight//lib/skylight/util/logging.rb#20 + def close; end + + # source://skylight//lib/skylight/util/logging.rb#11 + def write(*args); end +end + +# Helpers to reduce memory allocation +# +# source://skylight//lib/skylight/util/allocation_free.rb#4 +module Skylight::Util::AllocationFree + # Find an item in an array without allocation. + # + # return the found item or nil, if nothing found + # + # @param array [Array] the array to search + # @yield a block called against each item until a match is found + # @yieldparam item an item from the array + # @yieldreturn [Boolean] whether `item` matches the criteria + # + # source://skylight//lib/skylight/util/allocation_free.rb#12 + def array_find(array); end +end + +# A more precise clock +# +# source://skylight//lib/skylight/util/clock.rb#4 +class Skylight::Util::Clock + # TODO: rename to secs + # + # source://skylight//lib/skylight/util/clock.rb#22 + def absolute_secs; end + + # TODO: remove + # + # source://skylight//lib/skylight/util/clock.rb#27 + def nanos; end + + def native_hrtime; end + + # TODO: remove + # + # source://skylight//lib/skylight/util/clock.rb#32 + def secs; end + + # source://skylight//lib/skylight/util/clock.rb#7 + def tick; end + + class << self + # source://skylight//lib/skylight/util/clock.rb#37 + def absolute_secs; end + + # source://skylight//lib/skylight/util/clock.rb#49 + def default; end + + # Sets the attribute default + # + # @param value the value to set the attribute default to. + # + # source://skylight//lib/skylight/util/clock.rb#53 + def default=(_arg0); end + + # source://skylight//lib/skylight/util/clock.rb#41 + def nanos; end + + # source://skylight//lib/skylight/util/clock.rb#45 + def secs; end + + # source://skylight//lib/skylight/util/clock.rb#5 + def use_native!; end + end +end + +# source://skylight//lib/skylight/util/component.rb#7 +class Skylight::Util::Component + # @raise [ArgumentError] + # @return [Component] a new instance of Component + # + # source://skylight//lib/skylight/util/component.rb#15 + def initialize(environment, name, force_worker: T.unsafe(nil)); end + + # keys here should match those from the main config + # + # source://skylight//lib/skylight/util/component.rb#42 + def as_json(*_arg0); end + + # Returns the value of attribute environment. + # + # source://skylight//lib/skylight/util/component.rb#8 + def environment; end + + # Sets the attribute environment + # + # @param value the value to set the attribute environment to. + # + # source://skylight//lib/skylight/util/component.rb#8 + def environment=(_arg0); end + + # Returns the value of attribute name. + # + # source://skylight//lib/skylight/util/component.rb#8 + def name; end + + # Sets the attribute name + # + # @param value the value to set the attribute name to. + # + # source://skylight//lib/skylight/util/component.rb#8 + def name=(_arg0); end + + # source://skylight//lib/skylight/util/component.rb#29 + def to_encoded_s; end + + # source://skylight//lib/skylight/util/component.rb#25 + def to_s; end + + # @return [Boolean] + # + # source://skylight//lib/skylight/util/component.rb#33 + def web?; end + + # @return [Boolean] + # + # source://skylight//lib/skylight/util/component.rb#37 + def worker?; end + + private + + # source://skylight//lib/skylight/util/component.rb#52 + def argv; end + + # source://skylight//lib/skylight/util/component.rb#48 + def program_name; end + + # source://skylight//lib/skylight/util/component.rb#56 + def resolve_name(given_name, force_worker); end + + # @raise [ArgumentError] + # + # source://skylight//lib/skylight/util/component.rb#64 + def validate_string!(string, kind); end +end + +# source://skylight//lib/skylight/util/component.rb#13 +Skylight::Util::Component::DEFAULT_ENVIRONMENT = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/util/component.rb#11 +Skylight::Util::Component::DEFAULT_NAME = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/util/component.rb#10 +Skylight::Util::Component::NAME_FORMAT = T.let(T.unsafe(nil), Regexp) + +# source://skylight//lib/skylight/util/component.rb#12 +Skylight::Util::Component::WORKER_NAME = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/util/deploy.rb#6 +module Skylight::Util::Deploy + class << self + # source://skylight//lib/skylight/util/deploy.rb#7 + def build(config); end + end +end + +# source://skylight//lib/skylight/util/deploy.rb#114 +Skylight::Util::Deploy::DEPLOY_TYPES = T.let(T.unsafe(nil), Array) + +# source://skylight//lib/skylight/util/deploy.rb#46 +class Skylight::Util::Deploy::DefaultDeploy < ::Skylight::Util::Deploy::EmptyDeploy + include ::Skylight::Util::Logging + + # @return [DefaultDeploy] a new instance of DefaultDeploy + # + # source://skylight//lib/skylight/util/deploy.rb#49 + def initialize(*_arg0); end + + # source://skylight//lib/skylight/util/deploy.rb#62 + def description; end + + # source://skylight//lib/skylight/util/deploy.rb#58 + def git_sha; end + + # source://skylight//lib/skylight/util/deploy.rb#54 + def id; end +end + +# source://skylight//lib/skylight/util/deploy.rb#15 +class Skylight::Util::Deploy::EmptyDeploy + # @return [EmptyDeploy] a new instance of EmptyDeploy + # + # source://skylight//lib/skylight/util/deploy.rb#18 + def initialize(config); end + + # Returns the value of attribute config. + # + # source://skylight//lib/skylight/util/deploy.rb#16 + def config; end + + # source://skylight//lib/skylight/util/deploy.rb#31 + def description; end + + # source://skylight//lib/skylight/util/deploy.rb#27 + def git_sha; end + + # source://skylight//lib/skylight/util/deploy.rb#23 + def id; end + + # Returns the value of attribute timestamp. + # + # source://skylight//lib/skylight/util/deploy.rb#16 + def timestamp; end + + # source://skylight//lib/skylight/util/deploy.rb#35 + def to_query_hash; end +end + +# source://skylight//lib/skylight/util/deploy.rb#96 +class Skylight::Util::Deploy::GitDeploy < ::Skylight::Util::Deploy::EmptyDeploy + # @return [GitDeploy] a new instance of GitDeploy + # + # source://skylight//lib/skylight/util/deploy.rb#99 + def initialize(*_arg0); end + + # Returns the value of attribute description. + # + # source://skylight//lib/skylight/util/deploy.rb#97 + def description; end + + # Returns the value of attribute git_sha. + # + # source://skylight//lib/skylight/util/deploy.rb#97 + def git_sha; end + + private + + # source://skylight//lib/skylight/util/deploy.rb#106 + def get_info; end +end + +# source://skylight//lib/skylight/util/deploy.rb#67 +class Skylight::Util::Deploy::HerokuDeploy < ::Skylight::Util::Deploy::EmptyDeploy + # @return [HerokuDeploy] a new instance of HerokuDeploy + # + # source://skylight//lib/skylight/util/deploy.rb#68 + def initialize(*_arg0); end + + # source://skylight//lib/skylight/util/deploy.rb#81 + def description; end + + # source://skylight//lib/skylight/util/deploy.rb#77 + def git_sha; end + + # source://skylight//lib/skylight/util/deploy.rb#73 + def id; end + + private + + # source://skylight//lib/skylight/util/deploy.rb#87 + def get_info; end +end + +# Provides Gzip compressing support +# +# source://skylight//lib/skylight/util/gzip.rb#6 +module Skylight::Util::Gzip + class << self + # Compress a string with Gzip + # + # @param str [String] uncompressed string + # @return [String] compressed string + # + # source://skylight//lib/skylight/util/gzip.rb#11 + def compress(str); end + end +end + +# source://skylight//lib/skylight/util/http.rb#11 +class Skylight::Util::HTTP + include ::Skylight::Util::Logging + + # @return [HTTP] a new instance of HTTP + # + # source://skylight//lib/skylight/util/http.rb#41 + def initialize(config, service = T.unsafe(nil), opts = T.unsafe(nil)); end + + # Returns the value of attribute authentication. + # + # source://skylight//lib/skylight/util/http.rb#24 + def authentication; end + + # Sets the attribute authentication + # + # @param value the value to set the attribute authentication to. + # + # source://skylight//lib/skylight/util/http.rb#24 + def authentication=(_arg0); end + + # Returns the value of attribute config. + # + # source://skylight//lib/skylight/util/http.rb#25 + def config; end + + # source://skylight//lib/skylight/util/http.rb#68 + def get(endpoint, hdrs = T.unsafe(nil)); end + + # Returns the value of attribute host. + # + # source://skylight//lib/skylight/util/http.rb#25 + def host; end + + # Returns the value of attribute port. + # + # source://skylight//lib/skylight/util/http.rb#25 + def port; end + + # source://skylight//lib/skylight/util/http.rb#73 + def post(endpoint, body, hdrs = T.unsafe(nil)); end + + private + + # source://skylight//lib/skylight/util/http.rb#89 + def build_request(type, endpoint, hdrs, length = T.unsafe(nil)); end + + # source://skylight//lib/skylight/util/http.rb#103 + def do_request(http, req); end + + # source://skylight//lib/skylight/util/http.rb#122 + def execute(req, body = T.unsafe(nil)); end + + # source://skylight//lib/skylight/util/http.rb#85 + def get_timeout(type, config, service, opts); end +end + +# source://skylight//lib/skylight/util/http.rb#15 +Skylight::Util::HTTP::ACCEPT = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/util/http.rb#17 +Skylight::Util::HTTP::APPLICATION_JSON = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/util/http.rb#18 +Skylight::Util::HTTP::AUTHORIZATION = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/util/http.rb#12 +Skylight::Util::HTTP::CONTENT_ENCODING = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/util/http.rb#13 +Skylight::Util::HTTP::CONTENT_LENGTH = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/util/http.rb#14 +Skylight::Util::HTTP::CONTENT_TYPE = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/util/http.rb#19 +Skylight::Util::HTTP::DEFLATE = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/util/http.rb#207 +class Skylight::Util::HTTP::ErrorResponse < ::Struct + # Returns the value of attribute exception + # + # @return [Object] the current value of exception + def exception; end + + # Sets the attribute exception + # + # @param value [Object] the value to set the attribute exception to. + # @return [Object] the newly set value + def exception=(_); end + + # Returns the value of attribute request + # + # @return [Object] the current value of request + def request; end + + # Sets the attribute request + # + # @param value [Object] the value to set the attribute request to. + # @return [Object] the newly set value + def request=(_); end + + # source://skylight//lib/skylight/util/http.rb#208 + def status; end + + # @return [Boolean] + # + # source://skylight//lib/skylight/util/http.rb#212 + def success?; end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://skylight//lib/skylight/util/http.rb#20 +Skylight::Util::HTTP::GZIP = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/util/http.rb#27 +Skylight::Util::HTTP::READ_EXCEPTIONS = T.let(T.unsafe(nil), Array) + +# source://skylight//lib/skylight/util/http.rb#38 +class Skylight::Util::HTTP::ReadResponseError < ::StandardError; end + +# source://skylight//lib/skylight/util/http.rb#163 +class Skylight::Util::HTTP::Response + # @return [Response] a new instance of Response + # + # source://skylight//lib/skylight/util/http.rb#166 + def initialize(status, headers, body); end + + # Returns the value of attribute body. + # + # source://skylight//lib/skylight/util/http.rb#164 + def body; end + + # Returns the value of attribute exception. + # + # source://skylight//lib/skylight/util/http.rb#164 + def exception; end + + # source://skylight//lib/skylight/util/http.rb#189 + def get(key); end + + # Returns the value of attribute headers. + # + # source://skylight//lib/skylight/util/http.rb#164 + def headers; end + + # source://skylight//lib/skylight/util/http.rb#197 + def method_missing(name, *args, &blk); end + + # Returns the value of attribute status. + # + # source://skylight//lib/skylight/util/http.rb#164 + def status; end + + # @return [Boolean] + # + # source://skylight//lib/skylight/util/http.rb#181 + def success?; end + + # source://skylight//lib/skylight/util/http.rb#185 + def to_s; end + + private + + # @return [Boolean] + # + # source://skylight//lib/skylight/util/http.rb#193 + def respond_to_missing?(name, include_all = T.unsafe(nil)); end +end + +# source://skylight//lib/skylight/util/http.rb#29 +class Skylight::Util::HTTP::StartError < ::StandardError + # @return [StartError] a new instance of StartError + # + # source://skylight//lib/skylight/util/http.rb#32 + def initialize(error); end + + # Returns the value of attribute original. + # + # source://skylight//lib/skylight/util/http.rb#30 + def original; end +end + +# source://skylight//lib/skylight/util/http.rb#16 +Skylight::Util::HTTP::X_VERSION_HDR = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/util/hostname.rb#6 +module Skylight::Util::Hostname + class << self + # source://skylight//lib/skylight/util/hostname.rb#7 + def default_hostname; end + end +end + +# source://skylight//lib/skylight/util/instrumenter_method.rb#3 +module Skylight::Util::InstrumenterMethod + # source://skylight//lib/skylight/util/instrumenter_method.rb#4 + def instrumenter_method(name, wrapped_block: T.unsafe(nil)); end +end + +# source://skylight//lib/skylight/util/logging.rb#24 +module Skylight::Util::Logging + # source://skylight//lib/skylight/util/logging.rb#97 + def config_for_logging; end + + # @param msg [String] the message to log + # @param args [Array] values for `Kernel#sprintf` on `msg` + # + # source://skylight//lib/skylight/util/logging.rb#62 + def debug(msg, *args); end + + # @param msg [String] the message to log + # @param args [Array] values for `Kernel#sprintf` on `msg` + # + # source://skylight//lib/skylight/util/logging.rb#80 + def error(msg, *args); end + + # Alias for `Kernel#sprintf` + # + # @return [String] + # + # source://skylight//lib/skylight/util/logging.rb#93 + def fmt(*args); end + + # @param msg [String] the message to log + # @param args [Array] values for `Kernel#sprintf` on `msg` + # + # source://skylight//lib/skylight/util/logging.rb#68 + def info(msg, *args); end + + # @param level [String, Symbol] the method on `logger` to use for logging + # @param msg [String] the message to log + # @param args [Array] values for `Kernel#sprintf` on `msg` + # + # source://skylight//lib/skylight/util/logging.rb#108 + def log(level, msg, *args); end + + # source://skylight//lib/skylight/util/logging.rb#25 + def log_context; end + + # source://skylight//lib/skylight/util/logging.rb#62 + def log_debug(msg, *args); end + + # source://skylight//lib/skylight/util/logging.rb#80 + def log_error(msg, *args); end + + # source://skylight//lib/skylight/util/logging.rb#68 + def log_info(msg, *args); end + + # Logs if tracing + # + # See {trace?}. + # + # source://skylight//lib/skylight/util/logging.rb#42 + def log_trace(msg, *args); end + + # source://skylight//lib/skylight/util/logging.rb#74 + def log_warn(msg, *args); end + + # @return [Boolean] + # + # source://skylight//lib/skylight/util/logging.rb#33 + def raise_on_error?; end + + # Evaluates and logs the result of the block if tracing + # + # See {trace?}. + # + # @yield block to be evaluted + # @yieldreturn arguments for {#debug} + # + # source://skylight//lib/skylight/util/logging.rb#54 + def t; end + + # Logs if tracing + # + # See {trace?}. + # + # @param msg [String] the message to log + # @param args [Array] values for `Kernel#sprintf` on `msg` + # + # source://skylight//lib/skylight/util/logging.rb#42 + def trace(msg, *args); end + + # @return [Boolean] + # + # source://skylight//lib/skylight/util/logging.rb#29 + def trace?; end + + # @param msg [String] the message to log + # @param args [Array] values for `Kernel#sprintf` on `msg` + # + # source://skylight//lib/skylight/util/logging.rb#74 + def warn(msg, *args); end +end + +# source://skylight//lib/skylight/util/lru_cache.rb#4 +class Skylight::Util::LruCache + # @return [LruCache] a new instance of LruCache + # + # source://skylight//lib/skylight/util/lru_cache.rb#5 + def initialize(max_size); end + + # source://skylight//lib/skylight/util/lru_cache.rb#31 + def clear; end + + # Individual hash operations here are atomic in MRI. + # + # source://skylight//lib/skylight/util/lru_cache.rb#18 + def fetch(key); end + + # @raise [ArgumentError] + # + # source://skylight//lib/skylight/util/lru_cache.rb#10 + def max_size=(size); end +end + +# source://skylight//lib/skylight/util/platform.rb#6 +module Skylight::Util::Platform + class << self + # source://skylight//lib/skylight/util/platform.rb#69 + def dlext; end + + # source://skylight//lib/skylight/util/platform.rb#65 + def libext; end + + # source://skylight//lib/skylight/util/platform.rb#61 + def tuple; end + end +end + +# Normalize the platform CPU +# +# source://skylight//lib/skylight/util/platform.rb#33 +Skylight::Util::Platform::ARCH = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/util/platform.rb#47 +Skylight::Util::Platform::LIBEXT = T.let(T.unsafe(nil), String) + +# Normalize the platform OS +# +# source://skylight//lib/skylight/util/platform.rb#8 +Skylight::Util::Platform::OS = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/util/platform.rb#59 +Skylight::Util::Platform::TUPLE = T.let(T.unsafe(nil), String) + +# source://skylight//lib/skylight/util/proxy.rb#3 +module Skylight::Util::Proxy + class << self + # source://skylight//lib/skylight/util/proxy.rb#4 + def detect_url(env); end + end +end + +# source://skylight//lib/skylight/util/ssl.rb#5 +class Skylight::Util::SSL + class << self + # @return [Boolean] + # + # source://skylight//lib/skylight/util/ssl.rb#21 + def ca_cert_file?; end + + # source://skylight//lib/skylight/util/ssl.rb#25 + def ca_cert_file_or_default; end + + # source://skylight//lib/skylight/util/ssl.rb#8 + def detect_ca_cert_file!; end + end +end + +# source://skylight//lib/skylight/util/ssl.rb#6 +Skylight::Util::SSL::DEFAULT_CA_FILE = T.let(T.unsafe(nil), String) + +# pre-release versions should be given here as "5.0.0-alpha" +# for compatibility with semver when it is parsed by the rust agent. +# This string will be transformed in the gemspec to "5.0.0.alpha" +# to conform with rubygems. +# +# source://skylight//lib/skylight/version.rb#6 +Skylight::VERSION = T.let(T.unsafe(nil), String) + +# @api private +# +# source://skylight//lib/skylight/vm/gc.rb#3 +module Skylight::VM; end + +# This doesn't quite work as we would like it. I believe that the GC +# statistics includes time that is not stop-the-world, this does not +# necessarily take time away from the application. +# +# require 'java' +# class GC +# def initialize +# @factory = Java::JavaLangManagement::ManagementFactory +# end +# +# def enable +# end +# +# def total_time +# res = 0.0 +# +# @factory.garbage_collector_mx_beans.each do |mx| +# res += (mx.collection_time.to_f / 1_000.0) +# end +# +# res +# end +# end +# +# @api private +# +# source://skylight//lib/skylight/vm/gc.rb#29 +class Skylight::VM::GC + # @api private + # @return [GC] a new instance of GC + # + # source://skylight//lib/skylight/vm/gc.rb#30 + def initialize; end + + # @api private + # + # source://skylight//lib/skylight/vm/gc.rb#34 + def enable; end + + # @api private + # + # source://skylight//lib/skylight/vm/gc.rb#38 + def total_time; end +end diff --git a/sorbet/rbi/gems/spoom@1.2.2.rbi b/sorbet/rbi/gems/spoom@1.2.4.rbi similarity index 73% rename from sorbet/rbi/gems/spoom@1.2.2.rbi rename to sorbet/rbi/gems/spoom@1.2.4.rbi index e1fafe4d9..5ea173ad5 100644 --- a/sorbet/rbi/gems/spoom@1.2.2.rbi +++ b/sorbet/rbi/gems/spoom@1.2.4.rbi @@ -221,22 +221,22 @@ class Spoom::Cli::Main < ::Thor # source://spoom//lib/spoom/cli.rb#61 def __print_version; end - # source://thor/1.2.2/lib/thor.rb#239 + # source://thor/1.3.0/lib/thor.rb#334 def bump(*args); end - # source://thor/1.2.2/lib/thor.rb#239 + # source://thor/1.3.0/lib/thor.rb#334 def config(*args); end - # source://thor/1.2.2/lib/thor.rb#239 + # source://thor/1.3.0/lib/thor.rb#334 def coverage(*args); end # source://spoom//lib/spoom/cli.rb#43 def files; end - # source://thor/1.2.2/lib/thor.rb#239 + # source://thor/1.3.0/lib/thor.rb#334 def lsp(*args); end - # source://thor/1.2.2/lib/thor.rb#239 + # source://thor/1.3.0/lib/thor.rb#334 def tc(*args); end class << self @@ -958,7 +958,7 @@ class Spoom::Coverage::D3::ColorPalette < ::T::Struct prop :strong, ::String class << self - # source://sorbet-runtime/0.5.10908/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11109/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.10908/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11109/lib/types/struct.rb#13 def inherited(s); end end end @@ -1353,16 +1353,44 @@ end # source://spoom//lib/spoom/deadcode/erb.rb#27 module Spoom::Deadcode class << self - # source://spoom//lib/spoom/deadcode.rb#49 - sig { params(index: ::Spoom::Deadcode::Index, erb: ::String, file: ::String).void } - def index_erb(index, erb, file:); end + # source://spoom//lib/spoom/deadcode.rb#51 + sig do + params( + index: ::Spoom::Deadcode::Index, + erb: ::String, + file: ::String, + plugins: T::Array[::Spoom::Deadcode::Plugins::Base] + ).void + end + def index_erb(index, erb, file:, plugins: T.unsafe(nil)); end + + # source://spoom//lib/spoom/deadcode.rb#40 + sig do + params( + index: ::Spoom::Deadcode::Index, + ruby: ::String, + file: ::String, + plugins: T::Array[::Spoom::Deadcode::Plugins::Base] + ).void + end + def index_ruby(index, ruby, file:, plugins: T.unsafe(nil)); end + + # source://spoom//lib/spoom/deadcode/plugins.rb#74 + sig { params(context: ::Spoom::Context).returns(T::Array[::Spoom::Deadcode::Plugins::Base]) } + def load_custom_plugins(context); end - # source://spoom//lib/spoom/deadcode.rb#38 - sig { params(index: ::Spoom::Deadcode::Index, ruby: ::String, file: ::String).void } - def index_ruby(index, ruby, file:); 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 @@ -1422,7 +1450,7 @@ class Spoom::Deadcode::Definition < ::T::Struct def module?; end class << self - # source://sorbet-runtime/0.5.10908/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11109/lib/types/struct.rb#13 def inherited(s); end end end @@ -1459,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 @@ -1484,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#18 +# source://spoom//lib/spoom/deadcode.rb#20 class Spoom::Deadcode::Error < ::Spoom::Error abstract! - # source://spoom//lib/spoom/deadcode.rb#25 + # source://spoom//lib/spoom/deadcode.rb#27 sig { params(message: ::String, parent: ::Exception).void } def initialize(message, parent:); end end @@ -1543,8 +1571,55 @@ end # source://spoom//lib/spoom/deadcode/indexer.rb#6 class Spoom::Deadcode::Indexer < ::SyntaxTree::Visitor # source://spoom//lib/spoom/deadcode/indexer.rb#16 - sig { params(path: ::String, source: ::String, index: ::Spoom::Deadcode::Index).void } - def initialize(path, source, index); end + sig do + params( + path: ::String, + source: ::String, + index: ::Spoom::Deadcode::Index, + plugins: T::Array[::Spoom::Deadcode::Plugins::Base] + ).void + end + def initialize(path, source, index, plugins: T.unsafe(nil)); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#459 + sig do + params( + node: T.nilable(T.any(::SyntaxTree::ArgParen, ::SyntaxTree::Args, ::SyntaxTree::ArgsForward)) + ).returns(T::Array[::SyntaxTree::Node]) + end + def call_args(node); end + + # 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 + sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } + def define_attr_reader(name, full_name, node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#293 + sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } + def define_attr_writer(name, full_name, node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#305 + sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } + def define_class(name, full_name, node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#317 + sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } + def define_constant(name, full_name, node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#329 + sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } + def define_method(name, full_name, node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#341 + sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } + def define_module(name, full_name, node); end # @return [String] # @@ -1555,165 +1630,161 @@ class Spoom::Deadcode::Indexer < ::SyntaxTree::Visitor sig { returns(::Spoom::Deadcode::Index) } def index; end + # 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#435 + sig { params(node: T.any(::Symbol, ::SyntaxTree::Node)).returns(::String) } + def node_string(node); end + # source://spoom//lib/spoom/deadcode/indexer.rb#10 sig { returns(::String) } def path; end + # Reference indexing + # + # source://spoom//lib/spoom/deadcode/indexer.rb#355 + sig { params(name: ::String, node: ::SyntaxTree::Node).void } + def reference_constant(name, node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#360 + sig { params(name: ::String, node: ::SyntaxTree::Node).void } + def reference_method(name, node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#450 + sig { params(node: ::SyntaxTree::Node).returns(::String) } + def symbol_string(node); end + # Visit # - # source://spoom//lib/spoom/deadcode/indexer.rb#34 + # source://spoom//lib/spoom/deadcode/indexer.rb#35 sig { override.params(node: T.nilable(::SyntaxTree::Node)).void } def visit(node); end - # source://spoom//lib/spoom/deadcode/indexer.rb#44 + # source://spoom//lib/spoom/deadcode/indexer.rb#45 sig { override.params(node: ::SyntaxTree::AliasNode).void } def visit_alias(node); end - # source://spoom//lib/spoom/deadcode/indexer.rb#49 + # source://spoom//lib/spoom/deadcode/indexer.rb#50 sig { override.params(node: ::SyntaxTree::ARef).void } def visit_aref(node); end - # source://spoom//lib/spoom/deadcode/indexer.rb#56 + # source://spoom//lib/spoom/deadcode/indexer.rb#57 sig { override.params(node: ::SyntaxTree::ARefField).void } def visit_aref_field(node); end - # source://spoom//lib/spoom/deadcode/indexer.rb#63 + # source://spoom//lib/spoom/deadcode/indexer.rb#64 sig { override.params(node: ::SyntaxTree::ArgBlock).void } def visit_arg_block(node); end - # source://spoom//lib/spoom/deadcode/indexer.rb#77 + # source://spoom//lib/spoom/deadcode/indexer.rb#78 sig { override.params(node: ::SyntaxTree::Binary).void } def visit_binary(node); end - # source://spoom//lib/spoom/deadcode/indexer.rb#93 + # source://spoom//lib/spoom/deadcode/indexer.rb#94 sig { override.params(node: ::SyntaxTree::CallNode).void } def visit_call(node); end - # source://spoom//lib/spoom/deadcode/indexer.rb#105 + # source://spoom//lib/spoom/deadcode/indexer.rb#106 sig { override.params(node: ::SyntaxTree::ClassDeclaration).void } def visit_class(node); end - # source://spoom//lib/spoom/deadcode/indexer.rb#118 + # source://spoom//lib/spoom/deadcode/indexer.rb#119 sig { override.params(node: ::SyntaxTree::Command).void } def visit_command(node); end - # source://spoom//lib/spoom/deadcode/indexer.rb#130 + # source://spoom//lib/spoom/deadcode/indexer.rb#131 sig { override.params(node: ::SyntaxTree::CommandCall).void } def visit_command_call(node); end - # source://spoom//lib/spoom/deadcode/indexer.rb#143 + # source://spoom//lib/spoom/deadcode/indexer.rb#144 sig { override.params(node: ::SyntaxTree::Const).void } def visit_const(node); end - # source://spoom//lib/spoom/deadcode/indexer.rb#148 + # source://spoom//lib/spoom/deadcode/indexer.rb#149 sig { override.params(node: ::SyntaxTree::ConstPathField).void } def visit_const_path_field(node); end - # source://spoom//lib/spoom/deadcode/indexer.rb#158 + # source://spoom//lib/spoom/deadcode/indexer.rb#159 sig { override.params(node: ::SyntaxTree::DefNode).void } def visit_def(node); end - # source://spoom//lib/spoom/deadcode/indexer.rb#166 + # source://spoom//lib/spoom/deadcode/indexer.rb#167 sig { override.params(node: ::SyntaxTree::Field).void } def visit_field(node); end - # source://spoom//lib/spoom/deadcode/indexer.rb#182 + # source://spoom//lib/spoom/deadcode/indexer.rb#183 sig { override.params(node: ::SyntaxTree::ModuleDeclaration).void } def visit_module(node); end - # source://spoom//lib/spoom/deadcode/indexer.rb#194 + # source://spoom//lib/spoom/deadcode/indexer.rb#195 sig { override.params(node: ::SyntaxTree::OpAssign).void } def visit_opassign(node); end - # source://spoom//lib/spoom/deadcode/indexer.rb#203 + # source://spoom//lib/spoom/deadcode/indexer.rb#204 sig { params(send: ::Spoom::Deadcode::Send).void } def visit_send(send); end - # source://spoom//lib/spoom/deadcode/indexer.rb#238 + # source://spoom//lib/spoom/deadcode/indexer.rb#243 sig { override.params(node: ::SyntaxTree::SymbolLiteral).void } def visit_symbol_literal(node); end - # source://spoom//lib/spoom/deadcode/indexer.rb#247 + # source://spoom//lib/spoom/deadcode/indexer.rb#252 sig { override.params(node: ::SyntaxTree::TopConstField).void } def visit_top_const_field(node); end - # source://spoom//lib/spoom/deadcode/indexer.rb#252 + # source://spoom//lib/spoom/deadcode/indexer.rb#257 sig { override.params(node: ::SyntaxTree::VarField).void } def visit_var_field(node); end - # source://spoom//lib/spoom/deadcode/indexer.rb#269 + # source://spoom//lib/spoom/deadcode/indexer.rb#274 sig { override.params(node: ::SyntaxTree::VCall).void } def visit_vcall(node); end - - private - - # source://spoom//lib/spoom/deadcode/indexer.rb#382 - sig do - params( - node: T.nilable(T.any(::SyntaxTree::ArgParen, ::SyntaxTree::Args, ::SyntaxTree::ArgsForward)) - ).returns(T::Array[::SyntaxTree::Node]) - end - def call_args(node); end - - # Definition indexing - # - # source://spoom//lib/spoom/deadcode/indexer.rb#278 - sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } - def define_attr_reader(name, full_name, node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#289 - sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } - def define_attr_writer(name, full_name, node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#300 - sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } - def define_class(name, full_name, node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#311 - sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } - def define_constant(name, full_name, node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#322 - sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } - def define_method(name, full_name, node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#333 - sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } - def define_module(name, full_name, node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#368 - sig { params(node: ::SyntaxTree::Node).returns(::Spoom::Deadcode::Location) } - def node_location(node); end - - # Node utils - # - # source://spoom//lib/spoom/deadcode/indexer.rb#358 - sig { params(node: T.any(::Symbol, ::SyntaxTree::Node)).returns(::String) } - def node_string(node); end - - # Reference indexing - # - # source://spoom//lib/spoom/deadcode/indexer.rb#346 - sig { params(name: ::String, node: ::SyntaxTree::Node).void } - def reference_constant(name, node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#351 - sig { params(name: ::String, node: ::SyntaxTree::Node).void } - def reference_method(name, node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#373 - sig { params(node: ::SyntaxTree::Node).returns(::String) } - def symbol_string(node); end end -# source://spoom//lib/spoom/deadcode.rb#32 +# 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, @@ -1725,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 @@ -1766,9 +1847,483 @@ end # source://spoom//lib/spoom/deadcode/location.rb#11 class Spoom::Deadcode::Location::LocationError < ::Spoom::Error; end -# source://spoom//lib/spoom/deadcode.rb#31 +# 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. + # Note that when this method is called, the definition for the node has already been added to the index. + # It is still possible to ignore it from the plugin: + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # def on_define_accessor(indexer, definition) + # definition.ignored! if definition.name == "foo" + # end + # end + # ~~~ + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#144 + sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def on_define_accessor(indexer, definition); end + + # Called when a class is defined. + # + # Will be called when the indexer processes a `class` node. + # Note that when this method is called, the definition for the node has already been added to the index. + # It is still possible to ignore it from the plugin: + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # def on_define_class(indexer, definition) + # definition.ignored! if definition.name == "Foo" + # end + # end + # ~~~ + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#168 + sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def on_define_class(indexer, definition); end + + # Called when a constant is defined. + # + # Will be called when the indexer processes a `CONST =` node. + # Note that when this method is called, the definition for the node has already been added to the index. + # It is still possible to ignore it from the plugin: + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # def on_define_constant(indexer, definition) + # definition.ignored! if definition.name == "FOO" + # end + # end + # ~~~ + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#198 + sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def on_define_constant(indexer, definition); end + + # Called when a method is defined. + # + # Will be called when the indexer processes a `def` or `defs` node. + # Note that when this method is called, the definition for the node has already been added to the index. + # It is still possible to ignore it from the plugin: + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # def on_define_method(indexer, definition) + # super # So the `ignore_method_names` DSL is still applied + # + # definition.ignored! if definition.name == "foo" + # end + # end + # ~~~ + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#226 + sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def on_define_method(indexer, definition); end + + # Called when a module is defined. + # + # Will be called when the indexer processes a `module` node. + # Note that when this method is called, the definition for the node has already been added to the index. + # It is still possible to ignore it from the plugin: + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # def on_define_module(indexer, definition) + # definition.ignored! if definition.name == "Foo" + # end + # end + # ~~~ + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#252 + sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def on_define_module(indexer, definition); end + + # Called when a send is being processed + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # def on_send(indexer, send) + # return unless send.name == "dsl_method" + # return if send.args.empty? + # + # method_name = indexer.node_string(send.args.first).delete_prefix(":") + # indexer.reference_method(method_name, send.node) + # end + # end + # ~~~ + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#278 + sig { params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } + def on_send(indexer, send); end + + private + + # 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#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#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#332 + sig { params(const: ::Symbol).returns(T::Array[::Regexp]) } + def patterns(const); 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: + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # ignore_method_names( + # "foo", + # "bar", + # /baz.*/, + # ) + # end + # ~~~ + # + # 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_modules_named(*names); end + + private + + # source://spoom//lib/spoom/deadcode/plugins/base.rb#113 + sig do + params( + names: T::Array[T.any(::Regexp, ::String)], + names_variable: ::Symbol, + patterns_variable: ::Symbol + ).void + end + def save_names_and_patterns(names, names_variable, patterns_variable); end + 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 + sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } + def on_send(indexer, send); end + + private + + # source://spoom//lib/spoom/deadcode/plugins/ruby.rb#50 + sig { params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send, node: ::SyntaxTree::Node).void } + def reference_symbol_as_constant(indexer, send, node); end +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 @@ -1788,7 +2343,7 @@ class Spoom::Deadcode::Reference < ::T::Struct def method?; end class << self - # source://sorbet-runtime/0.5.10908/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11109/lib/types/struct.rb#13 def inherited(s); end end end @@ -1801,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. # @@ -1812,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.10908/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11109/lib/types/struct.rb#13 def inherited(s); end end end @@ -1833,7 +2613,7 @@ class Spoom::ExecResult < ::T::Struct def to_s; end class << self - # source://sorbet-runtime/0.5.10908/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11109/lib/types/struct.rb#13 def inherited(s); end end end @@ -2041,7 +2821,7 @@ class Spoom::FileTree::Node < ::T::Struct def path; end class << self - # source://sorbet-runtime/0.5.10908/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11109/lib/types/struct.rb#13 def inherited(s); end end end @@ -2107,7 +2887,7 @@ class Spoom::Git::Commit < ::T::Struct def timestamp; end class << self - # source://sorbet-runtime/0.5.10908/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11109/lib/types/struct.rb#13 def inherited(s); end # Parse a line formated as `%h %at` into a `Commit` @@ -2219,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.10908/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11109/lib/types/struct.rb#13 def inherited(s); end end end @@ -2252,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.10908/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11109/lib/types/struct.rb#13 def inherited(s); end end end @@ -2310,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.10908/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11109/lib/types/struct.rb#13 def inherited(s); end end end @@ -2335,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.10908/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11109/lib/types/struct.rb#13 def inherited(s); end end end @@ -2398,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.10908/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11109/lib/types/struct.rb#13 def inherited(s); end end end @@ -2436,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.10908/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11109/lib/types/struct.rb#13 def inherited(s); end end end @@ -2502,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.10908/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11109/lib/types/struct.rb#13 def inherited(s); end end end @@ -2624,7 +3404,7 @@ Spoom::SPOOM_PATH = T.let(T.unsafe(nil), String) # source://spoom//lib/spoom/sorbet/config.rb#5 module Spoom::Sorbet; end -# source://spoom//lib/spoom/sorbet.rb#38 +# source://spoom//lib/spoom/sorbet.rb#39 Spoom::Sorbet::BIN_PATH = T.let(T.unsafe(nil), String) # source://spoom//lib/spoom/sorbet.rb#36 @@ -2867,7 +3647,10 @@ Spoom::Sorbet::Errors::Parser::HEADER = T.let(T.unsafe(nil), Array) # source://spoom//lib/spoom/sorbet.rb#37 Spoom::Sorbet::GEM_PATH = T.let(T.unsafe(nil), String) -# source://spoom//lib/spoom/sorbet.rb#40 +# source://spoom//lib/spoom/sorbet.rb#38 +Spoom::Sorbet::GEM_VERSION = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/sorbet.rb#41 Spoom::Sorbet::KILLED_CODE = T.let(T.unsafe(nil), Integer) # source://spoom//lib/spoom/sorbet/metrics.rb#8 @@ -2890,7 +3673,7 @@ end # source://spoom//lib/spoom/sorbet/metrics.rb#9 Spoom::Sorbet::MetricsParser::DEFAULT_PREFIX = T.let(T.unsafe(nil), String) -# source://spoom//lib/spoom/sorbet.rb#41 +# source://spoom//lib/spoom/sorbet.rb#42 Spoom::Sorbet::SEGFAULT_CODE = T.let(T.unsafe(nil), Integer) # source://spoom//lib/spoom/sorbet/sigils.rb#9 diff --git a/sorbet/rbi/gems/stringio@3.0.8.rbi b/sorbet/rbi/gems/stringio@3.0.8.rbi new file mode 100644 index 000000000..01a26ea58 --- /dev/null +++ b/sorbet/rbi/gems/stringio@3.0.8.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/syntax_tree@6.1.1.rbi b/sorbet/rbi/gems/syntax_tree@6.2.0.rbi similarity index 86% rename from sorbet/rbi/gems/syntax_tree@6.1.1.rbi rename to sorbet/rbi/gems/syntax_tree@6.2.0.rbi index d8f68fe50..0ecc1a415 100644 --- a/sorbet/rbi/gems/syntax_tree@6.1.1.rbi +++ b/sorbet/rbi/gems/syntax_tree@6.2.0.rbi @@ -14,72 +14,72 @@ module SyntaxTree class << self # Parses the given source and returns the formatted source. # - # source://syntax_tree//lib/syntax_tree.rb#59 + # source://syntax_tree//lib/syntax_tree.rb#60 def format(source, maxwidth = T.unsafe(nil), base_indentation = T.unsafe(nil), options: T.unsafe(nil)); end # Parses the given file and returns the formatted source. # - # source://syntax_tree//lib/syntax_tree.rb#75 + # source://syntax_tree//lib/syntax_tree.rb#76 def format_file(filepath, maxwidth = T.unsafe(nil), base_indentation = T.unsafe(nil), options: T.unsafe(nil)); end # Accepts a node in the tree and returns the formatted source. # - # source://syntax_tree//lib/syntax_tree.rb#85 + # source://syntax_tree//lib/syntax_tree.rb#86 def format_node(source, node, maxwidth = T.unsafe(nil), base_indentation = T.unsafe(nil), options: T.unsafe(nil)); end # Indexes the given source code to return a list of all class, module, and # method definitions. Used to quickly provide indexing capability for IDEs or # documentation generation. # - # source://syntax_tree//lib/syntax_tree.rb#102 + # source://syntax_tree//lib/syntax_tree.rb#103 def index(source); end # Indexes the given file to return a list of all class, module, and method # definitions. Used to quickly provide indexing capability for IDEs or # documentation generation. # - # source://syntax_tree//lib/syntax_tree.rb#109 + # source://syntax_tree//lib/syntax_tree.rb#110 def index_file(filepath); end # A convenience method for creating a new mutation visitor. # # @yield [visitor] # - # source://syntax_tree//lib/syntax_tree.rb#114 + # source://syntax_tree//lib/syntax_tree.rb#115 def mutation; end # Parses the given source and returns the syntax tree. # - # source://syntax_tree//lib/syntax_tree.rb#121 + # source://syntax_tree//lib/syntax_tree.rb#122 def parse(source); end # Parses the given file and returns the syntax tree. # - # source://syntax_tree//lib/syntax_tree.rb#128 + # source://syntax_tree//lib/syntax_tree.rb#129 def parse_file(filepath); end # Returns the source from the given filepath taking into account any potential # magic encoding comments. # - # source://syntax_tree//lib/syntax_tree.rb#134 + # source://syntax_tree//lib/syntax_tree.rb#135 def read(filepath); end # This is a hook provided so that plugins can register themselves as the # handler for a particular file type. # - # source://syntax_tree//lib/syntax_tree.rb#149 + # source://syntax_tree//lib/syntax_tree.rb#150 def register_handler(extension, handler); end # Searches through the given source using the given pattern and yields each # node in the tree that matches the pattern to the given block. # - # source://syntax_tree//lib/syntax_tree.rb#155 + # source://syntax_tree//lib/syntax_tree.rb#156 def search(source, query, &block); end # Searches through the given file using the given pattern and yields each # node in the tree that matches the pattern to the given block. # - # source://syntax_tree//lib/syntax_tree.rb#164 + # source://syntax_tree//lib/syntax_tree.rb#165 def search_file(filepath, query, &block); end end end @@ -716,7 +716,7 @@ class SyntaxTree::AryPtn < ::SyntaxTree::Node # source://syntax_tree//lib/syntax_tree/node.rb#1318 def comments; end - # [nil | VarRef] the optional constant wrapper + # [nil | VarRef | ConstPathRef] the optional constant wrapper # # source://syntax_tree//lib/syntax_tree/node.rb#1303 def constant; end @@ -1415,60 +1415,60 @@ end # # method { |value| } # -# source://syntax_tree//lib/syntax_tree/node.rb#4309 +# source://syntax_tree//lib/syntax_tree/node.rb#4312 class SyntaxTree::BlockNode < ::SyntaxTree::Node # @return [BlockNode] a new instance of BlockNode # - # source://syntax_tree//lib/syntax_tree/node.rb#4344 + # source://syntax_tree//lib/syntax_tree/node.rb#4347 def initialize(opening:, block_var:, bodystmt:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#4417 + # source://syntax_tree//lib/syntax_tree/node.rb#4420 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#4352 + # source://syntax_tree//lib/syntax_tree/node.rb#4355 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#4426 + # source://syntax_tree//lib/syntax_tree/node.rb#4429 def arity; end # [nil | BlockVar] the optional variable declaration within this block # - # source://syntax_tree//lib/syntax_tree/node.rb#4336 + # source://syntax_tree//lib/syntax_tree/node.rb#4339 def block_var; end # [BodyStmt | Statements] the expressions to be executed within this block # - # source://syntax_tree//lib/syntax_tree/node.rb#4339 + # source://syntax_tree//lib/syntax_tree/node.rb#4342 def bodystmt; end - # source://syntax_tree//lib/syntax_tree/node.rb#4356 + # source://syntax_tree//lib/syntax_tree/node.rb#4359 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#4342 + # source://syntax_tree//lib/syntax_tree/node.rb#4345 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#4360 + # source://syntax_tree//lib/syntax_tree/node.rb#4363 def copy(opening: T.unsafe(nil), block_var: T.unsafe(nil), bodystmt: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#4356 + # source://syntax_tree//lib/syntax_tree/node.rb#4359 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#4375 + # source://syntax_tree//lib/syntax_tree/node.rb#4378 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#4385 + # source://syntax_tree//lib/syntax_tree/node.rb#4388 def format(q); end # @return [Boolean] # - # source://syntax_tree//lib/syntax_tree/node.rb#4422 + # source://syntax_tree//lib/syntax_tree/node.rb#4425 def keywords?; end # [LBrace | Kw] the left brace or the do keyword that opens this block # - # source://syntax_tree//lib/syntax_tree/node.rb#4333 + # source://syntax_tree//lib/syntax_tree/node.rb#4336 def opening; end private @@ -1478,7 +1478,7 @@ class SyntaxTree::BlockNode < ::SyntaxTree::Node # # @return [Boolean] # - # source://syntax_tree//lib/syntax_tree/node.rb#4468 + # source://syntax_tree//lib/syntax_tree/node.rb#4471 def forced_brace_bounds?(q); end # If we're a sibling of a control-flow keyword, then we're going to have to @@ -1486,13 +1486,13 @@ class SyntaxTree::BlockNode < ::SyntaxTree::Node # # @return [Boolean] # - # source://syntax_tree//lib/syntax_tree/node.rb#4457 + # source://syntax_tree//lib/syntax_tree/node.rb#4460 def forced_do_end_bounds?(q); end - # source://syntax_tree//lib/syntax_tree/node.rb#4484 + # source://syntax_tree//lib/syntax_tree/node.rb#4487 def format_break(q, break_opening, break_closing); end - # source://syntax_tree//lib/syntax_tree/node.rb#4504 + # source://syntax_tree//lib/syntax_tree/node.rb#4507 def format_flat(q, flat_opening, flat_closing); end # If this is nested anywhere inside certain nodes, then we can't change @@ -1500,33 +1500,33 @@ class SyntaxTree::BlockNode < ::SyntaxTree::Node # # @return [Boolean] # - # source://syntax_tree//lib/syntax_tree/node.rb#4439 + # source://syntax_tree//lib/syntax_tree/node.rb#4442 def unchangeable_bounds?(q); end end # Formats the opening brace or keyword of a block. # -# source://syntax_tree//lib/syntax_tree/node.rb#4311 +# source://syntax_tree//lib/syntax_tree/node.rb#4314 class SyntaxTree::BlockNode::BlockOpenFormatter # @return [BlockOpenFormatter] a new instance of BlockOpenFormatter # - # source://syntax_tree//lib/syntax_tree/node.rb#4318 + # source://syntax_tree//lib/syntax_tree/node.rb#4321 def initialize(text, node); end - # source://syntax_tree//lib/syntax_tree/node.rb#4323 + # source://syntax_tree//lib/syntax_tree/node.rb#4326 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#4327 + # source://syntax_tree//lib/syntax_tree/node.rb#4330 def format(q); end # [LBrace | Keyword] the node that is being represented # - # source://syntax_tree//lib/syntax_tree/node.rb#4316 + # source://syntax_tree//lib/syntax_tree/node.rb#4319 def node; end # [String] the actual output that should be printed # - # source://syntax_tree//lib/syntax_tree/node.rb#4313 + # source://syntax_tree//lib/syntax_tree/node.rb#4316 def text; end end @@ -1772,42 +1772,42 @@ end # # @@variable # -# source://syntax_tree//lib/syntax_tree/node.rb#4043 +# source://syntax_tree//lib/syntax_tree/node.rb#4046 class SyntaxTree::CVar < ::SyntaxTree::Node # @return [CVar] a new instance of CVar # - # source://syntax_tree//lib/syntax_tree/node.rb#4050 + # source://syntax_tree//lib/syntax_tree/node.rb#4053 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#4085 + # source://syntax_tree//lib/syntax_tree/node.rb#4088 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#4056 + # source://syntax_tree//lib/syntax_tree/node.rb#4059 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#4060 + # source://syntax_tree//lib/syntax_tree/node.rb#4063 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#4048 + # source://syntax_tree//lib/syntax_tree/node.rb#4051 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#4064 + # source://syntax_tree//lib/syntax_tree/node.rb#4067 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#4060 + # source://syntax_tree//lib/syntax_tree/node.rb#4063 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#4077 + # source://syntax_tree//lib/syntax_tree/node.rb#4080 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#4081 + # source://syntax_tree//lib/syntax_tree/node.rb#4084 def format(q); end # [String] the name of the class variable # - # source://syntax_tree//lib/syntax_tree/node.rb#4045 + # source://syntax_tree//lib/syntax_tree/node.rb#4048 def value; end end @@ -1852,16 +1852,16 @@ class SyntaxTree::CallChainFormatter # # @return [Boolean] # - # source://syntax_tree//lib/syntax_tree/node.rb#2895 + # source://syntax_tree//lib/syntax_tree/node.rb#2898 def attach_directly?(node); end - # source://syntax_tree//lib/syntax_tree/node.rb#2905 + # source://syntax_tree//lib/syntax_tree/node.rb#2908 def format_child(q, child, skip_comments: T.unsafe(nil), skip_operator: T.unsafe(nil), skip_attached: T.unsafe(nil)); end class << self # @return [Boolean] # - # source://syntax_tree//lib/syntax_tree/node.rb#2876 + # source://syntax_tree//lib/syntax_tree/node.rb#2879 def chained?(node); end end end @@ -1870,69 +1870,69 @@ end # # receiver.message # -# source://syntax_tree//lib/syntax_tree/node.rb#2943 +# source://syntax_tree//lib/syntax_tree/node.rb#2946 class SyntaxTree::CallNode < ::SyntaxTree::Node # @return [CallNode] a new instance of CallNode # - # source://syntax_tree//lib/syntax_tree/node.rb#2959 + # source://syntax_tree//lib/syntax_tree/node.rb#2962 def initialize(receiver:, operator:, message:, arguments:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#3054 + # source://syntax_tree//lib/syntax_tree/node.rb#3057 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#2968 + # source://syntax_tree//lib/syntax_tree/node.rb#2971 def accept(visitor); end # [nil | ArgParen | Args] the arguments to the method call # - # source://syntax_tree//lib/syntax_tree/node.rb#2954 + # source://syntax_tree//lib/syntax_tree/node.rb#2957 def arguments; end - # source://syntax_tree//lib/syntax_tree/node.rb#3100 + # source://syntax_tree//lib/syntax_tree/node.rb#3103 def arity; end - # source://syntax_tree//lib/syntax_tree/node.rb#2972 + # source://syntax_tree//lib/syntax_tree/node.rb#2975 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#2957 + # source://syntax_tree//lib/syntax_tree/node.rb#2960 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#2981 + # source://syntax_tree//lib/syntax_tree/node.rb#2984 def copy(receiver: T.unsafe(nil), operator: T.unsafe(nil), message: T.unsafe(nil), arguments: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#2972 + # source://syntax_tree//lib/syntax_tree/node.rb#2975 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#3003 + # source://syntax_tree//lib/syntax_tree/node.rb#3006 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#3014 + # source://syntax_tree//lib/syntax_tree/node.rb#3017 def format(q); end # Print out the arguments to this call. If there are no arguments, then do # nothing. # - # source://syntax_tree//lib/syntax_tree/node.rb#3062 + # source://syntax_tree//lib/syntax_tree/node.rb#3065 def format_arguments(q); end - # source://syntax_tree//lib/syntax_tree/node.rb#3072 + # source://syntax_tree//lib/syntax_tree/node.rb#3075 def format_contents(q); end # [:call | Backtick | Const | Ident | Op] the message being sent # - # source://syntax_tree//lib/syntax_tree/node.rb#2951 + # source://syntax_tree//lib/syntax_tree/node.rb#2954 def message; end # [nil | :"::" | Op | Period] the operator being used to send the message # - # source://syntax_tree//lib/syntax_tree/node.rb#2948 + # source://syntax_tree//lib/syntax_tree/node.rb#2951 def operator; end # [nil | Node] the receiver of the method call # - # source://syntax_tree//lib/syntax_tree/node.rb#2945 + # source://syntax_tree//lib/syntax_tree/node.rb#2948 def receiver; end end @@ -1969,52 +1969,52 @@ end # "number" # end # -# source://syntax_tree//lib/syntax_tree/node.rb#3116 +# source://syntax_tree//lib/syntax_tree/node.rb#3119 class SyntaxTree::Case < ::SyntaxTree::Node # @return [Case] a new instance of Case # - # source://syntax_tree//lib/syntax_tree/node.rb#3129 + # source://syntax_tree//lib/syntax_tree/node.rb#3132 def initialize(keyword:, value:, consequent:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#3187 + # source://syntax_tree//lib/syntax_tree/node.rb#3190 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#3137 + # source://syntax_tree//lib/syntax_tree/node.rb#3140 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#3141 + # source://syntax_tree//lib/syntax_tree/node.rb#3144 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#3127 + # source://syntax_tree//lib/syntax_tree/node.rb#3130 def comments; end # [In | When] the next clause in the chain # - # source://syntax_tree//lib/syntax_tree/node.rb#3124 + # source://syntax_tree//lib/syntax_tree/node.rb#3127 def consequent; end - # source://syntax_tree//lib/syntax_tree/node.rb#3145 + # source://syntax_tree//lib/syntax_tree/node.rb#3148 def copy(keyword: T.unsafe(nil), value: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#3141 + # source://syntax_tree//lib/syntax_tree/node.rb#3144 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#3160 + # source://syntax_tree//lib/syntax_tree/node.rb#3163 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#3170 + # source://syntax_tree//lib/syntax_tree/node.rb#3173 def format(q); end # [Kw] the keyword that opens this expression # - # source://syntax_tree//lib/syntax_tree/node.rb#3118 + # source://syntax_tree//lib/syntax_tree/node.rb#3121 def keyword; end # [nil | Node] optional value being switched on # - # source://syntax_tree//lib/syntax_tree/node.rb#3121 + # source://syntax_tree//lib/syntax_tree/node.rb#3124 def value; end end @@ -2050,91 +2050,91 @@ end # class Child < method # end # -# source://syntax_tree//lib/syntax_tree/node.rb#3312 +# source://syntax_tree//lib/syntax_tree/node.rb#3315 class SyntaxTree::ClassDeclaration < ::SyntaxTree::Node # @return [ClassDeclaration] a new instance of ClassDeclaration # - # source://syntax_tree//lib/syntax_tree/node.rb#3326 + # source://syntax_tree//lib/syntax_tree/node.rb#3329 def initialize(constant:, superclass:, bodystmt:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#3389 + # source://syntax_tree//lib/syntax_tree/node.rb#3392 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#3334 + # source://syntax_tree//lib/syntax_tree/node.rb#3337 def accept(visitor); end # [BodyStmt] the expressions to execute within the context of the class # - # source://syntax_tree//lib/syntax_tree/node.rb#3321 + # source://syntax_tree//lib/syntax_tree/node.rb#3324 def bodystmt; end - # source://syntax_tree//lib/syntax_tree/node.rb#3338 + # source://syntax_tree//lib/syntax_tree/node.rb#3341 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#3324 + # source://syntax_tree//lib/syntax_tree/node.rb#3327 def comments; end # [ConstPathRef | ConstRef | TopConstRef] the name of the class being # defined # - # source://syntax_tree//lib/syntax_tree/node.rb#3315 + # source://syntax_tree//lib/syntax_tree/node.rb#3318 def constant; end - # source://syntax_tree//lib/syntax_tree/node.rb#3342 + # source://syntax_tree//lib/syntax_tree/node.rb#3345 def copy(constant: T.unsafe(nil), superclass: T.unsafe(nil), bodystmt: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#3338 + # source://syntax_tree//lib/syntax_tree/node.rb#3341 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#3357 + # source://syntax_tree//lib/syntax_tree/node.rb#3360 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#3367 + # source://syntax_tree//lib/syntax_tree/node.rb#3370 def format(q); end # [nil | Node] the optional superclass declaration # - # source://syntax_tree//lib/syntax_tree/node.rb#3318 + # source://syntax_tree//lib/syntax_tree/node.rb#3321 def superclass; end private - # source://syntax_tree//lib/syntax_tree/node.rb#3396 + # source://syntax_tree//lib/syntax_tree/node.rb#3399 def format_declaration(q); end end # Comma represents the use of the , operator. # -# source://syntax_tree//lib/syntax_tree/node.rb#3410 +# source://syntax_tree//lib/syntax_tree/node.rb#3413 class SyntaxTree::Comma < ::SyntaxTree::Node # @return [Comma] a new instance of Comma # - # source://syntax_tree//lib/syntax_tree/node.rb#3414 + # source://syntax_tree//lib/syntax_tree/node.rb#3417 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#3437 + # source://syntax_tree//lib/syntax_tree/node.rb#3440 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#3419 + # source://syntax_tree//lib/syntax_tree/node.rb#3422 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#3423 + # source://syntax_tree//lib/syntax_tree/node.rb#3426 def child_nodes; end - # source://syntax_tree//lib/syntax_tree/node.rb#3427 + # source://syntax_tree//lib/syntax_tree/node.rb#3430 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#3423 + # source://syntax_tree//lib/syntax_tree/node.rb#3426 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#3433 + # source://syntax_tree//lib/syntax_tree/node.rb#3436 def deconstruct_keys(_keys); end # [String] the comma in the string # - # source://syntax_tree//lib/syntax_tree/node.rb#3412 + # source://syntax_tree//lib/syntax_tree/node.rb#3415 def value; end end @@ -2144,60 +2144,60 @@ end # # method argument # -# source://syntax_tree//lib/syntax_tree/node.rb#3448 +# source://syntax_tree//lib/syntax_tree/node.rb#3451 class SyntaxTree::Command < ::SyntaxTree::Node # @return [Command] a new instance of Command # - # source://syntax_tree//lib/syntax_tree/node.rb#3461 + # source://syntax_tree//lib/syntax_tree/node.rb#3464 def initialize(message:, arguments:, block:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#3511 + # source://syntax_tree//lib/syntax_tree/node.rb#3514 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#3469 + # source://syntax_tree//lib/syntax_tree/node.rb#3472 def accept(visitor); end # [Args] the arguments being sent with the message # - # source://syntax_tree//lib/syntax_tree/node.rb#3453 + # source://syntax_tree//lib/syntax_tree/node.rb#3456 def arguments; end - # source://syntax_tree//lib/syntax_tree/node.rb#3516 + # source://syntax_tree//lib/syntax_tree/node.rb#3519 def arity; end # [nil | BlockNode] the optional block being passed to the method # - # source://syntax_tree//lib/syntax_tree/node.rb#3456 + # source://syntax_tree//lib/syntax_tree/node.rb#3459 def block; end - # source://syntax_tree//lib/syntax_tree/node.rb#3473 + # source://syntax_tree//lib/syntax_tree/node.rb#3476 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#3459 + # source://syntax_tree//lib/syntax_tree/node.rb#3462 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#3477 + # source://syntax_tree//lib/syntax_tree/node.rb#3480 def copy(message: T.unsafe(nil), arguments: T.unsafe(nil), block: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#3473 + # source://syntax_tree//lib/syntax_tree/node.rb#3476 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#3492 + # source://syntax_tree//lib/syntax_tree/node.rb#3495 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#3502 + # source://syntax_tree//lib/syntax_tree/node.rb#3505 def format(q); end # [Const | Ident] the message being sent to the implicit receiver # - # source://syntax_tree//lib/syntax_tree/node.rb#3450 + # source://syntax_tree//lib/syntax_tree/node.rb#3453 def message; end private - # source://syntax_tree//lib/syntax_tree/node.rb#3522 + # source://syntax_tree//lib/syntax_tree/node.rb#3525 def align(q, node, &block); end end @@ -2206,70 +2206,70 @@ end # # object.method argument # -# source://syntax_tree//lib/syntax_tree/node.rb#3560 +# source://syntax_tree//lib/syntax_tree/node.rb#3563 class SyntaxTree::CommandCall < ::SyntaxTree::Node # @return [CommandCall] a new instance of CommandCall # - # source://syntax_tree//lib/syntax_tree/node.rb#3579 + # source://syntax_tree//lib/syntax_tree/node.rb#3582 def initialize(receiver:, operator:, message:, arguments:, block:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#3683 + # source://syntax_tree//lib/syntax_tree/node.rb#3686 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#3596 + # source://syntax_tree//lib/syntax_tree/node.rb#3599 def accept(visitor); end # [nil | Args | ArgParen] the arguments going along with the message # - # source://syntax_tree//lib/syntax_tree/node.rb#3571 + # source://syntax_tree//lib/syntax_tree/node.rb#3574 def arguments; end - # source://syntax_tree//lib/syntax_tree/node.rb#3689 + # source://syntax_tree//lib/syntax_tree/node.rb#3692 def arity; end # [nil | BlockNode] the block associated with this method call # - # source://syntax_tree//lib/syntax_tree/node.rb#3574 + # source://syntax_tree//lib/syntax_tree/node.rb#3577 def block; end - # source://syntax_tree//lib/syntax_tree/node.rb#3600 + # source://syntax_tree//lib/syntax_tree/node.rb#3603 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#3577 + # source://syntax_tree//lib/syntax_tree/node.rb#3580 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#3604 + # source://syntax_tree//lib/syntax_tree/node.rb#3607 def copy(receiver: T.unsafe(nil), operator: T.unsafe(nil), message: T.unsafe(nil), arguments: T.unsafe(nil), block: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#3600 + # source://syntax_tree//lib/syntax_tree/node.rb#3603 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#3628 + # source://syntax_tree//lib/syntax_tree/node.rb#3631 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#3640 + # source://syntax_tree//lib/syntax_tree/node.rb#3643 def format(q); end # [:call | Const | Ident | Op] the message being send # - # source://syntax_tree//lib/syntax_tree/node.rb#3568 + # source://syntax_tree//lib/syntax_tree/node.rb#3571 def message; end # [nil | :"::" | Op | Period] the operator used to send the message # - # source://syntax_tree//lib/syntax_tree/node.rb#3565 + # source://syntax_tree//lib/syntax_tree/node.rb#3568 def operator; end # [nil | Node] the receiver of the message # - # source://syntax_tree//lib/syntax_tree/node.rb#3562 + # source://syntax_tree//lib/syntax_tree/node.rb#3565 def receiver; end private - # source://syntax_tree//lib/syntax_tree/node.rb#3695 + # source://syntax_tree//lib/syntax_tree/node.rb#3698 def argument_alignment(q, doc); end end @@ -2277,112 +2277,112 @@ end # # # comment # -# source://syntax_tree//lib/syntax_tree/node.rb#3722 +# source://syntax_tree//lib/syntax_tree/node.rb#3725 class SyntaxTree::Comment < ::SyntaxTree::Node # @return [Comment] a new instance of Comment # - # source://syntax_tree//lib/syntax_tree/node.rb#3731 + # source://syntax_tree//lib/syntax_tree/node.rb#3734 def initialize(value:, inline:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#3790 + # source://syntax_tree//lib/syntax_tree/node.rb#3793 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#3764 + # source://syntax_tree//lib/syntax_tree/node.rb#3767 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#3768 + # source://syntax_tree//lib/syntax_tree/node.rb#3771 def child_nodes; end - # source://syntax_tree//lib/syntax_tree/node.rb#3760 + # source://syntax_tree//lib/syntax_tree/node.rb#3763 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#3772 + # source://syntax_tree//lib/syntax_tree/node.rb#3775 def copy(value: T.unsafe(nil), inline: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#3768 + # source://syntax_tree//lib/syntax_tree/node.rb#3771 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#3782 + # source://syntax_tree//lib/syntax_tree/node.rb#3785 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#3786 + # source://syntax_tree//lib/syntax_tree/node.rb#3789 def format(q); end # @return [Boolean] # - # source://syntax_tree//lib/syntax_tree/node.rb#3756 + # source://syntax_tree//lib/syntax_tree/node.rb#3759 def ignore?; end # [boolean] whether or not there is code on the same line as this comment. # If there is, then inline will be true. # - # source://syntax_tree//lib/syntax_tree/node.rb#3728 + # source://syntax_tree//lib/syntax_tree/node.rb#3731 def inline; end # [boolean] whether or not there is code on the same line as this comment. # If there is, then inline will be true. # - # source://syntax_tree//lib/syntax_tree/node.rb#3728 + # source://syntax_tree//lib/syntax_tree/node.rb#3731 def inline?; end - # source://syntax_tree//lib/syntax_tree/node.rb#3740 + # source://syntax_tree//lib/syntax_tree/node.rb#3743 def leading!; end # @return [Boolean] # - # source://syntax_tree//lib/syntax_tree/node.rb#3744 + # source://syntax_tree//lib/syntax_tree/node.rb#3747 def leading?; end - # source://syntax_tree//lib/syntax_tree/node.rb#3748 + # source://syntax_tree//lib/syntax_tree/node.rb#3751 def trailing!; end # @return [Boolean] # - # source://syntax_tree//lib/syntax_tree/node.rb#3752 + # source://syntax_tree//lib/syntax_tree/node.rb#3755 def trailing?; end # [String] the contents of the comment # - # source://syntax_tree//lib/syntax_tree/node.rb#3724 + # source://syntax_tree//lib/syntax_tree/node.rb#3727 def value; end end # Formats an If or Unless node. # -# source://syntax_tree//lib/syntax_tree/node.rb#6314 +# source://syntax_tree//lib/syntax_tree/node.rb#6317 class SyntaxTree::ConditionalFormatter # @return [ConditionalFormatter] a new instance of ConditionalFormatter # - # source://syntax_tree//lib/syntax_tree/node.rb#6321 + # source://syntax_tree//lib/syntax_tree/node.rb#6324 def initialize(keyword, node); end - # source://syntax_tree//lib/syntax_tree/node.rb#6326 + # source://syntax_tree//lib/syntax_tree/node.rb#6329 def format(q); end # [String] the keyword associated with this conditional # - # source://syntax_tree//lib/syntax_tree/node.rb#6316 + # source://syntax_tree//lib/syntax_tree/node.rb#6319 def keyword; end # [If | Unless] the node that is being formatted # - # source://syntax_tree//lib/syntax_tree/node.rb#6319 + # source://syntax_tree//lib/syntax_tree/node.rb#6322 def node; end private # @return [Boolean] # - # source://syntax_tree//lib/syntax_tree/node.rb#6450 + # source://syntax_tree//lib/syntax_tree/node.rb#6453 def contains_conditional?; end - # source://syntax_tree//lib/syntax_tree/node.rb#6385 + # source://syntax_tree//lib/syntax_tree/node.rb#6388 def format_break(q, force:); end - # source://syntax_tree//lib/syntax_tree/node.rb#6377 + # source://syntax_tree//lib/syntax_tree/node.rb#6380 def format_flat(q); end - # source://syntax_tree//lib/syntax_tree/node.rb#6405 + # source://syntax_tree//lib/syntax_tree/node.rb#6408 def format_ternary(q); end end @@ -2400,42 +2400,42 @@ end # # :Constant # -# source://syntax_tree//lib/syntax_tree/node.rb#3809 +# source://syntax_tree//lib/syntax_tree/node.rb#3812 class SyntaxTree::Const < ::SyntaxTree::Node # @return [Const] a new instance of Const # - # source://syntax_tree//lib/syntax_tree/node.rb#3816 + # source://syntax_tree//lib/syntax_tree/node.rb#3819 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#3851 + # source://syntax_tree//lib/syntax_tree/node.rb#3854 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#3822 + # source://syntax_tree//lib/syntax_tree/node.rb#3825 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#3826 + # source://syntax_tree//lib/syntax_tree/node.rb#3829 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#3814 + # source://syntax_tree//lib/syntax_tree/node.rb#3817 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#3830 + # source://syntax_tree//lib/syntax_tree/node.rb#3833 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#3826 + # source://syntax_tree//lib/syntax_tree/node.rb#3829 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#3843 + # source://syntax_tree//lib/syntax_tree/node.rb#3846 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#3847 + # source://syntax_tree//lib/syntax_tree/node.rb#3850 def format(q); end # [String] the name of the constant # - # source://syntax_tree//lib/syntax_tree/node.rb#3811 + # source://syntax_tree//lib/syntax_tree/node.rb#3814 def value; end end @@ -2445,47 +2445,47 @@ end # # object::Const = value # -# source://syntax_tree//lib/syntax_tree/node.rb#3862 +# source://syntax_tree//lib/syntax_tree/node.rb#3865 class SyntaxTree::ConstPathField < ::SyntaxTree::Node # @return [ConstPathField] a new instance of ConstPathField # - # source://syntax_tree//lib/syntax_tree/node.rb#3872 + # source://syntax_tree//lib/syntax_tree/node.rb#3875 def initialize(parent:, constant:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#3916 + # source://syntax_tree//lib/syntax_tree/node.rb#3919 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#3879 + # source://syntax_tree//lib/syntax_tree/node.rb#3882 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#3883 + # source://syntax_tree//lib/syntax_tree/node.rb#3886 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#3870 + # source://syntax_tree//lib/syntax_tree/node.rb#3873 def comments; end # [Const] the constant itself # - # source://syntax_tree//lib/syntax_tree/node.rb#3867 + # source://syntax_tree//lib/syntax_tree/node.rb#3870 def constant; end - # source://syntax_tree//lib/syntax_tree/node.rb#3887 + # source://syntax_tree//lib/syntax_tree/node.rb#3890 def copy(parent: T.unsafe(nil), constant: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#3883 + # source://syntax_tree//lib/syntax_tree/node.rb#3886 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#3901 + # source://syntax_tree//lib/syntax_tree/node.rb#3904 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#3910 + # source://syntax_tree//lib/syntax_tree/node.rb#3913 def format(q); end # [Node] the source of the constant # - # source://syntax_tree//lib/syntax_tree/node.rb#3864 + # source://syntax_tree//lib/syntax_tree/node.rb#3867 def parent; end end @@ -2493,47 +2493,47 @@ end # # object::Const # -# source://syntax_tree//lib/syntax_tree/node.rb#3926 +# source://syntax_tree//lib/syntax_tree/node.rb#3929 class SyntaxTree::ConstPathRef < ::SyntaxTree::Node # @return [ConstPathRef] a new instance of ConstPathRef # - # source://syntax_tree//lib/syntax_tree/node.rb#3936 + # source://syntax_tree//lib/syntax_tree/node.rb#3939 def initialize(parent:, constant:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#3980 + # source://syntax_tree//lib/syntax_tree/node.rb#3983 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#3943 + # source://syntax_tree//lib/syntax_tree/node.rb#3946 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#3947 + # source://syntax_tree//lib/syntax_tree/node.rb#3950 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#3934 + # source://syntax_tree//lib/syntax_tree/node.rb#3937 def comments; end # [Const] the constant itself # - # source://syntax_tree//lib/syntax_tree/node.rb#3931 + # source://syntax_tree//lib/syntax_tree/node.rb#3934 def constant; end - # source://syntax_tree//lib/syntax_tree/node.rb#3951 + # source://syntax_tree//lib/syntax_tree/node.rb#3954 def copy(parent: T.unsafe(nil), constant: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#3947 + # source://syntax_tree//lib/syntax_tree/node.rb#3950 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#3965 + # source://syntax_tree//lib/syntax_tree/node.rb#3968 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#3974 + # source://syntax_tree//lib/syntax_tree/node.rb#3977 def format(q); end # [Node] the source of the constant # - # source://syntax_tree//lib/syntax_tree/node.rb#3928 + # source://syntax_tree//lib/syntax_tree/node.rb#3931 def parent; end end @@ -2543,42 +2543,42 @@ end # class Container # end # -# source://syntax_tree//lib/syntax_tree/node.rb#3992 +# source://syntax_tree//lib/syntax_tree/node.rb#3995 class SyntaxTree::ConstRef < ::SyntaxTree::Node # @return [ConstRef] a new instance of ConstRef # - # source://syntax_tree//lib/syntax_tree/node.rb#3999 + # source://syntax_tree//lib/syntax_tree/node.rb#4002 def initialize(constant:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#4034 + # source://syntax_tree//lib/syntax_tree/node.rb#4037 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#4005 + # source://syntax_tree//lib/syntax_tree/node.rb#4008 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#4009 + # source://syntax_tree//lib/syntax_tree/node.rb#4012 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#3997 + # source://syntax_tree//lib/syntax_tree/node.rb#4000 def comments; end # [Const] the constant itself # - # source://syntax_tree//lib/syntax_tree/node.rb#3994 + # source://syntax_tree//lib/syntax_tree/node.rb#3997 def constant; end - # source://syntax_tree//lib/syntax_tree/node.rb#4013 + # source://syntax_tree//lib/syntax_tree/node.rb#4016 def copy(constant: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#4009 + # source://syntax_tree//lib/syntax_tree/node.rb#4012 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#4026 + # source://syntax_tree//lib/syntax_tree/node.rb#4029 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#4030 + # source://syntax_tree//lib/syntax_tree/node.rb#4033 def format(q); end end @@ -2587,10 +2587,10 @@ end # statements inside the conditional) then we can't use the modifier form # and we must use the block form. # -# source://syntax_tree//lib/syntax_tree/node.rb#6229 +# source://syntax_tree//lib/syntax_tree/node.rb#6232 module SyntaxTree::ContainsAssignment class << self - # source://syntax_tree//lib/syntax_tree/node.rb#6230 + # source://syntax_tree//lib/syntax_tree/node.rb#6233 def call(parent); end end end @@ -2598,20 +2598,20 @@ end # The default indentation level for formatting. We allow changing this so # that Syntax Tree can format arbitrary parts of a document. # -# source://syntax_tree//lib/syntax_tree.rb#56 +# source://syntax_tree//lib/syntax_tree.rb#57 SyntaxTree::DEFAULT_INDENTATION = T.let(T.unsafe(nil), Integer) # This is the default print width when formatting. It can be overridden in the # CLI by passing the --print-width option or here in the API by passing the # optional second argument to ::format. # -# source://syntax_tree//lib/syntax_tree.rb#48 +# source://syntax_tree//lib/syntax_tree.rb#49 SyntaxTree::DEFAULT_PRINT_WIDTH = T.let(T.unsafe(nil), Integer) # This is the default ruby version that we're going to target for formatting. # It shouldn't really be changed except in very niche circumstances. # -# source://syntax_tree//lib/syntax_tree.rb#52 +# source://syntax_tree//lib/syntax_tree.rb#53 SyntaxTree::DEFAULT_RUBY_VERSION = T.let(T.unsafe(nil), SyntaxTree::Formatter::SemanticVersion) # This module provides shortcuts for creating AST nodes. @@ -3369,47 +3369,273 @@ module SyntaxTree::DSL def ZSuper; end end +# Provides the ability to index source files into a database, then query for +# the nodes. +# +# source://syntax_tree//lib/syntax_tree/database.rb#6 +module SyntaxTree::Database; end + +# Query for the attributes of a node, optionally also filtering by type. +# +# source://syntax_tree//lib/syntax_tree/database.rb#99 +class SyntaxTree::Database::AttrQuery + # @return [AttrQuery] a new instance of AttrQuery + # + # source://syntax_tree//lib/syntax_tree/database.rb#102 + def initialize(type, attrs); end + + # Returns the value of attribute attrs. + # + # source://syntax_tree//lib/syntax_tree/database.rb#100 + def attrs; end + + # source://syntax_tree//lib/syntax_tree/database.rb#107 + def each(database, &block); end + + # Returns the value of attribute type. + # + # source://syntax_tree//lib/syntax_tree/database.rb#100 + def type; end +end + +# source://syntax_tree//lib/syntax_tree/database.rb#276 +class SyntaxTree::Database::Connection + # @return [Connection] a new instance of Connection + # + # source://syntax_tree//lib/syntax_tree/database.rb#279 + def initialize(raw_connection); end + + # source://syntax_tree//lib/syntax_tree/database.rb#283 + def execute(query, binds = T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/database.rb#287 + def index_file(filepath); end + + # source://syntax_tree//lib/syntax_tree/database.rb#292 + def last_insert_row_id; end + + # source://syntax_tree//lib/syntax_tree/database.rb#296 + def prepare; end + + # Returns the value of attribute raw_connection. + # + # source://syntax_tree//lib/syntax_tree/database.rb#277 + def raw_connection; end + + # source://syntax_tree//lib/syntax_tree/database.rb#326 + def search(query); end +end + +# source://syntax_tree//lib/syntax_tree/database.rb#7 +class SyntaxTree::Database::IndexingVisitor < ::SyntaxTree::FieldVisitor + # @return [IndexingVisitor] a new instance of IndexingVisitor + # + # source://syntax_tree//lib/syntax_tree/database.rb#10 + def initialize(database, filepath); end + + # Returns the value of attribute database. + # + # source://syntax_tree//lib/syntax_tree/database.rb#8 + def database; end + + # Returns the value of attribute filepath. + # + # source://syntax_tree//lib/syntax_tree/database.rb#8 + def filepath; end + + # Returns the value of attribute node_id. + # + # source://syntax_tree//lib/syntax_tree/database.rb#8 + def node_id; end + + private + + # source://syntax_tree//lib/syntax_tree/database.rb#18 + def comments(node); end + + # source://syntax_tree//lib/syntax_tree/database.rb#21 + def field(name, value); end + + # source://syntax_tree//lib/syntax_tree/database.rb#31 + def list(name, values); end + + # source://syntax_tree//lib/syntax_tree/database.rb#41 + def node(node, _name); end + + # source://syntax_tree//lib/syntax_tree/database.rb#67 + def pairs(name, values); end + + # source://syntax_tree//lib/syntax_tree/database.rb#64 + def text(name, value); end +end + +# Query for the results of either query. +# +# source://syntax_tree//lib/syntax_tree/database.rb#136 +class SyntaxTree::Database::OrQuery + # @return [OrQuery] a new instance of OrQuery + # + # source://syntax_tree//lib/syntax_tree/database.rb#139 + def initialize(left, right); end + + # source://syntax_tree//lib/syntax_tree/database.rb#144 + def each(database, &block); end + + # Returns the value of attribute left. + # + # source://syntax_tree//lib/syntax_tree/database.rb#137 + def left; end + + # Returns the value of attribute right. + # + # source://syntax_tree//lib/syntax_tree/database.rb#137 + def right; end +end + +# A pattern matching expression that will be compiled into a query. +# +# source://syntax_tree//lib/syntax_tree/database.rb#166 +class SyntaxTree::Database::Pattern + # @return [Pattern] a new instance of Pattern + # + # source://syntax_tree//lib/syntax_tree/database.rb#172 + def initialize(query); end + + # source://syntax_tree//lib/syntax_tree/database.rb#176 + def compile; end + + # Returns the value of attribute query. + # + # source://syntax_tree//lib/syntax_tree/database.rb#170 + def query; end + + private + + # Shortcut for combining two queries into one that returns the results of + # if either query matches. + # + # source://syntax_tree//lib/syntax_tree/database.rb#195 + def combine_or(left, right); end + + # in foo | bar + # + # source://syntax_tree//lib/syntax_tree/database.rb#200 + def compile_binary(node); end + + # in Ident + # + # source://syntax_tree//lib/syntax_tree/database.rb#207 + def compile_const(node); end + + # in SyntaxTree::Ident + # + # source://syntax_tree//lib/syntax_tree/database.rb#219 + def compile_const_path_ref(node); end + + # @raise [CompilationError] + # + # source://syntax_tree//lib/syntax_tree/database.rb#189 + def compile_error(node); end + + # in Ident[value: String] + # + # source://syntax_tree//lib/syntax_tree/database.rb#234 + def compile_hshptn(node); end + + # source://syntax_tree//lib/syntax_tree/database.rb#258 + def compile_node(node); end + + # in Foo + # + # source://syntax_tree//lib/syntax_tree/database.rb#248 + def compile_var_ref(node); end +end + +# source://syntax_tree//lib/syntax_tree/database.rb#167 +class SyntaxTree::Database::Pattern::CompilationError < ::StandardError; end + +# A lazy query result. +# +# source://syntax_tree//lib/syntax_tree/database.rb#151 +class SyntaxTree::Database::QueryResult + # @return [QueryResult] a new instance of QueryResult + # + # source://syntax_tree//lib/syntax_tree/database.rb#154 + def initialize(database, query); end + + # Returns the value of attribute database. + # + # source://syntax_tree//lib/syntax_tree/database.rb#152 + def database; end + + # source://syntax_tree//lib/syntax_tree/database.rb#159 + def each(&block); end + + # Returns the value of attribute query. + # + # source://syntax_tree//lib/syntax_tree/database.rb#152 + def query; end +end + +# Query for a specific type of node. +# +# source://syntax_tree//lib/syntax_tree/database.rb#85 +class SyntaxTree::Database::TypeQuery + # @return [TypeQuery] a new instance of TypeQuery + # + # source://syntax_tree//lib/syntax_tree/database.rb#88 + def initialize(type); end + + # source://syntax_tree//lib/syntax_tree/database.rb#92 + def each(database, &block); end + + # Returns the value of attribute type. + # + # source://syntax_tree//lib/syntax_tree/database.rb#86 + def type; end +end + # Def represents defining a regular method on the current self object. # # def method(param) result end # def object.method(param) result end # -# source://syntax_tree//lib/syntax_tree/node.rb#4095 +# source://syntax_tree//lib/syntax_tree/node.rb#4098 class SyntaxTree::DefNode < ::SyntaxTree::Node # @return [DefNode] a new instance of DefNode # - # source://syntax_tree//lib/syntax_tree/node.rb#4114 + # source://syntax_tree//lib/syntax_tree/node.rb#4117 def initialize(target:, operator:, name:, params:, bodystmt:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#4214 + # source://syntax_tree//lib/syntax_tree/node.rb#4217 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#4124 + # source://syntax_tree//lib/syntax_tree/node.rb#4127 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#4227 + # source://syntax_tree//lib/syntax_tree/node.rb#4230 def arity; end # [BodyStmt | Node] the expressions to be executed by the method # - # source://syntax_tree//lib/syntax_tree/node.rb#4109 + # source://syntax_tree//lib/syntax_tree/node.rb#4112 def bodystmt; end - # source://syntax_tree//lib/syntax_tree/node.rb#4128 + # source://syntax_tree//lib/syntax_tree/node.rb#4131 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#4112 + # source://syntax_tree//lib/syntax_tree/node.rb#4115 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#4132 + # source://syntax_tree//lib/syntax_tree/node.rb#4135 def copy(target: T.unsafe(nil), operator: T.unsafe(nil), name: T.unsafe(nil), params: T.unsafe(nil), bodystmt: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#4128 + # source://syntax_tree//lib/syntax_tree/node.rb#4131 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#4156 + # source://syntax_tree//lib/syntax_tree/node.rb#4159 def deconstruct_keys(_keys); end # Returns true if the method was found in the source in the "endless" form, @@ -3418,30 +3644,30 @@ class SyntaxTree::DefNode < ::SyntaxTree::Node # # @return [Boolean] # - # source://syntax_tree//lib/syntax_tree/node.rb#4223 + # source://syntax_tree//lib/syntax_tree/node.rb#4226 def endless?; end - # source://syntax_tree//lib/syntax_tree/node.rb#4168 + # source://syntax_tree//lib/syntax_tree/node.rb#4171 def format(q); end # [Backtick | Const | Ident | Kw | Op] the name of the method # - # source://syntax_tree//lib/syntax_tree/node.rb#4103 + # source://syntax_tree//lib/syntax_tree/node.rb#4106 def name; end # [nil | Op | Period] the operator being used to declare the method # - # source://syntax_tree//lib/syntax_tree/node.rb#4100 + # source://syntax_tree//lib/syntax_tree/node.rb#4103 def operator; end # [nil | Params | Paren] the parameter declaration for the method # - # source://syntax_tree//lib/syntax_tree/node.rb#4106 + # source://syntax_tree//lib/syntax_tree/node.rb#4109 def params; end # [nil | Node] the target where the method is being defined # - # source://syntax_tree//lib/syntax_tree/node.rb#4097 + # source://syntax_tree//lib/syntax_tree/node.rb#4100 def target; end end @@ -3450,42 +3676,42 @@ end # # defined?(variable) # -# source://syntax_tree//lib/syntax_tree/node.rb#4246 +# source://syntax_tree//lib/syntax_tree/node.rb#4249 class SyntaxTree::Defined < ::SyntaxTree::Node # @return [Defined] a new instance of Defined # - # source://syntax_tree//lib/syntax_tree/node.rb#4253 + # source://syntax_tree//lib/syntax_tree/node.rb#4256 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#4296 + # source://syntax_tree//lib/syntax_tree/node.rb#4299 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#4259 + # source://syntax_tree//lib/syntax_tree/node.rb#4262 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#4263 + # source://syntax_tree//lib/syntax_tree/node.rb#4266 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#4251 + # source://syntax_tree//lib/syntax_tree/node.rb#4254 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#4267 + # source://syntax_tree//lib/syntax_tree/node.rb#4270 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#4263 + # source://syntax_tree//lib/syntax_tree/node.rb#4266 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#4280 + # source://syntax_tree//lib/syntax_tree/node.rb#4283 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#4284 + # source://syntax_tree//lib/syntax_tree/node.rb#4287 def format(q); end # [Node] the value being sent to the keyword # - # source://syntax_tree//lib/syntax_tree/node.rb#4248 + # source://syntax_tree//lib/syntax_tree/node.rb#4251 def value; end end @@ -3498,48 +3724,48 @@ end # # { "#{key}": value } # -# source://syntax_tree//lib/syntax_tree/node.rb#4660 +# source://syntax_tree//lib/syntax_tree/node.rb#4663 class SyntaxTree::DynaSymbol < ::SyntaxTree::Node # @return [DynaSymbol] a new instance of DynaSymbol # - # source://syntax_tree//lib/syntax_tree/node.rb#4671 + # source://syntax_tree//lib/syntax_tree/node.rb#4674 def initialize(parts:, quote:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#4733 + # source://syntax_tree//lib/syntax_tree/node.rb#4736 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#4678 + # source://syntax_tree//lib/syntax_tree/node.rb#4681 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#4682 + # source://syntax_tree//lib/syntax_tree/node.rb#4685 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#4669 + # source://syntax_tree//lib/syntax_tree/node.rb#4672 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#4686 + # source://syntax_tree//lib/syntax_tree/node.rb#4689 def copy(parts: T.unsafe(nil), quote: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#4682 + # source://syntax_tree//lib/syntax_tree/node.rb#4685 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#4700 + # source://syntax_tree//lib/syntax_tree/node.rb#4703 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#4704 + # source://syntax_tree//lib/syntax_tree/node.rb#4707 def format(q); end # [Array[ StringDVar | StringEmbExpr | TStringContent ]] the parts of the # dynamic symbol # - # source://syntax_tree//lib/syntax_tree/node.rb#4663 + # source://syntax_tree//lib/syntax_tree/node.rb#4666 def parts; end # [nil | String] the quote used to delimit the dynamic symbol # - # source://syntax_tree//lib/syntax_tree/node.rb#4666 + # source://syntax_tree//lib/syntax_tree/node.rb#4669 def quote; end private @@ -3548,7 +3774,7 @@ class SyntaxTree::DynaSymbol < ::SyntaxTree::Node # lot of rules because it could be in many different contexts with many # different kinds of escaping. # - # source://syntax_tree//lib/syntax_tree/node.rb#4743 + # source://syntax_tree//lib/syntax_tree/node.rb#4746 def quotes(q); end end @@ -3612,47 +3838,47 @@ end # else # end # -# source://syntax_tree//lib/syntax_tree/node.rb#4789 +# source://syntax_tree//lib/syntax_tree/node.rb#4792 class SyntaxTree::Else < ::SyntaxTree::Node # @return [Else] a new instance of Else # - # source://syntax_tree//lib/syntax_tree/node.rb#4799 + # source://syntax_tree//lib/syntax_tree/node.rb#4802 def initialize(keyword:, statements:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#4850 + # source://syntax_tree//lib/syntax_tree/node.rb#4853 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#4806 + # source://syntax_tree//lib/syntax_tree/node.rb#4809 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#4810 + # source://syntax_tree//lib/syntax_tree/node.rb#4813 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#4797 + # source://syntax_tree//lib/syntax_tree/node.rb#4800 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#4814 + # source://syntax_tree//lib/syntax_tree/node.rb#4817 def copy(keyword: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#4810 + # source://syntax_tree//lib/syntax_tree/node.rb#4813 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#4828 + # source://syntax_tree//lib/syntax_tree/node.rb#4831 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#4837 + # source://syntax_tree//lib/syntax_tree/node.rb#4840 def format(q); end # [Kw] the else keyword # - # source://syntax_tree//lib/syntax_tree/node.rb#4791 + # source://syntax_tree//lib/syntax_tree/node.rb#4794 def keyword; end # [Statements] the expressions to be executed # - # source://syntax_tree//lib/syntax_tree/node.rb#4794 + # source://syntax_tree//lib/syntax_tree/node.rb#4797 def statements; end end @@ -3662,52 +3888,52 @@ end # elsif other_variable # end # -# source://syntax_tree//lib/syntax_tree/node.rb#4862 +# source://syntax_tree//lib/syntax_tree/node.rb#4865 class SyntaxTree::Elsif < ::SyntaxTree::Node # @return [Elsif] a new instance of Elsif # - # source://syntax_tree//lib/syntax_tree/node.rb#4875 + # source://syntax_tree//lib/syntax_tree/node.rb#4878 def initialize(predicate:, statements:, consequent:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#4939 + # source://syntax_tree//lib/syntax_tree/node.rb#4942 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#4883 + # source://syntax_tree//lib/syntax_tree/node.rb#4886 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#4887 + # source://syntax_tree//lib/syntax_tree/node.rb#4890 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#4873 + # source://syntax_tree//lib/syntax_tree/node.rb#4876 def comments; end # [nil | Elsif | Else] the next clause in the chain # - # source://syntax_tree//lib/syntax_tree/node.rb#4870 + # source://syntax_tree//lib/syntax_tree/node.rb#4873 def consequent; end - # source://syntax_tree//lib/syntax_tree/node.rb#4891 + # source://syntax_tree//lib/syntax_tree/node.rb#4894 def copy(predicate: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#4887 + # source://syntax_tree//lib/syntax_tree/node.rb#4890 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#4906 + # source://syntax_tree//lib/syntax_tree/node.rb#4909 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#4916 + # source://syntax_tree//lib/syntax_tree/node.rb#4919 def format(q); end # [Node] the expression to be checked # - # source://syntax_tree//lib/syntax_tree/node.rb#4864 + # source://syntax_tree//lib/syntax_tree/node.rb#4867 def predicate; end # [Statements] the expressions to be executed # - # source://syntax_tree//lib/syntax_tree/node.rb#4867 + # source://syntax_tree//lib/syntax_tree/node.rb#4870 def statements; end end @@ -3718,66 +3944,66 @@ end # second line # =end # -# source://syntax_tree//lib/syntax_tree/node.rb#4952 +# source://syntax_tree//lib/syntax_tree/node.rb#4955 class SyntaxTree::EmbDoc < ::SyntaxTree::Node # @return [EmbDoc] a new instance of EmbDoc # - # source://syntax_tree//lib/syntax_tree/node.rb#4956 + # source://syntax_tree//lib/syntax_tree/node.rb#4959 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#5024 + # source://syntax_tree//lib/syntax_tree/node.rb#5027 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#4992 + # source://syntax_tree//lib/syntax_tree/node.rb#4995 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#4996 + # source://syntax_tree//lib/syntax_tree/node.rb#4999 def child_nodes; end - # source://syntax_tree//lib/syntax_tree/node.rb#4988 + # source://syntax_tree//lib/syntax_tree/node.rb#4991 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#5000 + # source://syntax_tree//lib/syntax_tree/node.rb#5003 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#4996 + # source://syntax_tree//lib/syntax_tree/node.rb#4999 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#5009 + # source://syntax_tree//lib/syntax_tree/node.rb#5012 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#5013 + # source://syntax_tree//lib/syntax_tree/node.rb#5016 def format(q); end # @return [Boolean] # - # source://syntax_tree//lib/syntax_tree/node.rb#4984 + # source://syntax_tree//lib/syntax_tree/node.rb#4987 def ignore?; end # @return [Boolean] # - # source://syntax_tree//lib/syntax_tree/node.rb#4980 + # source://syntax_tree//lib/syntax_tree/node.rb#4983 def inline?; end - # source://syntax_tree//lib/syntax_tree/node.rb#4964 + # source://syntax_tree//lib/syntax_tree/node.rb#4967 def leading!; end # @return [Boolean] # - # source://syntax_tree//lib/syntax_tree/node.rb#4968 + # source://syntax_tree//lib/syntax_tree/node.rb#4971 def leading?; end - # source://syntax_tree//lib/syntax_tree/node.rb#4972 + # source://syntax_tree//lib/syntax_tree/node.rb#4975 def trailing!; end # @return [Boolean] # - # source://syntax_tree//lib/syntax_tree/node.rb#4976 + # source://syntax_tree//lib/syntax_tree/node.rb#4979 def trailing?; end # [String] the contents of the comment # - # source://syntax_tree//lib/syntax_tree/node.rb#4954 + # source://syntax_tree//lib/syntax_tree/node.rb#4957 def value; end end @@ -3787,34 +4013,34 @@ end # # "Hello, #{person}!" # -# source://syntax_tree//lib/syntax_tree/node.rb#5035 +# source://syntax_tree//lib/syntax_tree/node.rb#5038 class SyntaxTree::EmbExprBeg < ::SyntaxTree::Node # @return [EmbExprBeg] a new instance of EmbExprBeg # - # source://syntax_tree//lib/syntax_tree/node.rb#5039 + # source://syntax_tree//lib/syntax_tree/node.rb#5042 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#5065 + # source://syntax_tree//lib/syntax_tree/node.rb#5068 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#5044 + # source://syntax_tree//lib/syntax_tree/node.rb#5047 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#5048 + # source://syntax_tree//lib/syntax_tree/node.rb#5051 def child_nodes; end - # source://syntax_tree//lib/syntax_tree/node.rb#5052 + # source://syntax_tree//lib/syntax_tree/node.rb#5055 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#5048 + # source://syntax_tree//lib/syntax_tree/node.rb#5051 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#5061 + # source://syntax_tree//lib/syntax_tree/node.rb#5064 def deconstruct_keys(_keys); end # [String] the #{ used in the string # - # source://syntax_tree//lib/syntax_tree/node.rb#5037 + # source://syntax_tree//lib/syntax_tree/node.rb#5040 def value; end end @@ -3824,34 +4050,34 @@ end # # "Hello, #{person}!" # -# source://syntax_tree//lib/syntax_tree/node.rb#5076 +# source://syntax_tree//lib/syntax_tree/node.rb#5079 class SyntaxTree::EmbExprEnd < ::SyntaxTree::Node # @return [EmbExprEnd] a new instance of EmbExprEnd # - # source://syntax_tree//lib/syntax_tree/node.rb#5080 + # source://syntax_tree//lib/syntax_tree/node.rb#5083 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#5106 + # source://syntax_tree//lib/syntax_tree/node.rb#5109 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#5085 + # source://syntax_tree//lib/syntax_tree/node.rb#5088 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#5089 + # source://syntax_tree//lib/syntax_tree/node.rb#5092 def child_nodes; end - # source://syntax_tree//lib/syntax_tree/node.rb#5093 + # source://syntax_tree//lib/syntax_tree/node.rb#5096 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#5089 + # source://syntax_tree//lib/syntax_tree/node.rb#5092 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#5102 + # source://syntax_tree//lib/syntax_tree/node.rb#5105 def deconstruct_keys(_keys); end # [String] the } used in the string # - # source://syntax_tree//lib/syntax_tree/node.rb#5078 + # source://syntax_tree//lib/syntax_tree/node.rb#5081 def value; end end @@ -3863,34 +4089,34 @@ end # # In the example above, an EmbVar node represents the # because it forces # -# source://syntax_tree//lib/syntax_tree/node.rb#5119 +# source://syntax_tree//lib/syntax_tree/node.rb#5122 class SyntaxTree::EmbVar < ::SyntaxTree::Node # @return [EmbVar] a new instance of EmbVar # - # source://syntax_tree//lib/syntax_tree/node.rb#5123 + # source://syntax_tree//lib/syntax_tree/node.rb#5126 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#5149 + # source://syntax_tree//lib/syntax_tree/node.rb#5152 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#5128 + # source://syntax_tree//lib/syntax_tree/node.rb#5131 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#5132 + # source://syntax_tree//lib/syntax_tree/node.rb#5135 def child_nodes; end - # source://syntax_tree//lib/syntax_tree/node.rb#5136 + # source://syntax_tree//lib/syntax_tree/node.rb#5139 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#5132 + # source://syntax_tree//lib/syntax_tree/node.rb#5135 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#5145 + # source://syntax_tree//lib/syntax_tree/node.rb#5148 def deconstruct_keys(_keys); end # [String] the # used in the string # - # source://syntax_tree//lib/syntax_tree/node.rb#5121 + # source://syntax_tree//lib/syntax_tree/node.rb#5124 def value; end end @@ -3949,47 +4175,47 @@ end # ensure # end # -# source://syntax_tree//lib/syntax_tree/node.rb#5161 +# source://syntax_tree//lib/syntax_tree/node.rb#5164 class SyntaxTree::Ensure < ::SyntaxTree::Node # @return [Ensure] a new instance of Ensure # - # source://syntax_tree//lib/syntax_tree/node.rb#5171 + # source://syntax_tree//lib/syntax_tree/node.rb#5174 def initialize(keyword:, statements:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#5220 + # source://syntax_tree//lib/syntax_tree/node.rb#5223 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#5178 + # source://syntax_tree//lib/syntax_tree/node.rb#5181 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#5182 + # source://syntax_tree//lib/syntax_tree/node.rb#5185 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#5169 + # source://syntax_tree//lib/syntax_tree/node.rb#5172 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#5186 + # source://syntax_tree//lib/syntax_tree/node.rb#5189 def copy(keyword: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#5182 + # source://syntax_tree//lib/syntax_tree/node.rb#5185 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#5200 + # source://syntax_tree//lib/syntax_tree/node.rb#5203 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#5209 + # source://syntax_tree//lib/syntax_tree/node.rb#5212 def format(q); end # [Kw] the ensure keyword that began this node # - # source://syntax_tree//lib/syntax_tree/node.rb#5163 + # source://syntax_tree//lib/syntax_tree/node.rb#5166 def keyword; end # [Statements] the expressions to be executed # - # source://syntax_tree//lib/syntax_tree/node.rb#5166 + # source://syntax_tree//lib/syntax_tree/node.rb#5169 def statements; end end @@ -4004,42 +4230,42 @@ end # position typically represents a rest-type parameter, but in this case is # used to indicate that a trailing comma was used. # -# source://syntax_tree//lib/syntax_tree/node.rb#5236 +# source://syntax_tree//lib/syntax_tree/node.rb#5239 class SyntaxTree::ExcessedComma < ::SyntaxTree::Node # @return [ExcessedComma] a new instance of ExcessedComma # - # source://syntax_tree//lib/syntax_tree/node.rb#5243 + # source://syntax_tree//lib/syntax_tree/node.rb#5246 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#5278 + # source://syntax_tree//lib/syntax_tree/node.rb#5281 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#5249 + # source://syntax_tree//lib/syntax_tree/node.rb#5252 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#5253 + # source://syntax_tree//lib/syntax_tree/node.rb#5256 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#5241 + # source://syntax_tree//lib/syntax_tree/node.rb#5244 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#5257 + # source://syntax_tree//lib/syntax_tree/node.rb#5260 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#5253 + # source://syntax_tree//lib/syntax_tree/node.rb#5256 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#5270 + # source://syntax_tree//lib/syntax_tree/node.rb#5273 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#5274 + # source://syntax_tree//lib/syntax_tree/node.rb#5277 def format(q); end # [String] the comma # - # source://syntax_tree//lib/syntax_tree/node.rb#5238 + # source://syntax_tree//lib/syntax_tree/node.rb#5241 def value; end end @@ -4048,52 +4274,52 @@ end # # object.variable = value # -# source://syntax_tree//lib/syntax_tree/node.rb#5288 +# source://syntax_tree//lib/syntax_tree/node.rb#5291 class SyntaxTree::Field < ::SyntaxTree::Node # @return [Field] a new instance of Field # - # source://syntax_tree//lib/syntax_tree/node.rb#5301 + # source://syntax_tree//lib/syntax_tree/node.rb#5304 def initialize(parent:, operator:, name:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#5351 + # source://syntax_tree//lib/syntax_tree/node.rb#5354 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#5309 + # source://syntax_tree//lib/syntax_tree/node.rb#5312 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#5313 + # source://syntax_tree//lib/syntax_tree/node.rb#5316 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#5299 + # source://syntax_tree//lib/syntax_tree/node.rb#5302 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#5318 + # source://syntax_tree//lib/syntax_tree/node.rb#5321 def copy(parent: T.unsafe(nil), operator: T.unsafe(nil), name: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#5313 + # source://syntax_tree//lib/syntax_tree/node.rb#5316 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#5333 + # source://syntax_tree//lib/syntax_tree/node.rb#5336 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#5343 + # source://syntax_tree//lib/syntax_tree/node.rb#5346 def format(q); end # [Const | Ident] the name of the field being assigned # - # source://syntax_tree//lib/syntax_tree/node.rb#5296 + # source://syntax_tree//lib/syntax_tree/node.rb#5299 def name; end # [:"::" | Op | Period] the operator being used for the assignment # - # source://syntax_tree//lib/syntax_tree/node.rb#5293 + # source://syntax_tree//lib/syntax_tree/node.rb#5296 def operator; end # [Node] the parent object that owns the field being assigned # - # source://syntax_tree//lib/syntax_tree/node.rb#5290 + # source://syntax_tree//lib/syntax_tree/node.rb#5293 def parent; end end @@ -4605,42 +4831,42 @@ end # # 1.0 # -# source://syntax_tree//lib/syntax_tree/node.rb#5361 +# source://syntax_tree//lib/syntax_tree/node.rb#5364 class SyntaxTree::FloatLiteral < ::SyntaxTree::Node # @return [FloatLiteral] a new instance of FloatLiteral # - # source://syntax_tree//lib/syntax_tree/node.rb#5368 + # source://syntax_tree//lib/syntax_tree/node.rb#5371 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#5403 + # source://syntax_tree//lib/syntax_tree/node.rb#5406 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#5374 + # source://syntax_tree//lib/syntax_tree/node.rb#5377 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#5378 + # source://syntax_tree//lib/syntax_tree/node.rb#5381 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#5366 + # source://syntax_tree//lib/syntax_tree/node.rb#5369 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#5382 + # source://syntax_tree//lib/syntax_tree/node.rb#5385 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#5378 + # source://syntax_tree//lib/syntax_tree/node.rb#5381 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#5395 + # source://syntax_tree//lib/syntax_tree/node.rb#5398 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#5399 + # source://syntax_tree//lib/syntax_tree/node.rb#5402 def format(q); end # [String] the value of the floating point number literal # - # source://syntax_tree//lib/syntax_tree/node.rb#5363 + # source://syntax_tree//lib/syntax_tree/node.rb#5366 def value; end end @@ -4687,58 +4913,58 @@ end # in [*, 7, *] # end # -# source://syntax_tree//lib/syntax_tree/node.rb#5415 +# source://syntax_tree//lib/syntax_tree/node.rb#5418 class SyntaxTree::FndPtn < ::SyntaxTree::Node # @return [FndPtn] a new instance of FndPtn # - # source://syntax_tree//lib/syntax_tree/node.rb#5432 + # source://syntax_tree//lib/syntax_tree/node.rb#5435 def initialize(constant:, left:, values:, right:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#5501 + # source://syntax_tree//lib/syntax_tree/node.rb#5504 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#5441 + # source://syntax_tree//lib/syntax_tree/node.rb#5444 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#5445 + # source://syntax_tree//lib/syntax_tree/node.rb#5448 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#5430 + # source://syntax_tree//lib/syntax_tree/node.rb#5433 def comments; end - # [nil | Node] the optional constant wrapper + # [nil | VarRef | ConstPathRef] the optional constant wrapper # - # source://syntax_tree//lib/syntax_tree/node.rb#5417 + # source://syntax_tree//lib/syntax_tree/node.rb#5420 def constant; end - # source://syntax_tree//lib/syntax_tree/node.rb#5449 + # source://syntax_tree//lib/syntax_tree/node.rb#5452 def copy(constant: T.unsafe(nil), left: T.unsafe(nil), values: T.unsafe(nil), right: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#5445 + # source://syntax_tree//lib/syntax_tree/node.rb#5448 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#5465 + # source://syntax_tree//lib/syntax_tree/node.rb#5468 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#5476 + # source://syntax_tree//lib/syntax_tree/node.rb#5479 def format(q); end # [VarField] the splat on the left-hand side # - # source://syntax_tree//lib/syntax_tree/node.rb#5420 + # source://syntax_tree//lib/syntax_tree/node.rb#5423 def left; end # [VarField] the splat on the right-hand side # - # source://syntax_tree//lib/syntax_tree/node.rb#5427 + # source://syntax_tree//lib/syntax_tree/node.rb#5430 def right; end # [Array[ Node ]] the list of positional expressions in the pattern that # are being matched # - # source://syntax_tree//lib/syntax_tree/node.rb#5424 + # source://syntax_tree//lib/syntax_tree/node.rb#5427 def values; end end @@ -4747,53 +4973,53 @@ end # for value in list do # end # -# source://syntax_tree//lib/syntax_tree/node.rb#5513 +# source://syntax_tree//lib/syntax_tree/node.rb#5516 class SyntaxTree::For < ::SyntaxTree::Node # @return [For] a new instance of For # - # source://syntax_tree//lib/syntax_tree/node.rb#5527 + # source://syntax_tree//lib/syntax_tree/node.rb#5530 def initialize(index:, collection:, statements:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#5587 + # source://syntax_tree//lib/syntax_tree/node.rb#5590 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#5535 + # source://syntax_tree//lib/syntax_tree/node.rb#5538 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#5539 + # source://syntax_tree//lib/syntax_tree/node.rb#5542 def child_nodes; end # [Node] the object being enumerated in the loop # - # source://syntax_tree//lib/syntax_tree/node.rb#5519 + # source://syntax_tree//lib/syntax_tree/node.rb#5522 def collection; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#5525 + # source://syntax_tree//lib/syntax_tree/node.rb#5528 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#5543 + # source://syntax_tree//lib/syntax_tree/node.rb#5546 def copy(index: T.unsafe(nil), collection: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#5539 + # source://syntax_tree//lib/syntax_tree/node.rb#5542 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#5558 + # source://syntax_tree//lib/syntax_tree/node.rb#5561 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#5568 + # source://syntax_tree//lib/syntax_tree/node.rb#5571 def format(q); end # [MLHS | VarField] the variable declaration being used to # pull values out of the object being enumerated # - # source://syntax_tree//lib/syntax_tree/node.rb#5516 + # source://syntax_tree//lib/syntax_tree/node.rb#5519 def index; end # [Statements] the statements to be executed # - # source://syntax_tree//lib/syntax_tree/node.rb#5522 + # source://syntax_tree//lib/syntax_tree/node.rb#5525 def statements; end end @@ -4950,49 +5176,49 @@ end # # $variable # -# source://syntax_tree//lib/syntax_tree/node.rb#5597 +# source://syntax_tree//lib/syntax_tree/node.rb#5600 class SyntaxTree::GVar < ::SyntaxTree::Node # @return [GVar] a new instance of GVar # - # source://syntax_tree//lib/syntax_tree/node.rb#5604 + # source://syntax_tree//lib/syntax_tree/node.rb#5607 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#5639 + # source://syntax_tree//lib/syntax_tree/node.rb#5642 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#5610 + # source://syntax_tree//lib/syntax_tree/node.rb#5613 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#5614 + # source://syntax_tree//lib/syntax_tree/node.rb#5617 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#5602 + # source://syntax_tree//lib/syntax_tree/node.rb#5605 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#5618 + # source://syntax_tree//lib/syntax_tree/node.rb#5621 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#5614 + # source://syntax_tree//lib/syntax_tree/node.rb#5617 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#5631 + # source://syntax_tree//lib/syntax_tree/node.rb#5634 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#5635 + # source://syntax_tree//lib/syntax_tree/node.rb#5638 def format(q); end # [String] the name of the global variable # - # source://syntax_tree//lib/syntax_tree/node.rb#5599 + # source://syntax_tree//lib/syntax_tree/node.rb#5602 def value; end end # This holds references to objects that respond to both #parse and #format # so that we can use them in the CLI. # -# source://syntax_tree//lib/syntax_tree.rb#42 +# source://syntax_tree//lib/syntax_tree.rb#43 SyntaxTree::HANDLERS = T.let(T.unsafe(nil), Hash) # This module is responsible for formatting the assocs contained within a @@ -5040,50 +5266,50 @@ end # # { key => value } # -# source://syntax_tree//lib/syntax_tree/node.rb#5648 +# source://syntax_tree//lib/syntax_tree/node.rb#5651 class SyntaxTree::HashLiteral < ::SyntaxTree::Node # @return [HashLiteral] a new instance of HashLiteral # - # source://syntax_tree//lib/syntax_tree/node.rb#5684 + # source://syntax_tree//lib/syntax_tree/node.rb#5687 def initialize(lbrace:, assocs:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#5725 + # source://syntax_tree//lib/syntax_tree/node.rb#5728 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#5691 + # source://syntax_tree//lib/syntax_tree/node.rb#5694 def accept(visitor); end # [Array[ Assoc | AssocSplat ]] the optional contents of the hash # - # source://syntax_tree//lib/syntax_tree/node.rb#5679 + # source://syntax_tree//lib/syntax_tree/node.rb#5682 def assocs; end - # source://syntax_tree//lib/syntax_tree/node.rb#5695 + # source://syntax_tree//lib/syntax_tree/node.rb#5698 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#5682 + # source://syntax_tree//lib/syntax_tree/node.rb#5685 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#5699 + # source://syntax_tree//lib/syntax_tree/node.rb#5702 def copy(lbrace: T.unsafe(nil), assocs: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#5695 + # source://syntax_tree//lib/syntax_tree/node.rb#5698 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#5713 + # source://syntax_tree//lib/syntax_tree/node.rb#5716 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#5717 + # source://syntax_tree//lib/syntax_tree/node.rb#5720 def format(q); end - # source://syntax_tree//lib/syntax_tree/node.rb#5730 + # source://syntax_tree//lib/syntax_tree/node.rb#5733 def format_key(q, key); end # [LBrace] the left brace that opens this hash # - # source://syntax_tree//lib/syntax_tree/node.rb#5676 + # source://syntax_tree//lib/syntax_tree/node.rb#5679 def lbrace; end private @@ -5093,10 +5319,10 @@ class SyntaxTree::HashLiteral < ::SyntaxTree::Node # # @return [Boolean] # - # source://syntax_tree//lib/syntax_tree/node.rb#5738 + # source://syntax_tree//lib/syntax_tree/node.rb#5741 def empty_with_comments?; end - # source://syntax_tree//lib/syntax_tree/node.rb#5742 + # source://syntax_tree//lib/syntax_tree/node.rb#5745 def format_contents(q); end end @@ -5104,19 +5330,19 @@ end # but _does_ contain comments. In this case we do some special formatting to # make sure the comments gets indented properly. # -# source://syntax_tree//lib/syntax_tree/node.rb#5652 +# source://syntax_tree//lib/syntax_tree/node.rb#5655 class SyntaxTree::HashLiteral::EmptyWithCommentsFormatter # @return [EmptyWithCommentsFormatter] a new instance of EmptyWithCommentsFormatter # - # source://syntax_tree//lib/syntax_tree/node.rb#5656 + # source://syntax_tree//lib/syntax_tree/node.rb#5659 def initialize(lbrace); end - # source://syntax_tree//lib/syntax_tree/node.rb#5660 + # source://syntax_tree//lib/syntax_tree/node.rb#5663 def format(q); end # [LBrace] the opening brace # - # source://syntax_tree//lib/syntax_tree/node.rb#5654 + # source://syntax_tree//lib/syntax_tree/node.rb#5657 def lbrace; end end @@ -5126,65 +5352,65 @@ end # contents # DOC # -# source://syntax_tree//lib/syntax_tree/node.rb#5771 +# source://syntax_tree//lib/syntax_tree/node.rb#5774 class SyntaxTree::Heredoc < ::SyntaxTree::Node # @return [Heredoc] a new instance of Heredoc # - # source://syntax_tree//lib/syntax_tree/node.rb#5788 + # source://syntax_tree//lib/syntax_tree/node.rb#5791 def initialize(beginning:, location:, ending: T.unsafe(nil), dedent: T.unsafe(nil), parts: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#5870 + # source://syntax_tree//lib/syntax_tree/node.rb#5873 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#5797 + # source://syntax_tree//lib/syntax_tree/node.rb#5800 def accept(visitor); end # [HeredocBeg] the opening of the heredoc # - # source://syntax_tree//lib/syntax_tree/node.rb#5773 + # source://syntax_tree//lib/syntax_tree/node.rb#5776 def beginning; end - # source://syntax_tree//lib/syntax_tree/node.rb#5801 + # source://syntax_tree//lib/syntax_tree/node.rb#5804 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#5786 + # source://syntax_tree//lib/syntax_tree/node.rb#5789 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#5805 + # source://syntax_tree//lib/syntax_tree/node.rb#5808 def copy(beginning: T.unsafe(nil), location: T.unsafe(nil), ending: T.unsafe(nil), parts: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#5801 + # source://syntax_tree//lib/syntax_tree/node.rb#5804 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#5820 + # source://syntax_tree//lib/syntax_tree/node.rb#5823 def deconstruct_keys(_keys); end # [Integer] how far to dedent the heredoc # - # source://syntax_tree//lib/syntax_tree/node.rb#5779 + # source://syntax_tree//lib/syntax_tree/node.rb#5782 def dedent; end # [HeredocEnd] the ending of the heredoc # - # source://syntax_tree//lib/syntax_tree/node.rb#5776 + # source://syntax_tree//lib/syntax_tree/node.rb#5779 def ending; end - # source://syntax_tree//lib/syntax_tree/node.rb#5835 + # source://syntax_tree//lib/syntax_tree/node.rb#5838 def format(q); end # [Array[ StringEmbExpr | StringDVar | TStringContent ]] the parts of the # heredoc string literal # - # source://syntax_tree//lib/syntax_tree/node.rb#5783 + # source://syntax_tree//lib/syntax_tree/node.rb#5786 def parts; end end # This is a very specific behavior where you want to force a newline, but # don't want to force the break parent. # -# source://syntax_tree//lib/syntax_tree/node.rb#5832 +# source://syntax_tree//lib/syntax_tree/node.rb#5835 SyntaxTree::Heredoc::SEPARATOR = T.let(T.unsafe(nil), PrettierPrint::Breakable) # HeredocBeg represents the beginning declaration of a heredoc. @@ -5195,42 +5421,42 @@ SyntaxTree::Heredoc::SEPARATOR = T.let(T.unsafe(nil), PrettierPrint::Breakable) # # In the example above the HeredocBeg node represents <<~DOC. # -# source://syntax_tree//lib/syntax_tree/node.rb#5883 +# source://syntax_tree//lib/syntax_tree/node.rb#5886 class SyntaxTree::HeredocBeg < ::SyntaxTree::Node # @return [HeredocBeg] a new instance of HeredocBeg # - # source://syntax_tree//lib/syntax_tree/node.rb#5890 + # source://syntax_tree//lib/syntax_tree/node.rb#5893 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#5925 + # source://syntax_tree//lib/syntax_tree/node.rb#5928 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#5896 + # source://syntax_tree//lib/syntax_tree/node.rb#5899 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#5900 + # source://syntax_tree//lib/syntax_tree/node.rb#5903 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#5888 + # source://syntax_tree//lib/syntax_tree/node.rb#5891 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#5904 + # source://syntax_tree//lib/syntax_tree/node.rb#5907 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#5900 + # source://syntax_tree//lib/syntax_tree/node.rb#5903 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#5917 + # source://syntax_tree//lib/syntax_tree/node.rb#5920 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#5921 + # source://syntax_tree//lib/syntax_tree/node.rb#5924 def format(q); end # [String] the opening declaration of the heredoc # - # source://syntax_tree//lib/syntax_tree/node.rb#5885 + # source://syntax_tree//lib/syntax_tree/node.rb#5888 def value; end end @@ -5242,42 +5468,42 @@ end # # In the example above the HeredocEnd node represents the closing DOC. # -# source://syntax_tree//lib/syntax_tree/node.rb#5937 +# source://syntax_tree//lib/syntax_tree/node.rb#5940 class SyntaxTree::HeredocEnd < ::SyntaxTree::Node # @return [HeredocEnd] a new instance of HeredocEnd # - # source://syntax_tree//lib/syntax_tree/node.rb#5944 + # source://syntax_tree//lib/syntax_tree/node.rb#5947 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#5979 + # source://syntax_tree//lib/syntax_tree/node.rb#5982 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#5950 + # source://syntax_tree//lib/syntax_tree/node.rb#5953 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#5954 + # source://syntax_tree//lib/syntax_tree/node.rb#5957 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#5942 + # source://syntax_tree//lib/syntax_tree/node.rb#5945 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#5958 + # source://syntax_tree//lib/syntax_tree/node.rb#5961 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#5954 + # source://syntax_tree//lib/syntax_tree/node.rb#5957 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#5971 + # source://syntax_tree//lib/syntax_tree/node.rb#5974 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#5975 + # source://syntax_tree//lib/syntax_tree/node.rb#5978 def format(q); end # [String] the closing declaration of the heredoc # - # source://syntax_tree//lib/syntax_tree/node.rb#5939 + # source://syntax_tree//lib/syntax_tree/node.rb#5942 def value; end end @@ -5288,105 +5514,105 @@ end # in { key: } # end # -# source://syntax_tree//lib/syntax_tree/node.rb#5991 +# source://syntax_tree//lib/syntax_tree/node.rb#5994 class SyntaxTree::HshPtn < ::SyntaxTree::Node # @return [HshPtn] a new instance of HshPtn # - # source://syntax_tree//lib/syntax_tree/node.rb#6051 + # source://syntax_tree//lib/syntax_tree/node.rb#6054 def initialize(constant:, keywords:, keyword_rest:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#6144 + # source://syntax_tree//lib/syntax_tree/node.rb#6147 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#6059 + # source://syntax_tree//lib/syntax_tree/node.rb#6062 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#6063 + # source://syntax_tree//lib/syntax_tree/node.rb#6066 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#6049 + # source://syntax_tree//lib/syntax_tree/node.rb#6052 def comments; end - # [nil | Node] the optional constant wrapper + # [nil | VarRef | ConstPathRef] the optional constant wrapper # - # source://syntax_tree//lib/syntax_tree/node.rb#6039 + # source://syntax_tree//lib/syntax_tree/node.rb#6042 def constant; end - # source://syntax_tree//lib/syntax_tree/node.rb#6067 + # source://syntax_tree//lib/syntax_tree/node.rb#6070 def copy(constant: T.unsafe(nil), keywords: T.unsafe(nil), keyword_rest: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#6063 + # source://syntax_tree//lib/syntax_tree/node.rb#6066 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#6082 + # source://syntax_tree//lib/syntax_tree/node.rb#6085 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#6092 + # source://syntax_tree//lib/syntax_tree/node.rb#6095 def format(q); end # [nil | VarField] an optional parameter to gather up all remaining keywords # - # source://syntax_tree//lib/syntax_tree/node.rb#6046 + # source://syntax_tree//lib/syntax_tree/node.rb#6049 def keyword_rest; end # [Array[ [DynaSymbol | Label, nil | Node] ]] the set of tuples # representing the keywords that should be matched against in the pattern # - # source://syntax_tree//lib/syntax_tree/node.rb#6043 + # source://syntax_tree//lib/syntax_tree/node.rb#6046 def keywords; end private - # source://syntax_tree//lib/syntax_tree/node.rb#6155 + # source://syntax_tree//lib/syntax_tree/node.rb#6158 def format_contents(q, parts, nested); end end # Formats a key-value pair in a hash pattern. The value is optional. # -# source://syntax_tree//lib/syntax_tree/node.rb#5993 +# source://syntax_tree//lib/syntax_tree/node.rb#5996 class SyntaxTree::HshPtn::KeywordFormatter # @return [KeywordFormatter] a new instance of KeywordFormatter # - # source://syntax_tree//lib/syntax_tree/node.rb#6000 + # source://syntax_tree//lib/syntax_tree/node.rb#6003 def initialize(key, value); end - # source://syntax_tree//lib/syntax_tree/node.rb#6005 + # source://syntax_tree//lib/syntax_tree/node.rb#6008 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#6009 + # source://syntax_tree//lib/syntax_tree/node.rb#6012 def format(q); end # [Label] the keyword being used # - # source://syntax_tree//lib/syntax_tree/node.rb#5995 + # source://syntax_tree//lib/syntax_tree/node.rb#5998 def key; end # [Node] the optional value for the keyword # - # source://syntax_tree//lib/syntax_tree/node.rb#5998 + # source://syntax_tree//lib/syntax_tree/node.rb#6001 def value; end end # Formats the optional double-splat from the pattern. # -# source://syntax_tree//lib/syntax_tree/node.rb#6020 +# source://syntax_tree//lib/syntax_tree/node.rb#6023 class SyntaxTree::HshPtn::KeywordRestFormatter # @return [KeywordRestFormatter] a new instance of KeywordRestFormatter # - # source://syntax_tree//lib/syntax_tree/node.rb#6024 + # source://syntax_tree//lib/syntax_tree/node.rb#6027 def initialize(keyword_rest); end - # source://syntax_tree//lib/syntax_tree/node.rb#6028 + # source://syntax_tree//lib/syntax_tree/node.rb#6031 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#6032 + # source://syntax_tree//lib/syntax_tree/node.rb#6035 def format(q); end # [VarField] the parameter that matches the remaining keywords # - # source://syntax_tree//lib/syntax_tree/node.rb#6022 + # source://syntax_tree//lib/syntax_tree/node.rb#6025 def keyword_rest; end end @@ -5394,42 +5620,42 @@ end # # @variable # -# source://syntax_tree//lib/syntax_tree/node.rb#6875 +# source://syntax_tree//lib/syntax_tree/node.rb#6878 class SyntaxTree::IVar < ::SyntaxTree::Node # @return [IVar] a new instance of IVar # - # source://syntax_tree//lib/syntax_tree/node.rb#6882 + # source://syntax_tree//lib/syntax_tree/node.rb#6885 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#6917 + # source://syntax_tree//lib/syntax_tree/node.rb#6920 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#6888 + # source://syntax_tree//lib/syntax_tree/node.rb#6891 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#6892 + # source://syntax_tree//lib/syntax_tree/node.rb#6895 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#6880 + # source://syntax_tree//lib/syntax_tree/node.rb#6883 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#6896 + # source://syntax_tree//lib/syntax_tree/node.rb#6899 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#6892 + # source://syntax_tree//lib/syntax_tree/node.rb#6895 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#6909 + # source://syntax_tree//lib/syntax_tree/node.rb#6912 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#6913 + # source://syntax_tree//lib/syntax_tree/node.rb#6916 def format(q); end # [String] the name of the instance variable # - # source://syntax_tree//lib/syntax_tree/node.rb#6877 + # source://syntax_tree//lib/syntax_tree/node.rb#6880 def value; end end @@ -5438,42 +5664,42 @@ end # # value # -# source://syntax_tree//lib/syntax_tree/node.rb#6178 +# source://syntax_tree//lib/syntax_tree/node.rb#6181 class SyntaxTree::Ident < ::SyntaxTree::Node # @return [Ident] a new instance of Ident # - # source://syntax_tree//lib/syntax_tree/node.rb#6185 + # source://syntax_tree//lib/syntax_tree/node.rb#6188 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#6220 + # source://syntax_tree//lib/syntax_tree/node.rb#6223 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#6191 + # source://syntax_tree//lib/syntax_tree/node.rb#6194 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#6195 + # source://syntax_tree//lib/syntax_tree/node.rb#6198 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#6183 + # source://syntax_tree//lib/syntax_tree/node.rb#6186 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#6199 + # source://syntax_tree//lib/syntax_tree/node.rb#6202 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#6195 + # source://syntax_tree//lib/syntax_tree/node.rb#6198 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#6212 + # source://syntax_tree//lib/syntax_tree/node.rb#6215 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#6216 + # source://syntax_tree//lib/syntax_tree/node.rb#6219 def format(q); end # [String] the value of the identifier # - # source://syntax_tree//lib/syntax_tree/node.rb#6180 + # source://syntax_tree//lib/syntax_tree/node.rb#6183 def value; end end @@ -5482,59 +5708,59 @@ end # if predicate # end # -# source://syntax_tree//lib/syntax_tree/node.rb#6468 +# source://syntax_tree//lib/syntax_tree/node.rb#6471 class SyntaxTree::IfNode < ::SyntaxTree::Node # @return [IfNode] a new instance of IfNode # - # source://syntax_tree//lib/syntax_tree/node.rb#6481 + # source://syntax_tree//lib/syntax_tree/node.rb#6484 def initialize(predicate:, statements:, consequent:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#6526 + # source://syntax_tree//lib/syntax_tree/node.rb#6529 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#6489 + # source://syntax_tree//lib/syntax_tree/node.rb#6492 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#6493 + # source://syntax_tree//lib/syntax_tree/node.rb#6496 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#6479 + # source://syntax_tree//lib/syntax_tree/node.rb#6482 def comments; end # [nil | Elsif | Else] the next clause in the chain # - # source://syntax_tree//lib/syntax_tree/node.rb#6476 + # source://syntax_tree//lib/syntax_tree/node.rb#6479 def consequent; end - # source://syntax_tree//lib/syntax_tree/node.rb#6497 + # source://syntax_tree//lib/syntax_tree/node.rb#6500 def copy(predicate: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#6493 + # source://syntax_tree//lib/syntax_tree/node.rb#6496 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#6512 + # source://syntax_tree//lib/syntax_tree/node.rb#6515 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#6522 + # source://syntax_tree//lib/syntax_tree/node.rb#6525 def format(q); end # Checks if the node was originally found in the modifier form. # # @return [Boolean] # - # source://syntax_tree//lib/syntax_tree/node.rb#6532 + # source://syntax_tree//lib/syntax_tree/node.rb#6535 def modifier?; end # [Node] the expression to be checked # - # source://syntax_tree//lib/syntax_tree/node.rb#6470 + # source://syntax_tree//lib/syntax_tree/node.rb#6473 def predicate; end # [Statements] the expressions to be executed # - # source://syntax_tree//lib/syntax_tree/node.rb#6473 + # source://syntax_tree//lib/syntax_tree/node.rb#6476 def statements; end end @@ -5542,60 +5768,60 @@ end # # predicate ? truthy : falsy # -# source://syntax_tree//lib/syntax_tree/node.rb#6541 +# source://syntax_tree//lib/syntax_tree/node.rb#6544 class SyntaxTree::IfOp < ::SyntaxTree::Node # @return [IfOp] a new instance of IfOp # - # source://syntax_tree//lib/syntax_tree/node.rb#6554 + # source://syntax_tree//lib/syntax_tree/node.rb#6557 def initialize(predicate:, truthy:, falsy:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#6628 + # source://syntax_tree//lib/syntax_tree/node.rb#6631 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#6562 + # source://syntax_tree//lib/syntax_tree/node.rb#6565 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#6566 + # source://syntax_tree//lib/syntax_tree/node.rb#6569 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#6552 + # source://syntax_tree//lib/syntax_tree/node.rb#6555 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#6570 + # source://syntax_tree//lib/syntax_tree/node.rb#6573 def copy(predicate: T.unsafe(nil), truthy: T.unsafe(nil), falsy: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#6566 + # source://syntax_tree//lib/syntax_tree/node.rb#6569 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#6585 + # source://syntax_tree//lib/syntax_tree/node.rb#6588 def deconstruct_keys(_keys); end # [Node] the expression to be executed if the predicate is falsy # - # source://syntax_tree//lib/syntax_tree/node.rb#6549 + # source://syntax_tree//lib/syntax_tree/node.rb#6552 def falsy; end - # source://syntax_tree//lib/syntax_tree/node.rb#6595 + # source://syntax_tree//lib/syntax_tree/node.rb#6598 def format(q); end # [Node] the expression to be checked # - # source://syntax_tree//lib/syntax_tree/node.rb#6543 + # source://syntax_tree//lib/syntax_tree/node.rb#6546 def predicate; end # [Node] the expression to be executed if the predicate is truthy # - # source://syntax_tree//lib/syntax_tree/node.rb#6546 + # source://syntax_tree//lib/syntax_tree/node.rb#6549 def truthy; end private - # source://syntax_tree//lib/syntax_tree/node.rb#6635 + # source://syntax_tree//lib/syntax_tree/node.rb#6638 def format_break(q); end - # source://syntax_tree//lib/syntax_tree/node.rb#6658 + # source://syntax_tree//lib/syntax_tree/node.rb#6661 def format_flat(q); end end @@ -5603,42 +5829,42 @@ end # # 1i # -# source://syntax_tree//lib/syntax_tree/node.rb#6677 +# source://syntax_tree//lib/syntax_tree/node.rb#6680 class SyntaxTree::Imaginary < ::SyntaxTree::Node # @return [Imaginary] a new instance of Imaginary # - # source://syntax_tree//lib/syntax_tree/node.rb#6684 + # source://syntax_tree//lib/syntax_tree/node.rb#6687 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#6719 + # source://syntax_tree//lib/syntax_tree/node.rb#6722 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#6690 + # source://syntax_tree//lib/syntax_tree/node.rb#6693 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#6694 + # source://syntax_tree//lib/syntax_tree/node.rb#6697 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#6682 + # source://syntax_tree//lib/syntax_tree/node.rb#6685 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#6698 + # source://syntax_tree//lib/syntax_tree/node.rb#6701 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#6694 + # source://syntax_tree//lib/syntax_tree/node.rb#6697 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#6711 + # source://syntax_tree//lib/syntax_tree/node.rb#6714 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#6715 + # source://syntax_tree//lib/syntax_tree/node.rb#6718 def format(q); end # [String] the value of the imaginary number literal # - # source://syntax_tree//lib/syntax_tree/node.rb#6679 + # source://syntax_tree//lib/syntax_tree/node.rb#6682 def value; end end @@ -5649,52 +5875,52 @@ end # in pattern # end # -# source://syntax_tree//lib/syntax_tree/node.rb#6731 +# source://syntax_tree//lib/syntax_tree/node.rb#6734 class SyntaxTree::In < ::SyntaxTree::Node # @return [In] a new instance of In # - # source://syntax_tree//lib/syntax_tree/node.rb#6744 + # source://syntax_tree//lib/syntax_tree/node.rb#6747 def initialize(pattern:, statements:, consequent:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#6809 + # source://syntax_tree//lib/syntax_tree/node.rb#6812 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#6752 + # source://syntax_tree//lib/syntax_tree/node.rb#6755 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#6756 + # source://syntax_tree//lib/syntax_tree/node.rb#6759 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#6742 + # source://syntax_tree//lib/syntax_tree/node.rb#6745 def comments; end # [nil | In | Else] the next clause in the chain # - # source://syntax_tree//lib/syntax_tree/node.rb#6739 + # source://syntax_tree//lib/syntax_tree/node.rb#6742 def consequent; end - # source://syntax_tree//lib/syntax_tree/node.rb#6760 + # source://syntax_tree//lib/syntax_tree/node.rb#6763 def copy(pattern: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#6756 + # source://syntax_tree//lib/syntax_tree/node.rb#6759 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#6775 + # source://syntax_tree//lib/syntax_tree/node.rb#6778 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#6785 + # source://syntax_tree//lib/syntax_tree/node.rb#6788 def format(q); end # [Node] the pattern to check against # - # source://syntax_tree//lib/syntax_tree/node.rb#6733 + # source://syntax_tree//lib/syntax_tree/node.rb#6736 def pattern; end # [Statements] the expressions to execute if the pattern matched # - # source://syntax_tree//lib/syntax_tree/node.rb#6736 + # source://syntax_tree//lib/syntax_tree/node.rb#6739 def statements; end end @@ -6159,42 +6385,42 @@ end # # 1 # -# source://syntax_tree//lib/syntax_tree/node.rb#6819 +# source://syntax_tree//lib/syntax_tree/node.rb#6822 class SyntaxTree::Int < ::SyntaxTree::Node # @return [Int] a new instance of Int # - # source://syntax_tree//lib/syntax_tree/node.rb#6826 + # source://syntax_tree//lib/syntax_tree/node.rb#6829 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#6866 + # source://syntax_tree//lib/syntax_tree/node.rb#6869 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#6832 + # source://syntax_tree//lib/syntax_tree/node.rb#6835 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#6836 + # source://syntax_tree//lib/syntax_tree/node.rb#6839 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#6824 + # source://syntax_tree//lib/syntax_tree/node.rb#6827 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#6840 + # source://syntax_tree//lib/syntax_tree/node.rb#6843 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#6836 + # source://syntax_tree//lib/syntax_tree/node.rb#6839 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#6850 + # source://syntax_tree//lib/syntax_tree/node.rb#6853 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#6854 + # source://syntax_tree//lib/syntax_tree/node.rb#6857 def format(q); end # [String] the value of the integer # - # source://syntax_tree//lib/syntax_tree/node.rb#6821 + # source://syntax_tree//lib/syntax_tree/node.rb#6824 def value; end end @@ -6251,47 +6477,47 @@ end # # then the contents of the symbol node will contain a Kw node. # -# source://syntax_tree//lib/syntax_tree/node.rb#6935 +# source://syntax_tree//lib/syntax_tree/node.rb#6938 class SyntaxTree::Kw < ::SyntaxTree::Node # @return [Kw] a new instance of Kw # - # source://syntax_tree//lib/syntax_tree/node.rb#6945 + # source://syntax_tree//lib/syntax_tree/node.rb#6948 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#6978 + # source://syntax_tree//lib/syntax_tree/node.rb#6981 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#6952 + # source://syntax_tree//lib/syntax_tree/node.rb#6955 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#6956 + # source://syntax_tree//lib/syntax_tree/node.rb#6959 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#6943 + # source://syntax_tree//lib/syntax_tree/node.rb#6946 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#6960 + # source://syntax_tree//lib/syntax_tree/node.rb#6963 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#6956 + # source://syntax_tree//lib/syntax_tree/node.rb#6959 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#6970 + # source://syntax_tree//lib/syntax_tree/node.rb#6973 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#6974 + # source://syntax_tree//lib/syntax_tree/node.rb#6977 def format(q); end # [Symbol] the symbol version of the value # - # source://syntax_tree//lib/syntax_tree/node.rb#6940 + # source://syntax_tree//lib/syntax_tree/node.rb#6943 def name; end # [String] the value of the keyword # - # source://syntax_tree//lib/syntax_tree/node.rb#6937 + # source://syntax_tree//lib/syntax_tree/node.rb#6940 def value; end end @@ -6300,83 +6526,83 @@ end # # def method(**kwargs) end # -# source://syntax_tree//lib/syntax_tree/node.rb#6988 +# source://syntax_tree//lib/syntax_tree/node.rb#6991 class SyntaxTree::KwRestParam < ::SyntaxTree::Node # @return [KwRestParam] a new instance of KwRestParam # - # source://syntax_tree//lib/syntax_tree/node.rb#6995 + # source://syntax_tree//lib/syntax_tree/node.rb#6998 def initialize(name:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#7031 + # source://syntax_tree//lib/syntax_tree/node.rb#7034 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#7001 + # source://syntax_tree//lib/syntax_tree/node.rb#7004 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#7005 + # source://syntax_tree//lib/syntax_tree/node.rb#7008 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#6993 + # source://syntax_tree//lib/syntax_tree/node.rb#6996 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#7009 + # source://syntax_tree//lib/syntax_tree/node.rb#7012 def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#7005 + # source://syntax_tree//lib/syntax_tree/node.rb#7008 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#7022 + # source://syntax_tree//lib/syntax_tree/node.rb#7025 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#7026 + # source://syntax_tree//lib/syntax_tree/node.rb#7029 def format(q); end # [nil | Ident] the name of the parameter # - # source://syntax_tree//lib/syntax_tree/node.rb#6990 + # source://syntax_tree//lib/syntax_tree/node.rb#6993 def name; end end # LBrace represents the use of a left brace, i.e., {. # -# source://syntax_tree//lib/syntax_tree/node.rb#7332 +# source://syntax_tree//lib/syntax_tree/node.rb#7316 class SyntaxTree::LBrace < ::SyntaxTree::Node # @return [LBrace] a new instance of LBrace # - # source://syntax_tree//lib/syntax_tree/node.rb#7339 + # source://syntax_tree//lib/syntax_tree/node.rb#7323 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#7374 + # source://syntax_tree//lib/syntax_tree/node.rb#7358 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#7345 + # source://syntax_tree//lib/syntax_tree/node.rb#7329 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#7349 + # source://syntax_tree//lib/syntax_tree/node.rb#7333 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#7337 + # source://syntax_tree//lib/syntax_tree/node.rb#7321 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#7353 + # source://syntax_tree//lib/syntax_tree/node.rb#7337 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#7349 + # source://syntax_tree//lib/syntax_tree/node.rb#7333 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#7366 + # source://syntax_tree//lib/syntax_tree/node.rb#7350 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#7370 + # source://syntax_tree//lib/syntax_tree/node.rb#7354 def format(q); end # [String] the left brace # - # source://syntax_tree//lib/syntax_tree/node.rb#7334 + # source://syntax_tree//lib/syntax_tree/node.rb#7318 def value; end class << self @@ -6386,49 +6612,49 @@ class SyntaxTree::LBrace < ::SyntaxTree::Node # easier to create LBrace nodes without any specific value, this method # provides a default node. # - # source://syntax_tree//lib/syntax_tree/node.rb#7383 + # source://syntax_tree//lib/syntax_tree/node.rb#7367 def default; end end end # LBracket represents the use of a left bracket, i.e., [. # -# source://syntax_tree//lib/syntax_tree/node.rb#7389 +# source://syntax_tree//lib/syntax_tree/node.rb#7373 class SyntaxTree::LBracket < ::SyntaxTree::Node # @return [LBracket] a new instance of LBracket # - # source://syntax_tree//lib/syntax_tree/node.rb#7396 + # source://syntax_tree//lib/syntax_tree/node.rb#7380 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#7431 + # source://syntax_tree//lib/syntax_tree/node.rb#7415 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#7402 + # source://syntax_tree//lib/syntax_tree/node.rb#7386 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#7406 + # source://syntax_tree//lib/syntax_tree/node.rb#7390 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#7394 + # source://syntax_tree//lib/syntax_tree/node.rb#7378 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#7410 + # source://syntax_tree//lib/syntax_tree/node.rb#7394 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#7406 + # source://syntax_tree//lib/syntax_tree/node.rb#7390 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#7423 + # source://syntax_tree//lib/syntax_tree/node.rb#7407 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#7427 + # source://syntax_tree//lib/syntax_tree/node.rb#7411 def format(q); end # [String] the left bracket # - # source://syntax_tree//lib/syntax_tree/node.rb#7391 + # source://syntax_tree//lib/syntax_tree/node.rb#7375 def value; end class << self @@ -6438,49 +6664,49 @@ class SyntaxTree::LBracket < ::SyntaxTree::Node # easier to create LBracket nodes without any specific value, this method # provides a default node. # - # source://syntax_tree//lib/syntax_tree/node.rb#7440 + # source://syntax_tree//lib/syntax_tree/node.rb#7424 def default; end end end # LParen represents the use of a left parenthesis, i.e., (. # -# source://syntax_tree//lib/syntax_tree/node.rb#7446 +# source://syntax_tree//lib/syntax_tree/node.rb#7430 class SyntaxTree::LParen < ::SyntaxTree::Node # @return [LParen] a new instance of LParen # - # source://syntax_tree//lib/syntax_tree/node.rb#7453 + # source://syntax_tree//lib/syntax_tree/node.rb#7437 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#7488 + # source://syntax_tree//lib/syntax_tree/node.rb#7472 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#7459 + # source://syntax_tree//lib/syntax_tree/node.rb#7443 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#7463 + # source://syntax_tree//lib/syntax_tree/node.rb#7447 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#7451 + # source://syntax_tree//lib/syntax_tree/node.rb#7435 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#7467 + # source://syntax_tree//lib/syntax_tree/node.rb#7451 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#7463 + # source://syntax_tree//lib/syntax_tree/node.rb#7447 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#7480 + # source://syntax_tree//lib/syntax_tree/node.rb#7464 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#7484 + # source://syntax_tree//lib/syntax_tree/node.rb#7468 def format(q); end # [String] the left parenthesis # - # source://syntax_tree//lib/syntax_tree/node.rb#7448 + # source://syntax_tree//lib/syntax_tree/node.rb#7432 def value; end class << self @@ -6490,7 +6716,7 @@ class SyntaxTree::LParen < ::SyntaxTree::Node # easier to create LParen nodes without any specific value, this method # provides a default node. # - # source://syntax_tree//lib/syntax_tree/node.rb#7497 + # source://syntax_tree//lib/syntax_tree/node.rb#7481 def default; end end end @@ -6509,42 +6735,42 @@ end # # In this case "key:" would be the body of the label. # -# source://syntax_tree//lib/syntax_tree/node.rb#7049 +# source://syntax_tree//lib/syntax_tree/node.rb#7052 class SyntaxTree::Label < ::SyntaxTree::Node # @return [Label] a new instance of Label # - # source://syntax_tree//lib/syntax_tree/node.rb#7056 + # source://syntax_tree//lib/syntax_tree/node.rb#7059 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#7091 + # source://syntax_tree//lib/syntax_tree/node.rb#7094 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#7062 + # source://syntax_tree//lib/syntax_tree/node.rb#7065 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#7066 + # source://syntax_tree//lib/syntax_tree/node.rb#7069 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#7054 + # source://syntax_tree//lib/syntax_tree/node.rb#7057 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#7070 + # source://syntax_tree//lib/syntax_tree/node.rb#7073 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#7066 + # source://syntax_tree//lib/syntax_tree/node.rb#7069 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#7083 + # source://syntax_tree//lib/syntax_tree/node.rb#7086 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#7087 + # source://syntax_tree//lib/syntax_tree/node.rb#7090 def format(q); end # [String] the value of the label # - # source://syntax_tree//lib/syntax_tree/node.rb#7051 + # source://syntax_tree//lib/syntax_tree/node.rb#7054 def value; end end @@ -6556,34 +6782,34 @@ end # hash key. This node is important for determining the type of quote being # used by the label. # -# source://syntax_tree//lib/syntax_tree/node.rb#7103 +# source://syntax_tree//lib/syntax_tree/node.rb#7106 class SyntaxTree::LabelEnd < ::SyntaxTree::Node # @return [LabelEnd] a new instance of LabelEnd # - # source://syntax_tree//lib/syntax_tree/node.rb#7107 + # source://syntax_tree//lib/syntax_tree/node.rb#7110 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#7133 + # source://syntax_tree//lib/syntax_tree/node.rb#7136 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#7112 + # source://syntax_tree//lib/syntax_tree/node.rb#7115 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#7116 + # source://syntax_tree//lib/syntax_tree/node.rb#7119 def child_nodes; end - # source://syntax_tree//lib/syntax_tree/node.rb#7120 + # source://syntax_tree//lib/syntax_tree/node.rb#7123 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#7116 + # source://syntax_tree//lib/syntax_tree/node.rb#7119 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#7129 + # source://syntax_tree//lib/syntax_tree/node.rb#7132 def deconstruct_keys(_keys); end # [String] the end of the label # - # source://syntax_tree//lib/syntax_tree/node.rb#7105 + # source://syntax_tree//lib/syntax_tree/node.rb#7108 def value; end end @@ -6591,47 +6817,47 @@ end # # ->(value) { value * 2 } # -# source://syntax_tree//lib/syntax_tree/node.rb#7142 +# source://syntax_tree//lib/syntax_tree/node.rb#7145 class SyntaxTree::Lambda < ::SyntaxTree::Node # @return [Lambda] a new instance of Lambda # - # source://syntax_tree//lib/syntax_tree/node.rb#7152 + # source://syntax_tree//lib/syntax_tree/node.rb#7155 def initialize(params:, statements:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#7255 + # source://syntax_tree//lib/syntax_tree/node.rb#7239 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#7159 + # source://syntax_tree//lib/syntax_tree/node.rb#7162 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#7163 + # source://syntax_tree//lib/syntax_tree/node.rb#7166 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#7150 + # source://syntax_tree//lib/syntax_tree/node.rb#7153 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#7167 + # source://syntax_tree//lib/syntax_tree/node.rb#7170 def copy(params: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#7163 + # source://syntax_tree//lib/syntax_tree/node.rb#7166 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#7181 + # source://syntax_tree//lib/syntax_tree/node.rb#7184 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#7190 + # source://syntax_tree//lib/syntax_tree/node.rb#7193 def format(q); end # [LambdaVar | Paren] the parameter declaration for this lambda # - # source://syntax_tree//lib/syntax_tree/node.rb#7144 + # source://syntax_tree//lib/syntax_tree/node.rb#7147 def params; end # [BodyStmt | Statements] the expressions to be executed in this lambda # - # source://syntax_tree//lib/syntax_tree/node.rb#7147 + # source://syntax_tree//lib/syntax_tree/node.rb#7150 def statements; end end @@ -6643,52 +6869,52 @@ end # -> (positional, optional = value, keyword:, █ local) do # end # -# source://syntax_tree//lib/syntax_tree/node.rb#7269 +# source://syntax_tree//lib/syntax_tree/node.rb#7253 class SyntaxTree::LambdaVar < ::SyntaxTree::Node # @return [LambdaVar] a new instance of LambdaVar # - # source://syntax_tree//lib/syntax_tree/node.rb#7279 + # source://syntax_tree//lib/syntax_tree/node.rb#7263 def initialize(params:, locals:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#7325 + # source://syntax_tree//lib/syntax_tree/node.rb#7309 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#7286 + # source://syntax_tree//lib/syntax_tree/node.rb#7270 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#7290 + # source://syntax_tree//lib/syntax_tree/node.rb#7274 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#7277 + # source://syntax_tree//lib/syntax_tree/node.rb#7261 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#7294 + # source://syntax_tree//lib/syntax_tree/node.rb#7278 def copy(params: T.unsafe(nil), locals: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#7290 + # source://syntax_tree//lib/syntax_tree/node.rb#7274 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#7308 + # source://syntax_tree//lib/syntax_tree/node.rb#7292 def deconstruct_keys(_keys); end # @return [Boolean] # - # source://syntax_tree//lib/syntax_tree/node.rb#7312 + # source://syntax_tree//lib/syntax_tree/node.rb#7296 def empty?; end - # source://syntax_tree//lib/syntax_tree/node.rb#7316 + # source://syntax_tree//lib/syntax_tree/node.rb#7300 def format(q); end # [Array[ Ident ]] the list of block-local variable declarations # - # source://syntax_tree//lib/syntax_tree/node.rb#7274 + # source://syntax_tree//lib/syntax_tree/node.rb#7258 def locals; end # [Params] the parameters being declared with the block # - # source://syntax_tree//lib/syntax_tree/node.rb#7271 + # source://syntax_tree//lib/syntax_tree/node.rb#7255 def params; end end @@ -6935,29 +7161,29 @@ end # Formats an Until or While node. # -# source://syntax_tree//lib/syntax_tree/node.rb#11394 +# source://syntax_tree//lib/syntax_tree/node.rb#11378 class SyntaxTree::LoopFormatter # @return [LoopFormatter] a new instance of LoopFormatter # - # source://syntax_tree//lib/syntax_tree/node.rb#11401 + # source://syntax_tree//lib/syntax_tree/node.rb#11385 def initialize(keyword, node); end - # source://syntax_tree//lib/syntax_tree/node.rb#11406 + # source://syntax_tree//lib/syntax_tree/node.rb#11390 def format(q); end # [String] the name of the keyword used for this loop # - # source://syntax_tree//lib/syntax_tree/node.rb#11396 + # source://syntax_tree//lib/syntax_tree/node.rb#11380 def keyword; end # [Until | While] the node that is being formatted # - # source://syntax_tree//lib/syntax_tree/node.rb#11399 + # source://syntax_tree//lib/syntax_tree/node.rb#11383 def node; end private - # source://syntax_tree//lib/syntax_tree/node.rb#11453 + # source://syntax_tree//lib/syntax_tree/node.rb#11437 def format_break(q); end end @@ -6975,47 +7201,47 @@ end # # first, = value # -# source://syntax_tree//lib/syntax_tree/node.rb#7516 +# source://syntax_tree//lib/syntax_tree/node.rb#7500 class SyntaxTree::MAssign < ::SyntaxTree::Node # @return [MAssign] a new instance of MAssign # - # source://syntax_tree//lib/syntax_tree/node.rb#7526 + # source://syntax_tree//lib/syntax_tree/node.rb#7510 def initialize(target:, value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#7570 + # source://syntax_tree//lib/syntax_tree/node.rb#7554 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#7533 + # source://syntax_tree//lib/syntax_tree/node.rb#7517 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#7537 + # source://syntax_tree//lib/syntax_tree/node.rb#7521 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#7524 + # source://syntax_tree//lib/syntax_tree/node.rb#7508 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#7541 + # source://syntax_tree//lib/syntax_tree/node.rb#7525 def copy(target: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#7537 + # source://syntax_tree//lib/syntax_tree/node.rb#7521 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#7555 + # source://syntax_tree//lib/syntax_tree/node.rb#7539 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#7559 + # source://syntax_tree//lib/syntax_tree/node.rb#7543 def format(q); end # [MLHS | MLHSParen] the target of the multiple assignment # - # source://syntax_tree//lib/syntax_tree/node.rb#7518 + # source://syntax_tree//lib/syntax_tree/node.rb#7502 def target; end # [Node] the value being assigned # - # source://syntax_tree//lib/syntax_tree/node.rb#7521 + # source://syntax_tree//lib/syntax_tree/node.rb#7505 def value; end end @@ -7024,51 +7250,51 @@ end # # first, second, third = value # -# source://syntax_tree//lib/syntax_tree/node.rb#7654 +# source://syntax_tree//lib/syntax_tree/node.rb#7638 class SyntaxTree::MLHS < ::SyntaxTree::Node # @return [MLHS] a new instance of MLHS # - # source://syntax_tree//lib/syntax_tree/node.rb#7671 + # source://syntax_tree//lib/syntax_tree/node.rb#7655 def initialize(parts:, location:, comma: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#7709 + # source://syntax_tree//lib/syntax_tree/node.rb#7693 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#7678 + # source://syntax_tree//lib/syntax_tree/node.rb#7662 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#7682 + # source://syntax_tree//lib/syntax_tree/node.rb#7666 def child_nodes; end # [boolean] whether or not there is a trailing comma at the end of this # list, which impacts destructuring. It's an attr_accessor so that while # the syntax tree is being built it can be set by its parent node # - # source://syntax_tree//lib/syntax_tree/node.rb#7666 + # source://syntax_tree//lib/syntax_tree/node.rb#7650 def comma; end # [boolean] whether or not there is a trailing comma at the end of this # list, which impacts destructuring. It's an attr_accessor so that while # the syntax tree is being built it can be set by its parent node # - # source://syntax_tree//lib/syntax_tree/node.rb#7666 + # source://syntax_tree//lib/syntax_tree/node.rb#7650 def comma=(_arg0); end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#7669 + # source://syntax_tree//lib/syntax_tree/node.rb#7653 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#7686 + # source://syntax_tree//lib/syntax_tree/node.rb#7670 def copy(parts: T.unsafe(nil), location: T.unsafe(nil), comma: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#7682 + # source://syntax_tree//lib/syntax_tree/node.rb#7666 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#7700 + # source://syntax_tree//lib/syntax_tree/node.rb#7684 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#7704 + # source://syntax_tree//lib/syntax_tree/node.rb#7688 def format(q); end # [ @@ -7078,7 +7304,7 @@ class SyntaxTree::MLHS < ::SyntaxTree::Node # ] # ] the parts of the left-hand side of a multiple assignment # - # source://syntax_tree//lib/syntax_tree/node.rb#7661 + # source://syntax_tree//lib/syntax_tree/node.rb#7645 def parts; end end @@ -7087,56 +7313,56 @@ end # # (left, right) = value # -# source://syntax_tree//lib/syntax_tree/node.rb#7720 +# source://syntax_tree//lib/syntax_tree/node.rb#7704 class SyntaxTree::MLHSParen < ::SyntaxTree::Node # @return [MLHSParen] a new instance of MLHSParen # - # source://syntax_tree//lib/syntax_tree/node.rb#7732 + # source://syntax_tree//lib/syntax_tree/node.rb#7716 def initialize(contents:, location:, comma: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#7785 + # source://syntax_tree//lib/syntax_tree/node.rb#7769 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#7739 + # source://syntax_tree//lib/syntax_tree/node.rb#7723 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#7743 + # source://syntax_tree//lib/syntax_tree/node.rb#7727 def child_nodes; end # [boolean] whether or not there is a trailing comma at the end of this # list, which impacts destructuring. It's an attr_accessor so that while # the syntax tree is being built it can be set by its parent node # - # source://syntax_tree//lib/syntax_tree/node.rb#7727 + # source://syntax_tree//lib/syntax_tree/node.rb#7711 def comma; end # [boolean] whether or not there is a trailing comma at the end of this # list, which impacts destructuring. It's an attr_accessor so that while # the syntax tree is being built it can be set by its parent node # - # source://syntax_tree//lib/syntax_tree/node.rb#7727 + # source://syntax_tree//lib/syntax_tree/node.rb#7711 def comma=(_arg0); end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#7730 + # source://syntax_tree//lib/syntax_tree/node.rb#7714 def comments; end # [MLHS | MLHSParen] the contents inside of the parentheses # - # source://syntax_tree//lib/syntax_tree/node.rb#7722 + # source://syntax_tree//lib/syntax_tree/node.rb#7706 def contents; end - # source://syntax_tree//lib/syntax_tree/node.rb#7747 + # source://syntax_tree//lib/syntax_tree/node.rb#7731 def copy(contents: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#7743 + # source://syntax_tree//lib/syntax_tree/node.rb#7727 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#7760 + # source://syntax_tree//lib/syntax_tree/node.rb#7744 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#7764 + # source://syntax_tree//lib/syntax_tree/node.rb#7748 def format(q); end end @@ -7145,42 +7371,42 @@ end # # values = first, second, third # -# source://syntax_tree//lib/syntax_tree/node.rb#7885 +# source://syntax_tree//lib/syntax_tree/node.rb#7869 class SyntaxTree::MRHS < ::SyntaxTree::Node # @return [MRHS] a new instance of MRHS # - # source://syntax_tree//lib/syntax_tree/node.rb#7892 + # source://syntax_tree//lib/syntax_tree/node.rb#7876 def initialize(parts:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#7927 + # source://syntax_tree//lib/syntax_tree/node.rb#7911 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#7898 + # source://syntax_tree//lib/syntax_tree/node.rb#7882 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#7902 + # source://syntax_tree//lib/syntax_tree/node.rb#7886 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#7890 + # source://syntax_tree//lib/syntax_tree/node.rb#7874 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#7906 + # source://syntax_tree//lib/syntax_tree/node.rb#7890 def copy(parts: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#7902 + # source://syntax_tree//lib/syntax_tree/node.rb#7886 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#7919 + # source://syntax_tree//lib/syntax_tree/node.rb#7903 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#7923 + # source://syntax_tree//lib/syntax_tree/node.rb#7907 def format(q); end # [Array[Node]] the parts that are being assigned # - # source://syntax_tree//lib/syntax_tree/node.rb#7887 + # source://syntax_tree//lib/syntax_tree/node.rb#7871 def parts; end end @@ -7437,50 +7663,50 @@ end # # method {} # -# source://syntax_tree//lib/syntax_tree/node.rb#7579 +# source://syntax_tree//lib/syntax_tree/node.rb#7563 class SyntaxTree::MethodAddBlock < ::SyntaxTree::Node # @return [MethodAddBlock] a new instance of MethodAddBlock # - # source://syntax_tree//lib/syntax_tree/node.rb#7589 + # source://syntax_tree//lib/syntax_tree/node.rb#7573 def initialize(call:, block:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#7638 + # source://syntax_tree//lib/syntax_tree/node.rb#7622 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#7596 + # source://syntax_tree//lib/syntax_tree/node.rb#7580 def accept(visitor); end # [BlockNode] the block being sent with the method call # - # source://syntax_tree//lib/syntax_tree/node.rb#7584 + # source://syntax_tree//lib/syntax_tree/node.rb#7568 def block; end # [ARef | CallNode | Command | CommandCall | Super | ZSuper] the method call # - # source://syntax_tree//lib/syntax_tree/node.rb#7581 + # source://syntax_tree//lib/syntax_tree/node.rb#7565 def call; end - # source://syntax_tree//lib/syntax_tree/node.rb#7600 + # source://syntax_tree//lib/syntax_tree/node.rb#7584 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#7587 + # source://syntax_tree//lib/syntax_tree/node.rb#7571 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#7604 + # source://syntax_tree//lib/syntax_tree/node.rb#7588 def copy(call: T.unsafe(nil), block: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#7600 + # source://syntax_tree//lib/syntax_tree/node.rb#7584 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#7618 + # source://syntax_tree//lib/syntax_tree/node.rb#7602 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#7622 + # source://syntax_tree//lib/syntax_tree/node.rb#7606 def format(q); end - # source://syntax_tree//lib/syntax_tree/node.rb#7643 + # source://syntax_tree//lib/syntax_tree/node.rb#7627 def format_contents(q); end end @@ -7489,52 +7715,52 @@ end # module Namespace # end # -# source://syntax_tree//lib/syntax_tree/node.rb#7795 +# source://syntax_tree//lib/syntax_tree/node.rb#7779 class SyntaxTree::ModuleDeclaration < ::SyntaxTree::Node # @return [ModuleDeclaration] a new instance of ModuleDeclaration # - # source://syntax_tree//lib/syntax_tree/node.rb#7805 + # source://syntax_tree//lib/syntax_tree/node.rb#7789 def initialize(constant:, bodystmt:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#7865 + # source://syntax_tree//lib/syntax_tree/node.rb#7849 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#7812 + # source://syntax_tree//lib/syntax_tree/node.rb#7796 def accept(visitor); end # [BodyStmt] the expressions to be executed in the context of the module # - # source://syntax_tree//lib/syntax_tree/node.rb#7800 + # source://syntax_tree//lib/syntax_tree/node.rb#7784 def bodystmt; end - # source://syntax_tree//lib/syntax_tree/node.rb#7816 + # source://syntax_tree//lib/syntax_tree/node.rb#7800 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#7803 + # source://syntax_tree//lib/syntax_tree/node.rb#7787 def comments; end # [ConstPathRef | ConstRef | TopConstRef] the name of the module # - # source://syntax_tree//lib/syntax_tree/node.rb#7797 + # source://syntax_tree//lib/syntax_tree/node.rb#7781 def constant; end - # source://syntax_tree//lib/syntax_tree/node.rb#7820 + # source://syntax_tree//lib/syntax_tree/node.rb#7804 def copy(constant: T.unsafe(nil), bodystmt: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#7816 + # source://syntax_tree//lib/syntax_tree/node.rb#7800 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#7834 + # source://syntax_tree//lib/syntax_tree/node.rb#7818 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#7843 + # source://syntax_tree//lib/syntax_tree/node.rb#7827 def format(q); end private - # source://syntax_tree//lib/syntax_tree/node.rb#7872 + # source://syntax_tree//lib/syntax_tree/node.rb#7856 def format_declaration(q); end end @@ -8037,42 +8263,42 @@ end # # next(value) # -# source://syntax_tree//lib/syntax_tree/node.rb#7949 +# source://syntax_tree//lib/syntax_tree/node.rb#7933 class SyntaxTree::Next < ::SyntaxTree::Node # @return [Next] a new instance of Next # - # source://syntax_tree//lib/syntax_tree/node.rb#7956 + # source://syntax_tree//lib/syntax_tree/node.rb#7940 def initialize(arguments:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#7991 + # source://syntax_tree//lib/syntax_tree/node.rb#7975 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#7962 + # source://syntax_tree//lib/syntax_tree/node.rb#7946 def accept(visitor); end # [Args] the arguments passed to the next keyword # - # source://syntax_tree//lib/syntax_tree/node.rb#7951 + # source://syntax_tree//lib/syntax_tree/node.rb#7935 def arguments; end - # source://syntax_tree//lib/syntax_tree/node.rb#7966 + # source://syntax_tree//lib/syntax_tree/node.rb#7950 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#7954 + # source://syntax_tree//lib/syntax_tree/node.rb#7938 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#7970 + # source://syntax_tree//lib/syntax_tree/node.rb#7954 def copy(arguments: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#7966 + # source://syntax_tree//lib/syntax_tree/node.rb#7950 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#7983 + # source://syntax_tree//lib/syntax_tree/node.rb#7967 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#7987 + # source://syntax_tree//lib/syntax_tree/node.rb#7971 def format(q); end end @@ -8135,52 +8361,52 @@ end # # not value # -# source://syntax_tree//lib/syntax_tree/node.rb#11093 +# source://syntax_tree//lib/syntax_tree/node.rb#11077 class SyntaxTree::Not < ::SyntaxTree::Node # @return [Not] a new instance of Not # - # source://syntax_tree//lib/syntax_tree/node.rb#11104 + # source://syntax_tree//lib/syntax_tree/node.rb#11088 def initialize(statement:, parentheses:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#11166 + # source://syntax_tree//lib/syntax_tree/node.rb#11150 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#11111 + # source://syntax_tree//lib/syntax_tree/node.rb#11095 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#11115 + # source://syntax_tree//lib/syntax_tree/node.rb#11099 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#11102 + # source://syntax_tree//lib/syntax_tree/node.rb#11086 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#11119 + # source://syntax_tree//lib/syntax_tree/node.rb#11103 def copy(statement: T.unsafe(nil), parentheses: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#11115 + # source://syntax_tree//lib/syntax_tree/node.rb#11099 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#11133 + # source://syntax_tree//lib/syntax_tree/node.rb#11117 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#11142 + # source://syntax_tree//lib/syntax_tree/node.rb#11126 def format(q); end # [boolean] whether or not parentheses were used # - # source://syntax_tree//lib/syntax_tree/node.rb#11098 + # source://syntax_tree//lib/syntax_tree/node.rb#11082 def parentheses; end # [boolean] whether or not parentheses were used # - # source://syntax_tree//lib/syntax_tree/node.rb#11098 + # source://syntax_tree//lib/syntax_tree/node.rb#11082 def parentheses?; end # [nil | Node] the statement on which to operate # - # source://syntax_tree//lib/syntax_tree/node.rb#11095 + # source://syntax_tree//lib/syntax_tree/node.rb#11079 def statement; end end @@ -8190,47 +8416,47 @@ end # # In the example above, the Op node represents the + operator. # -# source://syntax_tree//lib/syntax_tree/node.rb#8001 +# source://syntax_tree//lib/syntax_tree/node.rb#7985 class SyntaxTree::Op < ::SyntaxTree::Node # @return [Op] a new instance of Op # - # source://syntax_tree//lib/syntax_tree/node.rb#8011 + # source://syntax_tree//lib/syntax_tree/node.rb#7995 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#8044 + # source://syntax_tree//lib/syntax_tree/node.rb#8028 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#8018 + # source://syntax_tree//lib/syntax_tree/node.rb#8002 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#8022 + # source://syntax_tree//lib/syntax_tree/node.rb#8006 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#8009 + # source://syntax_tree//lib/syntax_tree/node.rb#7993 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#8026 + # source://syntax_tree//lib/syntax_tree/node.rb#8010 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#8022 + # source://syntax_tree//lib/syntax_tree/node.rb#8006 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#8036 + # source://syntax_tree//lib/syntax_tree/node.rb#8020 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#8040 + # source://syntax_tree//lib/syntax_tree/node.rb#8024 def format(q); end # [Symbol] the symbol version of the value # - # source://syntax_tree//lib/syntax_tree/node.rb#8006 + # source://syntax_tree//lib/syntax_tree/node.rb#7990 def name; end # [String] the operator # - # source://syntax_tree//lib/syntax_tree/node.rb#8003 + # source://syntax_tree//lib/syntax_tree/node.rb#7987 def value; end end @@ -8239,84 +8465,84 @@ end # # variable += value # -# source://syntax_tree//lib/syntax_tree/node.rb#8054 +# source://syntax_tree//lib/syntax_tree/node.rb#8038 class SyntaxTree::OpAssign < ::SyntaxTree::Node # @return [OpAssign] a new instance of OpAssign # - # source://syntax_tree//lib/syntax_tree/node.rb#8068 + # source://syntax_tree//lib/syntax_tree/node.rb#8052 def initialize(target:, operator:, value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#8127 + # source://syntax_tree//lib/syntax_tree/node.rb#8111 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#8076 + # source://syntax_tree//lib/syntax_tree/node.rb#8060 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#8080 + # source://syntax_tree//lib/syntax_tree/node.rb#8064 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#8066 + # source://syntax_tree//lib/syntax_tree/node.rb#8050 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#8084 + # source://syntax_tree//lib/syntax_tree/node.rb#8068 def copy(target: T.unsafe(nil), operator: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#8080 + # source://syntax_tree//lib/syntax_tree/node.rb#8064 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#8099 + # source://syntax_tree//lib/syntax_tree/node.rb#8083 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#8109 + # source://syntax_tree//lib/syntax_tree/node.rb#8093 def format(q); end # [Op] the operator being used for the assignment # - # source://syntax_tree//lib/syntax_tree/node.rb#8060 + # source://syntax_tree//lib/syntax_tree/node.rb#8044 def operator; end # [ARefField | ConstPathField | Field | TopConstField | VarField] the target # to assign the result of the expression to # - # source://syntax_tree//lib/syntax_tree/node.rb#8057 + # source://syntax_tree//lib/syntax_tree/node.rb#8041 def target; end # [Node] the expression to be assigned # - # source://syntax_tree//lib/syntax_tree/node.rb#8063 + # source://syntax_tree//lib/syntax_tree/node.rb#8047 def value; end private # @return [Boolean] # - # source://syntax_tree//lib/syntax_tree/node.rb#8134 + # source://syntax_tree//lib/syntax_tree/node.rb#8118 def skip_indent?; end end # The list of nodes that represent patterns inside of pattern matching so that # when a pattern is being printed it knows if it's nested. # -# source://syntax_tree//lib/syntax_tree/node.rb#6171 +# source://syntax_tree//lib/syntax_tree/node.rb#6174 SyntaxTree::PATTERNS = T.let(T.unsafe(nil), Array) # Params represents defining parameters on a method or lambda. # # def method(param) end # -# source://syntax_tree//lib/syntax_tree/node.rb#8212 +# source://syntax_tree//lib/syntax_tree/node.rb#8196 class SyntaxTree::Params < ::SyntaxTree::Node # @return [Params] a new instance of Params # - # source://syntax_tree//lib/syntax_tree/node.rb#8314 + # source://syntax_tree//lib/syntax_tree/node.rb#8298 def initialize(location:, requireds: T.unsafe(nil), optionals: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), keywords: T.unsafe(nil), keyword_rest: T.unsafe(nil), block: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#8444 + # source://syntax_tree//lib/syntax_tree/node.rb#8428 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#8344 + # source://syntax_tree//lib/syntax_tree/node.rb#8328 def accept(visitor); end # Returns a range representing the possible number of arguments accepted @@ -8328,29 +8554,29 @@ class SyntaxTree::Params < ::SyntaxTree::Node # # has arity 2..4. # - # source://syntax_tree//lib/syntax_tree/node.rb#8467 + # source://syntax_tree//lib/syntax_tree/node.rb#8451 def arity; end # [nil | BlockArg] the optional block parameter # - # source://syntax_tree//lib/syntax_tree/node.rb#8309 + # source://syntax_tree//lib/syntax_tree/node.rb#8293 def block; end - # source://syntax_tree//lib/syntax_tree/node.rb#8348 + # source://syntax_tree//lib/syntax_tree/node.rb#8332 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#8312 + # source://syntax_tree//lib/syntax_tree/node.rb#8296 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#8362 + # source://syntax_tree//lib/syntax_tree/node.rb#8346 def copy(location: T.unsafe(nil), requireds: T.unsafe(nil), optionals: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), keywords: T.unsafe(nil), keyword_rest: T.unsafe(nil), block: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#8348 + # source://syntax_tree//lib/syntax_tree/node.rb#8332 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#8390 + # source://syntax_tree//lib/syntax_tree/node.rb#8374 def deconstruct_keys(_keys); end # Params nodes are the most complicated in the tree. Occasionally you want @@ -8360,126 +8586,126 @@ class SyntaxTree::Params < ::SyntaxTree::Node # # @return [Boolean] # - # source://syntax_tree//lib/syntax_tree/node.rb#8339 + # source://syntax_tree//lib/syntax_tree/node.rb#8323 def empty?; end - # source://syntax_tree//lib/syntax_tree/node.rb#8404 + # source://syntax_tree//lib/syntax_tree/node.rb#8388 def format(q); end # [nil | :nil | ArgsForward | KwRestParam] the optional keyword rest # parameter # - # source://syntax_tree//lib/syntax_tree/node.rb#8306 + # source://syntax_tree//lib/syntax_tree/node.rb#8290 def keyword_rest; end # [Array[ [ Label, nil | Node ] ]] any keyword parameters and their # optional default values # - # source://syntax_tree//lib/syntax_tree/node.rb#8302 + # source://syntax_tree//lib/syntax_tree/node.rb#8286 def keywords; end # [Array[ [ Ident, Node ] ]] any optional parameters and their default # values # - # source://syntax_tree//lib/syntax_tree/node.rb#8290 + # source://syntax_tree//lib/syntax_tree/node.rb#8274 def optionals; end - # [Array[ Ident ]] any positional parameters that exist after a rest - # parameter + # [Array[ Ident | MLHSParen ]] any positional parameters that exist after a + # rest parameter # - # source://syntax_tree//lib/syntax_tree/node.rb#8298 + # source://syntax_tree//lib/syntax_tree/node.rb#8282 def posts; end # [Array[ Ident | MLHSParen ]] any required parameters # - # source://syntax_tree//lib/syntax_tree/node.rb#8286 + # source://syntax_tree//lib/syntax_tree/node.rb#8270 def requireds; end # [nil | ArgsForward | ExcessedComma | RestParam] the optional rest # parameter # - # source://syntax_tree//lib/syntax_tree/node.rb#8294 + # source://syntax_tree//lib/syntax_tree/node.rb#8278 def rest; end private - # source://syntax_tree//lib/syntax_tree/node.rb#8483 + # source://syntax_tree//lib/syntax_tree/node.rb#8467 def format_contents(q, parts); end end # Formats the keyword position of the parameters. This includes the label, # as well as an optional default value. # -# source://syntax_tree//lib/syntax_tree/node.rb#8240 +# source://syntax_tree//lib/syntax_tree/node.rb#8224 class SyntaxTree::Params::KeywordFormatter # @return [KeywordFormatter] a new instance of KeywordFormatter # - # source://syntax_tree//lib/syntax_tree/node.rb#8247 + # source://syntax_tree//lib/syntax_tree/node.rb#8231 def initialize(name, value); end - # source://syntax_tree//lib/syntax_tree/node.rb#8252 + # source://syntax_tree//lib/syntax_tree/node.rb#8236 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#8256 + # source://syntax_tree//lib/syntax_tree/node.rb#8240 def format(q); end # [Ident] the name of the parameter # - # source://syntax_tree//lib/syntax_tree/node.rb#8242 + # source://syntax_tree//lib/syntax_tree/node.rb#8226 def name; end # [nil | Node] the value of the parameter # - # source://syntax_tree//lib/syntax_tree/node.rb#8245 + # source://syntax_tree//lib/syntax_tree/node.rb#8229 def value; end end # Formats the keyword_rest position of the parameters. This can be the **nil # syntax, the ... syntax, or the ** syntax. # -# source://syntax_tree//lib/syntax_tree/node.rb#8268 +# source://syntax_tree//lib/syntax_tree/node.rb#8252 class SyntaxTree::Params::KeywordRestFormatter # @return [KeywordRestFormatter] a new instance of KeywordRestFormatter # - # source://syntax_tree//lib/syntax_tree/node.rb#8272 + # source://syntax_tree//lib/syntax_tree/node.rb#8256 def initialize(value); end - # source://syntax_tree//lib/syntax_tree/node.rb#8276 + # source://syntax_tree//lib/syntax_tree/node.rb#8260 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#8280 + # source://syntax_tree//lib/syntax_tree/node.rb#8264 def format(q); end # [:nil | ArgsForward | KwRestParam] the value of the parameter # - # source://syntax_tree//lib/syntax_tree/node.rb#8270 + # source://syntax_tree//lib/syntax_tree/node.rb#8254 def value; end end # Formats the optional position of the parameters. This includes the label, # as well as the default value. # -# source://syntax_tree//lib/syntax_tree/node.rb#8215 +# source://syntax_tree//lib/syntax_tree/node.rb#8199 class SyntaxTree::Params::OptionalFormatter # @return [OptionalFormatter] a new instance of OptionalFormatter # - # source://syntax_tree//lib/syntax_tree/node.rb#8222 + # source://syntax_tree//lib/syntax_tree/node.rb#8206 def initialize(name, value); end - # source://syntax_tree//lib/syntax_tree/node.rb#8227 + # source://syntax_tree//lib/syntax_tree/node.rb#8211 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#8231 + # source://syntax_tree//lib/syntax_tree/node.rb#8215 def format(q); end # [Ident] the name of the parameter # - # source://syntax_tree//lib/syntax_tree/node.rb#8217 + # source://syntax_tree//lib/syntax_tree/node.rb#8201 def name; end # [Node] the value of the parameter # - # source://syntax_tree//lib/syntax_tree/node.rb#8220 + # source://syntax_tree//lib/syntax_tree/node.rb#8204 def value; end end @@ -8489,47 +8715,47 @@ end # # (1 + 2) # -# source://syntax_tree//lib/syntax_tree/node.rb#8495 +# source://syntax_tree//lib/syntax_tree/node.rb#8479 class SyntaxTree::Paren < ::SyntaxTree::Node # @return [Paren] a new instance of Paren # - # source://syntax_tree//lib/syntax_tree/node.rb#8505 + # source://syntax_tree//lib/syntax_tree/node.rb#8489 def initialize(lparen:, contents:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#8561 + # source://syntax_tree//lib/syntax_tree/node.rb#8545 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#8512 + # source://syntax_tree//lib/syntax_tree/node.rb#8496 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#8516 + # source://syntax_tree//lib/syntax_tree/node.rb#8500 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#8503 + # source://syntax_tree//lib/syntax_tree/node.rb#8487 def comments; end # [nil | Node] the expression inside the parentheses # - # source://syntax_tree//lib/syntax_tree/node.rb#8500 + # source://syntax_tree//lib/syntax_tree/node.rb#8484 def contents; end - # source://syntax_tree//lib/syntax_tree/node.rb#8520 + # source://syntax_tree//lib/syntax_tree/node.rb#8504 def copy(lparen: T.unsafe(nil), contents: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#8516 + # source://syntax_tree//lib/syntax_tree/node.rb#8500 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#8534 + # source://syntax_tree//lib/syntax_tree/node.rb#8518 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#8543 + # source://syntax_tree//lib/syntax_tree/node.rb#8527 def format(q); end # [LParen] the left parenthesis that opened this statement # - # source://syntax_tree//lib/syntax_tree/node.rb#8497 + # source://syntax_tree//lib/syntax_tree/node.rb#8481 def lparen; end end @@ -8565,18 +8791,18 @@ end # This approach maintains the nice conciseness of the inline version, while # keeping the correct semantic meaning. # -# source://syntax_tree//lib/syntax_tree/node.rb#8171 +# source://syntax_tree//lib/syntax_tree/node.rb#8155 module SyntaxTree::Parentheses class << self - # source://syntax_tree//lib/syntax_tree/node.rb#8191 + # source://syntax_tree//lib/syntax_tree/node.rb#8175 def break(q); end - # source://syntax_tree//lib/syntax_tree/node.rb#8183 + # source://syntax_tree//lib/syntax_tree/node.rb#8167 def flat(q); end end end -# source://syntax_tree//lib/syntax_tree/node.rb#8172 +# source://syntax_tree//lib/syntax_tree/node.rb#8156 SyntaxTree::Parentheses::NODES = T.let(T.unsafe(nil), Array) # Parser is a subclass of the Ripper library that subscribes to the stream of @@ -10339,42 +10565,42 @@ end # Period represents the use of the +.+ operator. It is usually found in method # calls. # -# source://syntax_tree//lib/syntax_tree/node.rb#8569 +# source://syntax_tree//lib/syntax_tree/node.rb#8553 class SyntaxTree::Period < ::SyntaxTree::Node # @return [Period] a new instance of Period # - # source://syntax_tree//lib/syntax_tree/node.rb#8576 + # source://syntax_tree//lib/syntax_tree/node.rb#8560 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#8611 + # source://syntax_tree//lib/syntax_tree/node.rb#8595 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#8582 + # source://syntax_tree//lib/syntax_tree/node.rb#8566 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#8586 + # source://syntax_tree//lib/syntax_tree/node.rb#8570 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#8574 + # source://syntax_tree//lib/syntax_tree/node.rb#8558 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#8590 + # source://syntax_tree//lib/syntax_tree/node.rb#8574 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#8586 + # source://syntax_tree//lib/syntax_tree/node.rb#8570 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#8603 + # source://syntax_tree//lib/syntax_tree/node.rb#8587 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#8607 + # source://syntax_tree//lib/syntax_tree/node.rb#8591 def format(q); end # [String] the period # - # source://syntax_tree//lib/syntax_tree/node.rb#8571 + # source://syntax_tree//lib/syntax_tree/node.rb#8555 def value; end end @@ -10433,42 +10659,42 @@ end # This can be a plain local variable like the example above. It can also be a # a class variable, a global variable, or an instance variable. # -# source://syntax_tree//lib/syntax_tree/node.rb#11677 +# source://syntax_tree//lib/syntax_tree/node.rb#11661 class SyntaxTree::PinnedVarRef < ::SyntaxTree::Node # @return [PinnedVarRef] a new instance of PinnedVarRef # - # source://syntax_tree//lib/syntax_tree/node.rb#11684 + # source://syntax_tree//lib/syntax_tree/node.rb#11668 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#11722 + # source://syntax_tree//lib/syntax_tree/node.rb#11706 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#11690 + # source://syntax_tree//lib/syntax_tree/node.rb#11674 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#11694 + # source://syntax_tree//lib/syntax_tree/node.rb#11678 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#11682 + # source://syntax_tree//lib/syntax_tree/node.rb#11666 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#11698 + # source://syntax_tree//lib/syntax_tree/node.rb#11682 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#11694 + # source://syntax_tree//lib/syntax_tree/node.rb#11678 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#11711 + # source://syntax_tree//lib/syntax_tree/node.rb#11695 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#11715 + # source://syntax_tree//lib/syntax_tree/node.rb#11699 def format(q); end # [Const | CVar | GVar | Ident | IVar] the value of this node # - # source://syntax_tree//lib/syntax_tree/node.rb#11679 + # source://syntax_tree//lib/syntax_tree/node.rb#11663 def value; end end @@ -10521,42 +10747,42 @@ end # Program represents the overall syntax tree. # -# source://syntax_tree//lib/syntax_tree/node.rb#8617 +# source://syntax_tree//lib/syntax_tree/node.rb#8601 class SyntaxTree::Program < ::SyntaxTree::Node # @return [Program] a new instance of Program # - # source://syntax_tree//lib/syntax_tree/node.rb#8624 + # source://syntax_tree//lib/syntax_tree/node.rb#8608 def initialize(statements:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#8664 + # source://syntax_tree//lib/syntax_tree/node.rb#8648 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#8630 + # source://syntax_tree//lib/syntax_tree/node.rb#8614 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#8634 + # source://syntax_tree//lib/syntax_tree/node.rb#8618 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#8622 + # source://syntax_tree//lib/syntax_tree/node.rb#8606 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#8638 + # source://syntax_tree//lib/syntax_tree/node.rb#8622 def copy(statements: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#8634 + # source://syntax_tree//lib/syntax_tree/node.rb#8618 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#8651 + # source://syntax_tree//lib/syntax_tree/node.rb#8635 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#8655 + # source://syntax_tree//lib/syntax_tree/node.rb#8639 def format(q); end # [Statements] the top-level expressions of the program # - # source://syntax_tree//lib/syntax_tree/node.rb#8619 + # source://syntax_tree//lib/syntax_tree/node.rb#8603 def statements; end end @@ -10564,47 +10790,47 @@ end # # %i[one two three] # -# source://syntax_tree//lib/syntax_tree/node.rb#8673 +# source://syntax_tree//lib/syntax_tree/node.rb#8657 class SyntaxTree::QSymbols < ::SyntaxTree::Node # @return [QSymbols] a new instance of QSymbols # - # source://syntax_tree//lib/syntax_tree/node.rb#8683 + # source://syntax_tree//lib/syntax_tree/node.rb#8667 def initialize(beginning:, elements:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#8743 + # source://syntax_tree//lib/syntax_tree/node.rb#8727 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#8690 + # source://syntax_tree//lib/syntax_tree/node.rb#8674 def accept(visitor); end # [QSymbolsBeg] the token that opens this array literal # - # source://syntax_tree//lib/syntax_tree/node.rb#8675 + # source://syntax_tree//lib/syntax_tree/node.rb#8659 def beginning; end - # source://syntax_tree//lib/syntax_tree/node.rb#8694 + # source://syntax_tree//lib/syntax_tree/node.rb#8678 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#8681 + # source://syntax_tree//lib/syntax_tree/node.rb#8665 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#8698 + # source://syntax_tree//lib/syntax_tree/node.rb#8682 def copy(beginning: T.unsafe(nil), elements: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#8694 + # source://syntax_tree//lib/syntax_tree/node.rb#8678 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#8712 + # source://syntax_tree//lib/syntax_tree/node.rb#8696 def deconstruct_keys(_keys); end # [Array[ TStringContent ]] the elements of the array # - # source://syntax_tree//lib/syntax_tree/node.rb#8678 + # source://syntax_tree//lib/syntax_tree/node.rb#8662 def elements; end - # source://syntax_tree//lib/syntax_tree/node.rb#8721 + # source://syntax_tree//lib/syntax_tree/node.rb#8705 def format(q); end end @@ -10616,34 +10842,34 @@ end # these kinds of arrays can start with a lot of different delimiter types # (e.g., %i| or %i<). # -# source://syntax_tree//lib/syntax_tree/node.rb#8756 +# source://syntax_tree//lib/syntax_tree/node.rb#8740 class SyntaxTree::QSymbolsBeg < ::SyntaxTree::Node # @return [QSymbolsBeg] a new instance of QSymbolsBeg # - # source://syntax_tree//lib/syntax_tree/node.rb#8760 + # source://syntax_tree//lib/syntax_tree/node.rb#8744 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#8786 + # source://syntax_tree//lib/syntax_tree/node.rb#8770 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#8765 + # source://syntax_tree//lib/syntax_tree/node.rb#8749 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#8769 + # source://syntax_tree//lib/syntax_tree/node.rb#8753 def child_nodes; end - # source://syntax_tree//lib/syntax_tree/node.rb#8773 + # source://syntax_tree//lib/syntax_tree/node.rb#8757 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#8769 + # source://syntax_tree//lib/syntax_tree/node.rb#8753 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#8782 + # source://syntax_tree//lib/syntax_tree/node.rb#8766 def deconstruct_keys(_keys); end # [String] the beginning of the array literal # - # source://syntax_tree//lib/syntax_tree/node.rb#8758 + # source://syntax_tree//lib/syntax_tree/node.rb#8742 def value; end end @@ -10651,47 +10877,47 @@ end # # %w[one two three] # -# source://syntax_tree//lib/syntax_tree/node.rb#8795 +# source://syntax_tree//lib/syntax_tree/node.rb#8779 class SyntaxTree::QWords < ::SyntaxTree::Node # @return [QWords] a new instance of QWords # - # source://syntax_tree//lib/syntax_tree/node.rb#8805 + # source://syntax_tree//lib/syntax_tree/node.rb#8789 def initialize(beginning:, elements:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#8861 + # source://syntax_tree//lib/syntax_tree/node.rb#8845 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#8812 + # source://syntax_tree//lib/syntax_tree/node.rb#8796 def accept(visitor); end # [QWordsBeg] the token that opens this array literal # - # source://syntax_tree//lib/syntax_tree/node.rb#8797 + # source://syntax_tree//lib/syntax_tree/node.rb#8781 def beginning; end - # source://syntax_tree//lib/syntax_tree/node.rb#8816 + # source://syntax_tree//lib/syntax_tree/node.rb#8800 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#8803 + # source://syntax_tree//lib/syntax_tree/node.rb#8787 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#8820 + # source://syntax_tree//lib/syntax_tree/node.rb#8804 def copy(beginning: T.unsafe(nil), elements: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#8816 + # source://syntax_tree//lib/syntax_tree/node.rb#8800 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#8830 + # source://syntax_tree//lib/syntax_tree/node.rb#8814 def deconstruct_keys(_keys); end # [Array[ TStringContent ]] the elements of the array # - # source://syntax_tree//lib/syntax_tree/node.rb#8800 + # source://syntax_tree//lib/syntax_tree/node.rb#8784 def elements; end - # source://syntax_tree//lib/syntax_tree/node.rb#8839 + # source://syntax_tree//lib/syntax_tree/node.rb#8823 def format(q); end end @@ -10703,41 +10929,41 @@ end # kinds of arrays can start with a lot of different delimiter types (e.g., # %w| or %w<). # -# source://syntax_tree//lib/syntax_tree/node.rb#8874 +# source://syntax_tree//lib/syntax_tree/node.rb#8858 class SyntaxTree::QWordsBeg < ::SyntaxTree::Node # @return [QWordsBeg] a new instance of QWordsBeg # - # source://syntax_tree//lib/syntax_tree/node.rb#8878 + # source://syntax_tree//lib/syntax_tree/node.rb#8862 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#8904 + # source://syntax_tree//lib/syntax_tree/node.rb#8888 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#8883 + # source://syntax_tree//lib/syntax_tree/node.rb#8867 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#8887 + # source://syntax_tree//lib/syntax_tree/node.rb#8871 def child_nodes; end - # source://syntax_tree//lib/syntax_tree/node.rb#8891 + # source://syntax_tree//lib/syntax_tree/node.rb#8875 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#8887 + # source://syntax_tree//lib/syntax_tree/node.rb#8871 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#8900 + # source://syntax_tree//lib/syntax_tree/node.rb#8884 def deconstruct_keys(_keys); end # [String] the beginning of the array literal # - # source://syntax_tree//lib/syntax_tree/node.rb#8876 + # source://syntax_tree//lib/syntax_tree/node.rb#8860 def value; end end # Responsible for providing information about quotes to be used for strings # and dynamic symbols. # -# source://syntax_tree//lib/syntax_tree/node.rb#4612 +# source://syntax_tree//lib/syntax_tree/node.rb#4615 module SyntaxTree::Quotes class << self # If there is some part of this string that matches an escape sequence or @@ -10748,25 +10974,25 @@ module SyntaxTree::Quotes # # @return [Boolean] # - # source://syntax_tree//lib/syntax_tree/node.rb#4621 + # source://syntax_tree//lib/syntax_tree/node.rb#4624 def locked?(node, quote); end # Find the matching closing quote for the given opening quote. # - # source://syntax_tree//lib/syntax_tree/node.rb#4628 + # source://syntax_tree//lib/syntax_tree/node.rb#4631 def matching(quote); end # Escape and unescape single and double quotes as needed to be able to # enclose +content+ with +enclosing+. # - # source://syntax_tree//lib/syntax_tree/node.rb#4634 + # source://syntax_tree//lib/syntax_tree/node.rb#4637 def normalize(content, enclosing); end end end # The matching pairs of quotes that can be used with % literals. # -# source://syntax_tree//lib/syntax_tree/node.rb#4614 +# source://syntax_tree//lib/syntax_tree/node.rb#4617 SyntaxTree::Quotes::PAIRS = T.let(T.unsafe(nil), Hash) # RAssign represents a single-line pattern match. @@ -10774,152 +11000,152 @@ SyntaxTree::Quotes::PAIRS = T.let(T.unsafe(nil), Hash) # value in pattern # value => pattern # -# source://syntax_tree//lib/syntax_tree/node.rb#3198 +# source://syntax_tree//lib/syntax_tree/node.rb#3201 class SyntaxTree::RAssign < ::SyntaxTree::Node # @return [RAssign] a new instance of RAssign # - # source://syntax_tree//lib/syntax_tree/node.rb#3212 + # source://syntax_tree//lib/syntax_tree/node.rb#3215 def initialize(value:, operator:, pattern:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#3274 + # source://syntax_tree//lib/syntax_tree/node.rb#3277 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#3220 + # source://syntax_tree//lib/syntax_tree/node.rb#3223 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#3224 + # source://syntax_tree//lib/syntax_tree/node.rb#3227 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#3210 + # source://syntax_tree//lib/syntax_tree/node.rb#3213 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#3228 + # source://syntax_tree//lib/syntax_tree/node.rb#3231 def copy(value: T.unsafe(nil), operator: T.unsafe(nil), pattern: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#3224 + # source://syntax_tree//lib/syntax_tree/node.rb#3227 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#3243 + # source://syntax_tree//lib/syntax_tree/node.rb#3246 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#3253 + # source://syntax_tree//lib/syntax_tree/node.rb#3256 def format(q); end # [Kw | Op] the operator being used to match against the pattern, which is # either => or in # - # source://syntax_tree//lib/syntax_tree/node.rb#3204 + # source://syntax_tree//lib/syntax_tree/node.rb#3207 def operator; end # [Node] the pattern on the right-hand side of the expression # - # source://syntax_tree//lib/syntax_tree/node.rb#3207 + # source://syntax_tree//lib/syntax_tree/node.rb#3210 def pattern; end # [Node] the left-hand expression # - # source://syntax_tree//lib/syntax_tree/node.rb#3200 + # source://syntax_tree//lib/syntax_tree/node.rb#3203 def value; end end # RBrace represents the use of a right brace, i.e., +++. # -# source://syntax_tree//lib/syntax_tree/node.rb#8961 +# source://syntax_tree//lib/syntax_tree/node.rb#8945 class SyntaxTree::RBrace < ::SyntaxTree::Node # @return [RBrace] a new instance of RBrace # - # source://syntax_tree//lib/syntax_tree/node.rb#8965 + # source://syntax_tree//lib/syntax_tree/node.rb#8949 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#8991 + # source://syntax_tree//lib/syntax_tree/node.rb#8975 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#8970 + # source://syntax_tree//lib/syntax_tree/node.rb#8954 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#8974 + # source://syntax_tree//lib/syntax_tree/node.rb#8958 def child_nodes; end - # source://syntax_tree//lib/syntax_tree/node.rb#8978 + # source://syntax_tree//lib/syntax_tree/node.rb#8962 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#8974 + # source://syntax_tree//lib/syntax_tree/node.rb#8958 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#8987 + # source://syntax_tree//lib/syntax_tree/node.rb#8971 def deconstruct_keys(_keys); end # [String] the right brace # - # source://syntax_tree//lib/syntax_tree/node.rb#8963 + # source://syntax_tree//lib/syntax_tree/node.rb#8947 def value; end end # RBracket represents the use of a right bracket, i.e., +]+. # -# source://syntax_tree//lib/syntax_tree/node.rb#8997 +# source://syntax_tree//lib/syntax_tree/node.rb#8981 class SyntaxTree::RBracket < ::SyntaxTree::Node # @return [RBracket] a new instance of RBracket # - # source://syntax_tree//lib/syntax_tree/node.rb#9001 + # source://syntax_tree//lib/syntax_tree/node.rb#8985 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#9027 + # source://syntax_tree//lib/syntax_tree/node.rb#9011 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#9006 + # source://syntax_tree//lib/syntax_tree/node.rb#8990 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#9010 + # source://syntax_tree//lib/syntax_tree/node.rb#8994 def child_nodes; end - # source://syntax_tree//lib/syntax_tree/node.rb#9014 + # source://syntax_tree//lib/syntax_tree/node.rb#8998 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#9010 + # source://syntax_tree//lib/syntax_tree/node.rb#8994 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#9023 + # source://syntax_tree//lib/syntax_tree/node.rb#9007 def deconstruct_keys(_keys); end # [String] the right bracket # - # source://syntax_tree//lib/syntax_tree/node.rb#8999 + # source://syntax_tree//lib/syntax_tree/node.rb#8983 def value; end end # RParen represents the use of a right parenthesis, i.e., +)+. # -# source://syntax_tree//lib/syntax_tree/node.rb#9767 +# source://syntax_tree//lib/syntax_tree/node.rb#9751 class SyntaxTree::RParen < ::SyntaxTree::Node # @return [RParen] a new instance of RParen # - # source://syntax_tree//lib/syntax_tree/node.rb#9771 + # source://syntax_tree//lib/syntax_tree/node.rb#9755 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#9797 + # source://syntax_tree//lib/syntax_tree/node.rb#9781 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#9776 + # source://syntax_tree//lib/syntax_tree/node.rb#9760 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#9780 + # source://syntax_tree//lib/syntax_tree/node.rb#9764 def child_nodes; end - # source://syntax_tree//lib/syntax_tree/node.rb#9784 + # source://syntax_tree//lib/syntax_tree/node.rb#9768 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#9780 + # source://syntax_tree//lib/syntax_tree/node.rb#9764 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#9793 + # source://syntax_tree//lib/syntax_tree/node.rb#9777 def deconstruct_keys(_keys); end # [String] the parenthesis # - # source://syntax_tree//lib/syntax_tree/node.rb#9769 + # source://syntax_tree//lib/syntax_tree/node.rb#9753 def value; end end @@ -10935,52 +11161,52 @@ end # # One of the sides of the expression may be nil, but not both. # -# source://syntax_tree//lib/syntax_tree/node.rb#4537 +# source://syntax_tree//lib/syntax_tree/node.rb#4540 class SyntaxTree::RangeNode < ::SyntaxTree::Node # @return [RangeNode] a new instance of RangeNode # - # source://syntax_tree//lib/syntax_tree/node.rb#4550 + # source://syntax_tree//lib/syntax_tree/node.rb#4553 def initialize(left:, operator:, right:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#4604 + # source://syntax_tree//lib/syntax_tree/node.rb#4607 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#4558 + # source://syntax_tree//lib/syntax_tree/node.rb#4561 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#4562 + # source://syntax_tree//lib/syntax_tree/node.rb#4565 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#4548 + # source://syntax_tree//lib/syntax_tree/node.rb#4551 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#4566 + # source://syntax_tree//lib/syntax_tree/node.rb#4569 def copy(left: T.unsafe(nil), operator: T.unsafe(nil), right: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#4562 + # source://syntax_tree//lib/syntax_tree/node.rb#4565 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#4581 + # source://syntax_tree//lib/syntax_tree/node.rb#4584 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#4591 + # source://syntax_tree//lib/syntax_tree/node.rb#4594 def format(q); end # [nil | Node] the left side of the expression # - # source://syntax_tree//lib/syntax_tree/node.rb#4539 + # source://syntax_tree//lib/syntax_tree/node.rb#4542 def left; end # [Op] the operator used for this range # - # source://syntax_tree//lib/syntax_tree/node.rb#4542 + # source://syntax_tree//lib/syntax_tree/node.rb#4545 def operator; end # [nil | Node] the right side of the expression # - # source://syntax_tree//lib/syntax_tree/node.rb#4545 + # source://syntax_tree//lib/syntax_tree/node.rb#4548 def right; end end @@ -10988,42 +11214,42 @@ end # # 1r # -# source://syntax_tree//lib/syntax_tree/node.rb#8913 +# source://syntax_tree//lib/syntax_tree/node.rb#8897 class SyntaxTree::RationalLiteral < ::SyntaxTree::Node # @return [RationalLiteral] a new instance of RationalLiteral # - # source://syntax_tree//lib/syntax_tree/node.rb#8920 + # source://syntax_tree//lib/syntax_tree/node.rb#8904 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#8955 + # source://syntax_tree//lib/syntax_tree/node.rb#8939 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#8926 + # source://syntax_tree//lib/syntax_tree/node.rb#8910 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#8930 + # source://syntax_tree//lib/syntax_tree/node.rb#8914 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#8918 + # source://syntax_tree//lib/syntax_tree/node.rb#8902 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#8934 + # source://syntax_tree//lib/syntax_tree/node.rb#8918 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#8930 + # source://syntax_tree//lib/syntax_tree/node.rb#8914 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#8947 + # source://syntax_tree//lib/syntax_tree/node.rb#8931 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#8951 + # source://syntax_tree//lib/syntax_tree/node.rb#8935 def format(q); end # [String] the rational number literal # - # source://syntax_tree//lib/syntax_tree/node.rb#8915 + # source://syntax_tree//lib/syntax_tree/node.rb#8899 def value; end end @@ -11031,37 +11257,37 @@ end # # redo # -# source://syntax_tree//lib/syntax_tree/node.rb#9036 +# source://syntax_tree//lib/syntax_tree/node.rb#9020 class SyntaxTree::Redo < ::SyntaxTree::Node # @return [Redo] a new instance of Redo # - # source://syntax_tree//lib/syntax_tree/node.rb#9040 + # source://syntax_tree//lib/syntax_tree/node.rb#9024 def initialize(location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#9070 + # source://syntax_tree//lib/syntax_tree/node.rb#9054 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#9045 + # source://syntax_tree//lib/syntax_tree/node.rb#9029 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#9049 + # source://syntax_tree//lib/syntax_tree/node.rb#9033 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#9038 + # source://syntax_tree//lib/syntax_tree/node.rb#9022 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#9053 + # source://syntax_tree//lib/syntax_tree/node.rb#9037 def copy(location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#9049 + # source://syntax_tree//lib/syntax_tree/node.rb#9033 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#9062 + # source://syntax_tree//lib/syntax_tree/node.rb#9046 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#9066 + # source://syntax_tree//lib/syntax_tree/node.rb#9050 def format(q); end end @@ -11074,34 +11300,34 @@ end # # %r{.+} # -# source://syntax_tree//lib/syntax_tree/node.rb#9132 +# source://syntax_tree//lib/syntax_tree/node.rb#9116 class SyntaxTree::RegexpBeg < ::SyntaxTree::Node # @return [RegexpBeg] a new instance of RegexpBeg # - # source://syntax_tree//lib/syntax_tree/node.rb#9136 + # source://syntax_tree//lib/syntax_tree/node.rb#9120 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#9162 + # source://syntax_tree//lib/syntax_tree/node.rb#9146 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#9141 + # source://syntax_tree//lib/syntax_tree/node.rb#9125 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#9145 + # source://syntax_tree//lib/syntax_tree/node.rb#9129 def child_nodes; end - # source://syntax_tree//lib/syntax_tree/node.rb#9149 + # source://syntax_tree//lib/syntax_tree/node.rb#9133 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#9145 + # source://syntax_tree//lib/syntax_tree/node.rb#9129 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#9158 + # source://syntax_tree//lib/syntax_tree/node.rb#9142 def deconstruct_keys(_keys); end # [String] the beginning of the regular expression # - # source://syntax_tree//lib/syntax_tree/node.rb#9134 + # source://syntax_tree//lib/syntax_tree/node.rb#9118 def value; end end @@ -11112,40 +11338,40 @@ end # In the example above, a RegexpContent node represents everything contained # within the forward slashes. # -# source://syntax_tree//lib/syntax_tree/node.rb#9081 +# source://syntax_tree//lib/syntax_tree/node.rb#9065 class SyntaxTree::RegexpContent < ::SyntaxTree::Node # @return [RegexpContent] a new instance of RegexpContent # - # source://syntax_tree//lib/syntax_tree/node.rb#9089 + # source://syntax_tree//lib/syntax_tree/node.rb#9073 def initialize(beginning:, parts:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#9117 + # source://syntax_tree//lib/syntax_tree/node.rb#9101 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#9095 + # source://syntax_tree//lib/syntax_tree/node.rb#9079 def accept(visitor); end # [String] the opening of the regular expression # - # source://syntax_tree//lib/syntax_tree/node.rb#9083 + # source://syntax_tree//lib/syntax_tree/node.rb#9067 def beginning; end - # source://syntax_tree//lib/syntax_tree/node.rb#9099 + # source://syntax_tree//lib/syntax_tree/node.rb#9083 def child_nodes; end - # source://syntax_tree//lib/syntax_tree/node.rb#9103 + # source://syntax_tree//lib/syntax_tree/node.rb#9087 def copy(beginning: T.unsafe(nil), parts: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#9099 + # source://syntax_tree//lib/syntax_tree/node.rb#9083 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#9113 + # source://syntax_tree//lib/syntax_tree/node.rb#9097 def deconstruct_keys(_keys); end # [Array[ StringDVar | StringEmbExpr | TStringContent ]] the parts of the # regular expression # - # source://syntax_tree//lib/syntax_tree/node.rb#9087 + # source://syntax_tree//lib/syntax_tree/node.rb#9071 def parts; end end @@ -11159,34 +11385,34 @@ end # # %r{.+}m # -# source://syntax_tree//lib/syntax_tree/node.rb#9177 +# source://syntax_tree//lib/syntax_tree/node.rb#9161 class SyntaxTree::RegexpEnd < ::SyntaxTree::Node # @return [RegexpEnd] a new instance of RegexpEnd # - # source://syntax_tree//lib/syntax_tree/node.rb#9181 + # source://syntax_tree//lib/syntax_tree/node.rb#9165 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#9207 + # source://syntax_tree//lib/syntax_tree/node.rb#9191 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#9186 + # source://syntax_tree//lib/syntax_tree/node.rb#9170 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#9190 + # source://syntax_tree//lib/syntax_tree/node.rb#9174 def child_nodes; end - # source://syntax_tree//lib/syntax_tree/node.rb#9194 + # source://syntax_tree//lib/syntax_tree/node.rb#9178 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#9190 + # source://syntax_tree//lib/syntax_tree/node.rb#9174 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#9203 + # source://syntax_tree//lib/syntax_tree/node.rb#9187 def deconstruct_keys(_keys); end # [String] the end of the regular expression # - # source://syntax_tree//lib/syntax_tree/node.rb#9179 + # source://syntax_tree//lib/syntax_tree/node.rb#9163 def value; end end @@ -11194,56 +11420,56 @@ end # # /.+/ # -# source://syntax_tree//lib/syntax_tree/node.rb#9216 +# source://syntax_tree//lib/syntax_tree/node.rb#9200 class SyntaxTree::RegexpLiteral < ::SyntaxTree::Node # @return [RegexpLiteral] a new instance of RegexpLiteral # - # source://syntax_tree//lib/syntax_tree/node.rb#9230 + # source://syntax_tree//lib/syntax_tree/node.rb#9214 def initialize(beginning:, ending:, parts:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#9312 + # source://syntax_tree//lib/syntax_tree/node.rb#9296 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#9238 + # source://syntax_tree//lib/syntax_tree/node.rb#9222 def accept(visitor); end # [String] the beginning of the regular expression literal # - # source://syntax_tree//lib/syntax_tree/node.rb#9218 + # source://syntax_tree//lib/syntax_tree/node.rb#9202 def beginning; end - # source://syntax_tree//lib/syntax_tree/node.rb#9242 + # source://syntax_tree//lib/syntax_tree/node.rb#9226 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#9228 + # source://syntax_tree//lib/syntax_tree/node.rb#9212 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#9246 + # source://syntax_tree//lib/syntax_tree/node.rb#9230 def copy(beginning: T.unsafe(nil), ending: T.unsafe(nil), parts: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#9242 + # source://syntax_tree//lib/syntax_tree/node.rb#9226 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#9261 + # source://syntax_tree//lib/syntax_tree/node.rb#9245 def deconstruct_keys(_keys); end # [String] the ending of the regular expression literal # - # source://syntax_tree//lib/syntax_tree/node.rb#9221 + # source://syntax_tree//lib/syntax_tree/node.rb#9205 def ending; end - # source://syntax_tree//lib/syntax_tree/node.rb#9272 + # source://syntax_tree//lib/syntax_tree/node.rb#9256 def format(q); end - # source://syntax_tree//lib/syntax_tree/node.rb#9318 + # source://syntax_tree//lib/syntax_tree/node.rb#9302 def options; end # [Array[ StringEmbExpr | StringDVar | TStringContent ]] the parts of the # regular expression literal # - # source://syntax_tree//lib/syntax_tree/node.rb#9225 + # source://syntax_tree//lib/syntax_tree/node.rb#9209 def parts; end private @@ -11255,12 +11481,12 @@ class SyntaxTree::RegexpLiteral < ::SyntaxTree::Node # # @return [Boolean] # - # source://syntax_tree//lib/syntax_tree/node.rb#9334 + # source://syntax_tree//lib/syntax_tree/node.rb#9318 def ambiguous?(q); end # @return [Boolean] # - # source://syntax_tree//lib/syntax_tree/node.rb#9324 + # source://syntax_tree//lib/syntax_tree/node.rb#9308 def include?(pattern); end end @@ -11270,60 +11496,60 @@ end # rescue # end # -# source://syntax_tree//lib/syntax_tree/node.rb#9424 +# source://syntax_tree//lib/syntax_tree/node.rb#9408 class SyntaxTree::Rescue < ::SyntaxTree::Node # @return [Rescue] a new instance of Rescue # - # source://syntax_tree//lib/syntax_tree/node.rb#9440 + # source://syntax_tree//lib/syntax_tree/node.rb#9424 def initialize(keyword:, exception:, statements:, consequent:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#9536 + # source://syntax_tree//lib/syntax_tree/node.rb#9520 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#9471 + # source://syntax_tree//lib/syntax_tree/node.rb#9455 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#9449 + # source://syntax_tree//lib/syntax_tree/node.rb#9433 def bind_end(end_char, end_column); end - # source://syntax_tree//lib/syntax_tree/node.rb#9475 + # source://syntax_tree//lib/syntax_tree/node.rb#9459 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#9438 + # source://syntax_tree//lib/syntax_tree/node.rb#9422 def comments; end # [nil | Rescue] the optional next clause in the chain # - # source://syntax_tree//lib/syntax_tree/node.rb#9435 + # source://syntax_tree//lib/syntax_tree/node.rb#9419 def consequent; end - # source://syntax_tree//lib/syntax_tree/node.rb#9479 + # source://syntax_tree//lib/syntax_tree/node.rb#9463 def copy(keyword: T.unsafe(nil), exception: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#9475 + # source://syntax_tree//lib/syntax_tree/node.rb#9459 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#9501 + # source://syntax_tree//lib/syntax_tree/node.rb#9485 def deconstruct_keys(_keys); end # [nil | RescueEx] the exceptions being rescued # - # source://syntax_tree//lib/syntax_tree/node.rb#9429 + # source://syntax_tree//lib/syntax_tree/node.rb#9413 def exception; end - # source://syntax_tree//lib/syntax_tree/node.rb#9512 + # source://syntax_tree//lib/syntax_tree/node.rb#9496 def format(q); end # [Kw] the rescue keyword # - # source://syntax_tree//lib/syntax_tree/node.rb#9426 + # source://syntax_tree//lib/syntax_tree/node.rb#9410 def keyword; end # [Statements] the expressions to evaluate when an error is rescued # - # source://syntax_tree//lib/syntax_tree/node.rb#9432 + # source://syntax_tree//lib/syntax_tree/node.rb#9416 def statements; end end @@ -11333,48 +11559,48 @@ end # rescue Exception => exception # end # -# source://syntax_tree//lib/syntax_tree/node.rb#9349 +# source://syntax_tree//lib/syntax_tree/node.rb#9333 class SyntaxTree::RescueEx < ::SyntaxTree::Node # @return [RescueEx] a new instance of RescueEx # - # source://syntax_tree//lib/syntax_tree/node.rb#9360 + # source://syntax_tree//lib/syntax_tree/node.rb#9344 def initialize(exceptions:, variable:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#9412 + # source://syntax_tree//lib/syntax_tree/node.rb#9396 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#9367 + # source://syntax_tree//lib/syntax_tree/node.rb#9351 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#9371 + # source://syntax_tree//lib/syntax_tree/node.rb#9355 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#9358 + # source://syntax_tree//lib/syntax_tree/node.rb#9342 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#9375 + # source://syntax_tree//lib/syntax_tree/node.rb#9359 def copy(exceptions: T.unsafe(nil), variable: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#9371 + # source://syntax_tree//lib/syntax_tree/node.rb#9355 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#9389 + # source://syntax_tree//lib/syntax_tree/node.rb#9373 def deconstruct_keys(_keys); end # [nil | Node] the list of exceptions being rescued # - # source://syntax_tree//lib/syntax_tree/node.rb#9351 + # source://syntax_tree//lib/syntax_tree/node.rb#9335 def exceptions; end - # source://syntax_tree//lib/syntax_tree/node.rb#9398 + # source://syntax_tree//lib/syntax_tree/node.rb#9382 def format(q); end # [nil | Field | VarField] the expression being used to capture the raised # exception # - # source://syntax_tree//lib/syntax_tree/node.rb#9355 + # source://syntax_tree//lib/syntax_tree/node.rb#9339 def variable; end end @@ -11382,47 +11608,47 @@ end # # expression rescue value # -# source://syntax_tree//lib/syntax_tree/node.rb#9547 +# source://syntax_tree//lib/syntax_tree/node.rb#9531 class SyntaxTree::RescueMod < ::SyntaxTree::Node # @return [RescueMod] a new instance of RescueMod # - # source://syntax_tree//lib/syntax_tree/node.rb#9557 + # source://syntax_tree//lib/syntax_tree/node.rb#9541 def initialize(statement:, value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#9613 + # source://syntax_tree//lib/syntax_tree/node.rb#9597 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#9564 + # source://syntax_tree//lib/syntax_tree/node.rb#9548 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#9568 + # source://syntax_tree//lib/syntax_tree/node.rb#9552 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#9555 + # source://syntax_tree//lib/syntax_tree/node.rb#9539 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#9572 + # source://syntax_tree//lib/syntax_tree/node.rb#9556 def copy(statement: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#9568 + # source://syntax_tree//lib/syntax_tree/node.rb#9552 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#9586 + # source://syntax_tree//lib/syntax_tree/node.rb#9570 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#9595 + # source://syntax_tree//lib/syntax_tree/node.rb#9579 def format(q); end # [Node] the expression to execute # - # source://syntax_tree//lib/syntax_tree/node.rb#9549 + # source://syntax_tree//lib/syntax_tree/node.rb#9533 def statement; end # [Node] the value to use if the executed expression raises an error # - # source://syntax_tree//lib/syntax_tree/node.rb#9552 + # source://syntax_tree//lib/syntax_tree/node.rb#9536 def value; end end @@ -11431,42 +11657,42 @@ end # # def method(*rest) end # -# source://syntax_tree//lib/syntax_tree/node.rb#9624 +# source://syntax_tree//lib/syntax_tree/node.rb#9608 class SyntaxTree::RestParam < ::SyntaxTree::Node # @return [RestParam] a new instance of RestParam # - # source://syntax_tree//lib/syntax_tree/node.rb#9631 + # source://syntax_tree//lib/syntax_tree/node.rb#9615 def initialize(name:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#9667 + # source://syntax_tree//lib/syntax_tree/node.rb#9651 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#9637 + # source://syntax_tree//lib/syntax_tree/node.rb#9621 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#9641 + # source://syntax_tree//lib/syntax_tree/node.rb#9625 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#9629 + # source://syntax_tree//lib/syntax_tree/node.rb#9613 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#9645 + # source://syntax_tree//lib/syntax_tree/node.rb#9629 def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#9641 + # source://syntax_tree//lib/syntax_tree/node.rb#9625 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#9658 + # source://syntax_tree//lib/syntax_tree/node.rb#9642 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#9662 + # source://syntax_tree//lib/syntax_tree/node.rb#9646 def format(q); end # [nil | Ident] the name of the parameter # - # source://syntax_tree//lib/syntax_tree/node.rb#9626 + # source://syntax_tree//lib/syntax_tree/node.rb#9610 def name; end end @@ -11474,37 +11700,37 @@ end # # retry # -# source://syntax_tree//lib/syntax_tree/node.rb#9676 +# source://syntax_tree//lib/syntax_tree/node.rb#9660 class SyntaxTree::Retry < ::SyntaxTree::Node # @return [Retry] a new instance of Retry # - # source://syntax_tree//lib/syntax_tree/node.rb#9680 + # source://syntax_tree//lib/syntax_tree/node.rb#9664 def initialize(location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#9710 + # source://syntax_tree//lib/syntax_tree/node.rb#9694 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#9685 + # source://syntax_tree//lib/syntax_tree/node.rb#9669 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#9689 + # source://syntax_tree//lib/syntax_tree/node.rb#9673 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#9678 + # source://syntax_tree//lib/syntax_tree/node.rb#9662 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#9693 + # source://syntax_tree//lib/syntax_tree/node.rb#9677 def copy(location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#9689 + # source://syntax_tree//lib/syntax_tree/node.rb#9673 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#9702 + # source://syntax_tree//lib/syntax_tree/node.rb#9686 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#9706 + # source://syntax_tree//lib/syntax_tree/node.rb#9690 def format(q); end end @@ -11512,42 +11738,42 @@ end # # return value # -# source://syntax_tree//lib/syntax_tree/node.rb#9719 +# source://syntax_tree//lib/syntax_tree/node.rb#9703 class SyntaxTree::ReturnNode < ::SyntaxTree::Node # @return [ReturnNode] a new instance of ReturnNode # - # source://syntax_tree//lib/syntax_tree/node.rb#9726 + # source://syntax_tree//lib/syntax_tree/node.rb#9710 def initialize(arguments:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#9761 + # source://syntax_tree//lib/syntax_tree/node.rb#9745 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#9732 + # source://syntax_tree//lib/syntax_tree/node.rb#9716 def accept(visitor); end # [nil | Args] the arguments being passed to the keyword # - # source://syntax_tree//lib/syntax_tree/node.rb#9721 + # source://syntax_tree//lib/syntax_tree/node.rb#9705 def arguments; end - # source://syntax_tree//lib/syntax_tree/node.rb#9736 + # source://syntax_tree//lib/syntax_tree/node.rb#9720 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#9724 + # source://syntax_tree//lib/syntax_tree/node.rb#9708 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#9740 + # source://syntax_tree//lib/syntax_tree/node.rb#9724 def copy(arguments: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#9736 + # source://syntax_tree//lib/syntax_tree/node.rb#9720 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#9753 + # source://syntax_tree//lib/syntax_tree/node.rb#9737 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#9757 + # source://syntax_tree//lib/syntax_tree/node.rb#9741 def format(q); end end @@ -11558,47 +11784,47 @@ end # class << self # end # -# source://syntax_tree//lib/syntax_tree/node.rb#9809 +# source://syntax_tree//lib/syntax_tree/node.rb#9793 class SyntaxTree::SClass < ::SyntaxTree::Node # @return [SClass] a new instance of SClass # - # source://syntax_tree//lib/syntax_tree/node.rb#9819 + # source://syntax_tree//lib/syntax_tree/node.rb#9803 def initialize(target:, bodystmt:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#9870 + # source://syntax_tree//lib/syntax_tree/node.rb#9854 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#9826 + # source://syntax_tree//lib/syntax_tree/node.rb#9810 def accept(visitor); end # [BodyStmt] the expressions to be executed # - # source://syntax_tree//lib/syntax_tree/node.rb#9814 + # source://syntax_tree//lib/syntax_tree/node.rb#9798 def bodystmt; end - # source://syntax_tree//lib/syntax_tree/node.rb#9830 + # source://syntax_tree//lib/syntax_tree/node.rb#9814 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#9817 + # source://syntax_tree//lib/syntax_tree/node.rb#9801 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#9834 + # source://syntax_tree//lib/syntax_tree/node.rb#9818 def copy(target: T.unsafe(nil), bodystmt: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#9830 + # source://syntax_tree//lib/syntax_tree/node.rb#9814 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#9848 + # source://syntax_tree//lib/syntax_tree/node.rb#9832 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#9857 + # source://syntax_tree//lib/syntax_tree/node.rb#9841 def format(q); end # [Node] the target of the singleton class to enter # - # source://syntax_tree//lib/syntax_tree/node.rb#9811 + # source://syntax_tree//lib/syntax_tree/node.rb#9795 def target; end end @@ -11629,53 +11855,53 @@ end # propagate that onto void_stmt nodes inside the stmts in order to make sure # all comments get printed appropriately. # -# source://syntax_tree//lib/syntax_tree/node.rb#9883 +# source://syntax_tree//lib/syntax_tree/node.rb#9867 class SyntaxTree::Statements < ::SyntaxTree::Node # @return [Statements] a new instance of Statements # - # source://syntax_tree//lib/syntax_tree/node.rb#9890 + # source://syntax_tree//lib/syntax_tree/node.rb#9874 def initialize(body:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#10016 + # source://syntax_tree//lib/syntax_tree/node.rb#10000 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#9943 + # source://syntax_tree//lib/syntax_tree/node.rb#9927 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#9896 + # source://syntax_tree//lib/syntax_tree/node.rb#9880 def bind(parser, start_char, start_column, end_char, end_column); end - # source://syntax_tree//lib/syntax_tree/node.rb#9925 + # source://syntax_tree//lib/syntax_tree/node.rb#9909 def bind_end(end_char, end_column); end # [Array[ Node ]] the list of expressions contained within this node # - # source://syntax_tree//lib/syntax_tree/node.rb#9885 + # source://syntax_tree//lib/syntax_tree/node.rb#9869 def body; end - # source://syntax_tree//lib/syntax_tree/node.rb#9947 + # source://syntax_tree//lib/syntax_tree/node.rb#9931 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#9888 + # source://syntax_tree//lib/syntax_tree/node.rb#9872 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#9951 + # source://syntax_tree//lib/syntax_tree/node.rb#9935 def copy(body: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#9947 + # source://syntax_tree//lib/syntax_tree/node.rb#9931 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#9964 + # source://syntax_tree//lib/syntax_tree/node.rb#9948 def deconstruct_keys(_keys); end # @return [Boolean] # - # source://syntax_tree//lib/syntax_tree/node.rb#9937 + # source://syntax_tree//lib/syntax_tree/node.rb#9921 def empty?; end - # source://syntax_tree//lib/syntax_tree/node.rb#9968 + # source://syntax_tree//lib/syntax_tree/node.rb#9952 def format(q); end private @@ -11684,7 +11910,7 @@ class SyntaxTree::Statements < ::SyntaxTree::Node # found while this statements list was being parsed and add them into the # body. # - # source://syntax_tree//lib/syntax_tree/node.rb#10025 + # source://syntax_tree//lib/syntax_tree/node.rb#10009 def attach_comments(parser, start_char, end_char); end end @@ -11694,48 +11920,48 @@ end # "first" \ # "second" # -# source://syntax_tree//lib/syntax_tree/node.rb#10140 +# source://syntax_tree//lib/syntax_tree/node.rb#10124 class SyntaxTree::StringConcat < ::SyntaxTree::Node # @return [StringConcat] a new instance of StringConcat # - # source://syntax_tree//lib/syntax_tree/node.rb#10151 + # source://syntax_tree//lib/syntax_tree/node.rb#10135 def initialize(left:, right:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#10195 + # source://syntax_tree//lib/syntax_tree/node.rb#10179 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#10158 + # source://syntax_tree//lib/syntax_tree/node.rb#10142 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#10162 + # source://syntax_tree//lib/syntax_tree/node.rb#10146 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#10149 + # source://syntax_tree//lib/syntax_tree/node.rb#10133 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#10166 + # source://syntax_tree//lib/syntax_tree/node.rb#10150 def copy(left: T.unsafe(nil), right: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#10162 + # source://syntax_tree//lib/syntax_tree/node.rb#10146 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#10180 + # source://syntax_tree//lib/syntax_tree/node.rb#10164 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#10184 + # source://syntax_tree//lib/syntax_tree/node.rb#10168 def format(q); end # [Heredoc | StringConcat | StringLiteral] the left side of the # concatenation # - # source://syntax_tree//lib/syntax_tree/node.rb#10143 + # source://syntax_tree//lib/syntax_tree/node.rb#10127 def left; end # [StringLiteral] the right side of the concatenation # - # source://syntax_tree//lib/syntax_tree/node.rb#10146 + # source://syntax_tree//lib/syntax_tree/node.rb#10130 def right; end end @@ -11743,43 +11969,43 @@ end # # "string" # -# source://syntax_tree//lib/syntax_tree/node.rb#10067 +# source://syntax_tree//lib/syntax_tree/node.rb#10051 class SyntaxTree::StringContent < ::SyntaxTree::Node # @return [StringContent] a new instance of StringContent # - # source://syntax_tree//lib/syntax_tree/node.rb#10075 + # source://syntax_tree//lib/syntax_tree/node.rb#10059 def initialize(parts:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#10102 + # source://syntax_tree//lib/syntax_tree/node.rb#10086 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#10081 + # source://syntax_tree//lib/syntax_tree/node.rb#10065 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#10085 + # source://syntax_tree//lib/syntax_tree/node.rb#10069 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#10073 + # source://syntax_tree//lib/syntax_tree/node.rb#10057 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#10089 + # source://syntax_tree//lib/syntax_tree/node.rb#10073 def copy(parts: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#10085 + # source://syntax_tree//lib/syntax_tree/node.rb#10069 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#10098 + # source://syntax_tree//lib/syntax_tree/node.rb#10082 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#10106 + # source://syntax_tree//lib/syntax_tree/node.rb#10090 def format(q); end # [Array[ StringEmbExpr | StringDVar | TStringContent ]] the parts of the # string # - # source://syntax_tree//lib/syntax_tree/node.rb#10070 + # source://syntax_tree//lib/syntax_tree/node.rb#10054 def parts; end end @@ -11789,42 +12015,42 @@ end # # "#@variable" # -# source://syntax_tree//lib/syntax_tree/node.rb#10206 +# source://syntax_tree//lib/syntax_tree/node.rb#10190 class SyntaxTree::StringDVar < ::SyntaxTree::Node # @return [StringDVar] a new instance of StringDVar # - # source://syntax_tree//lib/syntax_tree/node.rb#10213 + # source://syntax_tree//lib/syntax_tree/node.rb#10197 def initialize(variable:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#10250 + # source://syntax_tree//lib/syntax_tree/node.rb#10234 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#10219 + # source://syntax_tree//lib/syntax_tree/node.rb#10203 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#10223 + # source://syntax_tree//lib/syntax_tree/node.rb#10207 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#10211 + # source://syntax_tree//lib/syntax_tree/node.rb#10195 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#10227 + # source://syntax_tree//lib/syntax_tree/node.rb#10211 def copy(variable: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#10223 + # source://syntax_tree//lib/syntax_tree/node.rb#10207 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#10240 + # source://syntax_tree//lib/syntax_tree/node.rb#10224 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#10244 + # source://syntax_tree//lib/syntax_tree/node.rb#10228 def format(q); end # [Backref | VarRef] the variable being interpolated # - # source://syntax_tree//lib/syntax_tree/node.rb#10208 + # source://syntax_tree//lib/syntax_tree/node.rb#10192 def variable; end end @@ -11834,42 +12060,42 @@ end # # "string #{expression}" # -# source://syntax_tree//lib/syntax_tree/node.rb#10261 +# source://syntax_tree//lib/syntax_tree/node.rb#10245 class SyntaxTree::StringEmbExpr < ::SyntaxTree::Node # @return [StringEmbExpr] a new instance of StringEmbExpr # - # source://syntax_tree//lib/syntax_tree/node.rb#10268 + # source://syntax_tree//lib/syntax_tree/node.rb#10252 def initialize(statements:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#10325 + # source://syntax_tree//lib/syntax_tree/node.rb#10309 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#10274 + # source://syntax_tree//lib/syntax_tree/node.rb#10258 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#10278 + # source://syntax_tree//lib/syntax_tree/node.rb#10262 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#10266 + # source://syntax_tree//lib/syntax_tree/node.rb#10250 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#10282 + # source://syntax_tree//lib/syntax_tree/node.rb#10266 def copy(statements: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#10278 + # source://syntax_tree//lib/syntax_tree/node.rb#10262 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#10295 + # source://syntax_tree//lib/syntax_tree/node.rb#10279 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#10299 + # source://syntax_tree//lib/syntax_tree/node.rb#10283 def format(q); end # [Statements] the expressions to be interpolated # - # source://syntax_tree//lib/syntax_tree/node.rb#10263 + # source://syntax_tree//lib/syntax_tree/node.rb#10247 def statements; end end @@ -11877,48 +12103,48 @@ end # # "string" # -# source://syntax_tree//lib/syntax_tree/node.rb#10334 +# source://syntax_tree//lib/syntax_tree/node.rb#10318 class SyntaxTree::StringLiteral < ::SyntaxTree::Node # @return [StringLiteral] a new instance of StringLiteral # - # source://syntax_tree//lib/syntax_tree/node.rb#10345 + # source://syntax_tree//lib/syntax_tree/node.rb#10329 def initialize(parts:, quote:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#10419 + # source://syntax_tree//lib/syntax_tree/node.rb#10403 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#10352 + # source://syntax_tree//lib/syntax_tree/node.rb#10336 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#10356 + # source://syntax_tree//lib/syntax_tree/node.rb#10340 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#10343 + # source://syntax_tree//lib/syntax_tree/node.rb#10327 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#10360 + # source://syntax_tree//lib/syntax_tree/node.rb#10344 def copy(parts: T.unsafe(nil), quote: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#10356 + # source://syntax_tree//lib/syntax_tree/node.rb#10340 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#10374 + # source://syntax_tree//lib/syntax_tree/node.rb#10358 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#10378 + # source://syntax_tree//lib/syntax_tree/node.rb#10362 def format(q); end # [Array[ StringEmbExpr | StringDVar | TStringContent ]] the parts of the # string literal # - # source://syntax_tree//lib/syntax_tree/node.rb#10337 + # source://syntax_tree//lib/syntax_tree/node.rb#10321 def parts; end # [nil | String] which quote was used by the string literal # - # source://syntax_tree//lib/syntax_tree/node.rb#10340 + # source://syntax_tree//lib/syntax_tree/node.rb#10324 def quote; end end @@ -11927,42 +12153,42 @@ end # # super(value) # -# source://syntax_tree//lib/syntax_tree/node.rb#10430 +# source://syntax_tree//lib/syntax_tree/node.rb#10414 class SyntaxTree::Super < ::SyntaxTree::Node # @return [Super] a new instance of Super # - # source://syntax_tree//lib/syntax_tree/node.rb#10437 + # source://syntax_tree//lib/syntax_tree/node.rb#10421 def initialize(arguments:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#10481 + # source://syntax_tree//lib/syntax_tree/node.rb#10465 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#10443 + # source://syntax_tree//lib/syntax_tree/node.rb#10427 def accept(visitor); end # [ArgParen | Args] the arguments to the keyword # - # source://syntax_tree//lib/syntax_tree/node.rb#10432 + # source://syntax_tree//lib/syntax_tree/node.rb#10416 def arguments; end - # source://syntax_tree//lib/syntax_tree/node.rb#10447 + # source://syntax_tree//lib/syntax_tree/node.rb#10431 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#10435 + # source://syntax_tree//lib/syntax_tree/node.rb#10419 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#10451 + # source://syntax_tree//lib/syntax_tree/node.rb#10435 def copy(arguments: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#10447 + # source://syntax_tree//lib/syntax_tree/node.rb#10431 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#10464 + # source://syntax_tree//lib/syntax_tree/node.rb#10448 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#10468 + # source://syntax_tree//lib/syntax_tree/node.rb#10452 def format(q); end end @@ -11983,34 +12209,34 @@ end # contain ":'" or ":\"". In the case of %s symbols, it will contain the start # of the symbol including the %s and the delimiter. # -# source://syntax_tree//lib/syntax_tree/node.rb#10502 +# source://syntax_tree//lib/syntax_tree/node.rb#10486 class SyntaxTree::SymBeg < ::SyntaxTree::Node # @return [SymBeg] a new instance of SymBeg # - # source://syntax_tree//lib/syntax_tree/node.rb#10506 + # source://syntax_tree//lib/syntax_tree/node.rb#10490 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#10532 + # source://syntax_tree//lib/syntax_tree/node.rb#10516 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#10511 + # source://syntax_tree//lib/syntax_tree/node.rb#10495 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#10515 + # source://syntax_tree//lib/syntax_tree/node.rb#10499 def child_nodes; end - # source://syntax_tree//lib/syntax_tree/node.rb#10519 + # source://syntax_tree//lib/syntax_tree/node.rb#10503 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#10515 + # source://syntax_tree//lib/syntax_tree/node.rb#10499 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#10528 + # source://syntax_tree//lib/syntax_tree/node.rb#10512 def deconstruct_keys(_keys); end # [String] the beginning of the symbol # - # source://syntax_tree//lib/syntax_tree/node.rb#10504 + # source://syntax_tree//lib/syntax_tree/node.rb#10488 def value; end end @@ -12019,35 +12245,35 @@ end # # :symbol # -# source://syntax_tree//lib/syntax_tree/node.rb#10542 +# source://syntax_tree//lib/syntax_tree/node.rb#10526 class SyntaxTree::SymbolContent < ::SyntaxTree::Node # @return [SymbolContent] a new instance of SymbolContent # - # source://syntax_tree//lib/syntax_tree/node.rb#10547 + # source://syntax_tree//lib/syntax_tree/node.rb#10531 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#10573 + # source://syntax_tree//lib/syntax_tree/node.rb#10557 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#10552 + # source://syntax_tree//lib/syntax_tree/node.rb#10536 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#10556 + # source://syntax_tree//lib/syntax_tree/node.rb#10540 def child_nodes; end - # source://syntax_tree//lib/syntax_tree/node.rb#10560 + # source://syntax_tree//lib/syntax_tree/node.rb#10544 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#10556 + # source://syntax_tree//lib/syntax_tree/node.rb#10540 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#10569 + # source://syntax_tree//lib/syntax_tree/node.rb#10553 def deconstruct_keys(_keys); end # [Backtick | Const | CVar | GVar | Ident | IVar | Kw | Op] the value of the # symbol # - # source://syntax_tree//lib/syntax_tree/node.rb#10545 + # source://syntax_tree//lib/syntax_tree/node.rb#10529 def value; end end @@ -12056,43 +12282,43 @@ end # # :symbol # -# source://syntax_tree//lib/syntax_tree/node.rb#10583 +# source://syntax_tree//lib/syntax_tree/node.rb#10567 class SyntaxTree::SymbolLiteral < ::SyntaxTree::Node # @return [SymbolLiteral] a new instance of SymbolLiteral # - # source://syntax_tree//lib/syntax_tree/node.rb#10591 + # source://syntax_tree//lib/syntax_tree/node.rb#10575 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#10628 + # source://syntax_tree//lib/syntax_tree/node.rb#10612 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#10597 + # source://syntax_tree//lib/syntax_tree/node.rb#10581 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#10601 + # source://syntax_tree//lib/syntax_tree/node.rb#10585 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#10589 + # source://syntax_tree//lib/syntax_tree/node.rb#10573 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#10605 + # source://syntax_tree//lib/syntax_tree/node.rb#10589 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#10601 + # source://syntax_tree//lib/syntax_tree/node.rb#10585 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#10618 + # source://syntax_tree//lib/syntax_tree/node.rb#10602 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#10622 + # source://syntax_tree//lib/syntax_tree/node.rb#10606 def format(q); end # [Backtick | Const | CVar | GVar | Ident | IVar | Kw | Op | TStringContent] # the value of the symbol # - # source://syntax_tree//lib/syntax_tree/node.rb#10586 + # source://syntax_tree//lib/syntax_tree/node.rb#10570 def value; end end @@ -12100,47 +12326,47 @@ end # # %I[one two three] # -# source://syntax_tree//lib/syntax_tree/node.rb#10637 +# source://syntax_tree//lib/syntax_tree/node.rb#10621 class SyntaxTree::Symbols < ::SyntaxTree::Node # @return [Symbols] a new instance of Symbols # - # source://syntax_tree//lib/syntax_tree/node.rb#10647 + # source://syntax_tree//lib/syntax_tree/node.rb#10631 def initialize(beginning:, elements:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#10703 + # source://syntax_tree//lib/syntax_tree/node.rb#10687 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#10654 + # source://syntax_tree//lib/syntax_tree/node.rb#10638 def accept(visitor); end # [SymbolsBeg] the token that opens this array literal # - # source://syntax_tree//lib/syntax_tree/node.rb#10639 + # source://syntax_tree//lib/syntax_tree/node.rb#10623 def beginning; end - # source://syntax_tree//lib/syntax_tree/node.rb#10658 + # source://syntax_tree//lib/syntax_tree/node.rb#10642 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#10645 + # source://syntax_tree//lib/syntax_tree/node.rb#10629 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#10662 + # source://syntax_tree//lib/syntax_tree/node.rb#10646 def copy(beginning: T.unsafe(nil), elements: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#10658 + # source://syntax_tree//lib/syntax_tree/node.rb#10642 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#10672 + # source://syntax_tree//lib/syntax_tree/node.rb#10656 def deconstruct_keys(_keys); end # [Array[ Word ]] the words in the symbol array literal # - # source://syntax_tree//lib/syntax_tree/node.rb#10642 + # source://syntax_tree//lib/syntax_tree/node.rb#10626 def elements; end - # source://syntax_tree//lib/syntax_tree/node.rb#10681 + # source://syntax_tree//lib/syntax_tree/node.rb#10665 def format(q); end end @@ -12153,34 +12379,34 @@ end # kinds of arrays can start with a lot of different delimiter types # (e.g., %I| or %I<). # -# source://syntax_tree//lib/syntax_tree/node.rb#10717 +# source://syntax_tree//lib/syntax_tree/node.rb#10701 class SyntaxTree::SymbolsBeg < ::SyntaxTree::Node # @return [SymbolsBeg] a new instance of SymbolsBeg # - # source://syntax_tree//lib/syntax_tree/node.rb#10721 + # source://syntax_tree//lib/syntax_tree/node.rb#10705 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#10747 + # source://syntax_tree//lib/syntax_tree/node.rb#10731 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#10726 + # source://syntax_tree//lib/syntax_tree/node.rb#10710 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#10730 + # source://syntax_tree//lib/syntax_tree/node.rb#10714 def child_nodes; end - # source://syntax_tree//lib/syntax_tree/node.rb#10734 + # source://syntax_tree//lib/syntax_tree/node.rb#10718 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#10730 + # source://syntax_tree//lib/syntax_tree/node.rb#10714 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#10743 + # source://syntax_tree//lib/syntax_tree/node.rb#10727 def deconstruct_keys(_keys); end # [String] the beginning of the symbol literal array # - # source://syntax_tree//lib/syntax_tree/node.rb#10719 + # source://syntax_tree//lib/syntax_tree/node.rb#10703 def value; end end @@ -12191,34 +12417,34 @@ end # # In the example above the TLamBeg represents the +{+ operator. # -# source://syntax_tree//lib/syntax_tree/node.rb#10798 +# source://syntax_tree//lib/syntax_tree/node.rb#10782 class SyntaxTree::TLamBeg < ::SyntaxTree::Node # @return [TLamBeg] a new instance of TLamBeg # - # source://syntax_tree//lib/syntax_tree/node.rb#10802 + # source://syntax_tree//lib/syntax_tree/node.rb#10786 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#10828 + # source://syntax_tree//lib/syntax_tree/node.rb#10812 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#10807 + # source://syntax_tree//lib/syntax_tree/node.rb#10791 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#10811 + # source://syntax_tree//lib/syntax_tree/node.rb#10795 def child_nodes; end - # source://syntax_tree//lib/syntax_tree/node.rb#10815 + # source://syntax_tree//lib/syntax_tree/node.rb#10799 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#10811 + # source://syntax_tree//lib/syntax_tree/node.rb#10795 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#10824 + # source://syntax_tree//lib/syntax_tree/node.rb#10808 def deconstruct_keys(_keys); end # [String] the beginning of the body of the lambda literal # - # source://syntax_tree//lib/syntax_tree/node.rb#10800 + # source://syntax_tree//lib/syntax_tree/node.rb#10784 def value; end end @@ -12228,34 +12454,34 @@ end # # In the example above the TLambda represents the +->+ operator. # -# source://syntax_tree//lib/syntax_tree/node.rb#10757 +# source://syntax_tree//lib/syntax_tree/node.rb#10741 class SyntaxTree::TLambda < ::SyntaxTree::Node # @return [TLambda] a new instance of TLambda # - # source://syntax_tree//lib/syntax_tree/node.rb#10761 + # source://syntax_tree//lib/syntax_tree/node.rb#10745 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#10787 + # source://syntax_tree//lib/syntax_tree/node.rb#10771 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#10766 + # source://syntax_tree//lib/syntax_tree/node.rb#10750 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#10770 + # source://syntax_tree//lib/syntax_tree/node.rb#10754 def child_nodes; end - # source://syntax_tree//lib/syntax_tree/node.rb#10774 + # source://syntax_tree//lib/syntax_tree/node.rb#10758 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#10770 + # source://syntax_tree//lib/syntax_tree/node.rb#10754 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#10783 + # source://syntax_tree//lib/syntax_tree/node.rb#10767 def deconstruct_keys(_keys); end # [String] the beginning of the lambda literal # - # source://syntax_tree//lib/syntax_tree/node.rb#10759 + # source://syntax_tree//lib/syntax_tree/node.rb#10743 def value; end end @@ -12269,34 +12495,34 @@ end # # %q{string} # -# source://syntax_tree//lib/syntax_tree/node.rb#10950 +# source://syntax_tree//lib/syntax_tree/node.rb#10934 class SyntaxTree::TStringBeg < ::SyntaxTree::Node # @return [TStringBeg] a new instance of TStringBeg # - # source://syntax_tree//lib/syntax_tree/node.rb#10954 + # source://syntax_tree//lib/syntax_tree/node.rb#10938 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#10980 + # source://syntax_tree//lib/syntax_tree/node.rb#10964 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#10959 + # source://syntax_tree//lib/syntax_tree/node.rb#10943 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#10963 + # source://syntax_tree//lib/syntax_tree/node.rb#10947 def child_nodes; end - # source://syntax_tree//lib/syntax_tree/node.rb#10967 + # source://syntax_tree//lib/syntax_tree/node.rb#10951 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#10963 + # source://syntax_tree//lib/syntax_tree/node.rb#10947 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#10976 + # source://syntax_tree//lib/syntax_tree/node.rb#10960 def deconstruct_keys(_keys); end # [String] the beginning of the string # - # source://syntax_tree//lib/syntax_tree/node.rb#10952 + # source://syntax_tree//lib/syntax_tree/node.rb#10936 def value; end end @@ -12309,47 +12535,47 @@ end # In the example above, TStringContent represents the +string+ token contained # within the string. # -# source://syntax_tree//lib/syntax_tree/node.rb#10993 +# source://syntax_tree//lib/syntax_tree/node.rb#10977 class SyntaxTree::TStringContent < ::SyntaxTree::Node # @return [TStringContent] a new instance of TStringContent # - # source://syntax_tree//lib/syntax_tree/node.rb#11000 + # source://syntax_tree//lib/syntax_tree/node.rb#10984 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#11039 + # source://syntax_tree//lib/syntax_tree/node.rb#11023 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#11010 + # source://syntax_tree//lib/syntax_tree/node.rb#10994 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#11014 + # source://syntax_tree//lib/syntax_tree/node.rb#10998 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#10998 + # source://syntax_tree//lib/syntax_tree/node.rb#10982 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#11018 + # source://syntax_tree//lib/syntax_tree/node.rb#11002 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#11014 + # source://syntax_tree//lib/syntax_tree/node.rb#10998 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#11031 + # source://syntax_tree//lib/syntax_tree/node.rb#11015 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#11035 + # source://syntax_tree//lib/syntax_tree/node.rb#11019 def format(q); end # @return [Boolean] # - # source://syntax_tree//lib/syntax_tree/node.rb#11006 + # source://syntax_tree//lib/syntax_tree/node.rb#10990 def match?(pattern); end # [String] the content of the string # - # source://syntax_tree//lib/syntax_tree/node.rb#10995 + # source://syntax_tree//lib/syntax_tree/node.rb#10979 def value; end end @@ -12363,34 +12589,34 @@ end # # %q{string} # -# source://syntax_tree//lib/syntax_tree/node.rb#11054 +# source://syntax_tree//lib/syntax_tree/node.rb#11038 class SyntaxTree::TStringEnd < ::SyntaxTree::Node # @return [TStringEnd] a new instance of TStringEnd # - # source://syntax_tree//lib/syntax_tree/node.rb#11058 + # source://syntax_tree//lib/syntax_tree/node.rb#11042 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#11084 + # source://syntax_tree//lib/syntax_tree/node.rb#11068 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#11063 + # source://syntax_tree//lib/syntax_tree/node.rb#11047 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#11067 + # source://syntax_tree//lib/syntax_tree/node.rb#11051 def child_nodes; end - # source://syntax_tree//lib/syntax_tree/node.rb#11071 + # source://syntax_tree//lib/syntax_tree/node.rb#11055 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#11067 + # source://syntax_tree//lib/syntax_tree/node.rb#11051 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#11080 + # source://syntax_tree//lib/syntax_tree/node.rb#11064 def deconstruct_keys(_keys); end # [String] the end of the string # - # source://syntax_tree//lib/syntax_tree/node.rb#11056 + # source://syntax_tree//lib/syntax_tree/node.rb#11040 def value; end end @@ -12400,10 +12626,10 @@ end # statement, and that statement must not be on the denied list of potential # statements. # -# source://syntax_tree//lib/syntax_tree/node.rb#6251 +# source://syntax_tree//lib/syntax_tree/node.rb#6254 module SyntaxTree::Ternaryable class << self - # source://syntax_tree//lib/syntax_tree/node.rb#6253 + # source://syntax_tree//lib/syntax_tree/node.rb#6256 def call(q, node); end private @@ -12414,7 +12640,7 @@ module SyntaxTree::Ternaryable # # @return [Boolean] # - # source://syntax_tree//lib/syntax_tree/node.rb#6291 + # source://syntax_tree//lib/syntax_tree/node.rb#6294 def ternaryable?(statement); end end end @@ -12425,42 +12651,42 @@ end # # ::Constant = value # -# source://syntax_tree//lib/syntax_tree/node.rb#10839 +# source://syntax_tree//lib/syntax_tree/node.rb#10823 class SyntaxTree::TopConstField < ::SyntaxTree::Node # @return [TopConstField] a new instance of TopConstField # - # source://syntax_tree//lib/syntax_tree/node.rb#10846 + # source://syntax_tree//lib/syntax_tree/node.rb#10830 def initialize(constant:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#10882 + # source://syntax_tree//lib/syntax_tree/node.rb#10866 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#10852 + # source://syntax_tree//lib/syntax_tree/node.rb#10836 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#10856 + # source://syntax_tree//lib/syntax_tree/node.rb#10840 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#10844 + # source://syntax_tree//lib/syntax_tree/node.rb#10828 def comments; end # [Const] the constant being assigned # - # source://syntax_tree//lib/syntax_tree/node.rb#10841 + # source://syntax_tree//lib/syntax_tree/node.rb#10825 def constant; end - # source://syntax_tree//lib/syntax_tree/node.rb#10860 + # source://syntax_tree//lib/syntax_tree/node.rb#10844 def copy(constant: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#10856 + # source://syntax_tree//lib/syntax_tree/node.rb#10840 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#10873 + # source://syntax_tree//lib/syntax_tree/node.rb#10857 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#10877 + # source://syntax_tree//lib/syntax_tree/node.rb#10861 def format(q); end end @@ -12469,42 +12695,42 @@ end # # ::Constant # -# source://syntax_tree//lib/syntax_tree/node.rb#10892 +# source://syntax_tree//lib/syntax_tree/node.rb#10876 class SyntaxTree::TopConstRef < ::SyntaxTree::Node # @return [TopConstRef] a new instance of TopConstRef # - # source://syntax_tree//lib/syntax_tree/node.rb#10899 + # source://syntax_tree//lib/syntax_tree/node.rb#10883 def initialize(constant:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#10935 + # source://syntax_tree//lib/syntax_tree/node.rb#10919 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#10905 + # source://syntax_tree//lib/syntax_tree/node.rb#10889 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#10909 + # source://syntax_tree//lib/syntax_tree/node.rb#10893 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#10897 + # source://syntax_tree//lib/syntax_tree/node.rb#10881 def comments; end # [Const] the constant being referenced # - # source://syntax_tree//lib/syntax_tree/node.rb#10894 + # source://syntax_tree//lib/syntax_tree/node.rb#10878 def constant; end - # source://syntax_tree//lib/syntax_tree/node.rb#10913 + # source://syntax_tree//lib/syntax_tree/node.rb#10897 def copy(constant: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#10909 + # source://syntax_tree//lib/syntax_tree/node.rb#10893 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#10926 + # source://syntax_tree//lib/syntax_tree/node.rb#10910 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#10930 + # source://syntax_tree//lib/syntax_tree/node.rb#10914 def format(q); end end @@ -12535,47 +12761,47 @@ end # # !value # -# source://syntax_tree//lib/syntax_tree/node.rb#11177 +# source://syntax_tree//lib/syntax_tree/node.rb#11161 class SyntaxTree::Unary < ::SyntaxTree::Node # @return [Unary] a new instance of Unary # - # source://syntax_tree//lib/syntax_tree/node.rb#11187 + # source://syntax_tree//lib/syntax_tree/node.rb#11171 def initialize(operator:, statement:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#11230 + # source://syntax_tree//lib/syntax_tree/node.rb#11214 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#11194 + # source://syntax_tree//lib/syntax_tree/node.rb#11178 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#11198 + # source://syntax_tree//lib/syntax_tree/node.rb#11182 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#11185 + # source://syntax_tree//lib/syntax_tree/node.rb#11169 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#11202 + # source://syntax_tree//lib/syntax_tree/node.rb#11186 def copy(operator: T.unsafe(nil), statement: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#11198 + # source://syntax_tree//lib/syntax_tree/node.rb#11182 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#11216 + # source://syntax_tree//lib/syntax_tree/node.rb#11200 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#11225 + # source://syntax_tree//lib/syntax_tree/node.rb#11209 def format(q); end # [String] the operator being used # - # source://syntax_tree//lib/syntax_tree/node.rb#11179 + # source://syntax_tree//lib/syntax_tree/node.rb#11163 def operator; end # [Node] the statement on which to operate # - # source://syntax_tree//lib/syntax_tree/node.rb#11182 + # source://syntax_tree//lib/syntax_tree/node.rb#11166 def statement; end end @@ -12583,42 +12809,42 @@ end # # undef method # -# source://syntax_tree//lib/syntax_tree/node.rb#11240 +# source://syntax_tree//lib/syntax_tree/node.rb#11224 class SyntaxTree::Undef < ::SyntaxTree::Node # @return [Undef] a new instance of Undef # - # source://syntax_tree//lib/syntax_tree/node.rb#11271 + # source://syntax_tree//lib/syntax_tree/node.rb#11255 def initialize(symbols:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#11314 + # source://syntax_tree//lib/syntax_tree/node.rb#11298 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#11277 + # source://syntax_tree//lib/syntax_tree/node.rb#11261 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#11281 + # source://syntax_tree//lib/syntax_tree/node.rb#11265 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#11269 + # source://syntax_tree//lib/syntax_tree/node.rb#11253 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#11285 + # source://syntax_tree//lib/syntax_tree/node.rb#11269 def copy(symbols: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#11281 + # source://syntax_tree//lib/syntax_tree/node.rb#11265 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#11298 + # source://syntax_tree//lib/syntax_tree/node.rb#11282 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#11302 + # source://syntax_tree//lib/syntax_tree/node.rb#11286 def format(q); end # [Array[ DynaSymbol | SymbolLiteral ]] the symbols to undefine # - # source://syntax_tree//lib/syntax_tree/node.rb#11266 + # source://syntax_tree//lib/syntax_tree/node.rb#11250 def symbols; end end @@ -12626,22 +12852,22 @@ end # or SymbolLiteral objects. For SymbolLiteral objects we descend directly # into the value in order to have it come out as bare words. # -# source://syntax_tree//lib/syntax_tree/node.rb#11244 +# source://syntax_tree//lib/syntax_tree/node.rb#11228 class SyntaxTree::Undef::UndefArgumentFormatter # @return [UndefArgumentFormatter] a new instance of UndefArgumentFormatter # - # source://syntax_tree//lib/syntax_tree/node.rb#11248 + # source://syntax_tree//lib/syntax_tree/node.rb#11232 def initialize(node); end - # source://syntax_tree//lib/syntax_tree/node.rb#11252 + # source://syntax_tree//lib/syntax_tree/node.rb#11236 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#11260 + # source://syntax_tree//lib/syntax_tree/node.rb#11244 def format(q); end # [DynaSymbol | SymbolLiteral] the symbol to undefine # - # source://syntax_tree//lib/syntax_tree/node.rb#11246 + # source://syntax_tree//lib/syntax_tree/node.rb#11230 def node; end end @@ -12650,59 +12876,59 @@ end # unless predicate # end # -# source://syntax_tree//lib/syntax_tree/node.rb#11324 +# source://syntax_tree//lib/syntax_tree/node.rb#11308 class SyntaxTree::UnlessNode < ::SyntaxTree::Node # @return [UnlessNode] a new instance of UnlessNode # - # source://syntax_tree//lib/syntax_tree/node.rb#11337 + # source://syntax_tree//lib/syntax_tree/node.rb#11321 def initialize(predicate:, statements:, consequent:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#11382 + # source://syntax_tree//lib/syntax_tree/node.rb#11366 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#11345 + # source://syntax_tree//lib/syntax_tree/node.rb#11329 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#11349 + # source://syntax_tree//lib/syntax_tree/node.rb#11333 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#11335 + # source://syntax_tree//lib/syntax_tree/node.rb#11319 def comments; end # [nil | Elsif | Else] the next clause in the chain # - # source://syntax_tree//lib/syntax_tree/node.rb#11332 + # source://syntax_tree//lib/syntax_tree/node.rb#11316 def consequent; end - # source://syntax_tree//lib/syntax_tree/node.rb#11353 + # source://syntax_tree//lib/syntax_tree/node.rb#11337 def copy(predicate: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#11349 + # source://syntax_tree//lib/syntax_tree/node.rb#11333 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#11368 + # source://syntax_tree//lib/syntax_tree/node.rb#11352 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#11378 + # source://syntax_tree//lib/syntax_tree/node.rb#11362 def format(q); end # Checks if the node was originally found in the modifier form. # # @return [Boolean] # - # source://syntax_tree//lib/syntax_tree/node.rb#11388 + # source://syntax_tree//lib/syntax_tree/node.rb#11372 def modifier?; end # [Node] the expression to be checked # - # source://syntax_tree//lib/syntax_tree/node.rb#11326 + # source://syntax_tree//lib/syntax_tree/node.rb#11310 def predicate; end # [Statements] the expressions to be executed # - # source://syntax_tree//lib/syntax_tree/node.rb#11329 + # source://syntax_tree//lib/syntax_tree/node.rb#11313 def statements; end end @@ -12711,52 +12937,52 @@ end # until predicate # end # -# source://syntax_tree//lib/syntax_tree/node.rb#11470 +# source://syntax_tree//lib/syntax_tree/node.rb#11454 class SyntaxTree::UntilNode < ::SyntaxTree::Node # @return [UntilNode] a new instance of UntilNode # - # source://syntax_tree//lib/syntax_tree/node.rb#11480 + # source://syntax_tree//lib/syntax_tree/node.rb#11464 def initialize(predicate:, statements:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#11522 + # source://syntax_tree//lib/syntax_tree/node.rb#11506 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#11487 + # source://syntax_tree//lib/syntax_tree/node.rb#11471 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#11491 + # source://syntax_tree//lib/syntax_tree/node.rb#11475 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#11478 + # source://syntax_tree//lib/syntax_tree/node.rb#11462 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#11495 + # source://syntax_tree//lib/syntax_tree/node.rb#11479 def copy(predicate: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#11491 + # source://syntax_tree//lib/syntax_tree/node.rb#11475 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#11509 + # source://syntax_tree//lib/syntax_tree/node.rb#11493 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#11518 + # source://syntax_tree//lib/syntax_tree/node.rb#11502 def format(q); end # @return [Boolean] # - # source://syntax_tree//lib/syntax_tree/node.rb#11527 + # source://syntax_tree//lib/syntax_tree/node.rb#11511 def modifier?; end # [Node] the expression to be checked # - # source://syntax_tree//lib/syntax_tree/node.rb#11472 + # source://syntax_tree//lib/syntax_tree/node.rb#11456 def predicate; end # [Statements] the expressions to be executed # - # source://syntax_tree//lib/syntax_tree/node.rb#11475 + # source://syntax_tree//lib/syntax_tree/node.rb#11459 def statements; end end @@ -12765,50 +12991,50 @@ end # # variable # -# source://syntax_tree//lib/syntax_tree/node.rb#11732 +# source://syntax_tree//lib/syntax_tree/node.rb#11716 class SyntaxTree::VCall < ::SyntaxTree::Node # @return [VCall] a new instance of VCall # - # source://syntax_tree//lib/syntax_tree/node.rb#11739 + # source://syntax_tree//lib/syntax_tree/node.rb#11723 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#11774 + # source://syntax_tree//lib/syntax_tree/node.rb#11758 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#11745 + # source://syntax_tree//lib/syntax_tree/node.rb#11729 def accept(visitor); end # @return [Boolean] # - # source://syntax_tree//lib/syntax_tree/node.rb#11778 + # source://syntax_tree//lib/syntax_tree/node.rb#11762 def access_control?; end - # source://syntax_tree//lib/syntax_tree/node.rb#11782 + # source://syntax_tree//lib/syntax_tree/node.rb#11766 def arity; end - # source://syntax_tree//lib/syntax_tree/node.rb#11749 + # source://syntax_tree//lib/syntax_tree/node.rb#11733 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#11737 + # source://syntax_tree//lib/syntax_tree/node.rb#11721 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#11753 + # source://syntax_tree//lib/syntax_tree/node.rb#11737 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#11749 + # source://syntax_tree//lib/syntax_tree/node.rb#11733 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#11766 + # source://syntax_tree//lib/syntax_tree/node.rb#11750 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#11770 + # source://syntax_tree//lib/syntax_tree/node.rb#11754 def format(q); end # [Ident] the value of this expression # - # source://syntax_tree//lib/syntax_tree/node.rb#11734 + # source://syntax_tree//lib/syntax_tree/node.rb#11718 def value; end end @@ -12822,42 +13048,42 @@ SyntaxTree::VERSION = T.let(T.unsafe(nil), String) # # In the example above, the VarField node represents the +variable+ token. # -# source://syntax_tree//lib/syntax_tree/node.rb#11538 +# source://syntax_tree//lib/syntax_tree/node.rb#11522 class SyntaxTree::VarField < ::SyntaxTree::Node # @return [VarField] a new instance of VarField # - # source://syntax_tree//lib/syntax_tree/node.rb#11545 + # source://syntax_tree//lib/syntax_tree/node.rb#11529 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#11584 + # source://syntax_tree//lib/syntax_tree/node.rb#11568 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#11551 + # source://syntax_tree//lib/syntax_tree/node.rb#11535 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#11555 + # source://syntax_tree//lib/syntax_tree/node.rb#11539 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#11543 + # source://syntax_tree//lib/syntax_tree/node.rb#11527 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#11559 + # source://syntax_tree//lib/syntax_tree/node.rb#11543 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#11555 + # source://syntax_tree//lib/syntax_tree/node.rb#11539 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#11572 + # source://syntax_tree//lib/syntax_tree/node.rb#11556 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#11576 + # source://syntax_tree//lib/syntax_tree/node.rb#11560 def format(q); end # [nil | :nil | Const | CVar | GVar | Ident | IVar] the target of this node # - # source://syntax_tree//lib/syntax_tree/node.rb#11540 + # source://syntax_tree//lib/syntax_tree/node.rb#11524 def value; end end @@ -12870,37 +13096,37 @@ end # keyword (like +self+, +nil+, +true+, or +false+), or a numbered block # variable. # -# source://syntax_tree//lib/syntax_tree/node.rb#11597 +# source://syntax_tree//lib/syntax_tree/node.rb#11581 class SyntaxTree::VarRef < ::SyntaxTree::Node # @return [VarRef] a new instance of VarRef # - # source://syntax_tree//lib/syntax_tree/node.rb#11604 + # source://syntax_tree//lib/syntax_tree/node.rb#11588 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#11639 + # source://syntax_tree//lib/syntax_tree/node.rb#11623 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#11610 + # source://syntax_tree//lib/syntax_tree/node.rb#11594 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#11614 + # source://syntax_tree//lib/syntax_tree/node.rb#11598 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#11602 + # source://syntax_tree//lib/syntax_tree/node.rb#11586 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#11618 + # source://syntax_tree//lib/syntax_tree/node.rb#11602 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#11614 + # source://syntax_tree//lib/syntax_tree/node.rb#11598 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#11631 + # source://syntax_tree//lib/syntax_tree/node.rb#11615 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#11635 + # source://syntax_tree//lib/syntax_tree/node.rb#11619 def format(q); end # Oh man I hate this so much. Basically, ripper doesn't provide enough @@ -12911,12 +13137,12 @@ class SyntaxTree::VarRef < ::SyntaxTree::Node # To be clear, this method should just not exist. It's not good. It's a # place of shame. But it's necessary for now, so I'm keeping it. # - # source://syntax_tree//lib/syntax_tree/node.rb#11650 + # source://syntax_tree//lib/syntax_tree/node.rb#11634 def pin(parent, pin); end # [Const | CVar | GVar | Ident | IVar | Kw] the value of this node # - # source://syntax_tree//lib/syntax_tree/node.rb#11599 + # source://syntax_tree//lib/syntax_tree/node.rb#11583 def value; end end @@ -13681,37 +13907,37 @@ end # # ;; # -# source://syntax_tree//lib/syntax_tree/node.rb#11791 +# source://syntax_tree//lib/syntax_tree/node.rb#11775 class SyntaxTree::VoidStmt < ::SyntaxTree::Node # @return [VoidStmt] a new instance of VoidStmt # - # source://syntax_tree//lib/syntax_tree/node.rb#11795 + # source://syntax_tree//lib/syntax_tree/node.rb#11779 def initialize(location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#11824 + # source://syntax_tree//lib/syntax_tree/node.rb#11808 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#11800 + # source://syntax_tree//lib/syntax_tree/node.rb#11784 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#11804 + # source://syntax_tree//lib/syntax_tree/node.rb#11788 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#11793 + # source://syntax_tree//lib/syntax_tree/node.rb#11777 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#11808 + # source://syntax_tree//lib/syntax_tree/node.rb#11792 def copy(location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#11804 + # source://syntax_tree//lib/syntax_tree/node.rb#11788 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#11817 + # source://syntax_tree//lib/syntax_tree/node.rb#11801 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#11821 + # source://syntax_tree//lib/syntax_tree/node.rb#11805 def format(q); end end @@ -13721,68 +13947,68 @@ end # when predicate # end # -# source://syntax_tree//lib/syntax_tree/node.rb#11835 +# source://syntax_tree//lib/syntax_tree/node.rb#11819 class SyntaxTree::When < ::SyntaxTree::Node # @return [When] a new instance of When # - # source://syntax_tree//lib/syntax_tree/node.rb#11848 + # source://syntax_tree//lib/syntax_tree/node.rb#11832 def initialize(arguments:, statements:, consequent:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#11940 + # source://syntax_tree//lib/syntax_tree/node.rb#11924 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#11856 + # source://syntax_tree//lib/syntax_tree/node.rb#11840 def accept(visitor); end # [Args] the arguments to the when clause # - # source://syntax_tree//lib/syntax_tree/node.rb#11837 + # source://syntax_tree//lib/syntax_tree/node.rb#11821 def arguments; end - # source://syntax_tree//lib/syntax_tree/node.rb#11860 + # source://syntax_tree//lib/syntax_tree/node.rb#11844 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#11846 + # source://syntax_tree//lib/syntax_tree/node.rb#11830 def comments; end # [nil | Else | When] the next clause in the chain # - # source://syntax_tree//lib/syntax_tree/node.rb#11843 + # source://syntax_tree//lib/syntax_tree/node.rb#11827 def consequent; end - # source://syntax_tree//lib/syntax_tree/node.rb#11864 + # source://syntax_tree//lib/syntax_tree/node.rb#11848 def copy(arguments: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#11860 + # source://syntax_tree//lib/syntax_tree/node.rb#11844 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#11879 + # source://syntax_tree//lib/syntax_tree/node.rb#11863 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#11905 + # source://syntax_tree//lib/syntax_tree/node.rb#11889 def format(q); end # [Statements] the expressions to be executed # - # source://syntax_tree//lib/syntax_tree/node.rb#11840 + # source://syntax_tree//lib/syntax_tree/node.rb#11824 def statements; end end # We're going to keep a single instance of this separator around so we don't # have to allocate a new one every time we format a when clause. # -# source://syntax_tree//lib/syntax_tree/node.rb#11903 +# source://syntax_tree//lib/syntax_tree/node.rb#11887 SyntaxTree::When::SEPARATOR = T.let(T.unsafe(nil), SyntaxTree::When::Separator) # We have a special separator here for when clauses which causes them to # fill as much of the line as possible as opposed to everything breaking # into its own line as soon as you hit the print limit. # -# source://syntax_tree//lib/syntax_tree/node.rb#11892 +# source://syntax_tree//lib/syntax_tree/node.rb#11876 class SyntaxTree::When::Separator - # source://syntax_tree//lib/syntax_tree/node.rb#11893 + # source://syntax_tree//lib/syntax_tree/node.rb#11877 def call(q); end end @@ -13791,52 +14017,52 @@ end # while predicate # end # -# source://syntax_tree//lib/syntax_tree/node.rb#11951 +# source://syntax_tree//lib/syntax_tree/node.rb#11935 class SyntaxTree::WhileNode < ::SyntaxTree::Node # @return [WhileNode] a new instance of WhileNode # - # source://syntax_tree//lib/syntax_tree/node.rb#11961 + # source://syntax_tree//lib/syntax_tree/node.rb#11945 def initialize(predicate:, statements:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#12003 + # source://syntax_tree//lib/syntax_tree/node.rb#11987 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#11968 + # source://syntax_tree//lib/syntax_tree/node.rb#11952 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#11972 + # source://syntax_tree//lib/syntax_tree/node.rb#11956 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#11959 + # source://syntax_tree//lib/syntax_tree/node.rb#11943 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#11976 + # source://syntax_tree//lib/syntax_tree/node.rb#11960 def copy(predicate: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#11972 + # source://syntax_tree//lib/syntax_tree/node.rb#11956 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#11990 + # source://syntax_tree//lib/syntax_tree/node.rb#11974 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#11999 + # source://syntax_tree//lib/syntax_tree/node.rb#11983 def format(q); end # @return [Boolean] # - # source://syntax_tree//lib/syntax_tree/node.rb#12008 + # source://syntax_tree//lib/syntax_tree/node.rb#11992 def modifier?; end # [Node] the expression to be checked # - # source://syntax_tree//lib/syntax_tree/node.rb#11953 + # source://syntax_tree//lib/syntax_tree/node.rb#11937 def predicate; end # [Statements] the expressions to be executed # - # source://syntax_tree//lib/syntax_tree/node.rb#11956 + # source://syntax_tree//lib/syntax_tree/node.rb#11940 def statements; end end @@ -13875,13 +14101,13 @@ module SyntaxTree::WithScope # Visit for capturing local variables defined in regex named capture groups # - # source://syntax_tree//lib/syntax_tree/with_scope.rb#239 + # source://syntax_tree//lib/syntax_tree/with_scope.rb#236 def visit_binary(node); end - # source://syntax_tree//lib/syntax_tree/with_scope.rb#192 + # source://syntax_tree//lib/syntax_tree/with_scope.rb#189 def visit_block_var(node); end - # source://syntax_tree//lib/syntax_tree/with_scope.rb#185 + # source://syntax_tree//lib/syntax_tree/with_scope.rb#182 def visit_blockarg(node); end # Visits for nodes that create new scopes, such as classes, modules @@ -13893,10 +14119,10 @@ module SyntaxTree::WithScope # source://syntax_tree//lib/syntax_tree/with_scope.rb#147 def visit_def(node); end - # source://syntax_tree//lib/syntax_tree/with_scope.rb#178 + # source://syntax_tree//lib/syntax_tree/with_scope.rb#175 def visit_kwrest_param(node); end - # source://syntax_tree//lib/syntax_tree/with_scope.rb#192 + # source://syntax_tree//lib/syntax_tree/with_scope.rb#189 def visit_lambda_var(node); end # When we find a method invocation with a block, only the code that happens @@ -13917,36 +14143,36 @@ module SyntaxTree::WithScope # Visit for keeping track of local variable definitions # - # source://syntax_tree//lib/syntax_tree/with_scope.rb#210 + # source://syntax_tree//lib/syntax_tree/with_scope.rb#207 def visit_pinned_var_ref(node); end - # source://syntax_tree//lib/syntax_tree/with_scope.rb#171 + # source://syntax_tree//lib/syntax_tree/with_scope.rb#168 def visit_rest_param(node); end # Visit for keeping track of local variable definitions # - # source://syntax_tree//lib/syntax_tree/with_scope.rb#202 + # source://syntax_tree//lib/syntax_tree/with_scope.rb#199 def visit_var_field(node); end # Visits for keeping track of variable and argument usages # - # source://syntax_tree//lib/syntax_tree/with_scope.rb#218 + # source://syntax_tree//lib/syntax_tree/with_scope.rb#215 def visit_var_ref(node); end # When using regex named capture groups, vcalls might actually be a variable # - # source://syntax_tree//lib/syntax_tree/with_scope.rb#230 + # source://syntax_tree//lib/syntax_tree/with_scope.rb#227 def visit_vcall(node); end private - # source://syntax_tree//lib/syntax_tree/with_scope.rb#288 + # source://syntax_tree//lib/syntax_tree/with_scope.rb#285 def add_argument_definitions(list); end - # source://syntax_tree//lib/syntax_tree/with_scope.rb#302 + # source://syntax_tree//lib/syntax_tree/with_scope.rb#299 def next_scope_id; end - # source://syntax_tree//lib/syntax_tree/with_scope.rb#306 + # source://syntax_tree//lib/syntax_tree/with_scope.rb#303 def with_scope(parent_scope = T.unsafe(nil)); end end @@ -14044,48 +14270,48 @@ end # In the example above, there would be two Word nodes within a parent Words # node. # -# source://syntax_tree//lib/syntax_tree/node.rb#12020 +# source://syntax_tree//lib/syntax_tree/node.rb#12004 class SyntaxTree::Word < ::SyntaxTree::Node # @return [Word] a new instance of Word # - # source://syntax_tree//lib/syntax_tree/node.rb#12028 + # source://syntax_tree//lib/syntax_tree/node.rb#12012 def initialize(parts:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#12067 + # source://syntax_tree//lib/syntax_tree/node.rb#12051 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#12038 + # source://syntax_tree//lib/syntax_tree/node.rb#12022 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#12042 + # source://syntax_tree//lib/syntax_tree/node.rb#12026 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#12026 + # source://syntax_tree//lib/syntax_tree/node.rb#12010 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#12046 + # source://syntax_tree//lib/syntax_tree/node.rb#12030 def copy(parts: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#12042 + # source://syntax_tree//lib/syntax_tree/node.rb#12026 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#12059 + # source://syntax_tree//lib/syntax_tree/node.rb#12043 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#12063 + # source://syntax_tree//lib/syntax_tree/node.rb#12047 def format(q); end # @return [Boolean] # - # source://syntax_tree//lib/syntax_tree/node.rb#12034 + # source://syntax_tree//lib/syntax_tree/node.rb#12018 def match?(pattern); end # [Array[ StringEmbExpr | StringDVar | TStringContent ]] the parts of the # word # - # source://syntax_tree//lib/syntax_tree/node.rb#12023 + # source://syntax_tree//lib/syntax_tree/node.rb#12007 def parts; end end @@ -14093,47 +14319,47 @@ end # # %W[one two three] # -# source://syntax_tree//lib/syntax_tree/node.rb#12076 +# source://syntax_tree//lib/syntax_tree/node.rb#12060 class SyntaxTree::Words < ::SyntaxTree::Node # @return [Words] a new instance of Words # - # source://syntax_tree//lib/syntax_tree/node.rb#12086 + # source://syntax_tree//lib/syntax_tree/node.rb#12070 def initialize(beginning:, elements:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#12142 + # source://syntax_tree//lib/syntax_tree/node.rb#12126 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#12093 + # source://syntax_tree//lib/syntax_tree/node.rb#12077 def accept(visitor); end # [WordsBeg] the token that opens this array literal # - # source://syntax_tree//lib/syntax_tree/node.rb#12078 + # source://syntax_tree//lib/syntax_tree/node.rb#12062 def beginning; end - # source://syntax_tree//lib/syntax_tree/node.rb#12097 + # source://syntax_tree//lib/syntax_tree/node.rb#12081 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#12084 + # source://syntax_tree//lib/syntax_tree/node.rb#12068 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#12101 + # source://syntax_tree//lib/syntax_tree/node.rb#12085 def copy(beginning: T.unsafe(nil), elements: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#12097 + # source://syntax_tree//lib/syntax_tree/node.rb#12081 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#12111 + # source://syntax_tree//lib/syntax_tree/node.rb#12095 def deconstruct_keys(_keys); end # [Array[ Word ]] the elements of this array # - # source://syntax_tree//lib/syntax_tree/node.rb#12081 + # source://syntax_tree//lib/syntax_tree/node.rb#12065 def elements; end - # source://syntax_tree//lib/syntax_tree/node.rb#12120 + # source://syntax_tree//lib/syntax_tree/node.rb#12104 def format(q); end end @@ -14146,34 +14372,34 @@ end # Note that these kinds of arrays can start with a lot of different delimiter # types (e.g., %W| or %W<). # -# source://syntax_tree//lib/syntax_tree/node.rb#12156 +# source://syntax_tree//lib/syntax_tree/node.rb#12140 class SyntaxTree::WordsBeg < ::SyntaxTree::Node # @return [WordsBeg] a new instance of WordsBeg # - # source://syntax_tree//lib/syntax_tree/node.rb#12160 + # source://syntax_tree//lib/syntax_tree/node.rb#12144 def initialize(value:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#12186 + # source://syntax_tree//lib/syntax_tree/node.rb#12170 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#12165 + # source://syntax_tree//lib/syntax_tree/node.rb#12149 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#12169 + # source://syntax_tree//lib/syntax_tree/node.rb#12153 def child_nodes; end - # source://syntax_tree//lib/syntax_tree/node.rb#12173 + # source://syntax_tree//lib/syntax_tree/node.rb#12157 def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#12169 + # source://syntax_tree//lib/syntax_tree/node.rb#12153 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#12182 + # source://syntax_tree//lib/syntax_tree/node.rb#12166 def deconstruct_keys(_keys); end # [String] the start of the word literal array # - # source://syntax_tree//lib/syntax_tree/node.rb#12158 + # source://syntax_tree//lib/syntax_tree/node.rb#12142 def value; end end @@ -14181,35 +14407,35 @@ end # # `ls` # -# source://syntax_tree//lib/syntax_tree/node.rb#12195 +# source://syntax_tree//lib/syntax_tree/node.rb#12179 class SyntaxTree::XString < ::SyntaxTree::Node # @return [XString] a new instance of XString # - # source://syntax_tree//lib/syntax_tree/node.rb#12200 + # source://syntax_tree//lib/syntax_tree/node.rb#12184 def initialize(parts:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#12226 + # source://syntax_tree//lib/syntax_tree/node.rb#12210 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#12205 + # source://syntax_tree//lib/syntax_tree/node.rb#12189 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#12209 + # source://syntax_tree//lib/syntax_tree/node.rb#12193 def child_nodes; end - # source://syntax_tree//lib/syntax_tree/node.rb#12213 + # source://syntax_tree//lib/syntax_tree/node.rb#12197 def copy(parts: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#12209 + # source://syntax_tree//lib/syntax_tree/node.rb#12193 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#12222 + # source://syntax_tree//lib/syntax_tree/node.rb#12206 def deconstruct_keys(_keys); end # [Array[ StringEmbExpr | StringDVar | TStringContent ]] the parts of the # xstring # - # source://syntax_tree//lib/syntax_tree/node.rb#12198 + # source://syntax_tree//lib/syntax_tree/node.rb#12182 def parts; end end @@ -14217,43 +14443,43 @@ end # # `ls` # -# source://syntax_tree//lib/syntax_tree/node.rb#12235 +# source://syntax_tree//lib/syntax_tree/node.rb#12219 class SyntaxTree::XStringLiteral < ::SyntaxTree::Node # @return [XStringLiteral] a new instance of XStringLiteral # - # source://syntax_tree//lib/syntax_tree/node.rb#12243 + # source://syntax_tree//lib/syntax_tree/node.rb#12227 def initialize(parts:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#12280 + # source://syntax_tree//lib/syntax_tree/node.rb#12264 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#12249 + # source://syntax_tree//lib/syntax_tree/node.rb#12233 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#12253 + # source://syntax_tree//lib/syntax_tree/node.rb#12237 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#12241 + # source://syntax_tree//lib/syntax_tree/node.rb#12225 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#12257 + # source://syntax_tree//lib/syntax_tree/node.rb#12241 def copy(parts: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#12253 + # source://syntax_tree//lib/syntax_tree/node.rb#12237 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#12270 + # source://syntax_tree//lib/syntax_tree/node.rb#12254 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#12274 + # source://syntax_tree//lib/syntax_tree/node.rb#12258 def format(q); end # [Array[ StringEmbExpr | StringDVar | TStringContent ]] the parts of the # xstring # - # source://syntax_tree//lib/syntax_tree/node.rb#12238 + # source://syntax_tree//lib/syntax_tree/node.rb#12222 def parts; end end @@ -14264,7 +14490,7 @@ module SyntaxTree::YARV class << self # A convenience method for creating a CallData object. # - # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#82 + # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#88 def calldata(method, argc = T.unsafe(nil), flags = T.unsafe(nil), kw_arg = T.unsafe(nil)); end # Compile the given source into a YARV instruction sequence. @@ -14372,54 +14598,54 @@ end class SyntaxTree::YARV::Assembler # @return [Assembler] a new instance of Assembler # - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#67 + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#66 def initialize(lines); end - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#71 + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#70 def assemble; end # Returns the value of attribute lines. # - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#65 + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#64 def lines; end private - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#89 + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#88 def assemble_iseq(iseq, lines); end - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#409 + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#408 def find_local(iseq, operands); end - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#418 + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#417 def parse(value); end - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#450 + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#449 def parse_calldata(value); end - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#445 + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#444 def parse_nested(lines); end - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#433 + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#432 def parse_number(value); end - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#425 + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#424 def parse_options(value, options); end - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#437 + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#436 def parse_string(value); end - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#441 + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#440 def parse_symbol(value); end - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#429 + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#428 def parse_type(value, type); end class << self - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#79 + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#78 def assemble(source); end - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#83 + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#82 def assemble_file(filepath); end end end @@ -14427,7 +14653,7 @@ end # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#28 SyntaxTree::YARV::Assembler::CALLDATA_FLAGS = T.let(T.unsafe(nil), Hash) -# source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#44 +# source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#43 SyntaxTree::YARV::Assembler::DEFINED_TYPES = T.let(T.unsafe(nil), Array) # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#6 @@ -14721,83 +14947,83 @@ end class SyntaxTree::YARV::CallData # @return [CallData] a new instance of CallData # - # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#24 + # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#31 def initialize(method, argc = T.unsafe(nil), flags = T.unsafe(nil), kw_arg = T.unsafe(nil)); end # Returns the value of attribute argc. # - # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#22 + # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#29 def argc; end # @return [Boolean] # - # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#36 + # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#43 def flag?(mask); end # Returns the value of attribute flags. # - # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#22 + # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#29 def flags; end - # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#46 + # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#53 def inspect; end # Returns the value of attribute kw_arg. # - # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#22 + # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#29 def kw_arg; end # Returns the value of attribute method. # - # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#22 + # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#29 def method; end - # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#40 + # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#47 def to_h; end class << self - # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#71 + # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#77 def from(serialized); end end end -# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#9 +# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 SyntaxTree::YARV::CallData::CALL_ARGS_BLOCKARG = T.let(T.unsafe(nil), Integer) -# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#12 +# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 SyntaxTree::YARV::CallData::CALL_ARGS_SIMPLE = T.let(T.unsafe(nil), Integer) -# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#8 +# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 SyntaxTree::YARV::CallData::CALL_ARGS_SPLAT = T.let(T.unsafe(nil), Integer) -# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#13 +# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 SyntaxTree::YARV::CallData::CALL_BLOCKISEQ = T.let(T.unsafe(nil), Integer) -# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#10 +# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 SyntaxTree::YARV::CallData::CALL_FCALL = T.let(T.unsafe(nil), Integer) -# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#14 +# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 SyntaxTree::YARV::CallData::CALL_KWARG = T.let(T.unsafe(nil), Integer) -# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#15 +# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 SyntaxTree::YARV::CallData::CALL_KW_SPLAT = T.let(T.unsafe(nil), Integer) -# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#20 +# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 SyntaxTree::YARV::CallData::CALL_KW_SPLAT_MUT = T.let(T.unsafe(nil), Integer) -# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#19 +# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 SyntaxTree::YARV::CallData::CALL_OPT_SEND = T.let(T.unsafe(nil), Integer) -# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#17 +# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 SyntaxTree::YARV::CallData::CALL_SUPER = T.let(T.unsafe(nil), Integer) -# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#16 +# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 SyntaxTree::YARV::CallData::CALL_TAILCALL = T.let(T.unsafe(nil), Integer) -# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#11 +# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 SyntaxTree::YARV::CallData::CALL_VCALL = T.let(T.unsafe(nil), Integer) -# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#18 +# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 SyntaxTree::YARV::CallData::CALL_ZSUPER = T.let(T.unsafe(nil), Integer) # ### Summary @@ -17769,10 +17995,10 @@ class SyntaxTree::YARV::InstructionSequence # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#168 def initialize(name, file, line, type, parent_iseq = T.unsafe(nil), options = T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#636 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#652 def adjuststack(number); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#640 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#656 def anytostring; end # Returns the value of attribute argument_options. @@ -17792,34 +18018,34 @@ class SyntaxTree::YARV::InstructionSequence # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#142 def argument_size=(_arg0); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#456 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#472 def block_child_iseq(line); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#644 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#660 def branchif(label); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#648 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#664 def branchnil(label); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#652 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#668 def branchunless(label); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#549 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#565 def catch_break(iseq, begin_label, end_label, exit_label, restore_sp); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#559 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#575 def catch_ensure(iseq, begin_label, end_label, exit_label, restore_sp); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#569 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#585 def catch_next(begin_label, end_label, exit_label, restore_sp); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#579 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#595 def catch_redo(begin_label, end_label, exit_label, restore_sp); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#589 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#605 def catch_rescue(iseq, begin_label, end_label, exit_label, restore_sp); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#599 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#615 def catch_retry(begin_label, end_label, exit_label, restore_sp); end # The catch table for this instruction sequence. @@ -17827,21 +18053,21 @@ class SyntaxTree::YARV::InstructionSequence # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#146 def catch_table; end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#656 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#672 def checkkeyword(keyword_bits_index, keyword_index); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#660 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#676 def checkmatch(type); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#664 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#680 def checktype(type); end # Child instruction sequence methods # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#452 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#468 def child_iseq(name, line, type); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#462 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#478 def class_child_iseq(name, line); end # This method converts our linked list of instructions into a final array @@ -17850,49 +18076,49 @@ class SyntaxTree::YARV::InstructionSequence # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#305 def compile!; end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#668 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#684 def concatarray; end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#672 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#688 def concatstrings(number); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#676 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#692 def defineclass(name, class_iseq, flags); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#680 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#696 def defined(type, name, message); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#684 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#700 def definedivar(name, cache, message); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#693 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#709 def definemethod(name, method_iseq); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#697 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#713 def definesmethod(name, method_iseq); end # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#292 def disasm; end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#701 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#717 def dup; end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#705 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#721 def duparray(object); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#709 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#725 def duphash(object); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#713 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#729 def dupn(number); end # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#232 def eval; end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#632 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#648 def event(name); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#717 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#733 def expandarray(length, flags); end # The source location of the instruction sequence. @@ -17900,28 +18126,28 @@ class SyntaxTree::YARV::InstructionSequence # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#132 def file; end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#721 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#737 def getblockparam(index, level); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#725 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#741 def getblockparamproxy(index, level); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#729 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#745 def getclassvariable(name); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#737 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#753 def getconstant(name); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#741 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#757 def getglobal(name); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#745 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#761 def getinstancevariable(name); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#753 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#769 def getlocal(index, level); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#772 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#788 def getspecial(key, type); end # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#207 @@ -17944,24 +18170,24 @@ class SyntaxTree::YARV::InstructionSequence # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#299 def inspect; end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#776 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#792 def intern; end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#780 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#796 def invokeblock(calldata); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#784 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#800 def invokesuper(calldata, block_iseq); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#788 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#804 def jump(label); end # Instruction push methods # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#613 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#629 def label; end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#792 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#808 def leave; end # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#219 @@ -17982,10 +18208,10 @@ class SyntaxTree::YARV::InstructionSequence # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#199 def local_variable(name, level = T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#466 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#482 def method_child_iseq(name, line); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#470 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#486 def module_child_iseq(name, line); end # The name of the instruction sequence. @@ -17993,43 +18219,43 @@ class SyntaxTree::YARV::InstructionSequence # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#129 def name; end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#796 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#812 def newarray(number); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#800 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#816 def newarraykwsplat(number); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#804 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#820 def newhash(number); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#808 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#824 def newrange(exclude_end); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#812 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#828 def nop; end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#816 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#832 def objtostring(calldata); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#820 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#836 def once(iseq, cache); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#824 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#840 def opt_aref_with(object, calldata); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#828 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#844 def opt_aset_with(object, calldata); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#832 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#848 def opt_case_dispatch(case_dispatch_hash, else_label); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#836 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#852 def opt_getconstant_path(names); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#872 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#888 def opt_getinlinecache(label, cache); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#876 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#892 def opt_setinlinecache(cache); end # These are various compilation options provided. @@ -18042,61 +18268,61 @@ class SyntaxTree::YARV::InstructionSequence # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#138 def parent_iseq; end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#880 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#896 def pop; end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#617 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#633 def push(value); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#884 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#900 def putnil; end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#888 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#904 def putobject(object); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#906 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#922 def putself; end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#910 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#926 def putspecialobject(object); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#914 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#930 def putstring(object); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#918 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#934 def send(calldata, block_iseq = T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#922 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#938 def setblockparam(index, level); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#926 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#942 def setclassvariable(name); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#934 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#950 def setconstant(name); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#938 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#954 def setglobal(name); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#942 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#958 def setinstancevariable(name); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#950 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#966 def setlocal(index, level); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#969 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#985 def setn(number); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#973 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#989 def setspecial(key); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#474 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#490 def singleton_class_child_iseq(line); end # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#341 def specialize_instructions!; end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#977 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#993 def splatarray(flag); end # An object that will track the current size of the stack and the @@ -18110,10 +18336,10 @@ class SyntaxTree::YARV::InstructionSequence # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#159 def storage_index; end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#981 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#997 def swap; end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#985 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#1001 def throw(type); end # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#236 @@ -18128,10 +18354,10 @@ class SyntaxTree::YARV::InstructionSequence # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#288 def to_son; end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#989 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#1005 def topn(number); end - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#993 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#1009 def toregexp(options, length); end # The type of the instruction sequence. @@ -18143,7 +18369,7 @@ class SyntaxTree::YARV::InstructionSequence # This method will create a new instruction sequence from a serialized # RubyVM::InstructionSequence object. # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#999 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#1015 def from(source, options = T.unsafe(nil), parent_iseq = T.unsafe(nil)); end # This provides a handle to the rb_iseq_load function, which allows you @@ -18155,74 +18381,74 @@ class SyntaxTree::YARV::InstructionSequence end end -# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#494 +# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#510 class SyntaxTree::YARV::InstructionSequence::CatchBreak < ::SyntaxTree::YARV::InstructionSequence::CatchEntry - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#495 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#511 def to_a; end end -# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#507 +# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#523 class SyntaxTree::YARV::InstructionSequence::CatchEnsure < ::SyntaxTree::YARV::InstructionSequence::CatchEntry - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#508 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#524 def to_a; end end # Catch table methods # -# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#482 +# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#498 class SyntaxTree::YARV::InstructionSequence::CatchEntry # @return [CatchEntry] a new instance of CatchEntry # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#485 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#501 def initialize(iseq, begin_label, end_label, exit_label, restore_sp); end # Returns the value of attribute begin_label. # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#483 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#499 def begin_label; end # Returns the value of attribute end_label. # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#483 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#499 def end_label; end # Returns the value of attribute exit_label. # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#483 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#499 def exit_label; end # Returns the value of attribute iseq. # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#483 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#499 def iseq; end # Returns the value of attribute restore_sp. # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#483 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#499 def restore_sp; end end -# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#519 +# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#535 class SyntaxTree::YARV::InstructionSequence::CatchNext < ::SyntaxTree::YARV::InstructionSequence::CatchEntry - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#520 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#536 def to_a; end end -# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#525 +# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#541 class SyntaxTree::YARV::InstructionSequence::CatchRedo < ::SyntaxTree::YARV::InstructionSequence::CatchEntry - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#526 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#542 def to_a; end end -# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#531 +# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#547 class SyntaxTree::YARV::InstructionSequence::CatchRescue < ::SyntaxTree::YARV::InstructionSequence::CatchEntry - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#532 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#548 def to_a; end end -# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#543 +# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#559 class SyntaxTree::YARV::InstructionSequence::CatchRetry < ::SyntaxTree::YARV::InstructionSequence::CatchEntry - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#544 + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#560 def to_a; end end @@ -18705,6 +18931,104 @@ class SyntaxTree::YARV::Legacy::OptGetInlineCache < ::SyntaxTree::YARV::Instruct def to_a(_iseq); end end +# ### Summary +# +# `opt_newarray_max` is a specialization that occurs when the `max` method +# is called on an array literal. It pops the values of the array off the +# stack and pushes on the result. +# +# ### Usage +# +# ~~~ruby +# [a, b, c].max +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#139 +class SyntaxTree::YARV::Legacy::OptNewArrayMax < ::SyntaxTree::YARV::Instruction + # @return [OptNewArrayMax] a new instance of OptNewArrayMax + # + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#142 + def initialize(number); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#158 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#174 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#154 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#146 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#162 + def length; end + + # Returns the value of attribute number. + # + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#140 + def number; end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#166 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#170 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#150 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_newarray_min` is a specialization that occurs when the `min` method +# is called on an array literal. It pops the values of the array off the +# stack and pushes on the result. +# +# ### Usage +# +# ~~~ruby +# [a, b, c].min +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#191 +class SyntaxTree::YARV::Legacy::OptNewArrayMin < ::SyntaxTree::YARV::Instruction + # @return [OptNewArrayMin] a new instance of OptNewArrayMin + # + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#194 + def initialize(number); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#210 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#226 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#206 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#198 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#214 + def length; end + + # Returns the value of attribute number. + # + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#192 + def number; end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#218 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#222 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#202 + def to_a(_iseq); end +end + # ### Summary # # `opt_setinlinecache` sets an inline cache for a constant lookup. It pops @@ -18720,40 +19044,40 @@ end # Constant # ~~~ # -# source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#142 +# source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#246 class SyntaxTree::YARV::Legacy::OptSetInlineCache < ::SyntaxTree::YARV::Instruction # @return [OptSetInlineCache] a new instance of OptSetInlineCache # - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#145 + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#249 def initialize(cache); end - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#161 + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#265 def ==(other); end # Returns the value of attribute cache. # - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#143 + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#247 def cache; end - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#177 + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#281 def call(vm); end - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#157 + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#261 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#149 + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#253 def disasm(fmt); end - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#165 + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#269 def length; end - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#169 + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#273 def pops; end - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#173 + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#277 def pushes; end - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#153 + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#257 def to_a(_iseq); end end @@ -18771,40 +19095,40 @@ end # @@class_variable = 1 # ~~~ # -# source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#195 +# source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#299 class SyntaxTree::YARV::Legacy::SetClassVariable < ::SyntaxTree::YARV::Instruction # @return [SetClassVariable] a new instance of SetClassVariable # - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#198 + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#302 def initialize(name); end - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#214 + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#318 def ==(other); end - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#230 + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#334 def call(vm); end - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#226 + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#330 def canonical; end - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#210 + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#314 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#202 + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#306 def disasm(fmt); end - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#218 + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#322 def length; end # Returns the value of attribute name. # - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#196 + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#300 def name; end - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#222 + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#326 def pops; end - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#206 + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#310 def to_a(_iseq); end end @@ -20337,9 +20661,10 @@ end # ### Summary # -# `opt_newarray_max` is a specialization that occurs when the `max` method -# is called on an array literal. It pops the values of the array off the -# stack and pushes on the result. +# `opt_newarray_send` is a specialization that occurs when a dynamic array +# literal is created and immediately sent the `min`, `max`, or `hash` +# methods. It pops the values of the array off the stack and pushes on the +# result of the method call. # # ### Usage # @@ -20347,89 +20672,45 @@ end # [a, b, c].max # ~~~ # -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3831 -class SyntaxTree::YARV::OptNewArrayMax < ::SyntaxTree::YARV::Instruction - # @return [OptNewArrayMax] a new instance of OptNewArrayMax +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3832 +class SyntaxTree::YARV::OptNewArraySend < ::SyntaxTree::YARV::Instruction + # @return [OptNewArraySend] a new instance of OptNewArraySend # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3834 - def initialize(number); end + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3835 + def initialize(number, method); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3850 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3855 def ==(other); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3866 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3872 def call(vm); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3846 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3851 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3838 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3840 def disasm(fmt); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3854 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3860 def length; end - # Returns the value of attribute number. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3832 - def number; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3858 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3862 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3842 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_newarray_min` is a specialization that occurs when the `min` method -# is called on an array literal. It pops the values of the array off the -# stack and pushes on the result. -# -# ### Usage -# -# ~~~ruby -# [a, b, c].min -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3883 -class SyntaxTree::YARV::OptNewArrayMin < ::SyntaxTree::YARV::Instruction - # @return [OptNewArrayMin] a new instance of OptNewArrayMin + # Returns the value of attribute method. # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3886 - def initialize(number); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3902 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3918 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3898 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3890 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3906 - def length; end + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3833 + def method; end # Returns the value of attribute number. # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3884 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3833 def number; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3910 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3864 def pops; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3914 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3868 def pushes; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3894 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3847 def to_a(_iseq); end end @@ -20446,43 +20727,43 @@ end # "".nil? # ~~~ # -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3936 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3890 class SyntaxTree::YARV::OptNilP < ::SyntaxTree::YARV::Instruction # @return [OptNilP] a new instance of OptNilP # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3939 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3893 def initialize(calldata); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3955 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3909 def ==(other); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3975 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3929 def call(vm); end # Returns the value of attribute calldata. # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3937 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3891 def calldata; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3971 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3925 def canonical; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3951 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3905 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3943 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3897 def disasm(fmt); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3959 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3913 def length; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3963 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3917 def pops; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3967 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3921 def pushes; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3947 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3901 def to_a(_iseq); end end @@ -20497,43 +20778,43 @@ end # !true # ~~~ # -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3991 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3945 class SyntaxTree::YARV::OptNot < ::SyntaxTree::YARV::Instruction # @return [OptNot] a new instance of OptNot # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3994 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3948 def initialize(calldata); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4010 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3964 def ==(other); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4030 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3984 def call(vm); end # Returns the value of attribute calldata. # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3992 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3946 def calldata; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4026 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3980 def canonical; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4006 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3960 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3998 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3952 def disasm(fmt); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4014 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3968 def length; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4018 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3972 def pops; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4022 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3976 def pushes; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4002 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3956 def to_a(_iseq); end end @@ -20550,43 +20831,43 @@ end # 2 | 3 # ~~~ # -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4048 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4002 class SyntaxTree::YARV::OptOr < ::SyntaxTree::YARV::Instruction # @return [OptOr] a new instance of OptOr # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4051 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4005 def initialize(calldata); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4067 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4021 def ==(other); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4087 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4041 def call(vm); end # Returns the value of attribute calldata. # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4049 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4003 def calldata; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4083 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4037 def canonical; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4063 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4017 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4055 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4009 def disasm(fmt); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4071 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4025 def length; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4075 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4029 def pops; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4079 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4033 def pushes; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4059 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4013 def to_a(_iseq); end end @@ -20603,43 +20884,43 @@ end # 2 + 3 # ~~~ # -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4105 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4059 class SyntaxTree::YARV::OptPlus < ::SyntaxTree::YARV::Instruction # @return [OptPlus] a new instance of OptPlus # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4108 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4062 def initialize(calldata); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4124 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4078 def ==(other); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4144 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4098 def call(vm); end # Returns the value of attribute calldata. # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4106 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4060 def calldata; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4140 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4094 def canonical; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4120 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4074 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4112 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4066 def disasm(fmt); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4128 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4082 def length; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4132 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4086 def pops; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4136 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4090 def pushes; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4116 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4070 def to_a(_iseq); end end @@ -20655,43 +20936,43 @@ end # /a/ =~ "a" # ~~~ # -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4161 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4115 class SyntaxTree::YARV::OptRegExpMatch2 < ::SyntaxTree::YARV::Instruction # @return [OptRegExpMatch2] a new instance of OptRegExpMatch2 # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4164 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4118 def initialize(calldata); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4180 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4134 def ==(other); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4200 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4154 def call(vm); end # Returns the value of attribute calldata. # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4162 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4116 def calldata; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4196 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4150 def canonical; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4176 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4130 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4168 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4122 def disasm(fmt); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4184 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4138 def length; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4188 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4142 def pops; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4192 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4146 def pushes; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4172 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4126 def to_a(_iseq); end end @@ -20707,43 +20988,43 @@ end # puts "Hello, world!" # ~~~ # -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4217 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4171 class SyntaxTree::YARV::OptSendWithoutBlock < ::SyntaxTree::YARV::Instruction # @return [OptSendWithoutBlock] a new instance of OptSendWithoutBlock # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4220 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4174 def initialize(calldata); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4236 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4190 def ==(other); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4256 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4210 def call(vm); end # Returns the value of attribute calldata. # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4218 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4172 def calldata; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4252 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4206 def canonical; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4232 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4186 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4224 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4178 def disasm(fmt); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4240 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4194 def length; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4244 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4198 def pops; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4248 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4202 def pushes; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4228 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4182 def to_a(_iseq); end end @@ -20760,43 +21041,43 @@ end # "".size # ~~~ # -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4274 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4228 class SyntaxTree::YARV::OptSize < ::SyntaxTree::YARV::Instruction # @return [OptSize] a new instance of OptSize # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4277 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4231 def initialize(calldata); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4293 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4247 def ==(other); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4313 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4267 def call(vm); end # Returns the value of attribute calldata. # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4275 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4229 def calldata; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4309 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4263 def canonical; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4289 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4243 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4281 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4235 def disasm(fmt); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4297 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4251 def length; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4301 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4255 def pops; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4305 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4259 def pushes; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4285 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4239 def to_a(_iseq); end end @@ -20812,42 +21093,42 @@ end # "hello".freeze # ~~~ # -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4330 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4284 class SyntaxTree::YARV::OptStrFreeze < ::SyntaxTree::YARV::Instruction # @return [OptStrFreeze] a new instance of OptStrFreeze # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4333 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4287 def initialize(object, calldata); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4353 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4307 def ==(other); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4366 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4320 def call(vm); end # Returns the value of attribute calldata. # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4331 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4285 def calldata; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4349 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4303 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4338 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4292 def disasm(fmt); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4358 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4312 def length; end # Returns the value of attribute object. # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4331 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4285 def object; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4362 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4316 def pushes; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4345 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4299 def to_a(_iseq); end end @@ -20863,42 +21144,42 @@ end # -"string" # ~~~ # -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4383 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4337 class SyntaxTree::YARV::OptStrUMinus < ::SyntaxTree::YARV::Instruction # @return [OptStrUMinus] a new instance of OptStrUMinus # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4386 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4340 def initialize(object, calldata); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4406 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4360 def ==(other); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4419 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4373 def call(vm); end # Returns the value of attribute calldata. # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4384 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4338 def calldata; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4402 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4356 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4391 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4345 def disasm(fmt); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4411 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4365 def length; end # Returns the value of attribute object. # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4384 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4338 def object; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4415 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4369 def pushes; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4398 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4352 def to_a(_iseq); end end @@ -20915,43 +21196,43 @@ end # "".succ # ~~~ # -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4437 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4391 class SyntaxTree::YARV::OptSucc < ::SyntaxTree::YARV::Instruction # @return [OptSucc] a new instance of OptSucc # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4440 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4394 def initialize(calldata); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4456 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4410 def ==(other); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4476 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4430 def call(vm); end # Returns the value of attribute calldata. # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4438 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4392 def calldata; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4472 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4426 def canonical; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4452 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4406 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4444 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4398 def disasm(fmt); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4460 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4414 def length; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4464 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4418 def pops; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4468 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4422 def pushes; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4448 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4402 def to_a(_iseq); end end @@ -20965,29 +21246,29 @@ end # a ||= 2 # ~~~ # -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4491 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4445 class SyntaxTree::YARV::Pop < ::SyntaxTree::YARV::Instruction - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4504 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4458 def ==(other); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4512 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4466 def call(vm); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4500 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4454 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4492 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4446 def disasm(fmt); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4508 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4462 def pops; end # @return [Boolean] # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4516 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4470 def side_effects?; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4496 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4450 def to_a(_iseq); end end @@ -21001,32 +21282,32 @@ end # nil # ~~~ # -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4531 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4485 class SyntaxTree::YARV::PutNil < ::SyntaxTree::YARV::Instruction - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4544 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4498 def ==(other); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4556 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4510 def call(vm); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4552 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4506 def canonical; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4540 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4494 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4532 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4486 def disasm(fmt); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4548 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4502 def pushes; end # @return [Boolean] # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4560 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4514 def side_effects?; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4536 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4490 def to_a(_iseq); end end @@ -21040,42 +21321,42 @@ end # 5 # ~~~ # -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4575 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4529 class SyntaxTree::YARV::PutObject < ::SyntaxTree::YARV::Instruction # @return [PutObject] a new instance of PutObject # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4578 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4532 def initialize(object); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4594 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4548 def ==(other); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4606 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4560 def call(vm); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4590 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4544 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4582 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4536 def disasm(fmt); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4598 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4552 def length; end # Returns the value of attribute object. # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4576 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4530 def object; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4602 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4556 def pushes; end # @return [Boolean] # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4610 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4564 def side_effects?; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4586 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4540 def to_a(_iseq); end end @@ -21091,32 +21372,32 @@ end # 0 # ~~~ # -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4627 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4581 class SyntaxTree::YARV::PutObjectInt2Fix0 < ::SyntaxTree::YARV::Instruction - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4640 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4594 def ==(other); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4652 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4606 def call(vm); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4648 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4602 def canonical; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4636 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4590 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4628 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4582 def disasm(fmt); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4644 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4598 def pushes; end # @return [Boolean] # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4656 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4610 def side_effects?; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4632 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4586 def to_a(_iseq); end end @@ -21132,32 +21413,32 @@ end # 1 # ~~~ # -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4673 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4627 class SyntaxTree::YARV::PutObjectInt2Fix1 < ::SyntaxTree::YARV::Instruction - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4686 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4640 def ==(other); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4698 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4652 def call(vm); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4694 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4648 def canonical; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4682 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4636 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4674 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4628 def disasm(fmt); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4690 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4644 def pushes; end # @return [Boolean] # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4702 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4656 def side_effects?; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4678 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4632 def to_a(_iseq); end end @@ -21171,29 +21452,29 @@ end # puts "Hello, world!" # ~~~ # -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4717 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4671 class SyntaxTree::YARV::PutSelf < ::SyntaxTree::YARV::Instruction - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4730 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4684 def ==(other); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4738 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4692 def call(vm); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4726 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4680 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4718 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4672 def disasm(fmt); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4734 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4688 def pushes; end # @return [Boolean] # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4742 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4696 def side_effects?; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4722 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4676 def to_a(_iseq); end end @@ -21209,47 +21490,47 @@ end # alias foo bar # ~~~ # -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4759 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4713 class SyntaxTree::YARV::PutSpecialObject < ::SyntaxTree::YARV::Instruction # @return [PutSpecialObject] a new instance of PutSpecialObject # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4766 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4720 def initialize(object); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4782 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4736 def ==(other); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4794 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4748 def call(vm); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4778 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4732 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4770 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4724 def disasm(fmt); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4786 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4740 def length; end # Returns the value of attribute object. # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4764 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4718 def object; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4790 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4744 def pushes; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4774 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4728 def to_a(_iseq); end end -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4761 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4715 SyntaxTree::YARV::PutSpecialObject::OBJECT_CBASE = T.let(T.unsafe(nil), Integer) -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4762 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4716 SyntaxTree::YARV::PutSpecialObject::OBJECT_CONST_BASE = T.let(T.unsafe(nil), Integer) -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4760 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4714 SyntaxTree::YARV::PutSpecialObject::OBJECT_VMCORE = T.let(T.unsafe(nil), Integer) # ### Summary @@ -21262,37 +21543,37 @@ SyntaxTree::YARV::PutSpecialObject::OBJECT_VMCORE = T.let(T.unsafe(nil), Integer # "foo" # ~~~ # -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4818 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4772 class SyntaxTree::YARV::PutString < ::SyntaxTree::YARV::Instruction # @return [PutString] a new instance of PutString # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4821 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4775 def initialize(object); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4837 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4791 def ==(other); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4849 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4803 def call(vm); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4833 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4787 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4825 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4779 def disasm(fmt); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4841 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4795 def length; end # Returns the value of attribute object. # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4819 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4773 def object; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4845 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4799 def pushes; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4829 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4783 def to_a(_iseq); end end @@ -21583,45 +21864,45 @@ end # "hello".tap { |i| p i } # ~~~ # -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4867 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4821 class SyntaxTree::YARV::Send < ::SyntaxTree::YARV::Instruction # @return [Send] a new instance of Send # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4870 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4824 def initialize(calldata, block_iseq); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4891 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4845 def ==(other); end # Returns the value of attribute block_iseq. # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4868 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4822 def block_iseq; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4909 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4863 def call(vm); end # Returns the value of attribute calldata. # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4868 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4822 def calldata; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4887 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4841 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4875 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4829 def disasm(fmt); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4896 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4850 def length; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4900 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4854 def pops; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4905 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4859 def pushes; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4883 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4837 def to_a(_iseq); end end @@ -21640,42 +21921,42 @@ end # end # ~~~ # -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4951 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4905 class SyntaxTree::YARV::SetBlockParam < ::SyntaxTree::YARV::Instruction # @return [SetBlockParam] a new instance of SetBlockParam # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4954 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4908 def initialize(index, level); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4973 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4927 def ==(other); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4986 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4940 def call(vm); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4969 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4923 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4959 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4913 def disasm(fmt); end # Returns the value of attribute index. # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4952 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4906 def index; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4978 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4932 def length; end # Returns the value of attribute level. # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4952 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4906 def level; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4982 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4936 def pops; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4963 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4917 def to_a(iseq); end end @@ -21692,42 +21973,42 @@ end # @@class_variable = 1 # ~~~ # -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5004 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4958 class SyntaxTree::YARV::SetClassVariable < ::SyntaxTree::YARV::Instruction # @return [SetClassVariable] a new instance of SetClassVariable # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5007 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4961 def initialize(name, cache); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5027 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4981 def ==(other); end # Returns the value of attribute cache. # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5005 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4959 def cache; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5040 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4994 def call(vm); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5023 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4977 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5012 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4966 def disasm(fmt); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5032 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4986 def length; end # Returns the value of attribute name. # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5005 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4959 def name; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5036 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4990 def pops; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5019 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4973 def to_a(_iseq); end end @@ -21742,37 +22023,37 @@ end # Constant = 1 # ~~~ # -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5058 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5012 class SyntaxTree::YARV::SetConstant < ::SyntaxTree::YARV::Instruction # @return [SetConstant] a new instance of SetConstant # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5061 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5015 def initialize(name); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5077 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5031 def ==(other); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5089 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5043 def call(vm); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5073 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5027 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5065 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5019 def disasm(fmt); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5081 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5035 def length; end # Returns the value of attribute name. # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5059 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5013 def name; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5085 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5039 def pops; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5069 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5023 def to_a(_iseq); end end @@ -21787,37 +22068,37 @@ end # $global = 5 # ~~~ # -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5106 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5060 class SyntaxTree::YARV::SetGlobal < ::SyntaxTree::YARV::Instruction # @return [SetGlobal] a new instance of SetGlobal # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5109 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5063 def initialize(name); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5125 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5079 def ==(other); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5137 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5091 def call(vm); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5121 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5075 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5113 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5067 def disasm(fmt); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5129 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5083 def length; end # Returns the value of attribute name. # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5107 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5061 def name; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5133 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5087 def pops; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5117 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5071 def to_a(_iseq); end end @@ -21836,42 +22117,42 @@ end # ~~~ruby # ~~~ # -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5160 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5114 class SyntaxTree::YARV::SetInstanceVariable < ::SyntaxTree::YARV::Instruction # @return [SetInstanceVariable] a new instance of SetInstanceVariable # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5163 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5117 def initialize(name, cache); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5183 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5137 def ==(other); end # Returns the value of attribute cache. # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5161 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5115 def cache; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5196 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5150 def call(vm); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5179 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5133 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5168 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5122 def disasm(fmt); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5188 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5142 def length; end # Returns the value of attribute name. # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5161 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5115 def name; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5192 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5146 def pops; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5175 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5129 def to_a(_iseq); end end @@ -21889,42 +22170,42 @@ end # tap { tap { value = 10 } } # ~~~ # -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5216 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5170 class SyntaxTree::YARV::SetLocal < ::SyntaxTree::YARV::Instruction # @return [SetLocal] a new instance of SetLocal # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5219 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5173 def initialize(index, level); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5238 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5192 def ==(other); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5250 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5204 def call(vm); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5234 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5188 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5224 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5178 def disasm(fmt); end # Returns the value of attribute index. # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5217 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5171 def index; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5242 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5196 def length; end # Returns the value of attribute level. # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5217 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5171 def level; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5246 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5200 def pops; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5228 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5182 def to_a(iseq); end end @@ -21941,40 +22222,40 @@ end # value = 5 # ~~~ # -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5268 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5222 class SyntaxTree::YARV::SetLocalWC0 < ::SyntaxTree::YARV::Instruction # @return [SetLocalWC0] a new instance of SetLocalWC0 # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5271 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5225 def initialize(index); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5287 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5241 def ==(other); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5303 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5257 def call(vm); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5299 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5253 def canonical; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5283 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5237 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5275 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5229 def disasm(fmt); end # Returns the value of attribute index. # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5269 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5223 def index; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5291 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5245 def length; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5295 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5249 def pops; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5279 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5233 def to_a(iseq); end end @@ -21991,40 +22272,40 @@ end # self.then { value = 10 } # ~~~ # -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5321 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5275 class SyntaxTree::YARV::SetLocalWC1 < ::SyntaxTree::YARV::Instruction # @return [SetLocalWC1] a new instance of SetLocalWC1 # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5324 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5278 def initialize(index); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5340 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5294 def ==(other); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5356 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5310 def call(vm); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5352 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5306 def canonical; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5336 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5290 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5328 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5282 def disasm(fmt); end # Returns the value of attribute index. # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5322 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5276 def index; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5344 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5298 def length; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5348 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5302 def pops; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5332 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5286 def to_a(iseq); end end @@ -22039,40 +22320,40 @@ end # {}[:key] = 'val' # ~~~ # -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5372 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5326 class SyntaxTree::YARV::SetN < ::SyntaxTree::YARV::Instruction # @return [SetN] a new instance of SetN # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5375 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5329 def initialize(number); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5391 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5345 def ==(other); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5407 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5361 def call(vm); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5387 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5341 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5379 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5333 def disasm(fmt); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5395 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5349 def length; end # Returns the value of attribute number. # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5373 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5327 def number; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5399 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5353 def pops; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5403 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5357 def pushes; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5383 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5337 def to_a(_iseq); end end @@ -22088,37 +22369,37 @@ end # baz if (foo == 1) .. (bar == 1) # ~~~ # -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5424 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5378 class SyntaxTree::YARV::SetSpecial < ::SyntaxTree::YARV::Instruction # @return [SetSpecial] a new instance of SetSpecial # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5427 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5381 def initialize(key); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5443 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5397 def ==(other); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5455 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5409 def call(vm); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5439 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5393 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5431 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5385 def disasm(fmt); end # Returns the value of attribute key. # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5425 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5379 def key; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5447 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5401 def length; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5451 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5405 def pops; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5435 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5389 def to_a(_iseq); end end @@ -22134,40 +22415,40 @@ end # x = *(5) # ~~~ # -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5479 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5433 class SyntaxTree::YARV::SplatArray < ::SyntaxTree::YARV::Instruction # @return [SplatArray] a new instance of SplatArray # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5482 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5436 def initialize(flag); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5498 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5452 def ==(other); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5514 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5468 def call(vm); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5494 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5448 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5486 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5440 def disasm(fmt); end # Returns the value of attribute flag. # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5480 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5434 def flag; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5502 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5456 def length; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5506 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5460 def pops; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5510 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5464 def pushes; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5490 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5444 def to_a(_iseq); end end @@ -22185,27 +22466,27 @@ end # !!defined?([[]]) # ~~~ # -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5553 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5507 class SyntaxTree::YARV::Swap < ::SyntaxTree::YARV::Instruction - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5566 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5520 def ==(other); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5578 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5532 def call(vm); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5562 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5516 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5554 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5508 def disasm(fmt); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5570 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5524 def pops; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5574 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5528 def pushes; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5558 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5512 def to_a(_iseq); end end @@ -22221,79 +22502,79 @@ end # [1, 2, 3].map { break 2 } # ~~~ # -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5596 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5550 class SyntaxTree::YARV::Throw < ::SyntaxTree::YARV::Instruction # @return [Throw] a new instance of Throw # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5612 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5566 def initialize(type); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5628 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5582 def ==(other); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5644 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5598 def call(vm); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5624 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5578 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5616 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5570 def disasm(fmt); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5632 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5586 def length; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5636 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5590 def pops; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5640 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5594 def pushes; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5620 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5574 def to_a(_iseq); end # Returns the value of attribute type. # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5610 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5564 def type; end private - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5671 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5625 def error_backtrace(vm); end end -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5599 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5553 SyntaxTree::YARV::Throw::RUBY_TAG_BREAK = T.let(T.unsafe(nil), Integer) -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5605 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5559 SyntaxTree::YARV::Throw::RUBY_TAG_FATAL = T.let(T.unsafe(nil), Integer) -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5600 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5554 SyntaxTree::YARV::Throw::RUBY_TAG_NEXT = T.let(T.unsafe(nil), Integer) -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5597 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5551 SyntaxTree::YARV::Throw::RUBY_TAG_NONE = T.let(T.unsafe(nil), Integer) -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5603 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5557 SyntaxTree::YARV::Throw::RUBY_TAG_RAISE = T.let(T.unsafe(nil), Integer) -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5602 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5556 SyntaxTree::YARV::Throw::RUBY_TAG_REDO = T.let(T.unsafe(nil), Integer) -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5601 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5555 SyntaxTree::YARV::Throw::RUBY_TAG_RETRY = T.let(T.unsafe(nil), Integer) -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5598 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5552 SyntaxTree::YARV::Throw::RUBY_TAG_RETURN = T.let(T.unsafe(nil), Integer) -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5604 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5558 SyntaxTree::YARV::Throw::RUBY_TAG_THROW = T.let(T.unsafe(nil), Integer) -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5607 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5561 SyntaxTree::YARV::Throw::VM_THROW_NO_ESCAPE_FLAG = T.let(T.unsafe(nil), Integer) -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5608 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5562 SyntaxTree::YARV::Throw::VM_THROW_STATE_MASK = T.let(T.unsafe(nil), Integer) # ### Summary @@ -22307,42 +22588,42 @@ SyntaxTree::YARV::Throw::VM_THROW_STATE_MASK = T.let(T.unsafe(nil), Integer) # /foo #{bar}/ # ~~~ # -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5746 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5700 class SyntaxTree::YARV::ToRegExp < ::SyntaxTree::YARV::Instruction # @return [ToRegExp] a new instance of ToRegExp # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5749 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5703 def initialize(options, length); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5766 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5720 def ==(other); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5779 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5733 def call(vm); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5762 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5716 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5754 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5708 def disasm(fmt); end # Returns the value of attribute length. # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5747 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5701 def length; end # Returns the value of attribute options. # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5747 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5701 def options; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5771 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5725 def pops; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5775 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5729 def pushes; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5758 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5712 def to_a(_iseq); end end @@ -22360,37 +22641,37 @@ end # end # ~~~ # -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5699 +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5653 class SyntaxTree::YARV::TopN < ::SyntaxTree::YARV::Instruction # @return [TopN] a new instance of TopN # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5702 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5656 def initialize(number); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5718 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5672 def ==(other); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5730 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5684 def call(vm); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5714 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5668 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5706 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5660 def disasm(fmt); end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5722 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5676 def length; end # Returns the value of attribute number. # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5700 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5654 def number; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5726 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5680 def pushes; end - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5710 + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5664 def to_a(_iseq); end end @@ -22777,42 +23058,42 @@ end # # yield value # -# source://syntax_tree//lib/syntax_tree/node.rb#12289 +# source://syntax_tree//lib/syntax_tree/node.rb#12273 class SyntaxTree::YieldNode < ::SyntaxTree::Node # @return [YieldNode] a new instance of YieldNode # - # source://syntax_tree//lib/syntax_tree/node.rb#12296 + # source://syntax_tree//lib/syntax_tree/node.rb#12280 def initialize(arguments:, location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#12350 + # source://syntax_tree//lib/syntax_tree/node.rb#12334 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#12302 + # source://syntax_tree//lib/syntax_tree/node.rb#12286 def accept(visitor); end # [nil | Args | Paren] the arguments passed to the yield # - # source://syntax_tree//lib/syntax_tree/node.rb#12291 + # source://syntax_tree//lib/syntax_tree/node.rb#12275 def arguments; end - # source://syntax_tree//lib/syntax_tree/node.rb#12306 + # source://syntax_tree//lib/syntax_tree/node.rb#12290 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#12294 + # source://syntax_tree//lib/syntax_tree/node.rb#12278 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#12310 + # source://syntax_tree//lib/syntax_tree/node.rb#12294 def copy(arguments: T.unsafe(nil), location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#12306 + # source://syntax_tree//lib/syntax_tree/node.rb#12290 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#12323 + # source://syntax_tree//lib/syntax_tree/node.rb#12307 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#12327 + # source://syntax_tree//lib/syntax_tree/node.rb#12311 def format(q); end end @@ -22820,36 +23101,36 @@ end # # super # -# source://syntax_tree//lib/syntax_tree/node.rb#12359 +# source://syntax_tree//lib/syntax_tree/node.rb#12343 class SyntaxTree::ZSuper < ::SyntaxTree::Node # @return [ZSuper] a new instance of ZSuper # - # source://syntax_tree//lib/syntax_tree/node.rb#12363 + # source://syntax_tree//lib/syntax_tree/node.rb#12347 def initialize(location:); end - # source://syntax_tree//lib/syntax_tree/node.rb#12393 + # source://syntax_tree//lib/syntax_tree/node.rb#12377 def ===(other); end - # source://syntax_tree//lib/syntax_tree/node.rb#12368 + # source://syntax_tree//lib/syntax_tree/node.rb#12352 def accept(visitor); end - # source://syntax_tree//lib/syntax_tree/node.rb#12372 + # source://syntax_tree//lib/syntax_tree/node.rb#12356 def child_nodes; end # [Array[ Comment | EmbDoc ]] the comments attached to this node # - # source://syntax_tree//lib/syntax_tree/node.rb#12361 + # source://syntax_tree//lib/syntax_tree/node.rb#12345 def comments; end - # source://syntax_tree//lib/syntax_tree/node.rb#12376 + # source://syntax_tree//lib/syntax_tree/node.rb#12360 def copy(location: T.unsafe(nil)); end - # source://syntax_tree//lib/syntax_tree/node.rb#12372 + # source://syntax_tree//lib/syntax_tree/node.rb#12356 def deconstruct; end - # source://syntax_tree//lib/syntax_tree/node.rb#12385 + # source://syntax_tree//lib/syntax_tree/node.rb#12369 def deconstruct_keys(_keys); end - # source://syntax_tree//lib/syntax_tree/node.rb#12389 + # source://syntax_tree//lib/syntax_tree/node.rb#12373 def format(q); end end diff --git a/sorbet/rbi/gems/tapioca@0.11.7.rbi b/sorbet/rbi/gems/tapioca@0.11.10.rbi similarity index 87% rename from sorbet/rbi/gems/tapioca@0.11.7.rbi rename to sorbet/rbi/gems/tapioca@0.11.10.rbi index ede293dbd..1f313c1d4 100644 --- a/sorbet/rbi/gems/tapioca@0.11.7.rbi +++ b/sorbet/rbi/gems/tapioca@0.11.10.rbi @@ -8,6 +8,25 @@ class Bundler::Dependency < ::Gem::Dependency include ::Tapioca::BundlerExt::AutoRequireHook end +# source://tapioca//lib/tapioca/helpers/git_attributes.rb#4 +class GitAttributes + class << self + # source://tapioca//lib/tapioca/helpers/git_attributes.rb#9 + sig { params(path: ::Pathname).void } + def create_generated_attribute_file(path); end + + # source://tapioca//lib/tapioca/helpers/git_attributes.rb#16 + sig { params(path: ::Pathname).void } + def create_vendored_attribute_file(path); end + + private + + # source://tapioca//lib/tapioca/helpers/git_attributes.rb#25 + sig { params(path: ::Pathname, content: ::String).void } + def create_gitattributes_file(path, content); end + end +end + # We need to do the alias-method-chain dance since Bootsnap does the same, # and prepended modules and alias-method-chain don't play well together. # @@ -35,7 +54,7 @@ module RBI; end # source://tapioca//lib/tapioca/rbi_ext/model.rb#5 class RBI::Tree < ::RBI::NodeWithComments - # source://rbi/0.0.16/lib/rbi/model.rb#115 + # source://rbi/0.1.2/lib/rbi/model.rb#119 sig do params( loc: T.nilable(::RBI::Loc), @@ -45,19 +64,19 @@ class RBI::Tree < ::RBI::NodeWithComments end def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi/0.0.16/lib/rbi/model.rb#122 + # source://rbi/0.1.2/lib/rbi/model.rb#126 sig { params(node: ::RBI::Node).void } def <<(node); end - # source://rbi/0.0.16/lib/rbi/printer.rb#224 + # source://rbi/0.1.2/lib/rbi/printer.rb#226 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi/0.0.16/lib/rbi/rewriters/add_sig_templates.rb#66 + # source://rbi/0.1.2/lib/rbi/rewriters/add_sig_templates.rb#66 sig { params(with_todo_comment: T::Boolean).void } def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end - # source://rbi/0.0.16/lib/rbi/rewriters/annotate.rb#48 + # source://rbi/0.1.2/lib/rbi/rewriters/annotate.rb#49 sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void } def annotate!(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end @@ -121,23 +140,23 @@ class RBI::Tree < ::RBI::NodeWithComments end def create_type_variable(name, type:, variance: T.unsafe(nil), fixed: T.unsafe(nil), upper: T.unsafe(nil), lower: T.unsafe(nil)); end - # source://rbi/0.0.16/lib/rbi/rewriters/deannotate.rb#40 + # source://rbi/0.1.2/lib/rbi/rewriters/deannotate.rb#41 sig { params(annotation: ::String).void } def deannotate!(annotation); end - # source://rbi/0.0.16/lib/rbi/model.rb#128 + # source://rbi/0.1.2/lib/rbi/model.rb#132 sig { returns(T::Boolean) } def empty?; end - # source://rbi/0.0.16/lib/rbi/rewriters/group_nodes.rb#38 + # source://rbi/0.1.2/lib/rbi/rewriters/group_nodes.rb#38 sig { void } def group_nodes!; end - # source://rbi/0.0.16/lib/rbi/index.rb#64 + # source://rbi/0.1.2/lib/rbi/index.rb#68 sig { returns(::RBI::Index) } def index; end - # source://rbi/0.0.16/lib/rbi/rewriters/merge_trees.rb#318 + # source://rbi/0.1.2/lib/rbi/rewriters/merge_trees.rb#324 sig do params( other: ::RBI::Tree, @@ -148,23 +167,23 @@ class RBI::Tree < ::RBI::NodeWithComments end def merge(other, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end - # source://rbi/0.0.16/lib/rbi/rewriters/nest_non_public_methods.rb#45 + # source://rbi/0.1.2/lib/rbi/rewriters/nest_non_public_methods.rb#46 sig { void } def nest_non_public_methods!; end - # source://rbi/0.0.16/lib/rbi/rewriters/nest_singleton_methods.rb#35 + # source://rbi/0.1.2/lib/rbi/rewriters/nest_singleton_methods.rb#36 sig { void } def nest_singleton_methods!; end - # source://rbi/0.0.16/lib/rbi/model.rb#106 + # source://rbi/0.1.2/lib/rbi/model.rb#110 sig { returns(T::Array[::RBI::Node]) } def nodes; end - # source://rbi/0.0.16/lib/rbi/printer.rb#231 + # source://rbi/0.1.2/lib/rbi/printer.rb#233 sig { override.returns(T::Boolean) } def oneline?; end - # source://rbi/0.0.16/lib/rbi/rewriters/sort_nodes.rb#107 + # source://rbi/0.1.2/lib/rbi/rewriters/sort_nodes.rb#119 sig { void } def sort_nodes!; end @@ -185,7 +204,7 @@ class RBI::TypedParam < ::T::Struct const :type, ::String class << self - # source://sorbet-runtime/0.5.10908/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11109/lib/types/struct.rb#13 def inherited(s); end end end @@ -420,40 +439,42 @@ class Tapioca::Cli < ::Thor include ::Tapioca::ConfigHelper include ::Tapioca::EnvHelper - # source://tapioca//lib/tapioca/cli.rb#346 + # source://tapioca//lib/tapioca/cli.rb#355 def __print_version; end - # source://tapioca//lib/tapioca/cli.rb#326 + # source://tapioca//lib/tapioca/cli.rb#337 def annotations; end - # source://tapioca//lib/tapioca/cli.rb#296 + # source://tapioca//lib/tapioca/cli.rb#309 def check_shims; end - # source://tapioca//lib/tapioca/cli.rb#41 + # source://tapioca//lib/tapioca/cli.rb#46 def configure; end - # source://tapioca//lib/tapioca/cli.rb#137 + # source://tapioca//lib/tapioca/cli.rb#138 def dsl(*constant_or_paths); end - # source://tapioca//lib/tapioca/cli.rb#247 + # @raise [MalformattedArgumentError] + # + # source://tapioca//lib/tapioca/cli.rb#253 def gem(*gems); end # source://tapioca//lib/tapioca/cli.rb#27 def init; end - # source://tapioca//lib/tapioca/cli.rb#52 + # source://tapioca//lib/tapioca/cli.rb#57 def require; end - # source://tapioca//lib/tapioca/cli.rb#71 + # source://tapioca//lib/tapioca/cli.rb#74 def todo; end private - # source://tapioca//lib/tapioca/cli.rb#360 + # source://tapioca//lib/tapioca/cli.rb#369 def print_init_next_steps; end class << self - # source://tapioca//lib/tapioca/cli.rb#352 + # source://tapioca//lib/tapioca/cli.rb#361 def exit_on_failure?; end end end @@ -481,6 +502,239 @@ end # source://tapioca//lib/tapioca/commands.rb#5 module Tapioca::Commands; end +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://tapioca//lib/tapioca/commands/abstract_dsl.rb#6 +class Tapioca::Commands::AbstractDsl < ::Tapioca::Commands::CommandWithoutTracker + include ::Tapioca::SorbetHelper + include ::Tapioca::RBIFilesHelper + + abstract! + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#31 + sig do + params( + requested_constants: T::Array[::String], + requested_paths: T::Array[::Pathname], + outpath: ::Pathname, + only: T::Array[::String], + exclude: T::Array[::String], + file_header: T::Boolean, + tapioca_path: ::String, + quiet: T::Boolean, + verbose: T::Boolean, + number_of_workers: T.nilable(::Integer), + auto_strictness: T::Boolean, + gem_dir: ::String, + rbi_formatter: ::Tapioca::RBIFormatter, + app_root: ::String, + halt_upon_load_error: T::Boolean + ).void + end + def initialize(requested_constants:, requested_paths:, outpath:, only:, exclude:, file_header:, tapioca_path:, quiet: T.unsafe(nil), verbose: T.unsafe(nil), number_of_workers: T.unsafe(nil), auto_strictness: T.unsafe(nil), gem_dir: T.unsafe(nil), rbi_formatter: T.unsafe(nil), app_root: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil)); end + + private + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#94 + sig { returns(T::Array[::String]) } + def all_requested_constants; end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#284 + sig { params(cause: ::Symbol, files: T::Array[::String]).returns(::String) } + def build_error_for_files(cause, files); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#208 + sig do + params( + constant_name: ::String, + rbi: ::RBI::File, + outpath: ::Pathname, + quiet: T::Boolean + ).returns(T.nilable(::Pathname)) + end + def compile_dsl_rbi(constant_name, rbi, outpath: T.unsafe(nil), quiet: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#146 + sig { params(constant_names: T::Array[::String], ignore_missing: T::Boolean).returns(T::Array[::Module]) } + def constantize(constant_names, ignore_missing: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#169 + sig { params(compiler_names: T::Array[::String]).returns(T::Array[T.class_of(Tapioca::Dsl::Compiler)]) } + def constantize_compilers(compiler_names); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#344 + sig { returns(T::Array[::String]) } + def constants_from_requested_paths; end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#117 + sig { returns(::Tapioca::Dsl::Pipeline) } + def create_pipeline; end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#247 + sig { params(constant_name: ::String).returns(::Pathname) } + def dsl_rbi_filename(constant_name); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#132 + sig { params(requested_constants: T::Array[::String], path: ::Pathname).returns(T::Set[::Pathname]) } + def existing_rbi_filenames(requested_constants, path: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#339 + sig { params(constant: ::String).returns(::String) } + def generate_command_for(constant); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#70 + sig { params(outpath: ::Pathname, quiet: T::Boolean).returns(T::Set[::Pathname]) } + def generate_dsl_rbi_files(outpath, quiet:); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#107 + sig { void } + def load_application; end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#226 + sig { params(dir: ::Pathname).void } + def perform_dsl_verification(dir); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#102 + sig { returns(::Tapioca::Dsl::Pipeline) } + def pipeline; end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#235 + sig { params(files: T::Set[::Pathname]).void } + def purge_stale_dsl_rbi_files(files); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#334 + sig { params(constant: ::String).returns(::String) } + def rbi_filename_for(constant); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#315 + sig { params(path: ::Pathname).returns(T::Array[::Pathname]) } + def rbi_files_in(path); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#293 + sig { params(diff: T::Hash[::String, ::Symbol], command: ::Symbol).void } + def report_diff_and_exit_if_out_of_date(diff, command); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#188 + sig { params(name: ::String).returns(T.nilable(T.class_of(Tapioca::Dsl::Compiler))) } + def resolve(name); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#322 + sig { params(class_name: ::String).returns(::String) } + def underscore(class_name); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#252 + sig { params(tmp_dir: ::Pathname).returns(T::Hash[::String, ::Symbol]) } + def verify_dsl_rbi(tmp_dir:); end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://tapioca//lib/tapioca/commands/abstract_gem.rb#6 +class Tapioca::Commands::AbstractGem < ::Tapioca::Commands::Command + include ::Tapioca::SorbetHelper + include ::Tapioca::RBIFilesHelper + + abstract! + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#32 + sig do + params( + gem_names: T::Array[::String], + exclude: T::Array[::String], + include_dependencies: T::Boolean, + prerequire: T.nilable(::String), + postrequire: ::String, + typed_overrides: T::Hash[::String, ::String], + outpath: ::Pathname, + file_header: T::Boolean, + include_doc: T::Boolean, + include_loc: T::Boolean, + include_exported_rbis: T::Boolean, + number_of_workers: T.nilable(::Integer), + auto_strictness: T::Boolean, + dsl_dir: ::String, + rbi_formatter: ::Tapioca::RBIFormatter, + halt_upon_load_error: T::Boolean + ).void + end + def initialize(gem_names:, exclude:, include_dependencies:, prerequire:, postrequire:, typed_overrides:, outpath:, file_header:, include_doc:, include_loc:, include_exported_rbis:, number_of_workers: T.unsafe(nil), auto_strictness: T.unsafe(nil), dsl_dir: T.unsafe(nil), rbi_formatter: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil)); end + + private + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#221 + sig { returns(T::Array[::String]) } + def added_rbis; end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#282 + sig { params(cause: ::Symbol, files: T::Array[::String]).returns(::String) } + def build_error_for_files(cause, files); end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#110 + sig { params(gem: ::Tapioca::Gemfile::GemSpec).void } + def compile_gem_rbi(gem); end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#216 + sig { params(gem_name: ::String).returns(::Pathname) } + def existing_rbi(gem_name); end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#264 + sig { returns(T::Hash[::String, ::String]) } + def existing_rbis; end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#228 + sig { params(gem_name: ::String).returns(::Pathname) } + def expected_rbi(gem_name); end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#270 + sig { returns(T::Hash[::String, ::String]) } + def expected_rbis; end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#98 + sig do + params( + gem: ::Tapioca::Gemfile::GemSpec, + dependencies: T::Array[::Tapioca::Gemfile::GemSpec] + ).returns(T::Array[::Tapioca::Gemfile::GemSpec]) + end + def gem_dependencies(gem, dependencies = T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#233 + sig { params(gem_name: ::String).returns(T::Boolean) } + def gem_rbi_exists?(gem_name); end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#277 + sig { params(gem_name: ::String, version: ::String).returns(::Pathname) } + def gem_rbi_filename(gem_name, version); end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#77 + sig { params(gem_names: T::Array[::String]).returns(T::Array[::Tapioca::Gemfile::GemSpec]) } + def gems_to_generate(gem_names); end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#287 + sig { params(gem: ::Tapioca::Gemfile::GemSpec, file: ::RBI::File).void } + def merge_with_exported_rbi(gem, file); end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#258 + sig { params(old_filename: ::Pathname, new_filename: ::Pathname).void } + def move(old_filename, new_filename); end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#168 + sig { void } + def perform_additions; end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#141 + sig { void } + def perform_removals; end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#211 + sig { returns(T::Array[::String]) } + def removed_rbis; end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#238 + sig { params(diff: T::Hash[::String, ::Symbol], command: ::Symbol).void } + def report_diff_and_exit_if_out_of_date(diff, command); end +end + # source://tapioca//lib/tapioca/commands/annotations.rb#6 class Tapioca::Commands::Annotations < ::Tapioca::Commands::CommandWithoutTracker # source://tapioca//lib/tapioca/commands/annotations.rb#18 @@ -495,69 +749,69 @@ class Tapioca::Commands::Annotations < ::Tapioca::Commands::CommandWithoutTracke end def initialize(central_repo_root_uris:, auth: T.unsafe(nil), netrc_file: T.unsafe(nil), central_repo_index_path: T.unsafe(nil), typed_overrides: T.unsafe(nil)); end - # source://tapioca//lib/tapioca/commands/annotations.rb#36 - sig { override.void } - def execute; end - private - # source://tapioca//lib/tapioca/commands/annotations.rb#191 + # source://tapioca//lib/tapioca/commands/annotations.rb#193 sig { params(name: ::String, content: ::String).returns(::String) } def add_header(name, content); end - # source://tapioca//lib/tapioca/commands/annotations.rb#211 + # source://tapioca//lib/tapioca/commands/annotations.rb#213 sig { params(name: ::String, content: ::String).returns(::String) } def apply_typed_override(name, content); end - # source://tapioca//lib/tapioca/commands/annotations.rb#132 + # source://tapioca//lib/tapioca/commands/annotations.rb#39 + sig { override.void } + def execute; end + + # source://tapioca//lib/tapioca/commands/annotations.rb#136 sig { params(repo_uris: T::Array[::String], gem_name: ::String).void } def fetch_annotation(repo_uris, gem_name); end - # source://tapioca//lib/tapioca/commands/annotations.rb#109 + # source://tapioca//lib/tapioca/commands/annotations.rb#113 sig { params(gem_names: T::Array[::String]).returns(T::Array[::String]) } def fetch_annotations(gem_names); end - # source://tapioca//lib/tapioca/commands/annotations.rb#150 + # source://tapioca//lib/tapioca/commands/annotations.rb#152 sig { params(repo_uri: ::String, path: ::String).returns(T.nilable(::String)) } def fetch_file(repo_uri, path); end - # source://tapioca//lib/tapioca/commands/annotations.rb#167 + # source://tapioca//lib/tapioca/commands/annotations.rb#169 sig { params(repo_uri: ::String, path: ::String).returns(T.nilable(::String)) } def fetch_http_file(repo_uri, path); end - # source://tapioca//lib/tapioca/commands/annotations.rb#98 + # source://tapioca//lib/tapioca/commands/annotations.rb#102 sig { params(repo_uri: ::String, repo_number: T.nilable(::Integer)).returns(T.nilable(Tapioca::RepoIndex)) } def fetch_index(repo_uri, repo_number:); end - # source://tapioca//lib/tapioca/commands/annotations.rb#77 + # source://tapioca//lib/tapioca/commands/annotations.rb#81 sig { returns(T::Hash[::String, Tapioca::RepoIndex]) } def fetch_indexes; end - # source://tapioca//lib/tapioca/commands/annotations.rb#159 + # source://tapioca//lib/tapioca/commands/annotations.rb#161 sig { params(repo_uri: ::String, path: ::String).returns(T.nilable(::String)) } def fetch_local_file(repo_uri, path); end - # source://tapioca//lib/tapioca/commands/annotations.rb#46 + # source://tapioca//lib/tapioca/commands/annotations.rb#50 sig { returns(T::Array[::String]) } def list_gemfile_gems; end - # source://tapioca//lib/tapioca/commands/annotations.rb#223 + # source://tapioca//lib/tapioca/commands/annotations.rb#225 sig { params(gem_name: ::String, contents: T::Array[::String]).returns(T.nilable(::String)) } def merge_files(gem_name, contents); end - # source://tapioca//lib/tapioca/commands/annotations.rb#56 + # source://tapioca//lib/tapioca/commands/annotations.rb#60 sig { params(project_gems: T::Array[::String]).void } def remove_expired_annotations(project_gems); end - # source://tapioca//lib/tapioca/commands/annotations.rb#250 + # source://tapioca//lib/tapioca/commands/annotations.rb#252 sig { returns(T::Hash[::String, T.nilable(::String)]) } def repo_tokens; end - # source://tapioca//lib/tapioca/commands/annotations.rb#278 + # source://tapioca//lib/tapioca/commands/annotations.rb#280 sig { params(path: ::String, repo_uri: ::String, message: ::String).void } def say_http_error(path, repo_uri, message:); end - # source://tapioca//lib/tapioca/commands/annotations.rb#262 + # source://tapioca//lib/tapioca/commands/annotations.rb#264 sig { params(repo_uri: ::String).returns(T.nilable(::String)) } def token_for(repo_uri); end end @@ -581,7 +835,9 @@ class Tapioca::Commands::CheckShims < ::Tapioca::Commands::CommandWithoutTracker end def initialize(gem_rbi_dir:, dsl_rbi_dir:, annotations_rbi_dir:, shim_rbi_dir:, todo_rbi_file:, payload:, number_of_workers:); end - # source://tapioca//lib/tapioca/commands/check_shims.rb#42 + private + + # source://tapioca//lib/tapioca/commands/check_shims.rb#44 sig { override.void } def execute; end end @@ -603,19 +859,17 @@ class Tapioca::Commands::Command sig { void } def initialize; end - # @abstract - # - # source://tapioca//lib/tapioca/commands/command.rb#25 - sig { abstract.void } - def execute; end - - # source://thor/1.2.2/lib/thor/base.rb#139 + # source://thor/1.3.0/lib/thor/base.rb#155 sig { returns(::Thor::Actions) } def file_writer; end + # source://tapioca//lib/tapioca/commands/command.rb#25 + sig(:final) { void } + def run; end + private - # source://tapioca//lib/tapioca/commands/command.rb#46 + # source://tapioca//lib/tapioca/commands/command.rb#53 sig do params( path: T.any(::Pathname, ::String), @@ -627,11 +881,17 @@ class Tapioca::Commands::Command end def create_file(path, content, force: T.unsafe(nil), skip: T.unsafe(nil), verbose: T.unsafe(nil)); end - # source://tapioca//lib/tapioca/commands/command.rb#30 + # source://tapioca//lib/tapioca/commands/command.rb#37 sig { params(command: ::Symbol, args: ::String).returns(::String) } def default_command(command, *args); end - # source://tapioca//lib/tapioca/commands/command.rb#56 + # @abstract + # + # source://tapioca//lib/tapioca/commands/command.rb#34 + sig { abstract.void } + def execute; end + + # source://tapioca//lib/tapioca/commands/command.rb#63 sig { params(path: T.any(::Pathname, ::String), verbose: T::Boolean).void } def remove_file(path, verbose: T.unsafe(nil)); end end @@ -659,10 +919,6 @@ class Tapioca::Commands::Configure < ::Tapioca::Commands::CommandWithoutTracker sig { params(sorbet_config: ::String, tapioca_config: ::String, default_postrequire: ::String).void } def initialize(sorbet_config:, tapioca_config:, default_postrequire:); end - # source://tapioca//lib/tapioca/commands/configure.rb#30 - sig { override.void } - def execute; end - private # source://tapioca//lib/tapioca/commands/configure.rb#79 @@ -681,6 +937,10 @@ class Tapioca::Commands::Configure < ::Tapioca::Commands::CommandWithoutTracker sig { void } def create_tapioca_config; end + # source://tapioca//lib/tapioca/commands/configure.rb#32 + sig { override.void } + def execute; end + # source://tapioca//lib/tapioca/commands/configure.rb#92 sig { returns(::Bundler::Installer) } def installer; end @@ -690,224 +950,62 @@ class Tapioca::Commands::Configure < ::Tapioca::Commands::CommandWithoutTracker def spec; end end -# source://tapioca//lib/tapioca/commands/dsl.rb#6 -class Tapioca::Commands::Dsl < ::Tapioca::Commands::CommandWithoutTracker - include ::Tapioca::SorbetHelper - include ::Tapioca::RBIFilesHelper - - # source://tapioca//lib/tapioca/commands/dsl.rb#30 - sig do - params( - requested_constants: T::Array[::String], - requested_paths: T::Array[::Pathname], - outpath: ::Pathname, - only: T::Array[::String], - exclude: T::Array[::String], - file_header: T::Boolean, - tapioca_path: ::String, - should_verify: T::Boolean, - quiet: T::Boolean, - verbose: T::Boolean, - number_of_workers: T.nilable(::Integer), - auto_strictness: T::Boolean, - gem_dir: ::String, - rbi_formatter: ::Tapioca::RBIFormatter, - app_root: ::String, - halt_upon_load_error: T::Boolean - ).void - end - def initialize(requested_constants:, requested_paths:, outpath:, only:, exclude:, file_header:, tapioca_path:, should_verify: T.unsafe(nil), quiet: T.unsafe(nil), verbose: T.unsafe(nil), number_of_workers: T.unsafe(nil), auto_strictness: T.unsafe(nil), gem_dir: T.unsafe(nil), rbi_formatter: T.unsafe(nil), app_root: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil)); end +# source://tapioca//lib/tapioca/commands/dsl_compiler_list.rb#6 +class Tapioca::Commands::DslCompilerList < ::Tapioca::Commands::AbstractDsl + private - # source://tapioca//lib/tapioca/commands/dsl.rb#97 + # source://tapioca//lib/tapioca/commands/dsl_compiler_list.rb#10 sig { override.void } def execute; end +end - # source://tapioca//lib/tapioca/commands/dsl.rb#69 - sig { void } - def list_compilers; end - +# source://tapioca//lib/tapioca/commands/dsl_generate.rb#6 +class Tapioca::Commands::DslGenerate < ::Tapioca::Commands::AbstractDsl private - # source://tapioca//lib/tapioca/commands/dsl.rb#330 - sig { params(cause: ::Symbol, files: T::Array[::String]).returns(::String) } - def build_error_for_files(cause, files); end - - # source://tapioca//lib/tapioca/commands/dsl.rb#254 - sig do - params( - constant_name: ::String, - rbi: ::RBI::File, - outpath: ::Pathname, - quiet: T::Boolean - ).returns(T.nilable(::Pathname)) - end - def compile_dsl_rbi(constant_name, rbi, outpath: T.unsafe(nil), quiet: T.unsafe(nil)); end - - # source://tapioca//lib/tapioca/commands/dsl.rb#192 - sig { params(constant_names: T::Array[::String], ignore_missing: T::Boolean).returns(T::Array[::Module]) } - def constantize(constant_names, ignore_missing: T.unsafe(nil)); end - - # source://tapioca//lib/tapioca/commands/dsl.rb#215 - sig { params(compiler_names: T::Array[::String]).returns(T::Array[T.class_of(Tapioca::Dsl::Compiler)]) } - def constantize_compilers(compiler_names); end - - # source://tapioca//lib/tapioca/commands/dsl.rb#390 - sig { returns(T::Array[::String]) } - def constants_from_requested_paths; end - - # source://tapioca//lib/tapioca/commands/dsl.rb#163 - sig { returns(::Tapioca::Dsl::Pipeline) } - def create_pipeline; end - - # source://tapioca//lib/tapioca/commands/dsl.rb#293 - sig { params(constant_name: ::String).returns(::Pathname) } - def dsl_rbi_filename(constant_name); end - - # source://tapioca//lib/tapioca/commands/dsl.rb#178 - sig { params(requested_constants: T::Array[::String], path: ::Pathname).returns(T::Set[::Pathname]) } - def existing_rbi_filenames(requested_constants, path: T.unsafe(nil)); end - - # source://tapioca//lib/tapioca/commands/dsl.rb#385 - sig { params(constant: ::String).returns(::String) } - def generate_command_for(constant); end - - # source://tapioca//lib/tapioca/commands/dsl.rb#272 - sig { params(dir: ::Pathname).void } - def perform_dsl_verification(dir); end - - # source://tapioca//lib/tapioca/commands/dsl.rb#281 - sig { params(files: T::Set[::Pathname]).void } - def purge_stale_dsl_rbi_files(files); end - - # source://tapioca//lib/tapioca/commands/dsl.rb#380 - sig { params(constant: ::String).returns(::String) } - def rbi_filename_for(constant); end - - # source://tapioca//lib/tapioca/commands/dsl.rb#361 - sig { params(path: ::Pathname).returns(T::Array[::Pathname]) } - def rbi_files_in(path); end - - # source://tapioca//lib/tapioca/commands/dsl.rb#339 - sig { params(diff: T::Hash[::String, ::Symbol], command: ::Symbol).void } - def report_diff_and_exit_if_out_of_date(diff, command); end - - # source://tapioca//lib/tapioca/commands/dsl.rb#234 - sig { params(name: ::String).returns(T.nilable(T.class_of(Tapioca::Dsl::Compiler))) } - def resolve(name); end - - # source://tapioca//lib/tapioca/commands/dsl.rb#368 - sig { params(class_name: ::String).returns(::String) } - def underscore(class_name); end - - # source://tapioca//lib/tapioca/commands/dsl.rb#298 - sig { params(tmp_dir: ::Pathname).returns(T::Hash[::String, ::Symbol]) } - def verify_dsl_rbi(tmp_dir:); end + # source://tapioca//lib/tapioca/commands/dsl_generate.rb#10 + sig { override.void } + def execute; end end -# source://tapioca//lib/tapioca/commands/gem.rb#6 -class Tapioca::Commands::Gem < ::Tapioca::Commands::Command - include ::Tapioca::SorbetHelper - include ::Tapioca::RBIFilesHelper - - # source://tapioca//lib/tapioca/commands/gem.rb#29 - sig do - params( - gem_names: T::Array[::String], - exclude: T::Array[::String], - prerequire: T.nilable(::String), - postrequire: ::String, - typed_overrides: T::Hash[::String, ::String], - outpath: ::Pathname, - file_header: T::Boolean, - include_doc: T::Boolean, - include_loc: T::Boolean, - include_exported_rbis: T::Boolean, - number_of_workers: T.nilable(::Integer), - auto_strictness: T::Boolean, - dsl_dir: ::String, - rbi_formatter: ::Tapioca::RBIFormatter, - halt_upon_load_error: T::Boolean - ).void - end - def initialize(gem_names:, exclude:, prerequire:, postrequire:, typed_overrides:, outpath:, file_header:, include_doc:, include_loc:, include_exported_rbis:, number_of_workers: T.unsafe(nil), auto_strictness: T.unsafe(nil), dsl_dir: T.unsafe(nil), rbi_formatter: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil)); end +# source://tapioca//lib/tapioca/commands/dsl_verify.rb#6 +class Tapioca::Commands::DslVerify < ::Tapioca::Commands::AbstractDsl + private - # source://tapioca//lib/tapioca/commands/gem.rb#70 + # source://tapioca//lib/tapioca/commands/dsl_verify.rb#10 sig { override.void } def execute; end +end - # source://tapioca//lib/tapioca/commands/gem.rb#109 - sig { params(should_verify: T::Boolean, exclude: T::Array[::String]).void } - def sync(should_verify: T.unsafe(nil), exclude: T.unsafe(nil)); end - +# source://tapioca//lib/tapioca/commands/gem_generate.rb#6 +class Tapioca::Commands::GemGenerate < ::Tapioca::Commands::AbstractGem private - # source://tapioca//lib/tapioca/commands/gem.rb#288 - sig { returns(T::Array[::String]) } - def added_rbis; end - - # source://tapioca//lib/tapioca/commands/gem.rb#349 - sig { params(cause: ::Symbol, files: T::Array[::String]).returns(::String) } - def build_error_for_files(cause, files); end - - # source://tapioca//lib/tapioca/commands/gem.rb#158 - sig { params(gem: ::Tapioca::Gemfile::GemSpec).void } - def compile_gem_rbi(gem); end - - # source://tapioca//lib/tapioca/commands/gem.rb#283 - sig { params(gem_name: ::String).returns(::Pathname) } - def existing_rbi(gem_name); end - - # source://tapioca//lib/tapioca/commands/gem.rb#331 - sig { returns(T::Hash[::String, ::String]) } - def existing_rbis; end - - # source://tapioca//lib/tapioca/commands/gem.rb#295 - sig { params(gem_name: ::String).returns(::Pathname) } - def expected_rbi(gem_name); end - - # source://tapioca//lib/tapioca/commands/gem.rb#337 - sig { returns(T::Hash[::String, ::String]) } - def expected_rbis; end - - # source://tapioca//lib/tapioca/commands/gem.rb#300 - sig { params(gem_name: ::String).returns(T::Boolean) } - def gem_rbi_exists?(gem_name); end - - # source://tapioca//lib/tapioca/commands/gem.rb#344 - sig { params(gem_name: ::String, version: ::String).returns(::Pathname) } - def gem_rbi_filename(gem_name, version); end + # source://tapioca//lib/tapioca/commands/gem_generate.rb#10 + sig { override.void } + def execute; end +end - # source://tapioca//lib/tapioca/commands/gem.rb#143 - sig { params(gem_names: T::Array[::String]).returns(T::Array[::Tapioca::Gemfile::GemSpec]) } - def gems_to_generate(gem_names); end +# source://tapioca//lib/tapioca/commands/gem_sync.rb#6 +class Tapioca::Commands::GemSync < ::Tapioca::Commands::AbstractGem + private - # source://tapioca//lib/tapioca/commands/gem.rb#354 - sig { params(gem: ::Tapioca::Gemfile::GemSpec, file: ::RBI::File).void } - def merge_with_exported_rbi(gem, file); end + # source://tapioca//lib/tapioca/commands/gem_sync.rb#10 + sig { override.void } + def execute; end +end - # source://tapioca//lib/tapioca/commands/gem.rb#325 - sig { params(old_filename: ::Pathname, new_filename: ::Pathname).void } - def move(old_filename, new_filename); end +# source://tapioca//lib/tapioca/commands/gem_verify.rb#6 +class Tapioca::Commands::GemVerify < ::Tapioca::Commands::AbstractGem + private - # source://tapioca//lib/tapioca/commands/gem.rb#235 - sig { void } - def perform_additions; end + # source://tapioca//lib/tapioca/commands/gem_verify.rb#10 + sig { override.void } + def execute; end - # source://tapioca//lib/tapioca/commands/gem.rb#208 + # source://tapioca//lib/tapioca/commands/gem_verify.rb#17 sig { void } - def perform_removals; end - - # source://tapioca//lib/tapioca/commands/gem.rb#189 - sig { params(exclude: T::Array[::String]).void } - def perform_sync_verification(exclude: T.unsafe(nil)); end - - # source://tapioca//lib/tapioca/commands/gem.rb#278 - sig { returns(T::Array[::String]) } - def removed_rbis; end - - # source://tapioca//lib/tapioca/commands/gem.rb#305 - sig { params(diff: T::Hash[::String, ::Symbol], command: ::Symbol).void } - def report_diff_and_exit_if_out_of_date(diff, command); end + def perform_sync_verification; end end # source://tapioca//lib/tapioca/commands/require.rb#6 @@ -916,7 +1014,9 @@ class Tapioca::Commands::Require < ::Tapioca::Commands::CommandWithoutTracker sig { params(requires_path: ::String, sorbet_config_path: ::String).void } def initialize(requires_path:, sorbet_config_path:); end - # source://tapioca//lib/tapioca/commands/require.rb#21 + private + + # source://tapioca//lib/tapioca/commands/require.rb#23 sig { override.void } def execute; end end @@ -925,25 +1025,32 @@ end class Tapioca::Commands::Todo < ::Tapioca::Commands::CommandWithoutTracker include ::Tapioca::SorbetHelper - # source://tapioca//lib/tapioca/commands/todo.rb#15 + # source://tapioca//lib/tapioca/commands/todo.rb#26 sig { params(todo_file: ::String, file_header: T::Boolean).void } def initialize(todo_file:, file_header:); end - # source://tapioca//lib/tapioca/commands/todo.rb#23 - sig { override.void } - def execute; end + # source://tapioca//lib/tapioca/commands/todo.rb#34 + sig { void } + def run_with_deprecation; end private - # source://tapioca//lib/tapioca/commands/todo.rb#49 + # source://tapioca//lib/tapioca/commands/todo.rb#44 + sig { override.void } + def execute; end + + # source://tapioca//lib/tapioca/commands/todo.rb#68 sig { params(constants: T::Array[::String], command: ::String).returns(::RBI::File) } def rbi(constants, command:); end - # source://tapioca//lib/tapioca/commands/todo.rb#69 + # source://tapioca//lib/tapioca/commands/todo.rb#88 sig { returns(T::Array[::String]) } def unresolved_constants; end end +# source://tapioca//lib/tapioca/commands/todo.rb#9 +Tapioca::Commands::Todo::DEPRECATION_MESSAGE = T.let(T.unsafe(nil), String) + # source://tapioca//lib/tapioca/helpers/config_helper.rb#5 module Tapioca::ConfigHelper requires_ancestor { Thor } @@ -1014,7 +1121,7 @@ class Tapioca::ConfigHelper::ConfigError < ::T::Struct const :message_parts, T::Array[::Tapioca::ConfigHelper::ConfigErrorMessagePart] class << self - # source://sorbet-runtime/0.5.10908/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11109/lib/types/struct.rb#13 def inherited(s); end end end @@ -1025,7 +1132,7 @@ class Tapioca::ConfigHelper::ConfigErrorMessagePart < ::T::Struct const :colors, T::Array[::Symbol] class << self - # source://sorbet-runtime/0.5.10908/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11109/lib/types/struct.rb#13 def inherited(s); end end end @@ -1082,17 +1189,17 @@ class Tapioca::Dsl::Compiler ConstantType = type_member { { upper: Module } } - # source://tapioca//lib/tapioca/dsl/compiler.rb#60 + # source://tapioca//lib/tapioca/dsl/compiler.rb#64 sig { params(pipeline: ::Tapioca::Dsl::Pipeline, root: ::RBI::Tree, constant: ConstantType).void } def initialize(pipeline, root, constant); end # NOTE: This should eventually accept an `Error` object or `Exception` rather than simply a `String`. # - # source://tapioca//lib/tapioca/dsl/compiler.rb#77 + # source://tapioca//lib/tapioca/dsl/compiler.rb#81 sig { params(error: ::String).void } def add_error(error); end - # source://tapioca//lib/tapioca/dsl/compiler.rb#68 + # source://tapioca//lib/tapioca/dsl/compiler.rb#72 sig { params(compiler_name: ::String).returns(T::Boolean) } def compiler_enabled?(compiler_name); end @@ -1102,7 +1209,7 @@ class Tapioca::Dsl::Compiler # @abstract # - # source://tapioca//lib/tapioca/dsl/compiler.rb#73 + # source://tapioca//lib/tapioca/dsl/compiler.rb#77 sig { abstract.void } def decorate; end @@ -1112,21 +1219,21 @@ class Tapioca::Dsl::Compiler private - # source://tapioca//lib/tapioca/dsl/compiler.rb#126 + # source://tapioca//lib/tapioca/dsl/compiler.rb#130 sig { params(method_def: T.any(::Method, ::UnboundMethod)).returns(T::Array[::RBI::TypedParam]) } def compile_method_parameters_to_rbi(method_def); end - # source://tapioca//lib/tapioca/dsl/compiler.rb#162 + # source://tapioca//lib/tapioca/dsl/compiler.rb#166 sig { params(method_def: T.any(::Method, ::UnboundMethod)).returns(::String) } def compile_method_return_type_to_rbi(method_def); end - # source://tapioca//lib/tapioca/dsl/compiler.rb#116 + # source://tapioca//lib/tapioca/dsl/compiler.rb#120 sig { params(scope: ::RBI::Scope, method_def: T.any(::Method, ::UnboundMethod), class_method: T::Boolean).void } def create_method_from_def(scope, method_def, class_method: T.unsafe(nil)); end # Get the types of each parameter from a method signature # - # source://tapioca//lib/tapioca/dsl/compiler.rb#90 + # source://tapioca//lib/tapioca/dsl/compiler.rb#94 sig { params(method_def: T.any(::Method, ::UnboundMethod), signature: T.untyped).returns(T::Array[::String]) } def parameters_types_from_signature(method_def, signature); end @@ -1151,7 +1258,7 @@ class Tapioca::Dsl::Compiler sig { returns(T::Enumerable[T::Class[T.anything]]) } def all_classes; end - # source://tapioca//lib/tapioca/dsl/compiler.rb#53 + # source://tapioca//lib/tapioca/dsl/compiler.rb#55 sig { returns(T::Enumerable[::Module]) } def all_modules; end end @@ -1228,15 +1335,15 @@ class Tapioca::Dsl::Pipeline private - # source://tapioca//lib/tapioca/dsl/pipeline.rb#193 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#195 sig { void } def abort_if_pending_migrations!; end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#139 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#141 sig { params(constants: T::Set[::Module]).returns(T::Set[::Module]) } def filter_anonymous_and_reloaded_constants(constants); end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#122 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#124 sig do params( requested_compilers: T::Array[T.class_of(Tapioca::Dsl::Compiler)], @@ -1245,7 +1352,7 @@ class Tapioca::Dsl::Pipeline end def gather_active_compilers(requested_compilers, excluded_compilers); end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#130 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#132 sig do params( requested_constants: T::Array[::Module], @@ -1254,11 +1361,11 @@ class Tapioca::Dsl::Pipeline end def gather_constants(requested_constants, requested_paths); end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#167 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#169 sig { params(constant: ::Module).returns(T.nilable(::RBI::File)) } def rbi_for_constant(constant); end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#186 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#188 sig { params(error: ::String).returns(T.noreturn) } def report_error(error); end end @@ -1796,7 +1903,7 @@ class Tapioca::Gem::Pipeline sig { returns(::RBI::Tree) } def compile; end - # source://tapioca//lib/tapioca/gem/pipeline.rb#110 + # source://tapioca//lib/tapioca/gem/pipeline.rb#119 sig { params(name: T.any(::String, ::Symbol)).returns(T::Boolean) } def constant_in_gem?(name); end @@ -1804,31 +1911,33 @@ class Tapioca::Gem::Pipeline sig { returns(::Tapioca::Gemfile::GemSpec) } def gem; end - # source://tapioca//lib/tapioca/gem/pipeline.rb#122 + # source://tapioca//lib/tapioca/gem/pipeline.rb#137 sig { params(method: ::UnboundMethod).returns(T::Boolean) } def method_in_gem?(method); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#130 + # Helpers + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#147 sig { params(constant: ::Module).returns(T.nilable(::String)) } def name_of(constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#69 + # source://tapioca//lib/tapioca/gem/pipeline.rb#71 sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Const).void } def push_const(symbol, constant, node); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#59 + # source://tapioca//lib/tapioca/gem/pipeline.rb#61 sig { params(symbol: ::String, constant: ::BasicObject).void } def push_constant(symbol, constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#64 + # source://tapioca//lib/tapioca/gem/pipeline.rb#66 sig { params(symbol: ::String, constant: ::Module).void } def push_foreign_constant(symbol, constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#83 + # source://tapioca//lib/tapioca/gem/pipeline.rb#85 sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Scope).void } def push_foreign_scope(symbol, constant, node); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#97 + # source://tapioca//lib/tapioca/gem/pipeline.rb#99 sig do params( symbol: ::String, @@ -1841,103 +1950,148 @@ class Tapioca::Gem::Pipeline end def push_method(symbol, constant, method, node, signature, parameters); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#76 + # source://tapioca//lib/tapioca/gem/pipeline.rb#78 sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Scope).void } def push_scope(symbol, constant, node); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#54 + # Events handling + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#56 sig { params(symbol: ::String).void } def push_symbol(symbol); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#102 + # Constants and properties filtering + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#106 sig { params(symbol_name: ::String).returns(T::Boolean) } def symbol_in_payload?(symbol_name); end private - # source://tapioca//lib/tapioca/gem/pipeline.rb#376 + # source://tapioca//lib/tapioca/gem/pipeline.rb#441 sig { params(name: ::String).void } def add_to_alias_namespace(name); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#381 + # source://tapioca//lib/tapioca/gem/pipeline.rb#446 sig { params(name: ::String).returns(T::Boolean) } def alias_namespaced?(name); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#225 + # source://tapioca//lib/tapioca/gem/pipeline.rb#244 sig { params(name: ::String, constant: ::Module).void } def compile_alias(name, constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#211 + # source://tapioca//lib/tapioca/gem/pipeline.rb#230 sig { params(symbol: ::String, constant: ::BasicObject).void } def compile_constant(symbol, constant); end - # Compile + # Compiling # - # source://tapioca//lib/tapioca/gem/pipeline.rb#206 + # source://tapioca//lib/tapioca/gem/pipeline.rb#219 sig { params(symbol: ::String, constant: ::Module).void } def compile_foreign_constant(symbol, constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#283 - sig { params(name: ::String, constant: ::Module, foreign_constant: T::Boolean).void } - def compile_module(name, constant, foreign_constant: T.unsafe(nil)); end + # source://tapioca//lib/tapioca/gem/pipeline.rb#300 + sig { params(name: ::String, constant: ::Module).void } + def compile_module(name, constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#247 + # source://tapioca//lib/tapioca/gem/pipeline.rb#265 sig { params(name: ::String, value: ::BasicObject).void } def compile_object(name, value); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#308 + # source://tapioca//lib/tapioca/gem/pipeline.rb#311 + sig { params(name: ::String, constant: ::Module).returns(::RBI::Scope) } + def compile_scope(name, constant); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#325 sig { params(constant: T::Class[T.anything]).returns(T.nilable(::String)) } def compile_superclass(constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#357 + # source://tapioca//lib/tapioca/gem/pipeline.rb#422 sig { params(constant: ::Module, strict: T::Boolean).returns(T::Boolean) } def defined_in_gem?(constant, strict: T.unsafe(nil)); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#158 + # source://tapioca//lib/tapioca/gem/pipeline.rb#177 sig { params(event: ::Tapioca::Gem::Event).void } def dispatch(event); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#398 + # Helpers + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#465 sig { params(constant: T.all(::Module, ::T::Generic)).returns(::String) } def generic_name_of(constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#369 + # source://tapioca//lib/tapioca/gem/pipeline.rb#434 sig { params(constant: ::Module).returns(T::Set[::String]) } def get_file_candidates(constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#145 + # source://tapioca//lib/tapioca/gem/pipeline.rb#162 sig { params(gem: ::Tapioca::Gemfile::GemSpec).returns(T::Set[::String]) } def load_bootstrap_symbols(gem); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#388 - sig { params(name: ::String).void } - def mark_seen(name); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#414 + # source://tapioca//lib/tapioca/gem/pipeline.rb#481 sig { params(constant: ::Module, class_name: T.nilable(::String)).returns(T.nilable(::String)) } def name_of_proxy_target(constant, class_name); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#153 + # Events handling + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#172 sig { returns(::Tapioca::Gem::Event) } def next_event; end - # source://tapioca//lib/tapioca/gem/pipeline.rb#181 + # source://tapioca//lib/tapioca/gem/pipeline.rb#200 sig { params(event: ::Tapioca::Gem::ConstantFound).void } def on_constant(event); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#199 + # source://tapioca//lib/tapioca/gem/pipeline.rb#212 sig { params(event: ::Tapioca::Gem::NodeAdded).void } def on_node(event); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#172 + # source://tapioca//lib/tapioca/gem/pipeline.rb#191 sig { params(event: ::Tapioca::Gem::SymbolFound).void } def on_symbol(event); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#393 + # source://tapioca//lib/tapioca/gem/pipeline.rb#453 + sig { params(name: ::String).void } + def seen!(name); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#458 sig { params(name: ::String).returns(T::Boolean) } def seen?(name); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#393 + sig { params(name: ::String, constant: ::Module).returns(T::Boolean) } + def skip_alias?(name, constant); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#381 + sig { params(name: ::String, constant: T.anything).returns(T::Boolean) } + def skip_constant?(name, constant); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#409 + sig { params(name: ::String, constant: ::Module).returns(T::Boolean) } + def skip_foreign_constant?(name, constant); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#414 + sig { params(name: ::String, constant: ::Module).returns(T::Boolean) } + def skip_module?(name, constant); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#401 + sig { params(name: ::String, constant: ::BasicObject).returns(T::Boolean) } + def skip_object?(name, constant); end + + # Constants and properties filtering + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#376 + sig { params(name: ::String).returns(T::Boolean) } + def skip_symbol?(name); end end +# this looks something like: +# "(eval at /path/to/file.rb:123)" +# and we are just interested in the "/path/to/file.rb" part +# +# source://tapioca//lib/tapioca/gem/pipeline.rb#116 +Tapioca::Gem::Pipeline::EVAL_SOURCE_FILE_PATTERN = T.let(T.unsafe(nil), Regexp) + # source://tapioca//lib/tapioca/gem/pipeline.rb#11 Tapioca::Gem::Pipeline::IGNORED_SYMBOLS = T.let(T.unsafe(nil), Array) @@ -2058,19 +2212,23 @@ class Tapioca::Gemfile::GemSpec sig { params(other: ::BasicObject).returns(T::Boolean) } def ==(other); end - # source://tapioca//lib/tapioca/gemfile.rb#165 + # source://tapioca//lib/tapioca/gemfile.rb#170 sig { params(path: ::String).returns(T::Boolean) } def contains_path?(path); end - # source://tapioca//lib/tapioca/gemfile.rb#184 + # source://tapioca//lib/tapioca/gemfile.rb#160 + sig { returns(T::Array[::Gem::Dependency]) } + def dependencies; end + + # source://tapioca//lib/tapioca/gemfile.rb#189 sig { returns(T::Boolean) } def export_rbi_files?; end - # source://tapioca//lib/tapioca/gemfile.rb#179 + # source://tapioca//lib/tapioca/gemfile.rb#184 sig { returns(T::Array[::String]) } def exported_rbi_files; end - # source://tapioca//lib/tapioca/gemfile.rb#189 + # source://tapioca//lib/tapioca/gemfile.rb#194 sig { returns(::RBI::MergeTree) } def exported_rbi_tree; end @@ -2090,15 +2248,15 @@ class Tapioca::Gemfile::GemSpec sig { returns(::String) } def name; end - # source://tapioca//lib/tapioca/gemfile.rb#174 + # source://tapioca//lib/tapioca/gemfile.rb#179 sig { void } def parse_yard_docs; end - # source://tapioca//lib/tapioca/gemfile.rb#160 + # source://tapioca//lib/tapioca/gemfile.rb#165 sig { returns(::String) } def rbi_file_name; end - # source://tapioca//lib/tapioca/gemfile.rb#201 + # source://tapioca//lib/tapioca/gemfile.rb#206 sig { params(file: ::Pathname).returns(::Pathname) } def relative_path_for(file); end @@ -2109,31 +2267,31 @@ class Tapioca::Gemfile::GemSpec private - # source://tapioca//lib/tapioca/gemfile.rb#212 + # source://tapioca//lib/tapioca/gemfile.rb#217 sig { returns(T::Array[::Pathname]) } def collect_files; end - # source://tapioca//lib/tapioca/gemfile.rb#227 + # source://tapioca//lib/tapioca/gemfile.rb#232 sig { returns(T.nilable(T::Boolean)) } def default_gem?; end - # source://tapioca//lib/tapioca/gemfile.rb#285 + # source://tapioca//lib/tapioca/gemfile.rb#291 sig { returns(T::Boolean) } def gem_ignored?; end - # source://tapioca//lib/tapioca/gemfile.rb#264 + # source://tapioca//lib/tapioca/gemfile.rb#270 sig { params(path: ::String).returns(T::Boolean) } def has_parent_gemspec?(path); end - # source://tapioca//lib/tapioca/gemfile.rb#232 + # source://tapioca//lib/tapioca/gemfile.rb#237 sig { returns(::Regexp) } def require_paths_prefix_matcher; end - # source://tapioca//lib/tapioca/gemfile.rb#243 + # source://tapioca//lib/tapioca/gemfile.rb#249 sig { params(file: ::String).returns(::Pathname) } def resolve_to_ruby_lib_dir(file); end - # source://tapioca//lib/tapioca/gemfile.rb#257 + # source://tapioca//lib/tapioca/gemfile.rb#263 sig { returns(::String) } def version_string; end @@ -2172,11 +2330,11 @@ class Tapioca::Loaders::Dsl < ::Tapioca::Loaders::Loader protected - # source://tapioca//lib/tapioca/loaders/dsl.rb#71 + # source://tapioca//lib/tapioca/loaders/dsl.rb#81 sig { void } def load_application; end - # source://tapioca//lib/tapioca/loaders/dsl.rb#53 + # source://tapioca//lib/tapioca/loaders/dsl.rb#63 sig { void } def load_dsl_compilers; end @@ -2263,13 +2421,13 @@ class Tapioca::Loaders::Loader private - # source://tapioca//lib/tapioca/loaders/loader.rb#198 + # source://tapioca//lib/tapioca/loaders/loader.rb#213 sig { void } def eager_load_rails_app; end # @return [Array] # - # source://tapioca//lib/tapioca/loaders/loader.rb#169 + # source://tapioca//lib/tapioca/loaders/loader.rb#171 def engines; end # source://tapioca//lib/tapioca/loaders/loader.rb#29 @@ -2283,11 +2441,11 @@ class Tapioca::Loaders::Loader end def load_bundle(gemfile, initialize_file, require_file, halt_upon_load_error); end - # source://tapioca//lib/tapioca/loaders/loader.rb#127 + # source://tapioca//lib/tapioca/loaders/loader.rb#129 sig { void } def load_engines_in_classic_mode; end - # source://tapioca//lib/tapioca/loaders/loader.rb#105 + # source://tapioca//lib/tapioca/loaders/loader.rb#107 sig { void } def load_engines_in_zeitwerk_mode; end @@ -2306,26 +2464,37 @@ class Tapioca::Loaders::Loader sig { void } def load_rails_engines; end - # source://tapioca//lib/tapioca/loaders/loader.rb#219 + # 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 + # + # Here we make sure that the new `all_eager_load_paths` is always defined for every Rails version below 7.2, so + # that we can use it everywhere + # + # source://tapioca//lib/tapioca/loaders/loader.rb#191 + def normalize_eager_load_paths_configuration!; end + + # source://tapioca//lib/tapioca/loaders/loader.rb#234 sig { params(file: T.nilable(::String)).void } def require_helper(file); end - # source://tapioca//lib/tapioca/loaders/loader.rb#94 + # source://tapioca//lib/tapioca/loaders/loader.rb#96 def run_initializers; end - # source://tapioca//lib/tapioca/loaders/loader.rb#183 + # source://tapioca//lib/tapioca/loaders/loader.rb#198 sig { params(path: ::String).void } def safe_require(path); end - # source://tapioca//lib/tapioca/loaders/loader.rb#190 + # source://tapioca//lib/tapioca/loaders/loader.rb#205 sig { void } def silence_deprecations; end - # source://tapioca//lib/tapioca/loaders/loader.rb#152 + # source://tapioca//lib/tapioca/loaders/loader.rb#154 sig { params(blk: T.proc.void).void } def with_rails_application(&blk); end - # source://tapioca//lib/tapioca/loaders/loader.rb#145 + # source://tapioca//lib/tapioca/loaders/loader.rb#147 sig { returns(T::Boolean) } def zeitwerk_mode?; end end @@ -3166,7 +3335,7 @@ module Tapioca::Static::SymbolLoader sig { returns(T::Array[T.class_of(Rails::Engine)]) } def engines; end - # source://tapioca//lib/tapioca/static/symbol_loader.rb#73 + # source://tapioca//lib/tapioca/static/symbol_loader.rb#74 sig { params(input: ::String, table_type: ::String).returns(::String) } def symbol_table_json_from(input, table_type: T.unsafe(nil)); end end @@ -3241,11 +3410,11 @@ class Tapioca::TypeVariableModule < ::Module end def initialize(context, type, variance, fixed, lower, upper, bounds_proc); end - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#231 + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#218 sig { returns(::Tapioca::TypeVariable) } def coerce_to_type_variable; end - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#211 + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#198 sig { returns(T::Boolean) } def fixed?; end @@ -3253,7 +3422,7 @@ class Tapioca::TypeVariableModule < ::Module sig { returns(T.nilable(::String)) } def name; end - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#216 + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#203 sig { returns(::String) } def serialize; end @@ -3263,11 +3432,11 @@ class Tapioca::TypeVariableModule < ::Module private - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#265 + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#238 sig { returns(T::Hash[::Symbol, T.untyped]) } def bounds; end - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#241 + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#228 sig do params( fixed: T.untyped, @@ -3276,15 +3445,6 @@ class Tapioca::TypeVariableModule < ::Module ).returns(T.proc.returns(T::Hash[::Symbol, T.untyped])) end def build_bounds_proc(fixed, lower, upper); end - - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#255 - sig do - type_parameters(:Result) - .params( - block: T.proc.returns(T.type_parameter(:Result)) - ).returns(T.type_parameter(:Result)) - end - def with_bound_name_pre_3_0(&block); end end # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#154 diff --git a/sorbet/rbi/gems/thor@1.2.2.rbi b/sorbet/rbi/gems/thor@1.3.0.rbi similarity index 80% rename from sorbet/rbi/gems/thor@1.2.2.rbi rename to sorbet/rbi/gems/thor@1.3.0.rbi index dcb11ee22..9ed8f62fc 100644 --- a/sorbet/rbi/gems/thor@1.2.2.rbi +++ b/sorbet/rbi/gems/thor@1.3.0.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#193 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#193 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#146 def chmod(path, mode, config = T.unsafe(nil)); end # Comment all lines matching a given regex. It will leave the space @@ -538,7 +737,7 @@ 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#310 def comment_lines(path, flag, *args); end # ==== Examples @@ -673,17 +872,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#82 def get(source, *args, &block); end # Run a regular expression replacement on a file. @@ -703,7 +905,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#263 def gsub_file(path, flag, *args, &block); end # Goes to the root and execute the given block. @@ -728,7 +930,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#217 def inject_into_class(path, klass, *args, &block); end # source://thor//lib/thor/actions/inject_into_file.rb#26 @@ -751,7 +953,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#240 def inject_into_module(path, module_name, *args, &block); end # source://thor//lib/thor/actions/inject_into_file.rb#26 @@ -803,7 +1005,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#171 def prepend_file(path, *args, &block); end # Prepend text to a file. Since it depends on insert_into_file, it's reversible. @@ -821,7 +1023,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#171 def prepend_to_file(path, *args, &block); end # Returns the given path relative to the absolute root (ie, root where @@ -841,7 +1043,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#327 def remove_dir(path, config = T.unsafe(nil)); end # Removes a file at the given location. @@ -855,7 +1057,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#327 def remove_file(path, config = T.unsafe(nil)); end # Executes a command returning the contents of the command. @@ -871,7 +1073,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 +1082,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 +1105,7 @@ module Thor::Actions # # template "doc/README" # - # source://thor//lib/thor/actions/file_manipulation.rb#115 + # source://thor//lib/thor/actions/file_manipulation.rb#118 def template(source, *args, &block); end # Run a thor command. A hash of options can be given and it's converted to @@ -924,7 +1126,7 @@ 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 @@ -940,40 +1142,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#291 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#348 def capture(*args); end - # source://thor//lib/thor/actions/file_manipulation.rb#346 + # source://thor//lib/thor/actions/file_manipulation.rb#344 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#339 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#339 def output_buffer=(_arg0); end - # source://thor//lib/thor/actions/file_manipulation.rb#354 + # source://thor//lib/thor/actions/file_manipulation.rb#352 def with_output_buffer(buf = T.unsafe(nil)); end class << self @@ -985,9 +1187,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#364 class Thor::Actions::CapturableERB < ::ERB - # source://thor//lib/thor/actions/file_manipulation.rb#367 + # source://thor//lib/thor/actions/file_manipulation.rb#365 def set_eoutvar(compiler, eoutvar = T.unsafe(nil)); end end @@ -1043,12 +1245,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 +1259,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 +1463,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 +1507,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 +1541,9 @@ class Thor::Argument # source://thor//lib/thor/parser/argument.rb#5 def enum; end + # source://thor//lib/thor/parser/argument.rb#55 + def enum_to_s; end + # Returns the value of attribute name. # # source://thor//lib/thor/parser/argument.rb#5 @@ -1341,6 +1554,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 +1564,12 @@ class Thor::Argument # @return [Boolean] # - # source://thor//lib/thor/parser/argument.rb#31 + # source://thor//lib/thor/parser/argument.rb#42 def required?; end # @return [Boolean] # - # source://thor//lib/thor/parser/argument.rb#35 + # source://thor//lib/thor/parser/argument.rb#46 def show_default?; end # Returns the value of attribute type. @@ -1361,22 +1577,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#38 def usage; end protected - # source://thor//lib/thor/parser/argument.rb#55 + # source://thor//lib/thor/parser/argument.rb#74 def default_banner; end # @return [Boolean] # - # source://thor//lib/thor/parser/argument.rb#51 + # source://thor//lib/thor/parser/argument.rb#70 def valid_type?(type); end # @raise [ArgumentError] # - # source://thor//lib/thor/parser/argument.rb#46 + # source://thor//lib/thor/parser/argument.rb#65 def validate!; end end @@ -1392,10 +1608,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 +1620,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 +1647,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 +1659,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 +1674,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 +1706,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 +1773,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 +1800,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 +1808,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 +1821,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 +1830,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 +1874,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 +1882,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 +2008,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 +2020,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 +2029,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 +2037,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 +2053,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 +2093,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 +2115,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 +2145,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 +2158,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 +2171,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 +2185,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 +2198,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 +2213,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 +2228,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 +2239,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 +2248,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 +2272,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 +2280,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 +2295,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 +2306,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 +2407,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 +2521,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 +2561,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 +2597,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 +2776,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 +2938,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 +3051,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 +3078,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 +3093,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 +3104,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 +3120,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 +3128,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 +3144,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 +3214,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 +3254,50 @@ 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. # - # source://thor//lib/thor/parser/options.rb#217 + # source://thor//lib/thor/parser/options.rb#255 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#273 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 +3361,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 +3450,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. @@ -3147,19 +3489,19 @@ class Thor::Shell::Basic # # 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 +3509,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,24 +3520,24 @@ 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 @@ -3203,17 +3545,17 @@ class Thor::Shell::Basic # # @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 +3563,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 +3574,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 +3588,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 @@ -3255,7 +3598,7 @@ class Thor::Shell::Basic # ==== Example # 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 @@ -3265,7 +3608,7 @@ class Thor::Shell::Basic # ==== Example # 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 +3616,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 # "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#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#296 + def file_collision_help(block_given); 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,139 +3731,145 @@ 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 @@ -3551,7 +3879,7 @@ class Thor::Shell::HTML < ::Thor::Shell::Basic # # @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 +3887,174 @@ 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#120 + def as_unicode; end + + # 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#115 + 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 +4063,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 +4186,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 +4201,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 +4264,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 +4305,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 +4326,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 +4336,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/traces@0.10.0.rbi b/sorbet/rbi/gems/traces@0.11.1.rbi similarity index 70% rename from sorbet/rbi/gems/traces@0.10.0.rbi rename to sorbet/rbi/gems/traces@0.11.1.rbi index e16d04cdc..aaca5354d 100644 --- a/sorbet/rbi/gems/traces@0.10.0.rbi +++ b/sorbet/rbi/gems/traces@0.11.1.rbi @@ -9,7 +9,7 @@ module Traces class << self # Extend the specified class in order to emit traces. # - # source://traces//lib/traces/provider.rb#59 + # source://traces//lib/traces/provider.rb#39 def Provider(klass, &block); end # @return [Boolean] @@ -24,18 +24,6 @@ module Traces end end -# source://traces//lib/traces/provider.rb#24 -module Traces::Deprecated - # source://traces//lib/traces/provider.rb#25 - def trace(*_arg0, **_arg1, &_arg2); end - - # source://traces//lib/traces/provider.rb#30 - def trace_context; end - - # source://traces//lib/traces/provider.rb#35 - def trace_context=(value); end -end - # source://traces//lib/traces/provider.rb#14 module Traces::Provider; end 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 a88509427..000000000 --- a/sorbet/rbi/gems/unparser@0.6.8.rbi +++ /dev/null @@ -1,8 +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`. - -# THIS IS AN EMPTY RBI FILE. -# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/webrick@1.8.1.rbi b/sorbet/rbi/gems/webrick@1.8.1.rbi new file mode 100644 index 000000000..3f6a1bc6f --- /dev/null +++ b/sorbet/rbi/gems/webrick@1.8.1.rbi @@ -0,0 +1,2604 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `webrick` gem. +# Please instead update this file by running `bin/tapioca gem webrick`. + +# AccessLog provides logging to various files in various formats. +# +# Multiple logs may be written to at the same time: +# +# access_log = [ +# [$stderr, WEBrick::AccessLog::COMMON_LOG_FORMAT], +# [$stderr, WEBrick::AccessLog::REFERER_LOG_FORMAT], +# ] +# +# server = WEBrick::HTTPServer.new :AccessLog => access_log +# +# Custom log formats may be defined. WEBrick::AccessLog provides a subset +# of the formatting from Apache's mod_log_config +# http://httpd.apache.org/docs/mod/mod_log_config.html#formats. See +# AccessLog::setup_params for a list of supported options +# +# source://webrick//lib/webrick/accesslog.rb#30 +module WEBrick::AccessLog + private + + # Escapes control characters in +data+ + # + # source://webrick//lib/webrick/accesslog.rb#151 + def escape(data); end + + # Formats +params+ according to +format_string+ which is described in + # setup_params. + # + # source://webrick//lib/webrick/accesslog.rb#123 + def format(format_string, params); end + + # This format specification is a subset of mod_log_config of Apache: + # + # %a:: Remote IP address + # %b:: Total response size + # %e{variable}:: Given variable in ENV + # %f:: Response filename + # %h:: Remote host name + # %{header}i:: Given request header + # %l:: Remote logname, always "-" + # %m:: Request method + # %{attr}n:: Given request attribute from req.attributes + # %{header}o:: Given response header + # %p:: Server's request port + # %{format}p:: The canonical port of the server serving the request or the + # actual port or the client's actual port. Valid formats are + # canonical, local or remote. + # %q:: Request query string + # %r:: First line of the request + # %s:: Request status + # %t:: Time the request was received + # %T:: Time taken to process the request + # %u:: Remote user from auth + # %U:: Unparsed URI + # %%:: Literal % + # + # source://webrick//lib/webrick/accesslog.rb#95 + def setup_params(config, req, res); end + + class << self + # Escapes control characters in +data+ + # + # source://webrick//lib/webrick/accesslog.rb#151 + def escape(data); end + + # Formats +params+ according to +format_string+ which is described in + # setup_params. + # + # source://webrick//lib/webrick/accesslog.rb#123 + def format(format_string, params); end + + # This format specification is a subset of mod_log_config of Apache: + # + # %a:: Remote IP address + # %b:: Total response size + # %e{variable}:: Given variable in ENV + # %f:: Response filename + # %h:: Remote host name + # %{header}i:: Given request header + # %l:: Remote logname, always "-" + # %m:: Request method + # %{attr}n:: Given request attribute from req.attributes + # %{header}o:: Given response header + # %p:: Server's request port + # %{format}p:: The canonical port of the server serving the request or the + # actual port or the client's actual port. Valid formats are + # canonical, local or remote. + # %q:: Request query string + # %r:: First line of the request + # %s:: Request status + # %t:: Time the request was received + # %T:: Time taken to process the request + # %u:: Remote user from auth + # %U:: Unparsed URI + # %%:: Literal % + # + # source://webrick//lib/webrick/accesslog.rb#95 + def setup_params(config, req, res); end + end +end + +# A generic logging class +# +# source://webrick//lib/webrick/log.rb#17 +class WEBrick::BasicLog + # Initializes a new logger for +log_file+ that outputs messages at +level+ + # or higher. +log_file+ can be a filename, an IO-like object that + # responds to #<< or nil which outputs to $stderr. + # + # If no level is given INFO is chosen by default + # + # @return [BasicLog] a new instance of BasicLog + # + # source://webrick//lib/webrick/log.rb#50 + def initialize(log_file = T.unsafe(nil), level = T.unsafe(nil)); end + + # Synonym for log(INFO, obj.to_s) + # + # source://webrick//lib/webrick/log.rb#84 + def <<(obj); end + + # Closes the logger (also closes the log device associated to the logger) + # + # source://webrick//lib/webrick/log.rb#66 + def close; end + + # Shortcut for logging a DEBUG message + # + # source://webrick//lib/webrick/log.rb#97 + def debug(msg); end + + # Will the logger output DEBUG messages? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/log.rb#108 + def debug?; end + + # Shortcut for logging an ERROR message + # + # source://webrick//lib/webrick/log.rb#91 + def error(msg); end + + # Will the logger output ERROR messages? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/log.rb#102 + def error?; end + + # Shortcut for logging a FATAL message + # + # source://webrick//lib/webrick/log.rb#89 + def fatal(msg); end + + # Will the logger output FATAL messages? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/log.rb#100 + def fatal?; end + + # Shortcut for logging an INFO message + # + # source://webrick//lib/webrick/log.rb#95 + def info(msg); end + + # Will the logger output INFO messages? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/log.rb#106 + def info?; end + + # log-level, messages above this level will be logged + # + # source://webrick//lib/webrick/log.rb#41 + def level; end + + # log-level, messages above this level will be logged + # + # source://webrick//lib/webrick/log.rb#41 + def level=(_arg0); end + + # Logs +data+ at +level+ if the given level is above the current log + # level. + # + # source://webrick//lib/webrick/log.rb#75 + def log(level, data); end + + # Shortcut for logging a WARN message + # + # source://webrick//lib/webrick/log.rb#93 + def warn(msg); end + + # Will the logger output WARN messages? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/log.rb#104 + def warn?; end + + private + + # Formats +arg+ for the logger + # + # * If +arg+ is an Exception, it will format the error message and + # the back trace. + # * If +arg+ responds to #to_str, it will return it. + # * Otherwise it will return +arg+.inspect. + # + # source://webrick//lib/webrick/log.rb#119 + def format(arg); end +end + +# -- +# Updates WEBrick::GenericServer with SSL functionality +# +# source://webrick//lib/webrick/server.rb#56 +class WEBrick::GenericServer + # Creates a new generic server from +config+. The default configuration + # comes from +default+. + # + # @return [GenericServer] a new instance of GenericServer + # + # source://webrick//lib/webrick/server.rb#88 + def initialize(config = T.unsafe(nil), default = T.unsafe(nil)); end + + # Retrieves +key+ from the configuration + # + # source://webrick//lib/webrick/server.rb#121 + def [](key); end + + # The server configuration + # + # source://webrick//lib/webrick/server.rb#66 + def config; end + + # Updates +listen+ to enable SSL when the SSL configuration is active. + # + # source://webrick//lib/webrick/server.rb#129 + def listen(address, port); end + + # Sockets listening for connections. + # + # source://webrick//lib/webrick/server.rb#82 + def listeners; end + + # The server logger. This is independent from the HTTP access log. + # + # source://webrick//lib/webrick/server.rb#71 + def logger; end + + # You must subclass GenericServer and implement \#run which accepts a TCP + # client socket + # + # source://webrick//lib/webrick/server.rb#244 + def run(sock); end + + # Shuts down the server and all listening sockets. New listeners must be + # provided to restart the server. + # + # source://webrick//lib/webrick/server.rb#234 + def shutdown; end + + # Starts the server and runs the +block+ for each connection. This method + # does not return until the server is stopped from a signal handler or + # another thread using #stop or #shutdown. + # + # If the block raises a subclass of StandardError the exception is logged + # and ignored. If an IOError or Errno::EBADF exception is raised the + # exception is ignored. If an Exception subclass is raised the exception + # is logged and re-raised which stops the server. + # + # To completely shut down a server call #shutdown from ensure: + # + # server = WEBrick::GenericServer.new + # # or WEBrick::HTTPServer.new + # + # begin + # server.start + # ensure + # server.shutdown + # end + # + # @raise [ServerError] + # + # source://webrick//lib/webrick/server.rb#154 + def start(&block); end + + # The server status. One of :Stop, :Running or :Shutdown + # + # source://webrick//lib/webrick/server.rb#61 + def status; end + + # Stops the server from accepting new connections. + # + # source://webrick//lib/webrick/server.rb#222 + def stop; end + + # Tokens control the number of outstanding clients. The + # :MaxClients configuration sets this. + # + # source://webrick//lib/webrick/server.rb#77 + def tokens; end + + private + + # Accepts a TCP client socket from the TCP server socket +svr+ and returns + # the client socket. + # + # source://webrick//lib/webrick/server.rb#256 + def accept_client(svr); end + + # source://webrick//lib/webrick/server.rb#347 + def alarm_shutdown_pipe; end + + # Calls the callback +callback_name+ from the configuration with +args+ + # + # source://webrick//lib/webrick/server.rb#334 + def call_callback(callback_name, *args); end + + # source://webrick//lib/webrick/server.rb#359 + def cleanup_listener; end + + # source://webrick//lib/webrick/server.rb#342 + def cleanup_shutdown_pipe(shutdown_pipe); end + + # source://webrick//lib/webrick/server.rb#338 + def setup_shutdown_pipe; end + + # Starts a server thread for the client socket +sock+ that runs the given + # +block+. + # + # Sets the socket to the :WEBrickSocket thread local variable + # in the thread. + # + # If any errors occur in the block they are logged and handled. + # + # source://webrick//lib/webrick/server.rb#288 + def start_thread(sock, &block); end +end + +# source://webrick//lib/webrick/htmlutils.rb#13 +module WEBrick::HTMLUtils + private + + # Escapes &, ", > and < in +string+ + # + # source://webrick//lib/webrick/htmlutils.rb#18 + def escape(string); end + + class << self + # Escapes &, ", > and < in +string+ + # + # source://webrick//lib/webrick/htmlutils.rb#18 + def escape(string); end + end +end + +# HTTPAuth provides both basic and digest authentication. +# +# To enable authentication for requests in WEBrick you will need a user +# database and an authenticator. To start, here's an Htpasswd database for +# use with a DigestAuth authenticator: +# +# config = { :Realm => 'DigestAuth example realm' } +# +# htpasswd = WEBrick::HTTPAuth::Htpasswd.new 'my_password_file' +# htpasswd.auth_type = WEBrick::HTTPAuth::DigestAuth +# htpasswd.set_passwd config[:Realm], 'username', 'password' +# htpasswd.flush +# +# The +:Realm+ is used to provide different access to different groups +# across several resources on a server. Typically you'll need only one +# realm for a server. +# +# This database can be used to create an authenticator: +# +# config[:UserDB] = htpasswd +# +# digest_auth = WEBrick::HTTPAuth::DigestAuth.new config +# +# To authenticate a request call #authenticate with a request and response +# object in a servlet: +# +# def do_GET req, res +# @authenticator.authenticate req, res +# end +# +# For digest authentication the authenticator must not be created every +# request, it must be passed in as an option via WEBrick::HTTPServer#mount. +# +# source://webrick//lib/webrick/httpauth/authenticator.rb#12 +module WEBrick::HTTPAuth + private + + # source://webrick//lib/webrick/httpauth.rb#57 + def _basic_auth(req, res, realm, req_field, res_field, err_type, block); end + + # Simple wrapper for providing basic authentication for a request. When + # called with a request +req+, response +res+, authentication +realm+ and + # +block+ the block will be called with a +username+ and +password+. If + # the block returns true the request is allowed to continue, otherwise an + # HTTPStatus::Unauthorized error is raised. + # + # source://webrick//lib/webrick/httpauth.rb#79 + def basic_auth(req, res, realm, &block); end + + # Simple wrapper for providing basic authentication for a proxied request. + # When called with a request +req+, response +res+, authentication +realm+ + # and +block+ the block will be called with a +username+ and +password+. + # If the block returns true the request is allowed to continue, otherwise + # an HTTPStatus::ProxyAuthenticationRequired error is raised. + # + # source://webrick//lib/webrick/httpauth.rb#91 + def proxy_basic_auth(req, res, realm, &block); end + + class << self + # source://webrick//lib/webrick/httpauth.rb#57 + def _basic_auth(req, res, realm, req_field, res_field, err_type, block); end + + # Simple wrapper for providing basic authentication for a request. When + # called with a request +req+, response +res+, authentication +realm+ and + # +block+ the block will be called with a +username+ and +password+. If + # the block returns true the request is allowed to continue, otherwise an + # HTTPStatus::Unauthorized error is raised. + # + # source://webrick//lib/webrick/httpauth.rb#79 + def basic_auth(req, res, realm, &block); end + + # Simple wrapper for providing basic authentication for a proxied request. + # When called with a request +req+, response +res+, authentication +realm+ + # and +block+ the block will be called with a +username+ and +password+. + # If the block returns true the request is allowed to continue, otherwise + # an HTTPStatus::ProxyAuthenticationRequired error is raised. + # + # source://webrick//lib/webrick/httpauth.rb#91 + def proxy_basic_auth(req, res, realm, &block); end + end +end + +# Module providing generic support for both Digest and Basic +# authentication schemes. +# +# source://webrick//lib/webrick/httpauth/authenticator.rb#18 +module WEBrick::HTTPAuth::Authenticator + # The logger for this authenticator + # + # source://webrick//lib/webrick/httpauth/authenticator.rb#43 + def logger; end + + # The realm this authenticator covers + # + # source://webrick//lib/webrick/httpauth/authenticator.rb#33 + def realm; end + + # The user database for this authenticator + # + # source://webrick//lib/webrick/httpauth/authenticator.rb#38 + def userdb; end + + private + + # Initializes the authenticator from +config+ + # + # source://webrick//lib/webrick/httpauth/authenticator.rb#52 + def check_init(config); end + + # Ensures +req+ has credentials that can be authenticated. + # + # source://webrick//lib/webrick/httpauth/authenticator.rb#72 + def check_scheme(req); end + + # source://webrick//lib/webrick/httpauth/authenticator.rb#91 + def error(fmt, *args); end + + # source://webrick//lib/webrick/httpauth/authenticator.rb#97 + def info(fmt, *args); end + + # source://webrick//lib/webrick/httpauth/authenticator.rb#85 + def log(meth, fmt, *args); end +end + +# source://webrick//lib/webrick/httpauth/authenticator.rb#23 +WEBrick::HTTPAuth::Authenticator::AuthException = WEBrick::HTTPStatus::Unauthorized + +# Basic Authentication for WEBrick +# +# Use this class to add basic authentication to a WEBrick servlet. +# +# Here is an example of how to set up a BasicAuth: +# +# config = { :Realm => 'BasicAuth example realm' } +# +# htpasswd = WEBrick::HTTPAuth::Htpasswd.new 'my_password_file', password_hash: :bcrypt +# htpasswd.set_passwd config[:Realm], 'username', 'password' +# htpasswd.flush +# +# config[:UserDB] = htpasswd +# +# basic_auth = WEBrick::HTTPAuth::BasicAuth.new config +# +# source://webrick//lib/webrick/httpauth/basicauth.rb#35 +class WEBrick::HTTPAuth::BasicAuth + include ::WEBrick::HTTPAuth::Authenticator + + # Creates a new BasicAuth instance. + # + # See WEBrick::Config::BasicAuth for default configuration entries + # + # You must supply the following configuration entries: + # + # :Realm:: The name of the realm being protected. + # :UserDB:: A database of usernames and passwords. + # A WEBrick::HTTPAuth::Htpasswd instance should be used. + # + # @return [BasicAuth] a new instance of BasicAuth + # + # source://webrick//lib/webrick/httpauth/basicauth.rb#61 + def initialize(config, default = T.unsafe(nil)); end + + # Authenticates a +req+ and returns a 401 Unauthorized using +res+ if + # the authentication was not correct. + # + # source://webrick//lib/webrick/httpauth/basicauth.rb#70 + def authenticate(req, res); end + + # Returns a challenge response which asks for authentication information + # + # @raise [@auth_exception] + # + # source://webrick//lib/webrick/httpauth/basicauth.rb#103 + def challenge(req, res); end + + # Returns the value of attribute logger. + # + # source://webrick//lib/webrick/httpauth/basicauth.rb#48 + def logger; end + + # Returns the value of attribute realm. + # + # source://webrick//lib/webrick/httpauth/basicauth.rb#48 + def realm; end + + # Returns the value of attribute userdb. + # + # source://webrick//lib/webrick/httpauth/basicauth.rb#48 + def userdb; end + + class << self + # Used by UserDB to create a basic password entry + # + # source://webrick//lib/webrick/httpauth/basicauth.rb#43 + def make_passwd(realm, user, pass); end + end +end + +# RFC 2617 Digest Access Authentication for WEBrick +# +# Use this class to add digest authentication to a WEBrick servlet. +# +# Here is an example of how to set up DigestAuth: +# +# config = { :Realm => 'DigestAuth example realm' } +# +# htdigest = WEBrick::HTTPAuth::Htdigest.new 'my_password_file' +# htdigest.set_passwd config[:Realm], 'username', 'password' +# htdigest.flush +# +# config[:UserDB] = htdigest +# +# digest_auth = WEBrick::HTTPAuth::DigestAuth.new config +# +# When using this as with a servlet be sure not to create a new DigestAuth +# object in the servlet's #initialize. By default WEBrick creates a new +# servlet instance for every request and the DigestAuth object must be +# used across requests. +# +# source://webrick//lib/webrick/httpauth/digestauth.rb#46 +class WEBrick::HTTPAuth::DigestAuth + include ::WEBrick::HTTPAuth::Authenticator + + # Creates a new DigestAuth instance. Be sure to use the same DigestAuth + # instance for multiple requests as it saves state between requests in + # order to perform authentication. + # + # See WEBrick::Config::DigestAuth for default configuration entries + # + # You must supply the following configuration entries: + # + # :Realm:: The name of the realm being protected. + # :UserDB:: A database of usernames and passwords. + # A WEBrick::HTTPAuth::Htdigest instance should be used. + # + # @return [DigestAuth] a new instance of DigestAuth + # + # source://webrick//lib/webrick/httpauth/digestauth.rb#87 + def initialize(config, default = T.unsafe(nil)); end + + # Digest authentication algorithm + # + # source://webrick//lib/webrick/httpauth/digestauth.rb#59 + def algorithm; end + + # Authenticates a +req+ and returns a 401 Unauthorized using +res+ if + # the authentication was not correct. + # + # source://webrick//lib/webrick/httpauth/digestauth.rb#121 + def authenticate(req, res); end + + # Returns a challenge response which asks for authentication information + # + # @raise [@auth_exception] + # + # source://webrick//lib/webrick/httpauth/digestauth.rb#134 + def challenge(req, res, stale = T.unsafe(nil)); end + + # Quality of protection. RFC 2617 defines "auth" and "auth-int" + # + # source://webrick//lib/webrick/httpauth/digestauth.rb#64 + def qop; end + + private + + # source://webrick//lib/webrick/httpauth/digestauth.rb#163 + def _authenticate(req, res); end + + # source://webrick//lib/webrick/httpauth/digestauth.rb#306 + def check_nonce(req, auth_req); end + + # source://webrick//lib/webrick/httpauth/digestauth.rb#349 + def check_opaque(opaque_struct, req, auth_req); end + + # source://webrick//lib/webrick/httpauth/digestauth.rb#365 + def check_uri(req, auth_req); end + + # source://webrick//lib/webrick/httpauth/digestauth.rb#299 + def generate_next_nonce(req); end + + # source://webrick//lib/webrick/httpauth/digestauth.rb#332 + def generate_opaque(req); end + + # source://webrick//lib/webrick/httpauth/digestauth.rb#376 + def hexdigest(*args); end + + # source://webrick//lib/webrick/httpauth/digestauth.rb#291 + def split_param_value(string); end + + class << self + # Used by UserDB to create a digest password entry + # + # source://webrick//lib/webrick/httpauth/digestauth.rb#69 + def make_passwd(realm, user, pass); end + end +end + +# Htdigest accesses apache-compatible digest password files. Passwords are +# matched to a realm where they are valid. For security, the path for a +# digest password database should be stored outside of the paths available +# to the HTTP server. +# +# Htdigest is intended for use with WEBrick::HTTPAuth::DigestAuth and +# stores passwords using cryptographic hashes. +# +# htpasswd = WEBrick::HTTPAuth::Htdigest.new 'my_password_file' +# htpasswd.set_passwd 'my realm', 'username', 'password' +# htpasswd.flush +# +# source://webrick//lib/webrick/httpauth/htdigest.rb#31 +class WEBrick::HTTPAuth::Htdigest + include ::WEBrick::HTTPAuth::UserDB + + # Open a digest password database at +path+ + # + # @return [Htdigest] a new instance of Htdigest + # + # source://webrick//lib/webrick/httpauth/htdigest.rb#37 + def initialize(path); end + + # Removes a password from the database for +user+ in +realm+. + # + # source://webrick//lib/webrick/httpauth/htdigest.rb#113 + def delete_passwd(realm, user); end + + # Iterate passwords in the database. + # + # source://webrick//lib/webrick/httpauth/htdigest.rb#122 + def each; end + + # Flush the password database. If +output+ is given the database will + # be written there instead of to the original path. + # + # source://webrick//lib/webrick/httpauth/htdigest.rb#72 + def flush(output = T.unsafe(nil)); end + + # Retrieves a password from the database for +user+ in +realm+. If + # +reload_db+ is true the database will be reloaded first. + # + # source://webrick//lib/webrick/httpauth/htdigest.rb#91 + def get_passwd(realm, user, reload_db); end + + # Reloads passwords from the database + # + # source://webrick//lib/webrick/httpauth/htdigest.rb#50 + def reload; end + + # Sets a password in the database for +user+ in +realm+ to +pass+. + # + # source://webrick//lib/webrick/httpauth/htdigest.rb#101 + def set_passwd(realm, user, pass); end +end + +# Htgroup accesses apache-compatible group files. Htgroup can be used to +# provide group-based authentication for users. Currently Htgroup is not +# directly integrated with any authenticators in WEBrick. For security, +# the path for a digest password database should be stored outside of the +# paths available to the HTTP server. +# +# Example: +# +# htgroup = WEBrick::HTTPAuth::Htgroup.new 'my_group_file' +# htgroup.add 'superheroes', %w[spiderman batman] +# +# htgroup.members('superheroes').include? 'magneto' # => false +# +# source://webrick//lib/webrick/httpauth/htgroup.rb#30 +class WEBrick::HTTPAuth::Htgroup + # Open a group database at +path+ + # + # @return [Htgroup] a new instance of Htgroup + # + # source://webrick//lib/webrick/httpauth/htgroup.rb#35 + def initialize(path); end + + # Add an Array of +members+ to +group+ + # + # source://webrick//lib/webrick/httpauth/htgroup.rb#92 + def add(group, members); end + + # Flush the group database. If +output+ is given the database will be + # written there instead of to the original path. + # + # source://webrick//lib/webrick/httpauth/htgroup.rb#64 + def flush(output = T.unsafe(nil)); end + + # Retrieve the list of members from +group+ + # + # source://webrick//lib/webrick/httpauth/htgroup.rb#84 + def members(group); end + + # Reload groups from the database + # + # source://webrick//lib/webrick/httpauth/htgroup.rb#46 + def reload; end +end + +# Htpasswd accesses apache-compatible password files. Passwords are +# matched to a realm where they are valid. For security, the path for a +# password database should be stored outside of the paths available to the +# HTTP server. +# +# Htpasswd is intended for use with WEBrick::HTTPAuth::BasicAuth. +# +# To create an Htpasswd database with a single user: +# +# htpasswd = WEBrick::HTTPAuth::Htpasswd.new 'my_password_file' +# htpasswd.set_passwd 'my realm', 'username', 'password' +# htpasswd.flush +# +# source://webrick//lib/webrick/httpauth/htpasswd.rb#32 +class WEBrick::HTTPAuth::Htpasswd + include ::WEBrick::HTTPAuth::UserDB + + # Open a password database at +path+ + # + # @return [Htpasswd] a new instance of Htpasswd + # + # source://webrick//lib/webrick/httpauth/htpasswd.rb#38 + def initialize(path, password_hash: T.unsafe(nil)); end + + # Removes a password from the database for +user+ in +realm+. + # + # source://webrick//lib/webrick/httpauth/htpasswd.rb#144 + def delete_passwd(realm, user); end + + # Iterate passwords in the database. + # + # source://webrick//lib/webrick/httpauth/htpasswd.rb#151 + def each; end + + # Flush the password database. If +output+ is given the database will + # be written there instead of to the original path. + # + # source://webrick//lib/webrick/httpauth/htpasswd.rb#103 + def flush(output = T.unsafe(nil)); end + + # Retrieves a password from the database for +user+ in +realm+. If + # +reload_db+ is true the database will be reloaded first. + # + # source://webrick//lib/webrick/httpauth/htpasswd.rb#122 + def get_passwd(realm, user, reload_db); end + + # Reload passwords from the database + # + # source://webrick//lib/webrick/httpauth/htpasswd.rb#68 + def reload; end + + # Sets a password in the database for +user+ in +realm+ to +pass+. + # + # source://webrick//lib/webrick/httpauth/htpasswd.rb#130 + def set_passwd(realm, user, pass); end +end + +# source://webrick//lib/webrick/httpauth/authenticator.rb#114 +WEBrick::HTTPAuth::ProxyAuthenticator::AuthException = WEBrick::HTTPStatus::ProxyAuthenticationRequired + +# Basic authentication for proxy servers. See BasicAuth for details. +# +# source://webrick//lib/webrick/httpauth/basicauth.rb#112 +class WEBrick::HTTPAuth::ProxyBasicAuth < ::WEBrick::HTTPAuth::BasicAuth + include ::WEBrick::HTTPAuth::ProxyAuthenticator +end + +# Digest authentication for proxy servers. See DigestAuth for details. +# +# source://webrick//lib/webrick/httpauth/digestauth.rb#386 +class WEBrick::HTTPAuth::ProxyDigestAuth < ::WEBrick::HTTPAuth::DigestAuth + include ::WEBrick::HTTPAuth::ProxyAuthenticator + + private + + # source://webrick//lib/webrick/httpauth/digestauth.rb#390 + def check_uri(req, auth_req); end +end + +# User database mixin for HTTPAuth. This mixin dispatches user record +# access to the underlying auth_type for this database. +# +# source://webrick//lib/webrick/httpauth/userdb.rb#18 +module WEBrick::HTTPAuth::UserDB + # The authentication type. + # + # WEBrick::HTTPAuth::BasicAuth or WEBrick::HTTPAuth::DigestAuth are + # built-in. + # + # source://webrick//lib/webrick/httpauth/userdb.rb#26 + def auth_type; end + + # The authentication type. + # + # WEBrick::HTTPAuth::BasicAuth or WEBrick::HTTPAuth::DigestAuth are + # built-in. + # + # source://webrick//lib/webrick/httpauth/userdb.rb#26 + def auth_type=(_arg0); end + + # Retrieves a password in +realm+ for +user+ for the auth_type of this + # database. +reload_db+ is a dummy value. + # + # source://webrick//lib/webrick/httpauth/userdb.rb#48 + def get_passwd(realm, user, reload_db = T.unsafe(nil)); end + + # Creates an obscured password in +realm+ with +user+ and +password+ + # using the auth_type of this database. + # + # source://webrick//lib/webrick/httpauth/userdb.rb#32 + def make_passwd(realm, user, pass); end + + # Sets a password in +realm+ with +user+ and +password+ for the + # auth_type of this database. + # + # source://webrick//lib/webrick/httpauth/userdb.rb#40 + def set_passwd(realm, user, pass); end +end + +# -- +# Adds SSL functionality to WEBrick::HTTPRequest +# +# source://webrick//lib/webrick/httprequest.rb#25 +class WEBrick::HTTPRequest + # Creates a new HTTP request. WEBrick::Config::HTTP is the default + # configuration. + # + # @return [HTTPRequest] a new instance of HTTPRequest + # + # source://webrick//lib/webrick/httprequest.rb#153 + def initialize(config); end + + # Retrieves +header_name+ + # + # source://webrick//lib/webrick/httprequest.rb#318 + def [](header_name); end + + # The Accept header value + # + # source://webrick//lib/webrick/httprequest.rb#100 + def accept; end + + # The Accept-Charset header value + # + # source://webrick//lib/webrick/httprequest.rb#105 + def accept_charset; end + + # The Accept-Encoding header value + # + # source://webrick//lib/webrick/httprequest.rb#110 + def accept_encoding; end + + # The Accept-Language header value + # + # source://webrick//lib/webrick/httprequest.rb#115 + def accept_language; end + + # The socket address of the server + # + # source://webrick//lib/webrick/httprequest.rb#127 + def addr; end + + # Hash of request attributes + # + # source://webrick//lib/webrick/httprequest.rb#137 + def attributes; end + + # Returns the request body. + # + # source://webrick//lib/webrick/httprequest.rb#255 + def body(&block); end + + # Prepares the HTTPRequest object for use as the + # source for IO.copy_stream + # + # source://webrick//lib/webrick/httprequest.rb#265 + def body_reader; end + + # The content-length header + # + # source://webrick//lib/webrick/httprequest.rb#304 + def content_length; end + + # The content-type header + # + # source://webrick//lib/webrick/httprequest.rb#311 + def content_type; end + + # Generate HTTP/1.1 100 continue response if the client expects it, + # otherwise does nothing. + # + # source://webrick//lib/webrick/httprequest.rb#245 + def continue; end + + # The parsed request cookies + # + # source://webrick//lib/webrick/httprequest.rb#95 + def cookies; end + + # Iterates over the request headers + # + # source://webrick//lib/webrick/httprequest.rb#328 + def each; end + + # Consumes any remaining body and updates keep-alive status + # + # source://webrick//lib/webrick/httprequest.rb#390 + def fixup; end + + # The parsed header of the request + # + # source://webrick//lib/webrick/httprequest.rb#90 + def header; end + + # The host this request is for + # + # source://webrick//lib/webrick/httprequest.rb#340 + def host; end + + # The HTTP version of the request + # + # source://webrick//lib/webrick/httprequest.rb#51 + def http_version; end + + # Is this a keep-alive connection? + # + # source://webrick//lib/webrick/httprequest.rb#142 + def keep_alive; end + + # Should the connection this request was made on be kept alive? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httprequest.rb#375 + def keep_alive?; end + + # This method provides the metavariables defined by the revision 3 + # of "The WWW Common Gateway Interface Version 1.1" + # To browse the current document of CGI Version 1.1, see below: + # http://tools.ietf.org/html/rfc3875 + # + # source://webrick//lib/webrick/httprequest.rb#407 + def meta_vars; end + + # Parses a request from +socket+. This is called internally by + # WEBrick::HTTPServer. + # + # source://webrick//lib/webrick/httprequest.rb#193 + def parse(socket = T.unsafe(nil)); end + + # The request path + # + # source://webrick//lib/webrick/httprequest.rb#63 + def path; end + + # The path info (CGI variable) + # + # source://webrick//lib/webrick/httprequest.rb#73 + def path_info; end + + # The path info (CGI variable) + # + # source://webrick//lib/webrick/httprequest.rb#73 + def path_info=(_arg0); end + + # The socket address of the client + # + # source://webrick//lib/webrick/httprequest.rb#132 + def peeraddr; end + + # The port this request is for + # + # source://webrick//lib/webrick/httprequest.rb#347 + def port; end + + # Request query as a Hash + # + # source://webrick//lib/webrick/httprequest.rb#294 + def query; end + + # The query from the URI of the request + # + # source://webrick//lib/webrick/httprequest.rb#78 + def query_string; end + + # The query from the URI of the request + # + # source://webrick//lib/webrick/httprequest.rb#78 + def query_string=(_arg0); end + + # The raw header of the request + # + # source://webrick//lib/webrick/httprequest.rb#85 + def raw_header; end + + # for IO.copy_stream. + # + # source://webrick//lib/webrick/httprequest.rb#278 + def readpartial(size, buf = T.unsafe(nil)); end + + # The client's IP address + # + # source://webrick//lib/webrick/httprequest.rb#361 + def remote_ip; end + + # The complete request line such as: + # + # GET / HTTP/1.1 + # + # source://webrick//lib/webrick/httprequest.rb#36 + def request_line; end + + # The request method, GET, POST, PUT, etc. + # + # source://webrick//lib/webrick/httprequest.rb#41 + def request_method; end + + # The local time this request was received + # + # source://webrick//lib/webrick/httprequest.rb#147 + def request_time; end + + # The parsed URI of the request + # + # source://webrick//lib/webrick/httprequest.rb#58 + def request_uri; end + + # The script name (CGI variable) + # + # source://webrick//lib/webrick/httprequest.rb#68 + def script_name; end + + # The script name (CGI variable) + # + # source://webrick//lib/webrick/httprequest.rb#68 + def script_name=(_arg0); end + + # The server name this request is for + # + # source://webrick//lib/webrick/httprequest.rb#354 + def server_name; end + + # Is this an SSL request? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httprequest.rb#368 + def ssl?; end + + # source://webrick//lib/webrick/httprequest.rb#379 + def to_s; end + + # The unparsed URI of the request + # + # source://webrick//lib/webrick/httprequest.rb#46 + def unparsed_uri; end + + # The remote user (CGI variable) + # + # source://webrick//lib/webrick/httprequest.rb#122 + def user; end + + # The remote user (CGI variable) + # + # source://webrick//lib/webrick/httprequest.rb#122 + def user=(_arg0); end + + private + + # source://webrick//lib/webrick/httprequest.rb#566 + def _read_data(io, method, *arg); end + + # 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#511 + def read_body(socket, block); end + + # source://webrick//lib/webrick/httprequest.rb#535 + def read_chunk_size(socket); end + + # source://webrick//lib/webrick/httprequest.rb#546 + def read_chunked(socket, block); end + + # 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#578 + def read_line(io, size = T.unsafe(nil)); end + + # @raise [HTTPStatus::EOFError] + # + # source://webrick//lib/webrick/httprequest.rb#451 + def read_request_line(socket); end + + # It's said that all X-Forwarded-* headers will contain more than one + # (comma-separated) value if the original request already contained one of + # these headers. Since we could use these values as Host header, we choose + # the initial(first) value. (apr_table_mergen() adds new value after the + # existing value with ", " prefix) + # + # source://webrick//lib/webrick/httprequest.rb#614 + def setup_forwarded_info; end +end + +# same as Mongrel, Thin and Puma +# +# source://webrick//lib/webrick/httprequest.rb#449 +WEBrick::HTTPRequest::MAX_HEADER_LENGTH = T.let(T.unsafe(nil), Integer) + +# An HTTP response. This is filled in by the service or do_* methods of a +# WEBrick HTTP Servlet. +# +# source://webrick//lib/webrick/httpresponse.rb#24 +class WEBrick::HTTPResponse + # Creates a new HTTP response object. WEBrick::Config::HTTP is the + # default configuration. + # + # @return [HTTPResponse] a new instance of HTTPResponse + # + # source://webrick//lib/webrick/httpresponse.rb#117 + def initialize(config); end + + # Retrieves the response header +field+ + # + # source://webrick//lib/webrick/httpresponse.rb#155 + def [](field); end + + # Sets the response header +field+ to +value+ + # + # source://webrick//lib/webrick/httpresponse.rb#162 + def []=(field, value); end + + # source://webrick//lib/webrick/httpresponse.rb#255 + def _rack_setup_header; end + + # Body may be: + # * a String; + # * an IO-like object that responds to +#read+ and +#readpartial+; + # * a Proc-like object that responds to +#call+. + # + # In the latter case, either #chunked= should be set to +true+, + # or header['content-length'] explicitly provided. + # Example: + # + # server.mount_proc '/' do |req, res| + # res.chunked = true + # # or + # # res.header['content-length'] = 10 + # res.body = proc { |out| out.write(Time.now.to_s) } + # end + # + # source://webrick//lib/webrick/httpresponse.rb#70 + def body; end + + # Body may be: + # * a String; + # * an IO-like object that responds to +#read+ and +#readpartial+; + # * a Proc-like object that responds to +#call+. + # + # In the latter case, either #chunked= should be set to +true+, + # or header['content-length'] explicitly provided. + # Example: + # + # server.mount_proc '/' do |req, res| + # res.chunked = true + # # or + # # res.header['content-length'] = 10 + # res.body = proc { |out| out.write(Time.now.to_s) } + # end + # + # source://webrick//lib/webrick/httpresponse.rb#70 + def body=(_arg0); end + + # Enables chunked transfer encoding. + # + # 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#207 + def chunked?; end + + # Configuration for this response + # + # source://webrick//lib/webrick/httpresponse.rb#101 + def config; end + + # The content-length header + # + # source://webrick//lib/webrick/httpresponse.rb#170 + def content_length; end + + # Sets the content-length header to +len+ + # + # source://webrick//lib/webrick/httpresponse.rb#179 + def content_length=(len); end + + # The content-type header + # + # source://webrick//lib/webrick/httpresponse.rb#186 + def content_type; end + + # Sets the content-type header to +type+ + # + # source://webrick//lib/webrick/httpresponse.rb#193 + def content_type=(type); end + + # Response cookies + # + # source://webrick//lib/webrick/httpresponse.rb#46 + def cookies; end + + # Iterates over each header in the response + # + # source://webrick//lib/webrick/httpresponse.rb#200 + def each; end + + # Filename of the static file in this response. Only used by the + # FileHandler servlet. + # + # source://webrick//lib/webrick/httpresponse.rb#91 + def filename; end + + # Filename of the static file in this response. Only used by the + # FileHandler servlet. + # + # source://webrick//lib/webrick/httpresponse.rb#91 + def filename=(_arg0); end + + # Response header + # + # source://webrick//lib/webrick/httpresponse.rb#41 + def header; end + + # HTTP Response version + # + # source://webrick//lib/webrick/httpresponse.rb#31 + def http_version; end + + # Is this a keep-alive response? + # + # source://webrick//lib/webrick/httpresponse.rb#96 + def keep_alive; end + + # Is this a keep-alive response? + # + # source://webrick//lib/webrick/httpresponse.rb#96 + def keep_alive=(_arg0); end + + # Will this response's connection be kept alive? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httpresponse.rb#221 + def keep_alive?; end + + # source://webrick//lib/webrick/httpresponse.rb#325 + def make_body_tempfile; end + + # Response reason phrase ("OK") + # + # source://webrick//lib/webrick/httpresponse.rb#51 + def reason_phrase; end + + # Response reason phrase ("OK") + # + # source://webrick//lib/webrick/httpresponse.rb#51 + def reason_phrase=(_arg0); end + + # source://webrick//lib/webrick/httpresponse.rb#343 + def remove_body_tempfile; end + + # Request HTTP version for this response + # + # source://webrick//lib/webrick/httpresponse.rb#85 + def request_http_version; end + + # Request HTTP version for this response + # + # source://webrick//lib/webrick/httpresponse.rb#85 + def request_http_version=(_arg0); end + + # Request method for this response + # + # source://webrick//lib/webrick/httpresponse.rb#75 + def request_method; end + + # Request method for this response + # + # source://webrick//lib/webrick/httpresponse.rb#75 + def request_method=(_arg0); end + + # Request URI for this response + # + # source://webrick//lib/webrick/httpresponse.rb#80 + def request_uri; end + + # Request URI for this response + # + # source://webrick//lib/webrick/httpresponse.rb#80 + def request_uri=(_arg0); end + + # Sends the body on +socket+ + # + # source://webrick//lib/webrick/httpresponse.rb#378 + def send_body(socket); end + + # Sends the headers on +socket+ + # + # source://webrick//lib/webrick/httpresponse.rb#355 + def send_header(socket); end + + # Sends the response on +socket+ + # + # source://webrick//lib/webrick/httpresponse.rb#238 + def send_response(socket); end + + # Bytes sent in this response + # + # source://webrick//lib/webrick/httpresponse.rb#106 + def sent_size; end + + # Creates an error page for exception +ex+ with an optional +backtrace+ + # + # 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+. + # + # Example: + # + # res.set_redirect WEBrick::HTTPStatus::TemporaryRedirect + # + # source://webrick//lib/webrick/httpresponse.rb#395 + def set_redirect(status, url); end + + # Response status code (200) + # + # source://webrick//lib/webrick/httpresponse.rb#36 + def status; end + + # Sets the response's status to the +status+ code + # + # source://webrick//lib/webrick/httpresponse.rb#147 + def status=(status); end + + # The response's HTTP status line + # + # 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#581 + def _write_data(socket, data); end + + # source://webrick//lib/webrick/httpresponse.rb#432 + def check_header(header_value); end + + # :stopdoc: + # + # source://webrick//lib/webrick/httpresponse.rb#443 + def error_body(backtrace, ex, host, port); end + + # source://webrick//lib/webrick/httpresponse.rb#473 + def send_body_io(socket); end + + # source://webrick//lib/webrick/httpresponse.rb#535 + def send_body_proc(socket); end + + # source://webrick//lib/webrick/httpresponse.rb#513 + def send_body_string(socket); end +end + +# source://webrick//lib/webrick/httpresponse.rb#555 +class WEBrick::HTTPResponse::ChunkedWrapper + # @return [ChunkedWrapper] a new instance of ChunkedWrapper + # + # source://webrick//lib/webrick/httpresponse.rb#556 + def initialize(socket, resp); end + + # source://webrick//lib/webrick/httpresponse.rb#574 + def <<(*buf); end + + # source://webrick//lib/webrick/httpresponse.rb#561 + def write(buf); end +end + +# An HTTP Server +# +# source://webrick//lib/webrick/httpserver.rb#27 +class WEBrick::HTTPServer < ::WEBrick::GenericServer + # Creates a new HTTP server according to +config+ + # + # An HTTP server uses the following attributes: + # + # :AccessLog:: An array of access logs. See WEBrick::AccessLog + # :BindAddress:: Local address for the server to bind to + # :DocumentRoot:: Root path to serve files from + # :DocumentRootOptions:: Options for the default HTTPServlet::FileHandler + # :HTTPVersion:: The HTTP version of this server + # :Port:: Port to listen on + # :RequestCallback:: Called with a request and response before each + # request is serviced. + # :RequestTimeout:: Maximum time to wait between requests + # :ServerAlias:: Array of alternate names for this server for virtual + # hosting + # :ServerName:: Name for this server for virtual hosting + # + # @return [HTTPServer] a new instance of HTTPServer + # + # source://webrick//lib/webrick/httpserver.rb#46 + def initialize(config = T.unsafe(nil), default = T.unsafe(nil)); end + + # Logs +req+ and +res+ in the access logs. +config+ is used for the + # server name. + # + # source://webrick//lib/webrick/httpserver.rb#220 + def access_log(config, req, res); end + + # Creates the HTTPRequest used when handling the HTTP + # request. Can be overridden by subclasses. + # + # source://webrick//lib/webrick/httpserver.rb#230 + def create_request(with_webrick_config); end + + # Creates the HTTPResponse used when handling the HTTP + # request. Can be overridden by subclasses. + # + # source://webrick//lib/webrick/httpserver.rb#237 + def create_response(with_webrick_config); end + + # The default OPTIONS request handler says GET, HEAD, POST and OPTIONS + # requests are allowed. + # + # source://webrick//lib/webrick/httpserver.rb#147 + def do_OPTIONS(req, res); end + + # Finds the appropriate virtual host to handle +req+ + # + # source://webrick//lib/webrick/httpserver.rb#207 + def lookup_server(req); end + + # Mounts +servlet+ on +dir+ passing +options+ to the servlet at creation + # time + # + # source://webrick//lib/webrick/httpserver.rb#155 + def mount(dir, servlet, *options); end + + # Mounts +proc+ or +block+ on +dir+ and calls it with a + # WEBrick::HTTPRequest and WEBrick::HTTPResponse + # + # @raise [HTTPServerError] + # + # source://webrick//lib/webrick/httpserver.rb#164 + def mount_proc(dir, proc = T.unsafe(nil), &block); end + + # Processes requests on +sock+ + # + # source://webrick//lib/webrick/httpserver.rb#69 + def run(sock); end + + # Finds a servlet for +path+ + # + # source://webrick//lib/webrick/httpserver.rb#182 + def search_servlet(path); end + + # Services +req+ and fills in +res+ + # + # @raise [HTTPStatus::NotFound] + # + # source://webrick//lib/webrick/httpserver.rb#125 + def service(req, res); end + + # Unmounts +dir+ + # + # source://webrick//lib/webrick/httpserver.rb#173 + def umount(dir); end + + # Unmounts +dir+ + # + # source://webrick//lib/webrick/httpserver.rb#173 + def unmount(dir); end + + # Adds +server+ as a virtual host. + # + # source://webrick//lib/webrick/httpserver.rb#193 + def virtual_host(server); end +end + +# Mount table for the path a servlet is mounted on in the directory space +# of the server. Users of WEBrick can only access this indirectly via +# WEBrick::HTTPServer#mount, WEBrick::HTTPServer#unmount and +# WEBrick::HTTPServer#search_servlet +# +# source://webrick//lib/webrick/httpserver.rb#247 +class WEBrick::HTTPServer::MountTable + # @return [MountTable] a new instance of MountTable + # + # source://webrick//lib/webrick/httpserver.rb#248 + def initialize; end + + # source://webrick//lib/webrick/httpserver.rb#253 + def [](dir); end + + # source://webrick//lib/webrick/httpserver.rb#258 + def []=(dir, val); end + + # source://webrick//lib/webrick/httpserver.rb#265 + def delete(dir); end + + # source://webrick//lib/webrick/httpserver.rb#272 + def scan(path); end + + private + + # source://webrick//lib/webrick/httpserver.rb#279 + def compile; end + + # source://webrick//lib/webrick/httpserver.rb#287 + def normalize(dir); end +end + +# AbstractServlet allows HTTP server modules to be reused across multiple +# servers and allows encapsulation of functionality. +# +# By default a servlet will respond to GET, HEAD (through an alias to GET) +# and OPTIONS requests. +# +# By default a new servlet is initialized for every request. A servlet +# instance can be reused by overriding ::get_instance in the +# AbstractServlet subclass. +# +# == A Simple Servlet +# +# class Simple < WEBrick::HTTPServlet::AbstractServlet +# def do_GET request, response +# status, content_type, body = do_stuff_with request +# +# response.status = status +# response['Content-Type'] = content_type +# response.body = body +# end +# +# def do_stuff_with request +# return 200, 'text/plain', 'you got a page' +# end +# end +# +# This servlet can be mounted on a server at a given path: +# +# server.mount '/simple', Simple +# +# == Servlet Configuration +# +# Servlets can be configured via initialize. The first argument is the +# HTTP server the servlet is being initialized for. +# +# class Configurable < Simple +# def initialize server, color, size +# super server +# @color = color +# @size = size +# end +# +# def do_stuff_with request +# content = "

Hello, World!" +# +# return 200, "text/html", content +# end +# end +# +# This servlet must be provided two arguments at mount time: +# +# server.mount '/configurable', Configurable, 'red', '2em' +# +# source://webrick//lib/webrick/httpservlet/abstract.rb#76 +class WEBrick::HTTPServlet::AbstractServlet + # Initializes a new servlet for +server+ using +options+ which are + # stored as-is in +@options+. +@logger+ is also provided. + # + # @return [AbstractServlet] a new instance of AbstractServlet + # + # source://webrick//lib/webrick/httpservlet/abstract.rb#91 + def initialize(server, *options); end + + # Raises a NotFound exception + # + # @raise [HTTPStatus::NotFound] + # + # source://webrick//lib/webrick/httpservlet/abstract.rb#115 + def do_GET(req, res); end + + # Dispatches to do_GET + # + # source://webrick//lib/webrick/httpservlet/abstract.rb#122 + def do_HEAD(req, res); end + + # Returns the allowed HTTP request methods + # + # source://webrick//lib/webrick/httpservlet/abstract.rb#129 + def do_OPTIONS(req, res); end + + # Dispatches to a +do_+ method based on +req+ if such a method is + # available. (+do_GET+ for a GET request). Raises a MethodNotAllowed + # exception if the method is not implemented. + # + # source://webrick//lib/webrick/httpservlet/abstract.rb#102 + def service(req, res); end + + private + + # Redirects to a path ending in / + # + # source://webrick//lib/webrick/httpservlet/abstract.rb#140 + def redirect_to_directory_uri(req, res); end + + class << self + # Factory for servlet instances that will handle a request from +server+ + # using +options+ from the mount point. By default a new servlet + # instance is created for every call. + # + # source://webrick//lib/webrick/httpservlet/abstract.rb#83 + def get_instance(server, *options); end + end +end + +# Servlet for handling CGI scripts +# +# Example: +# +# server.mount('/cgi/my_script', WEBrick::HTTPServlet::CGIHandler, +# '/path/to/my_script') +# +# source://webrick//lib/webrick/httpservlet/cgihandler.rb#28 +class WEBrick::HTTPServlet::CGIHandler < ::WEBrick::HTTPServlet::AbstractServlet + # Creates a new CGI script servlet for the script at +name+ + # + # @return [CGIHandler] a new instance of CGIHandler + # + # source://webrick//lib/webrick/httpservlet/cgihandler.rb#36 + def initialize(server, name); end + + # :stopdoc: + # + # @raise [HTTPStatus::InternalServerError] + # + # source://webrick//lib/webrick/httpservlet/cgihandler.rb#50 + def do_GET(req, res); end + + # :stopdoc: + # + # @raise [HTTPStatus::InternalServerError] + # + # source://webrick//lib/webrick/httpservlet/cgihandler.rb#50 + def do_POST(req, res); end +end + +# source://webrick//lib/webrick/httpservlet/cgihandler.rb#31 +WEBrick::HTTPServlet::CGIHandler::CGIRunnerArray = T.let(T.unsafe(nil), Array) + +# Servlet for serving a single file. You probably want to use the +# FileHandler servlet instead as it handles directories and fancy indexes. +# +# Example: +# +# server.mount('/my_page.txt', WEBrick::HTTPServlet::DefaultFileHandler, +# '/path/to/my_page.txt') +# +# This servlet handles If-Modified-Since and Range requests. +# +# source://webrick//lib/webrick/httpservlet/filehandler.rb#32 +class WEBrick::HTTPServlet::DefaultFileHandler < ::WEBrick::HTTPServlet::AbstractServlet + # Creates a DefaultFileHandler instance for the file at +local_path+. + # + # @return [DefaultFileHandler] a new instance of DefaultFileHandler + # + # source://webrick//lib/webrick/httpservlet/filehandler.rb#37 + def initialize(server, local_path); end + + # :stopdoc: + # + # source://webrick//lib/webrick/httpservlet/filehandler.rb#44 + def do_GET(req, res); end + + # source://webrick//lib/webrick/httpservlet/filehandler.rb#118 + def make_partial_content(req, res, filename, filesize); end + + # returns a lambda for webrick/httpresponse.rb send_body_proc + # + # source://webrick//lib/webrick/httpservlet/filehandler.rb#90 + def multipart_body(body, parts, boundary, mtype, filesize); end + + # @return [Boolean] + # + # source://webrick//lib/webrick/httpservlet/filehandler.rb#64 + def not_modified?(req, res, mtime, etag); end + + # source://webrick//lib/webrick/httpservlet/filehandler.rb#155 + def prepare_range(range, filesize); end +end + +# ERBHandler evaluates an ERB file and returns the result. This handler +# is automatically used if there are .rhtml files in a directory served by +# the FileHandler. +# +# ERBHandler supports GET and POST methods. +# +# The ERB file is evaluated with the local variables +servlet_request+ and +# +servlet_response+ which are a WEBrick::HTTPRequest and +# WEBrick::HTTPResponse respectively. +# +# Example .rhtml file: +# +# Request to <%= servlet_request.request_uri %> +# +# Query params <%= servlet_request.query.inspect %> +# +# source://webrick//lib/webrick/httpservlet/erbhandler.rb#36 +class WEBrick::HTTPServlet::ERBHandler < ::WEBrick::HTTPServlet::AbstractServlet + # Creates a new ERBHandler on +server+ that will evaluate and serve the + # ERB file +name+ + # + # @return [ERBHandler] a new instance of ERBHandler + # + # source://webrick//lib/webrick/httpservlet/erbhandler.rb#42 + def initialize(server, name); end + + # Handles GET requests + # + # source://webrick//lib/webrick/httpservlet/erbhandler.rb#50 + def do_GET(req, res); end + + # Handles GET requests + # + # Handles POST requests + # + # source://webrick//lib/webrick/httpservlet/erbhandler.rb#50 + def do_POST(req, res); end + + private + + # Evaluates +erb+ providing +servlet_request+ and +servlet_response+ as + # local variables. + # + # source://webrick//lib/webrick/httpservlet/erbhandler.rb#79 + def evaluate(erb, servlet_request, servlet_response); end +end + +# Serves a directory including fancy indexing and a variety of other +# options. +# +# Example: +# +# server.mount('/assets', WEBrick::HTTPServlet::FileHandler, +# '/path/to/assets') +# +# source://webrick//lib/webrick/httpservlet/filehandler.rb#175 +class WEBrick::HTTPServlet::FileHandler < ::WEBrick::HTTPServlet::AbstractServlet + # Creates a FileHandler servlet on +server+ that serves files starting + # at directory +root+ + # + # +options+ may be a Hash containing keys from + # WEBrick::Config::FileHandler or +true+ or +false+. + # + # If +options+ is true or false then +:FancyIndexing+ is enabled or + # disabled respectively. + # + # @return [FileHandler] a new instance of FileHandler + # + # source://webrick//lib/webrick/httpservlet/filehandler.rb#203 + def initialize(server, root, options = T.unsafe(nil), default = T.unsafe(nil)); end + + # source://webrick//lib/webrick/httpservlet/filehandler.rb#245 + def do_GET(req, res); end + + # source://webrick//lib/webrick/httpservlet/filehandler.rb#257 + def do_OPTIONS(req, res); end + + # source://webrick//lib/webrick/httpservlet/filehandler.rb#251 + def do_POST(req, res); end + + # source://webrick//lib/webrick/httpservlet/filehandler.rb#224 + def service(req, res); end + + # :stopdoc: + # + # source://webrick//lib/webrick/httpservlet/filehandler.rb#215 + def set_filesystem_encoding(str); end + + private + + # source://webrick//lib/webrick/httpservlet/filehandler.rb#416 + def call_callback(callback_name, req, res); end + + # source://webrick//lib/webrick/httpservlet/filehandler.rb#369 + def check_filename(req, res, name); end + + # @raise [HTTPStatus::NotFound] + # + # source://webrick//lib/webrick/httpservlet/filehandler.rb#309 + def exec_handler(req, res); end + + # source://webrick//lib/webrick/httpservlet/filehandler.rb#322 + def get_handler(req, res); end + + # @return [Boolean] + # + # source://webrick//lib/webrick/httpservlet/filehandler.rb#428 + def nondisclosure_name?(name); end + + # source://webrick//lib/webrick/httpservlet/filehandler.rb#286 + def prevent_directory_traversal(req, res); end + + # source://webrick//lib/webrick/httpservlet/filehandler.rb#394 + def search_file(req, res, basename); end + + # source://webrick//lib/webrick/httpservlet/filehandler.rb#385 + def search_index_file(req, res); end + + # source://webrick//lib/webrick/httpservlet/filehandler.rb#437 + def set_dir_list(req, res); end + + # source://webrick//lib/webrick/httpservlet/filehandler.rb#335 + def set_filename(req, res); end + + # source://webrick//lib/webrick/httpservlet/filehandler.rb#376 + def shift_path_info(req, res, path_info, base = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://webrick//lib/webrick/httpservlet/filehandler.rb#277 + def trailing_pathsep?(path); end + + # @return [Boolean] + # + # source://webrick//lib/webrick/httpservlet/filehandler.rb#422 + def windows_ambiguous_name?(name); end + + class << self + # Allow custom handling of requests for files with +suffix+ by class + # +handler+ + # + # source://webrick//lib/webrick/httpservlet/filehandler.rb#182 + def add_handler(suffix, handler); end + + # Remove custom handling of requests for files with +suffix+ + # + # source://webrick//lib/webrick/httpservlet/filehandler.rb#189 + def remove_handler(suffix); end + 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 +# information. +# +# source://webrick//lib/webrick/httpstatus.rb#21 +module WEBrick::HTTPStatus + private + + # Is +code+ a client error status? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httpstatus.rb#170 + def client_error?(code); end + + # Is +code+ an error status? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httpstatus.rb#164 + def error?(code); end + + # Is +code+ an informational status? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httpstatus.rb#146 + def info?(code); end + + # Returns the description corresponding to the HTTP status +code+ + # + # WEBrick::HTTPStatus.reason_phrase 404 + # => "Not Found" + # + # source://webrick//lib/webrick/httpstatus.rb#140 + def reason_phrase(code); end + + # Is +code+ a redirection status? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httpstatus.rb#158 + def redirect?(code); end + + # Is +code+ a server error status? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httpstatus.rb#176 + def server_error?(code); end + + # Is +code+ a successful status? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httpstatus.rb#152 + def success?(code); end + + class << self + # Returns the status class corresponding to +code+ + # + # WEBrick::HTTPStatus[302] + # => WEBrick::HTTPStatus::NotFound + # + # source://webrick//lib/webrick/httpstatus.rb#186 + def [](code); end + + # Is +code+ a client error status? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httpstatus.rb#170 + def client_error?(code); end + + # Is +code+ an error status? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httpstatus.rb#164 + def error?(code); end + + # Is +code+ an informational status? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httpstatus.rb#146 + def info?(code); end + + # Returns the description corresponding to the HTTP status +code+ + # + # WEBrick::HTTPStatus.reason_phrase 404 + # => "Not Found" + # + # source://webrick//lib/webrick/httpstatus.rb#140 + def reason_phrase(code); end + + # Is +code+ a redirection status? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httpstatus.rb#158 + def redirect?(code); end + + # Is +code+ a server error status? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httpstatus.rb#176 + def server_error?(code); end + + # Is +code+ a successful status? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httpstatus.rb#152 + def success?(code); end + end +end + +# Root of the HTTP status class hierarchy +# +# source://webrick//lib/webrick/httpstatus.rb#25 +class WEBrick::HTTPStatus::Status < ::StandardError + # Returns the HTTP status code + # + # source://webrick//lib/webrick/httpstatus.rb#31 + def code; end + + # Returns the HTTP status description + # + # source://webrick//lib/webrick/httpstatus.rb#34 + def reason_phrase; end + + # Returns the HTTP status code + # + # source://webrick//lib/webrick/httpstatus.rb#31 + def to_i; end + + class << self + # source://webrick//lib/webrick/httpstatus.rb#27 + def code; end + + # source://webrick//lib/webrick/httpstatus.rb#27 + def reason_phrase; end + end +end + +# HTTPUtils provides utility methods for working with the HTTP protocol. +# +# This module is generally used internally by WEBrick +# +# source://webrick//lib/webrick/httputils.rb#25 +module WEBrick::HTTPUtils + private + + # source://webrick//lib/webrick/httputils.rb#454 + def _escape(str, regex); end + + # :stopdoc: + # + # source://webrick//lib/webrick/httputils.rb#452 + def _make_regex(str); end + + # source://webrick//lib/webrick/httputils.rb#453 + def _make_regex!(str); end + + # source://webrick//lib/webrick/httputils.rb#460 + def _unescape(str, regex); end + + # Removes quotes and escapes from +str+ + # + # 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#478 + def escape(str); end + + # Escapes 8 bit characters in +str+ + # + # source://webrick//lib/webrick/httputils.rb#519 + def escape8bit(str); end + + # Escapes form reserved characters in +str+ + # + # source://webrick//lib/webrick/httputils.rb#492 + def escape_form(str); end + + # Escapes path +str+ + # + # 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#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#145 + def mime_type(filename, mime_tab); end + + # Normalizes a request path. Raises an exception if the path cannot be + # normalized. + # + # source://webrick//lib/webrick/httputils.rb#31 + def normalize_path(path); end + + # Parses form data in +io+ with the given +boundary+ + # + # 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#156 + def parse_header(raw); end + + # Parses the query component of a URI in +str+ + # + # 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#213 + def parse_qvalues(value); end + + # Parses a Range header value +ranges_specifier+ + # + # 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#244 + def quote(str); end + + # Splits a header value +str+ according to HTTP specification. + # + # 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#485 + def unescape(str); end + + # Unescapes form reserved characters in +str+ + # + # source://webrick//lib/webrick/httputils.rb#501 + def unescape_form(str); end + + class << self + # source://webrick//lib/webrick/httputils.rb#454 + def _escape(str, regex); end + + # :stopdoc: + # + # source://webrick//lib/webrick/httputils.rb#452 + def _make_regex(str); end + + # source://webrick//lib/webrick/httputils.rb#453 + def _make_regex!(str); end + + # source://webrick//lib/webrick/httputils.rb#460 + def _unescape(str, regex); end + + # Removes quotes and escapes from +str+ + # + # 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#478 + def escape(str); end + + # Escapes 8 bit characters in +str+ + # + # source://webrick//lib/webrick/httputils.rb#519 + def escape8bit(str); end + + # Escapes form reserved characters in +str+ + # + # source://webrick//lib/webrick/httputils.rb#492 + def escape_form(str); end + + # Escapes path +str+ + # + # 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#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#145 + def mime_type(filename, mime_tab); end + + # Normalizes a request path. Raises an exception if the path cannot be + # normalized. + # + # source://webrick//lib/webrick/httputils.rb#31 + def normalize_path(path); end + + # Parses form data in +io+ with the given +boundary+ + # + # 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#156 + def parse_header(raw); end + + # Parses the query component of a URI in +str+ + # + # 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#213 + def parse_qvalues(value); end + + # Parses a Range header value +ranges_specifier+ + # + # 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#244 + def quote(str); end + + # Splits a header value +str+ according to HTTP specification. + # + # 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#485 + def unescape(str); end + + # Unescapes form reserved characters in +str+ + # + # source://webrick//lib/webrick/httputils.rb#501 + def unescape_form(str); end + end +end + +# Stores multipart form data. FormData objects are created when +# WEBrick::HTTPUtils.parse_form_data is called. +# +# source://webrick//lib/webrick/httputils.rb#253 +class WEBrick::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 + # + # 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 + # header entry. + # + # This is called by WEBrick::HTTPUtils.parse_form_data for you + # + # 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#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#331 + def append_data(data); end + + # Yields each entry in this FormData + # + # source://webrick//lib/webrick/httputils.rb#346 + def each_data; end + + # The filename of the form data part + # + # source://webrick//lib/webrick/httputils.rb#265 + def filename; end + + # The filename of the form data part + # + # source://webrick//lib/webrick/httputils.rb#265 + def filename=(_arg0); end + + # Returns all the FormData as an Array + # + # source://webrick//lib/webrick/httputils.rb#358 + def list; end + + # The name of the form data part + # + # source://webrick//lib/webrick/httputils.rb#260 + def name; end + + # The name of the form data part + # + # source://webrick//lib/webrick/httputils.rb#260 + def name=(_arg0); end + + # 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#358 + def to_ary; end + + # This FormData's body + # + # source://webrick//lib/webrick/httputils.rb#374 + def to_s; end + + protected + + # source://webrick//lib/webrick/httputils.rb#267 + def next_data; end +end + +# source://webrick//lib/webrick/utils.rb#17 +module WEBrick::Utils + private + + # Creates TCP server sockets bound to +address+:+port+ and returns them. + # + # It will create IPV4 and IPV6 sockets on all interfaces. + # + # source://webrick//lib/webrick/utils.rb#56 + def create_listeners(address, port); end + + # The server hostname + # + # source://webrick//lib/webrick/utils.rb#47 + def getservername; end + + # Generates a random string of length +len+ + # + # source://webrick//lib/webrick/utils.rb#79 + def random_string(len); end + + # Sets the close on exec flag for +io+ + # + # source://webrick//lib/webrick/utils.rb#27 + def set_close_on_exec(io); end + + # Sets IO operations on +io+ to be non-blocking + # + # source://webrick//lib/webrick/utils.rb#20 + def set_non_blocking(io); end + + # Changes the process's uid and gid to the ones of +user+ + # + # source://webrick//lib/webrick/utils.rb#34 + def su(user); end + + # Executes the passed block and raises +exception+ if execution takes more + # than +seconds+. + # + # If +seconds+ is zero or nil, simply executes the block + # + # source://webrick//lib/webrick/utils.rb#253 + def timeout(seconds, exception = T.unsafe(nil)); end + + class << self + # Creates TCP server sockets bound to +address+:+port+ and returns them. + # + # It will create IPV4 and IPV6 sockets on all interfaces. + # + # source://webrick//lib/webrick/utils.rb#56 + def create_listeners(address, port); end + + # The server hostname + # + # source://webrick//lib/webrick/utils.rb#47 + def getservername; end + + # Generates a random string of length +len+ + # + # source://webrick//lib/webrick/utils.rb#79 + def random_string(len); end + + # Sets the close on exec flag for +io+ + # + # source://webrick//lib/webrick/utils.rb#27 + def set_close_on_exec(io); end + + # Sets IO operations on +io+ to be non-blocking + # + # source://webrick//lib/webrick/utils.rb#20 + def set_non_blocking(io); end + + # Changes the process's uid and gid to the ones of +user+ + # + # source://webrick//lib/webrick/utils.rb#34 + def su(user); end + + # Executes the passed block and raises +exception+ if execution takes more + # than +seconds+. + # + # If +seconds+ is zero or nil, simply executes the block + # + # source://webrick//lib/webrick/utils.rb#253 + def timeout(seconds, exception = T.unsafe(nil)); end + end +end + +# Class used to manage timeout handlers across multiple threads. +# +# Timeout handlers should be managed by using the class methods which are +# synchronized. +# +# id = TimeoutHandler.register(10, Timeout::Error) +# begin +# sleep 20 +# puts 'foo' +# ensure +# TimeoutHandler.cancel(id) +# end +# +# will raise Timeout::Error +# +# id = TimeoutHandler.register(10, Timeout::Error) +# begin +# sleep 5 +# puts 'foo' +# ensure +# TimeoutHandler.cancel(id) +# end +# +# will print 'foo' +# +# source://webrick//lib/webrick/utils.rb#118 +class WEBrick::Utils::TimeoutHandler + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # Creates a new TimeoutHandler. You should use ::register and ::cancel + # instead of creating the timeout handler directly. + # + # @return [TimeoutHandler] a new instance of TimeoutHandler + # + # source://webrick//lib/webrick/utils.rb#148 + def initialize; end + + # Cancels the timeout handler +id+ + # + # source://webrick//lib/webrick/utils.rb#226 + def cancel(thread, id); end + + # Interrupts the timeout handler +id+ and raises +exception+ + # + # source://webrick//lib/webrick/utils.rb#203 + def interrupt(thread, id, exception); end + + # Registers a new timeout handler + # + # +time+:: Timeout in seconds + # +exception+:: Exception to raise when timeout elapsed + # + # source://webrick//lib/webrick/utils.rb#214 + def register(thread, time, exception); end + + # source://webrick//lib/webrick/utils.rb#240 + def terminate; end + + private + + # source://webrick//lib/webrick/utils.rb#158 + def watch; end + + # source://webrick//lib/webrick/utils.rb#193 + def watcher; end + + class << self + # Cancels the timeout handler +id+ + # + # source://webrick//lib/webrick/utils.rb#137 + def cancel(id); end + + # Registers a new timeout handler + # + # +time+:: Timeout in seconds + # +exception+:: Exception to raise when timeout elapsed + # + # source://webrick//lib/webrick/utils.rb#130 + def register(seconds, exception); end + + # source://webrick//lib/webrick/utils.rb#141 + def terminate; end + 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 85% rename from sorbet/rbi/gems/websocket-driver@0.7.5.rbi rename to sorbet/rbi/gems/websocket-driver@0.7.6.rbi index 7cf84d2c3..2fd3b66b6 100644 --- a/sorbet/rbi/gems/websocket-driver@0.7.5.rbi +++ b/sorbet/rbi/gems/websocket-driver@0.7.6.rbi @@ -7,16 +7,16 @@ # source://websocket-driver//lib/websocket/driver.rb#16 module WebSocket class << self - # source://websocket/1.2.9/lib/websocket.rb#20 + # source://websocket/1.2.10/lib/websocket.rb#20 def max_frame_size; end - # source://websocket/1.2.9/lib/websocket.rb#25 + # source://websocket/1.2.10/lib/websocket.rb#25 def max_frame_size=(val); end - # source://websocket/1.2.9/lib/websocket.rb#31 + # source://websocket/1.2.10/lib/websocket.rb#31 def should_raise; end - # source://websocket/1.2.9/lib/websocket.rb#36 + # source://websocket/1.2.10/lib/websocket.rb#36 def should_raise=(val); end end end @@ -27,79 +27,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 @@ -116,13 +119,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. @@ -130,18 +133,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 @@ -153,7 +156,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 # @@ -186,10 +189,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 @@ -326,88 +329,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 @@ -533,22 +536,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 @@ -622,37 +625,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 # @@ -674,7 +677,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 @@ -685,7 +688,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 # @@ -707,7 +713,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 # @@ -729,7 +735,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 @@ -738,33 +744,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 @@ -857,7 +860,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/websocket-extensions@0.1.5.rbi b/sorbet/rbi/gems/websocket-extensions@0.1.5.rbi index f7c1f9a20..80f62d8f4 100644 --- a/sorbet/rbi/gems/websocket-extensions@0.1.5.rbi +++ b/sorbet/rbi/gems/websocket-extensions@0.1.5.rbi @@ -7,16 +7,16 @@ # source://websocket-extensions//lib/websocket/extensions.rb#1 module WebSocket class << self - # source://websocket/1.2.9/lib/websocket.rb#20 + # source://websocket/1.2.10/lib/websocket.rb#20 def max_frame_size; end - # source://websocket/1.2.9/lib/websocket.rb#25 + # source://websocket/1.2.10/lib/websocket.rb#25 def max_frame_size=(val); end - # source://websocket/1.2.9/lib/websocket.rb#31 + # source://websocket/1.2.10/lib/websocket.rb#31 def should_raise; end - # source://websocket/1.2.9/lib/websocket.rb#36 + # source://websocket/1.2.10/lib/websocket.rb#36 def should_raise=(val); end end end diff --git a/sorbet/rbi/gems/websocket@1.2.9.rbi b/sorbet/rbi/gems/websocket@1.2.10.rbi similarity index 98% rename from sorbet/rbi/gems/websocket@1.2.9.rbi rename to sorbet/rbi/gems/websocket@1.2.10.rbi index bfc1459ea..6e2300b9e 100644 --- a/sorbet/rbi/gems/websocket@1.2.9.rbi +++ b/sorbet/rbi/gems/websocket@1.2.10.rbi @@ -668,7 +668,7 @@ class WebSocket::Frame::Incoming::Server < ::WebSocket::Frame::Incoming def outgoing_masking?; end end -# Construct or parse incoming WebSocket Frame. +# Construct or parse outgoing WebSocket Frame. # # @example # frame = WebSocket::Frame::Outgoing::Server.new(version: @handshake.version, data: "Hello", type: :text) @@ -754,6 +754,18 @@ class WebSocket::Handshake::Base # source://websocket//lib/websocket/handshake/base.rb#34 def <<(data); end + # Return default port for protocol (80 for ws, 443 for wss) + # + # source://websocket//lib/websocket/handshake/base.rb#70 + def default_port; end + + # Check if provided port is a default one + # + # @return [Boolean] + # + # source://websocket//lib/websocket/handshake/base.rb#75 + def default_port?; end + # Is parsing of data finished? # # @return [Boolena] True if request was completely parsed or error occured. False otherwise @@ -783,9 +795,7 @@ class WebSocket::Handshake::Base # source://websocket//lib/websocket/handshake/base.rb#10 def path; end - # Returns the value of attribute port. - # - # source://websocket//lib/websocket/handshake/base.rb#10 + # source://websocket//lib/websocket/handshake/base.rb#79 def port; end # Returns the value of attribute protocols. @@ -834,7 +844,7 @@ class WebSocket::Handshake::Base # @handshake.uri #=> "ws://example.com/path?query=true" # @return [String] Full URI with protocol # - # source://websocket//lib/websocket/handshake/base.rb#73 + # source://websocket//lib/websocket/handshake/base.rb#87 def uri; end # Is parsed data valid? @@ -855,25 +865,25 @@ class WebSocket::Handshake::Base # # @param message [String] Error message to set # - # source://websocket//lib/websocket/handshake/base.rb#92 + # source://websocket//lib/websocket/handshake/base.rb#106 def error=(message); end # Parse data imported to handshake and sets state to finished if necessary. # # @return [Boolean] True if finished parsing. False if not all data received yet. # - # source://websocket//lib/websocket/handshake/base.rb#101 + # source://websocket//lib/websocket/handshake/base.rb#115 def parse_data; end # Number of lines after header that should be handled as belonging to handshake. Any data after those lines will be handled as leftovers. # # @return [Integer] Number of lines # - # source://websocket//lib/websocket/handshake/base.rb#86 + # source://websocket//lib/websocket/handshake/base.rb#100 def reserved_leftover_lines; end end -# source://websocket//lib/websocket/handshake/base.rb#97 +# source://websocket//lib/websocket/handshake/base.rb#111 WebSocket::Handshake::Base::HEADER = T.let(T.unsafe(nil), Regexp) # Construct or parse a client WebSocket handshake. @@ -1425,7 +1435,7 @@ class WebSocket::Handshake::Server < ::WebSocket::Handshake::Base # Port of server according to client header # - # @return [String] port + # @return [Integer] port # # source://websocket//lib/websocket/handshake/server.rb#137 def port; end diff --git a/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi b/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi index 75797b618..925ccaee0 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.10908/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11109/lib/types/struct.rb#13 def inherited(s); end end end diff --git a/sorbet/rbi/gems/yard@0.9.34.rbi b/sorbet/rbi/gems/yard@0.9.34.rbi index aa9497eee..c7ba2e301 100644 --- a/sorbet/rbi/gems/yard@0.9.34.rbi +++ b/sorbet/rbi/gems/yard@0.9.34.rbi @@ -490,19 +490,19 @@ RUBY19 = T.let(T.unsafe(nil), TrueClass) # # source://yard//lib/yard/server/rack_adapter.rb#93 class Rack::Request - # source://rack/2.2.7/lib/rack/request.rb#26 + # source://rack/2.2.8/lib/rack/request.rb#26 def initialize(env); end - # source://rack/2.2.7/lib/rack/request.rb#40 + # source://rack/2.2.8/lib/rack/request.rb#40 def delete_param(k); end - # source://rack/2.2.7/lib/rack/request.rb#31 + # source://rack/2.2.8/lib/rack/request.rb#31 def params; end - # source://rack/2.2.7/lib/rack/request.rb#31 + # source://rack/2.2.8/lib/rack/request.rb#31 def query; end - # source://rack/2.2.7/lib/rack/request.rb#35 + # source://rack/2.2.8/lib/rack/request.rb#35 def update_param(k, v); end # Returns the value of attribute version_supplied. @@ -523,10 +523,10 @@ class Rack::Request def xhr?; end class << self - # source://rack/2.2.7/lib/rack/request.rb#16 + # source://rack/2.2.8/lib/rack/request.rb#16 def ip_filter; end - # source://rack/2.2.7/lib/rack/request.rb#16 + # source://rack/2.2.8/lib/rack/request.rb#16 def ip_filter=(_arg0); end end end diff --git a/sorbet/rbi/gems/zeitwerk@2.6.8.rbi b/sorbet/rbi/gems/zeitwerk@2.6.12.rbi similarity index 89% rename from sorbet/rbi/gems/zeitwerk@2.6.8.rbi rename to sorbet/rbi/gems/zeitwerk@2.6.12.rbi index e1e92244b..558e3b090 100644 --- a/sorbet/rbi/gems/zeitwerk@2.6.8.rbi +++ b/sorbet/rbi/gems/zeitwerk@2.6.12.rbi @@ -9,7 +9,7 @@ module Kernel private # source://zeitwerk//lib/zeitwerk/kernel.rb#27 - def require(path); end + def require_without_sk(path); end class << self # source://zeitwerk//lib/zeitwerk/kernel.rb#27 @@ -173,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 @@ -185,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. # @@ -214,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. @@ -233,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 @@ -241,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 @@ -274,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 @@ -285,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. # @@ -312,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 @@ -346,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: @@ -361,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 @@ -416,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 @@ -434,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 @@ -442,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 @@ -464,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 @@ -742,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. @@ -754,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 @@ -762,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 @@ -786,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. # @@ -830,7 +838,10 @@ 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 diff --git a/sorbet/rbi/todo.rbi b/sorbet/rbi/todo.rbi index ea4d26560..e70978aa1 100644 --- a/sorbet/rbi/todo.rbi +++ b/sorbet/rbi/todo.rbi @@ -22,15 +22,929 @@ module ::RUN_JOBS; end module ::RecursiveJob; end module ::RetryableError; end module ::SimpleJob; end -module ::Skylight::Middleware; end module ::THREAD_HAS_RUN; end module ::THREAD_JOBS; end module ::TestError; end module ::TestJob; end module ::TestJob::ExpectedError; end -module ActiveSupport::BroadcastLogger; end module GoodJob::Job::ERROR_EVENT_INTERRUPTED; end module GoodJob::Job::ERROR_EVENT_RETRIED; end +module Prism::AliasGlobalVariableNode::AliasGlobalVariableNode; end +module Prism::AliasGlobalVariableNode::Location; end +module Prism::AliasGlobalVariableNode::Node; end +module Prism::AliasGlobalVariableNode::Token; end +module Prism::AliasGlobalVariableNode::Visitor; end +module Prism::AliasMethodNode::AliasMethodNode; end +module Prism::AliasMethodNode::Location; end +module Prism::AliasMethodNode::Node; end +module Prism::AliasMethodNode::Token; end +module Prism::AliasMethodNode::Visitor; end +module Prism::AlternationPatternNode::AlternationPatternNode; end +module Prism::AlternationPatternNode::Location; end +module Prism::AlternationPatternNode::Node; end +module Prism::AlternationPatternNode::Token; end +module Prism::AlternationPatternNode::Visitor; end +module Prism::AndNode::AndNode; end +module Prism::AndNode::Location; end +module Prism::AndNode::Node; end +module Prism::AndNode::Token; end +module Prism::AndNode::Visitor; end +module Prism::ArgumentsNode::ArgumentsNode; end +module Prism::ArgumentsNode::Location; end +module Prism::ArgumentsNode::Node; end +module Prism::ArgumentsNode::Token; end +module Prism::ArgumentsNode::Visitor; end +module Prism::ArrayNode::ArrayNode; end +module Prism::ArrayNode::Location; end +module Prism::ArrayNode::Node; end +module Prism::ArrayNode::Token; end +module Prism::ArrayNode::Visitor; end +module Prism::ArrayPatternNode::ArrayPatternNode; end +module Prism::ArrayPatternNode::Location; end +module Prism::ArrayPatternNode::Node; end +module Prism::ArrayPatternNode::Token; end +module Prism::ArrayPatternNode::Visitor; end +module Prism::AssocNode::AssocNode; end +module Prism::AssocNode::Location; end +module Prism::AssocNode::Node; end +module Prism::AssocNode::Token; end +module Prism::AssocNode::Visitor; end +module Prism::AssocSplatNode::AssocSplatNode; end +module Prism::AssocSplatNode::Location; end +module Prism::AssocSplatNode::Node; end +module Prism::AssocSplatNode::Token; end +module Prism::AssocSplatNode::Visitor; end +module Prism::BackReferenceReadNode::BackReferenceReadNode; end +module Prism::BackReferenceReadNode::Location; end +module Prism::BackReferenceReadNode::Node; end +module Prism::BackReferenceReadNode::Token; end +module Prism::BackReferenceReadNode::Visitor; end +module Prism::BasicVisitor::Node; end +module Prism::BeginNode::BeginNode; end +module Prism::BeginNode::ElseNode; end +module Prism::BeginNode::EnsureNode; end +module Prism::BeginNode::Location; end +module Prism::BeginNode::Node; end +module Prism::BeginNode::RescueNode; end +module Prism::BeginNode::StatementsNode; end +module Prism::BeginNode::Token; end +module Prism::BeginNode::Visitor; end +module Prism::BlockArgumentNode::BlockArgumentNode; end +module Prism::BlockArgumentNode::Location; end +module Prism::BlockArgumentNode::Node; end +module Prism::BlockArgumentNode::Token; end +module Prism::BlockArgumentNode::Visitor; end +module Prism::BlockLocalVariableNode::BlockLocalVariableNode; end +module Prism::BlockLocalVariableNode::Location; end +module Prism::BlockLocalVariableNode::Node; end +module Prism::BlockLocalVariableNode::Token; end +module Prism::BlockLocalVariableNode::Visitor; end +module Prism::BlockNode::BlockNode; end +module Prism::BlockNode::BlockParametersNode; end +module Prism::BlockNode::Location; end +module Prism::BlockNode::Node; end +module Prism::BlockNode::Token; end +module Prism::BlockNode::Visitor; end +module Prism::BlockParameterNode::BlockParameterNode; end +module Prism::BlockParameterNode::Location; end +module Prism::BlockParameterNode::Node; end +module Prism::BlockParameterNode::Token; end +module Prism::BlockParameterNode::Visitor; end +module Prism::BlockParametersNode::BlockParametersNode; end +module Prism::BlockParametersNode::Location; end +module Prism::BlockParametersNode::Node; end +module Prism::BlockParametersNode::ParametersNode; end +module Prism::BlockParametersNode::Token; end +module Prism::BlockParametersNode::Visitor; end +module Prism::BreakNode::ArgumentsNode; end +module Prism::BreakNode::BreakNode; end +module Prism::BreakNode::Location; end +module Prism::BreakNode::Node; end +module Prism::BreakNode::Token; end +module Prism::BreakNode::Visitor; end +module Prism::CallAndWriteNode::CallAndWriteNode; end +module Prism::CallAndWriteNode::Location; end +module Prism::CallAndWriteNode::Node; end +module Prism::CallAndWriteNode::Token; end +module Prism::CallAndWriteNode::Visitor; end +module Prism::CallNode::ArgumentsNode; end +module Prism::CallNode::CallNode; end +module Prism::CallNode::Location; end +module Prism::CallNode::Node; end +module Prism::CallNode::Token; end +module Prism::CallNode::Visitor; end +module Prism::CallOperatorWriteNode::CallOperatorWriteNode; end +module Prism::CallOperatorWriteNode::Location; end +module Prism::CallOperatorWriteNode::Node; end +module Prism::CallOperatorWriteNode::Token; end +module Prism::CallOperatorWriteNode::Visitor; end +module Prism::CallOrWriteNode::CallOrWriteNode; end +module Prism::CallOrWriteNode::Location; end +module Prism::CallOrWriteNode::Node; end +module Prism::CallOrWriteNode::Token; end +module Prism::CallOrWriteNode::Visitor; end +module Prism::CapturePatternNode::CapturePatternNode; end +module Prism::CapturePatternNode::Location; end +module Prism::CapturePatternNode::Node; end +module Prism::CapturePatternNode::Token; end +module Prism::CapturePatternNode::Visitor; end +module Prism::CaseNode::CaseNode; end +module Prism::CaseNode::ElseNode; end +module Prism::CaseNode::Location; end +module Prism::CaseNode::Node; end +module Prism::CaseNode::Token; end +module Prism::CaseNode::Visitor; end +module Prism::ClassNode::ClassNode; end +module Prism::ClassNode::Location; end +module Prism::ClassNode::Node; end +module Prism::ClassNode::Token; end +module Prism::ClassNode::Visitor; end +module Prism::ClassVariableAndWriteNode::ClassVariableAndWriteNode; end +module Prism::ClassVariableAndWriteNode::Location; end +module Prism::ClassVariableAndWriteNode::Node; end +module Prism::ClassVariableAndWriteNode::Token; end +module Prism::ClassVariableAndWriteNode::Visitor; end +module Prism::ClassVariableOperatorWriteNode::ClassVariableOperatorWriteNode; end +module Prism::ClassVariableOperatorWriteNode::Location; end +module Prism::ClassVariableOperatorWriteNode::Node; end +module Prism::ClassVariableOperatorWriteNode::Token; end +module Prism::ClassVariableOperatorWriteNode::Visitor; end +module Prism::ClassVariableOrWriteNode::ClassVariableOrWriteNode; end +module Prism::ClassVariableOrWriteNode::Location; end +module Prism::ClassVariableOrWriteNode::Node; end +module Prism::ClassVariableOrWriteNode::Token; end +module Prism::ClassVariableOrWriteNode::Visitor; end +module Prism::ClassVariableReadNode::ClassVariableReadNode; end +module Prism::ClassVariableReadNode::Location; end +module Prism::ClassVariableReadNode::Node; end +module Prism::ClassVariableReadNode::Token; end +module Prism::ClassVariableReadNode::Visitor; end +module Prism::ClassVariableTargetNode::ClassVariableTargetNode; end +module Prism::ClassVariableTargetNode::Location; end +module Prism::ClassVariableTargetNode::Node; end +module Prism::ClassVariableTargetNode::Token; end +module Prism::ClassVariableTargetNode::Visitor; end +module Prism::ClassVariableWriteNode::ClassVariableWriteNode; end +module Prism::ClassVariableWriteNode::Location; end +module Prism::ClassVariableWriteNode::Node; end +module Prism::ClassVariableWriteNode::Token; end +module Prism::ClassVariableWriteNode::Visitor; end +module Prism::Comment::Location; end +module Prism::ConstantAndWriteNode::ConstantAndWriteNode; end +module Prism::ConstantAndWriteNode::Location; end +module Prism::ConstantAndWriteNode::Node; end +module Prism::ConstantAndWriteNode::Token; end +module Prism::ConstantAndWriteNode::Visitor; end +module Prism::ConstantOperatorWriteNode::ConstantOperatorWriteNode; end +module Prism::ConstantOperatorWriteNode::Location; end +module Prism::ConstantOperatorWriteNode::Node; end +module Prism::ConstantOperatorWriteNode::Token; end +module Prism::ConstantOperatorWriteNode::Visitor; end +module Prism::ConstantOrWriteNode::ConstantOrWriteNode; end +module Prism::ConstantOrWriteNode::Location; end +module Prism::ConstantOrWriteNode::Node; end +module Prism::ConstantOrWriteNode::Token; end +module Prism::ConstantOrWriteNode::Visitor; end +module Prism::ConstantPathAndWriteNode::ConstantPathAndWriteNode; end +module Prism::ConstantPathAndWriteNode::ConstantPathNode; end +module Prism::ConstantPathAndWriteNode::Location; end +module Prism::ConstantPathAndWriteNode::Node; end +module Prism::ConstantPathAndWriteNode::Token; end +module Prism::ConstantPathAndWriteNode::Visitor; end +module Prism::ConstantPathNode::ConstantPathNode; end +module Prism::ConstantPathNode::Location; end +module Prism::ConstantPathNode::Node; end +module Prism::ConstantPathNode::Token; end +module Prism::ConstantPathNode::Visitor; end +module Prism::ConstantPathOperatorWriteNode::ConstantPathNode; end +module Prism::ConstantPathOperatorWriteNode::ConstantPathOperatorWriteNode; end +module Prism::ConstantPathOperatorWriteNode::Location; end +module Prism::ConstantPathOperatorWriteNode::Node; end +module Prism::ConstantPathOperatorWriteNode::Token; end +module Prism::ConstantPathOperatorWriteNode::Visitor; end +module Prism::ConstantPathOrWriteNode::ConstantPathNode; end +module Prism::ConstantPathOrWriteNode::ConstantPathOrWriteNode; end +module Prism::ConstantPathOrWriteNode::Location; end +module Prism::ConstantPathOrWriteNode::Node; end +module Prism::ConstantPathOrWriteNode::Token; end +module Prism::ConstantPathOrWriteNode::Visitor; end +module Prism::ConstantPathTargetNode::ConstantPathTargetNode; end +module Prism::ConstantPathTargetNode::Location; end +module Prism::ConstantPathTargetNode::Node; end +module Prism::ConstantPathTargetNode::Token; end +module Prism::ConstantPathTargetNode::Visitor; end +module Prism::ConstantPathWriteNode::ConstantPathNode; end +module Prism::ConstantPathWriteNode::ConstantPathWriteNode; end +module Prism::ConstantPathWriteNode::Location; end +module Prism::ConstantPathWriteNode::Node; end +module Prism::ConstantPathWriteNode::Token; end +module Prism::ConstantPathWriteNode::Visitor; end +module Prism::ConstantReadNode::ConstantReadNode; end +module Prism::ConstantReadNode::Location; end +module Prism::ConstantReadNode::Node; end +module Prism::ConstantReadNode::Token; end +module Prism::ConstantReadNode::Visitor; end +module Prism::ConstantTargetNode::ConstantTargetNode; end +module Prism::ConstantTargetNode::Location; end +module Prism::ConstantTargetNode::Node; end +module Prism::ConstantTargetNode::Token; end +module Prism::ConstantTargetNode::Visitor; end +module Prism::ConstantWriteNode::ConstantWriteNode; end +module Prism::ConstantWriteNode::Location; end +module Prism::ConstantWriteNode::Node; end +module Prism::ConstantWriteNode::Token; end +module Prism::ConstantWriteNode::Visitor; end +module Prism::DefNode::DefNode; end +module Prism::DefNode::Location; end +module Prism::DefNode::Node; end +module Prism::DefNode::ParametersNode; end +module Prism::DefNode::Token; end +module Prism::DefNode::Visitor; end +module Prism::DefinedNode::DefinedNode; end +module Prism::DefinedNode::Location; end +module Prism::DefinedNode::Node; end +module Prism::DefinedNode::Token; end +module Prism::DefinedNode::Visitor; end +module Prism::ElseNode::ElseNode; end +module Prism::ElseNode::Location; end +module Prism::ElseNode::Node; end +module Prism::ElseNode::StatementsNode; end +module Prism::ElseNode::Token; end +module Prism::ElseNode::Visitor; end +module Prism::EmbeddedStatementsNode::EmbeddedStatementsNode; end +module Prism::EmbeddedStatementsNode::Location; end +module Prism::EmbeddedStatementsNode::Node; end +module Prism::EmbeddedStatementsNode::StatementsNode; end +module Prism::EmbeddedStatementsNode::Token; end +module Prism::EmbeddedStatementsNode::Visitor; end +module Prism::EmbeddedVariableNode::EmbeddedVariableNode; end +module Prism::EmbeddedVariableNode::Location; end +module Prism::EmbeddedVariableNode::Node; end +module Prism::EmbeddedVariableNode::Token; end +module Prism::EmbeddedVariableNode::Visitor; end +module Prism::EnsureNode::EnsureNode; end +module Prism::EnsureNode::Location; end +module Prism::EnsureNode::Node; end +module Prism::EnsureNode::StatementsNode; end +module Prism::EnsureNode::Token; end +module Prism::EnsureNode::Visitor; end +module Prism::FalseNode::FalseNode; end +module Prism::FalseNode::Location; end +module Prism::FalseNode::Node; end +module Prism::FalseNode::Token; end +module Prism::FalseNode::Visitor; end +module Prism::FindPatternNode::FindPatternNode; end +module Prism::FindPatternNode::Location; end +module Prism::FindPatternNode::Node; end +module Prism::FindPatternNode::Token; end +module Prism::FindPatternNode::Visitor; end +module Prism::FlipFlopNode::FlipFlopNode; end +module Prism::FlipFlopNode::Location; end +module Prism::FlipFlopNode::Node; end +module Prism::FlipFlopNode::Token; end +module Prism::FlipFlopNode::Visitor; end +module Prism::FloatNode::FloatNode; end +module Prism::FloatNode::Location; end +module Prism::FloatNode::Node; end +module Prism::FloatNode::Token; end +module Prism::FloatNode::Visitor; end +module Prism::ForNode::ForNode; end +module Prism::ForNode::Location; end +module Prism::ForNode::Node; end +module Prism::ForNode::StatementsNode; end +module Prism::ForNode::Token; end +module Prism::ForNode::Visitor; end +module Prism::ForwardingArgumentsNode::ForwardingArgumentsNode; end +module Prism::ForwardingArgumentsNode::Location; end +module Prism::ForwardingArgumentsNode::Node; end +module Prism::ForwardingArgumentsNode::Token; end +module Prism::ForwardingArgumentsNode::Visitor; end +module Prism::ForwardingParameterNode::ForwardingParameterNode; end +module Prism::ForwardingParameterNode::Location; end +module Prism::ForwardingParameterNode::Node; end +module Prism::ForwardingParameterNode::Token; end +module Prism::ForwardingParameterNode::Visitor; end +module Prism::ForwardingSuperNode::BlockNode; end +module Prism::ForwardingSuperNode::ForwardingSuperNode; end +module Prism::ForwardingSuperNode::Location; end +module Prism::ForwardingSuperNode::Node; end +module Prism::ForwardingSuperNode::Token; end +module Prism::ForwardingSuperNode::Visitor; end +module Prism::GlobalVariableAndWriteNode::GlobalVariableAndWriteNode; end +module Prism::GlobalVariableAndWriteNode::Location; end +module Prism::GlobalVariableAndWriteNode::Node; end +module Prism::GlobalVariableAndWriteNode::Token; end +module Prism::GlobalVariableAndWriteNode::Visitor; end +module Prism::GlobalVariableOperatorWriteNode::GlobalVariableOperatorWriteNode; end +module Prism::GlobalVariableOperatorWriteNode::Location; end +module Prism::GlobalVariableOperatorWriteNode::Node; end +module Prism::GlobalVariableOperatorWriteNode::Token; end +module Prism::GlobalVariableOperatorWriteNode::Visitor; end +module Prism::GlobalVariableOrWriteNode::GlobalVariableOrWriteNode; end +module Prism::GlobalVariableOrWriteNode::Location; end +module Prism::GlobalVariableOrWriteNode::Node; end +module Prism::GlobalVariableOrWriteNode::Token; end +module Prism::GlobalVariableOrWriteNode::Visitor; end +module Prism::GlobalVariableReadNode::GlobalVariableReadNode; end +module Prism::GlobalVariableReadNode::Location; end +module Prism::GlobalVariableReadNode::Node; end +module Prism::GlobalVariableReadNode::Token; end +module Prism::GlobalVariableReadNode::Visitor; end +module Prism::GlobalVariableTargetNode::GlobalVariableTargetNode; end +module Prism::GlobalVariableTargetNode::Location; end +module Prism::GlobalVariableTargetNode::Node; end +module Prism::GlobalVariableTargetNode::Token; end +module Prism::GlobalVariableTargetNode::Visitor; end +module Prism::GlobalVariableWriteNode::GlobalVariableWriteNode; end +module Prism::GlobalVariableWriteNode::Location; end +module Prism::GlobalVariableWriteNode::Node; end +module Prism::GlobalVariableWriteNode::Token; end +module Prism::GlobalVariableWriteNode::Visitor; end +module Prism::HashNode::HashNode; end +module Prism::HashNode::Location; end +module Prism::HashNode::Node; end +module Prism::HashNode::Token; end +module Prism::HashNode::Visitor; end +module Prism::HashPatternNode::HashPatternNode; end +module Prism::HashPatternNode::Location; end +module Prism::HashPatternNode::Node; end +module Prism::HashPatternNode::Token; end +module Prism::HashPatternNode::Visitor; end +module Prism::IfNode::IfNode; end +module Prism::IfNode::Location; end +module Prism::IfNode::Node; end +module Prism::IfNode::StatementsNode; end +module Prism::IfNode::Token; end +module Prism::IfNode::Visitor; end +module Prism::ImaginaryNode::ImaginaryNode; end +module Prism::ImaginaryNode::Location; end +module Prism::ImaginaryNode::Node; end +module Prism::ImaginaryNode::Token; end +module Prism::ImaginaryNode::Visitor; end +module Prism::ImplicitNode::ImplicitNode; end +module Prism::ImplicitNode::Location; end +module Prism::ImplicitNode::Node; end +module Prism::ImplicitNode::Token; end +module Prism::ImplicitNode::Visitor; end +module Prism::InNode::InNode; end +module Prism::InNode::Location; end +module Prism::InNode::Node; end +module Prism::InNode::StatementsNode; end +module Prism::InNode::Token; end +module Prism::InNode::Visitor; end +module Prism::IndexAndWriteNode::ArgumentsNode; end +module Prism::IndexAndWriteNode::IndexAndWriteNode; end +module Prism::IndexAndWriteNode::Location; end +module Prism::IndexAndWriteNode::Node; end +module Prism::IndexAndWriteNode::Token; end +module Prism::IndexAndWriteNode::Visitor; end +module Prism::IndexOperatorWriteNode::ArgumentsNode; end +module Prism::IndexOperatorWriteNode::IndexOperatorWriteNode; end +module Prism::IndexOperatorWriteNode::Location; end +module Prism::IndexOperatorWriteNode::Node; end +module Prism::IndexOperatorWriteNode::Token; end +module Prism::IndexOperatorWriteNode::Visitor; end +module Prism::IndexOrWriteNode::ArgumentsNode; end +module Prism::IndexOrWriteNode::IndexOrWriteNode; end +module Prism::IndexOrWriteNode::Location; end +module Prism::IndexOrWriteNode::Node; end +module Prism::IndexOrWriteNode::Token; end +module Prism::IndexOrWriteNode::Visitor; end +module Prism::InstanceVariableAndWriteNode::InstanceVariableAndWriteNode; end +module Prism::InstanceVariableAndWriteNode::Location; end +module Prism::InstanceVariableAndWriteNode::Node; end +module Prism::InstanceVariableAndWriteNode::Token; end +module Prism::InstanceVariableAndWriteNode::Visitor; end +module Prism::InstanceVariableOperatorWriteNode::InstanceVariableOperatorWriteNode; end +module Prism::InstanceVariableOperatorWriteNode::Location; end +module Prism::InstanceVariableOperatorWriteNode::Node; end +module Prism::InstanceVariableOperatorWriteNode::Token; end +module Prism::InstanceVariableOperatorWriteNode::Visitor; end +module Prism::InstanceVariableOrWriteNode::InstanceVariableOrWriteNode; end +module Prism::InstanceVariableOrWriteNode::Location; end +module Prism::InstanceVariableOrWriteNode::Node; end +module Prism::InstanceVariableOrWriteNode::Token; end +module Prism::InstanceVariableOrWriteNode::Visitor; end +module Prism::InstanceVariableReadNode::InstanceVariableReadNode; end +module Prism::InstanceVariableReadNode::Location; end +module Prism::InstanceVariableReadNode::Node; end +module Prism::InstanceVariableReadNode::Token; end +module Prism::InstanceVariableReadNode::Visitor; end +module Prism::InstanceVariableTargetNode::InstanceVariableTargetNode; end +module Prism::InstanceVariableTargetNode::Location; end +module Prism::InstanceVariableTargetNode::Node; end +module Prism::InstanceVariableTargetNode::Token; end +module Prism::InstanceVariableTargetNode::Visitor; end +module Prism::InstanceVariableWriteNode::InstanceVariableWriteNode; end +module Prism::InstanceVariableWriteNode::Location; end +module Prism::InstanceVariableWriteNode::Node; end +module Prism::InstanceVariableWriteNode::Token; end +module Prism::InstanceVariableWriteNode::Visitor; end +module Prism::IntegerNode::IntegerNode; end +module Prism::IntegerNode::Location; end +module Prism::IntegerNode::Node; end +module Prism::IntegerNode::Token; end +module Prism::IntegerNode::Visitor; end +module Prism::InterpolatedMatchLastLineNode::InterpolatedMatchLastLineNode; end +module Prism::InterpolatedMatchLastLineNode::Location; end +module Prism::InterpolatedMatchLastLineNode::Node; end +module Prism::InterpolatedMatchLastLineNode::Token; end +module Prism::InterpolatedMatchLastLineNode::Visitor; end +module Prism::InterpolatedRegularExpressionNode::InterpolatedRegularExpressionNode; end +module Prism::InterpolatedRegularExpressionNode::Location; end +module Prism::InterpolatedRegularExpressionNode::Node; end +module Prism::InterpolatedRegularExpressionNode::Token; end +module Prism::InterpolatedRegularExpressionNode::Visitor; end +module Prism::InterpolatedStringNode::InterpolatedStringNode; end +module Prism::InterpolatedStringNode::Location; end +module Prism::InterpolatedStringNode::Node; end +module Prism::InterpolatedStringNode::Token; end +module Prism::InterpolatedStringNode::Visitor; end +module Prism::InterpolatedSymbolNode::InterpolatedSymbolNode; end +module Prism::InterpolatedSymbolNode::Location; end +module Prism::InterpolatedSymbolNode::Node; end +module Prism::InterpolatedSymbolNode::Token; end +module Prism::InterpolatedSymbolNode::Visitor; end +module Prism::InterpolatedXStringNode::InterpolatedXStringNode; end +module Prism::InterpolatedXStringNode::Location; end +module Prism::InterpolatedXStringNode::Node; end +module Prism::InterpolatedXStringNode::Token; end +module Prism::InterpolatedXStringNode::Visitor; end +module Prism::KeywordHashNode::KeywordHashNode; end +module Prism::KeywordHashNode::Location; end +module Prism::KeywordHashNode::Node; end +module Prism::KeywordHashNode::Token; end +module Prism::KeywordHashNode::Visitor; end +module Prism::KeywordParameterNode::KeywordParameterNode; end +module Prism::KeywordParameterNode::Location; end +module Prism::KeywordParameterNode::Node; end +module Prism::KeywordParameterNode::Token; end +module Prism::KeywordParameterNode::Visitor; end +module Prism::KeywordRestParameterNode::KeywordRestParameterNode; end +module Prism::KeywordRestParameterNode::Location; end +module Prism::KeywordRestParameterNode::Node; end +module Prism::KeywordRestParameterNode::Token; end +module Prism::KeywordRestParameterNode::Visitor; end +module Prism::LambdaNode::BlockParametersNode; end +module Prism::LambdaNode::LambdaNode; end +module Prism::LambdaNode::Location; end +module Prism::LambdaNode::Node; end +module Prism::LambdaNode::Token; end +module Prism::LambdaNode::Visitor; end +module Prism::LocalVariableAndWriteNode::LocalVariableAndWriteNode; end +module Prism::LocalVariableAndWriteNode::Location; end +module Prism::LocalVariableAndWriteNode::Node; end +module Prism::LocalVariableAndWriteNode::Token; end +module Prism::LocalVariableAndWriteNode::Visitor; end +module Prism::LocalVariableOperatorWriteNode::LocalVariableOperatorWriteNode; end +module Prism::LocalVariableOperatorWriteNode::Location; end +module Prism::LocalVariableOperatorWriteNode::Node; end +module Prism::LocalVariableOperatorWriteNode::Token; end +module Prism::LocalVariableOperatorWriteNode::Visitor; end +module Prism::LocalVariableOrWriteNode::LocalVariableOrWriteNode; end +module Prism::LocalVariableOrWriteNode::Location; end +module Prism::LocalVariableOrWriteNode::Node; end +module Prism::LocalVariableOrWriteNode::Token; end +module Prism::LocalVariableOrWriteNode::Visitor; end +module Prism::LocalVariableReadNode::LocalVariableReadNode; end +module Prism::LocalVariableReadNode::Location; end +module Prism::LocalVariableReadNode::Node; end +module Prism::LocalVariableReadNode::Token; end +module Prism::LocalVariableReadNode::Visitor; end +module Prism::LocalVariableTargetNode::LocalVariableTargetNode; end +module Prism::LocalVariableTargetNode::Location; end +module Prism::LocalVariableTargetNode::Node; end +module Prism::LocalVariableTargetNode::Token; end +module Prism::LocalVariableTargetNode::Visitor; end +module Prism::LocalVariableWriteNode::LocalVariableWriteNode; end +module Prism::LocalVariableWriteNode::Location; end +module Prism::LocalVariableWriteNode::Node; end +module Prism::LocalVariableWriteNode::Token; end +module Prism::LocalVariableWriteNode::Visitor; end +module Prism::Location::Comment; end +module Prism::Location::Location; end +module Prism::Location::Source; end +module Prism::MatchLastLineNode::Location; end +module Prism::MatchLastLineNode::MatchLastLineNode; end +module Prism::MatchLastLineNode::Node; end +module Prism::MatchLastLineNode::Token; end +module Prism::MatchLastLineNode::Visitor; end +module Prism::MatchPredicateNode::Location; end +module Prism::MatchPredicateNode::MatchPredicateNode; end +module Prism::MatchPredicateNode::Node; end +module Prism::MatchPredicateNode::Token; end +module Prism::MatchPredicateNode::Visitor; end +module Prism::MatchRequiredNode::Location; end +module Prism::MatchRequiredNode::MatchRequiredNode; end +module Prism::MatchRequiredNode::Node; end +module Prism::MatchRequiredNode::Token; end +module Prism::MatchRequiredNode::Visitor; end +module Prism::MatchWriteNode::CallNode; end +module Prism::MatchWriteNode::Location; end +module Prism::MatchWriteNode::MatchWriteNode; end +module Prism::MatchWriteNode::Node; end +module Prism::MatchWriteNode::Token; end +module Prism::MatchWriteNode::Visitor; end +module Prism::MissingNode::Location; end +module Prism::MissingNode::MissingNode; end +module Prism::MissingNode::Node; end +module Prism::MissingNode::Token; end +module Prism::MissingNode::Visitor; end +module Prism::ModuleNode::Location; end +module Prism::ModuleNode::ModuleNode; end +module Prism::ModuleNode::Node; end +module Prism::ModuleNode::Token; end +module Prism::ModuleNode::Visitor; end +module Prism::MultiTargetNode::Location; end +module Prism::MultiTargetNode::MultiTargetNode; end +module Prism::MultiTargetNode::Node; end +module Prism::MultiTargetNode::Token; end +module Prism::MultiTargetNode::Visitor; end +module Prism::MultiWriteNode::Location; end +module Prism::MultiWriteNode::MultiWriteNode; end +module Prism::MultiWriteNode::Node; end +module Prism::MultiWriteNode::Token; end +module Prism::MultiWriteNode::Visitor; end +module Prism::NextNode::ArgumentsNode; end +module Prism::NextNode::Location; end +module Prism::NextNode::NextNode; end +module Prism::NextNode::Node; end +module Prism::NextNode::Token; end +module Prism::NextNode::Visitor; end +module Prism::NilNode::Location; end +module Prism::NilNode::NilNode; end +module Prism::NilNode::Node; end +module Prism::NilNode::Token; end +module Prism::NilNode::Visitor; end +module Prism::NoKeywordsParameterNode::Location; end +module Prism::NoKeywordsParameterNode::NoKeywordsParameterNode; end +module Prism::NoKeywordsParameterNode::Node; end +module Prism::NoKeywordsParameterNode::Token; end +module Prism::NoKeywordsParameterNode::Visitor; end +module Prism::Node::Location; end +module Prism::Node::Node; end +module Prism::NodeInspector::Location; end +module Prism::NodeInspector::Node; end +module Prism::NodeInspector::NodeInspector; end +module Prism::NumberedReferenceReadNode::Location; end +module Prism::NumberedReferenceReadNode::Node; end +module Prism::NumberedReferenceReadNode::NumberedReferenceReadNode; end +module Prism::NumberedReferenceReadNode::Token; end +module Prism::NumberedReferenceReadNode::Visitor; end +module Prism::OptionalParameterNode::Location; end +module Prism::OptionalParameterNode::Node; end +module Prism::OptionalParameterNode::OptionalParameterNode; end +module Prism::OptionalParameterNode::Token; end +module Prism::OptionalParameterNode::Visitor; end +module Prism::OrNode::Location; end +module Prism::OrNode::Node; end +module Prism::OrNode::OrNode; end +module Prism::OrNode::Token; end +module Prism::OrNode::Visitor; end +module Prism::ParametersNode::BlockParameterNode; end +module Prism::ParametersNode::Location; end +module Prism::ParametersNode::Node; end +module Prism::ParametersNode::ParametersNode; end +module Prism::ParametersNode::RestParameterNode; end +module Prism::ParametersNode::Token; end +module Prism::ParametersNode::Visitor; end +module Prism::ParenthesesNode::Location; end +module Prism::ParenthesesNode::Node; end +module Prism::ParenthesesNode::ParenthesesNode; end +module Prism::ParenthesesNode::Token; end +module Prism::ParenthesesNode::Visitor; end +module Prism::ParseError::Location; end +module Prism::ParseResult::Comment; end +module Prism::ParseResult::ParseWarning; end +module Prism::ParseResult::ProgramNode; end +module Prism::ParseResult::Source; end +module Prism::ParseWarning::Location; end +module Prism::PinnedExpressionNode::Location; end +module Prism::PinnedExpressionNode::Node; end +module Prism::PinnedExpressionNode::PinnedExpressionNode; end +module Prism::PinnedExpressionNode::Token; end +module Prism::PinnedExpressionNode::Visitor; end +module Prism::PinnedVariableNode::Location; end +module Prism::PinnedVariableNode::Node; end +module Prism::PinnedVariableNode::PinnedVariableNode; end +module Prism::PinnedVariableNode::Token; end +module Prism::PinnedVariableNode::Visitor; end +module Prism::PostExecutionNode::Location; end +module Prism::PostExecutionNode::Node; end +module Prism::PostExecutionNode::PostExecutionNode; end +module Prism::PostExecutionNode::StatementsNode; end +module Prism::PostExecutionNode::Token; end +module Prism::PostExecutionNode::Visitor; end +module Prism::PreExecutionNode::Location; end +module Prism::PreExecutionNode::Node; end +module Prism::PreExecutionNode::PreExecutionNode; end +module Prism::PreExecutionNode::StatementsNode; end +module Prism::PreExecutionNode::Token; end +module Prism::PreExecutionNode::Visitor; end +module Prism::ProgramNode::Location; end +module Prism::ProgramNode::Node; end +module Prism::ProgramNode::ProgramNode; end +module Prism::ProgramNode::StatementsNode; end +module Prism::ProgramNode::Token; end +module Prism::ProgramNode::Visitor; end +module Prism::RangeNode::Location; end +module Prism::RangeNode::Node; end +module Prism::RangeNode::RangeNode; end +module Prism::RangeNode::Token; end +module Prism::RangeNode::Visitor; end +module Prism::RationalNode::Location; end +module Prism::RationalNode::Node; end +module Prism::RationalNode::RationalNode; end +module Prism::RationalNode::Token; end +module Prism::RationalNode::Visitor; end +module Prism::RedoNode::Location; end +module Prism::RedoNode::Node; end +module Prism::RedoNode::RedoNode; end +module Prism::RedoNode::Token; end +module Prism::RedoNode::Visitor; end +module Prism::RegularExpressionNode::Location; end +module Prism::RegularExpressionNode::Node; end +module Prism::RegularExpressionNode::RegularExpressionNode; end +module Prism::RegularExpressionNode::Token; end +module Prism::RegularExpressionNode::Visitor; end +module Prism::RequiredParameterNode::Location; end +module Prism::RequiredParameterNode::Node; end +module Prism::RequiredParameterNode::RequiredParameterNode; end +module Prism::RequiredParameterNode::Token; end +module Prism::RequiredParameterNode::Visitor; end +module Prism::RescueModifierNode::Location; end +module Prism::RescueModifierNode::Node; end +module Prism::RescueModifierNode::RescueModifierNode; end +module Prism::RescueModifierNode::Token; end +module Prism::RescueModifierNode::Visitor; end +module Prism::RescueNode::Location; end +module Prism::RescueNode::Node; end +module Prism::RescueNode::RescueNode; end +module Prism::RescueNode::StatementsNode; end +module Prism::RescueNode::Token; end +module Prism::RescueNode::Visitor; end +module Prism::RestParameterNode::Location; end +module Prism::RestParameterNode::Node; end +module Prism::RestParameterNode::RestParameterNode; end +module Prism::RestParameterNode::Token; end +module Prism::RestParameterNode::Visitor; end +module Prism::RetryNode::Location; end +module Prism::RetryNode::Node; end +module Prism::RetryNode::RetryNode; end +module Prism::RetryNode::Token; end +module Prism::RetryNode::Visitor; end +module Prism::ReturnNode::ArgumentsNode; end +module Prism::ReturnNode::Location; end +module Prism::ReturnNode::Node; end +module Prism::ReturnNode::ReturnNode; end +module Prism::ReturnNode::Token; end +module Prism::ReturnNode::Visitor; end +module Prism::SelfNode::Location; end +module Prism::SelfNode::Node; end +module Prism::SelfNode::SelfNode; end +module Prism::SelfNode::Token; end +module Prism::SelfNode::Visitor; end +module Prism::SingletonClassNode::Location; end +module Prism::SingletonClassNode::Node; end +module Prism::SingletonClassNode::SingletonClassNode; end +module Prism::SingletonClassNode::Token; end +module Prism::SingletonClassNode::Visitor; end +module Prism::SourceEncodingNode::Location; end +module Prism::SourceEncodingNode::Node; end +module Prism::SourceEncodingNode::SourceEncodingNode; end +module Prism::SourceEncodingNode::Token; end +module Prism::SourceEncodingNode::Visitor; end +module Prism::SourceFileNode::Location; end +module Prism::SourceFileNode::Node; end +module Prism::SourceFileNode::SourceFileNode; end +module Prism::SourceFileNode::Token; end +module Prism::SourceFileNode::Visitor; end +module Prism::SourceLineNode::Location; end +module Prism::SourceLineNode::Node; end +module Prism::SourceLineNode::SourceLineNode; end +module Prism::SourceLineNode::Token; end +module Prism::SourceLineNode::Visitor; end +module Prism::SplatNode::Location; end +module Prism::SplatNode::Node; end +module Prism::SplatNode::SplatNode; end +module Prism::SplatNode::Token; end +module Prism::SplatNode::Visitor; end +module Prism::StatementsNode::Location; end +module Prism::StatementsNode::Node; end +module Prism::StatementsNode::StatementsNode; end +module Prism::StatementsNode::Token; end +module Prism::StatementsNode::Visitor; end +module Prism::StringConcatNode::Location; end +module Prism::StringConcatNode::Node; end +module Prism::StringConcatNode::StringConcatNode; end +module Prism::StringConcatNode::Token; end +module Prism::StringConcatNode::Visitor; end +module Prism::StringNode::Location; end +module Prism::StringNode::Node; end +module Prism::StringNode::StringNode; end +module Prism::StringNode::Token; end +module Prism::StringNode::Visitor; end +module Prism::SuperNode::ArgumentsNode; end +module Prism::SuperNode::Location; end +module Prism::SuperNode::Node; end +module Prism::SuperNode::SuperNode; end +module Prism::SuperNode::Token; end +module Prism::SuperNode::Visitor; end +module Prism::SymbolNode::Location; end +module Prism::SymbolNode::Node; end +module Prism::SymbolNode::SymbolNode; end +module Prism::SymbolNode::Token; end +module Prism::SymbolNode::Visitor; end +module Prism::Token::Location; end +module Prism::TrueNode::Location; end +module Prism::TrueNode::Node; end +module Prism::TrueNode::Token; end +module Prism::TrueNode::TrueNode; end +module Prism::TrueNode::Visitor; end +module Prism::UndefNode::Location; end +module Prism::UndefNode::Node; end +module Prism::UndefNode::Token; end +module Prism::UndefNode::UndefNode; end +module Prism::UndefNode::Visitor; end +module Prism::UnlessNode::ElseNode; end +module Prism::UnlessNode::Location; end +module Prism::UnlessNode::Node; end +module Prism::UnlessNode::StatementsNode; end +module Prism::UnlessNode::Token; end +module Prism::UnlessNode::UnlessNode; end +module Prism::UnlessNode::Visitor; end +module Prism::UntilNode::Location; end +module Prism::UntilNode::Node; end +module Prism::UntilNode::StatementsNode; end +module Prism::UntilNode::Token; end +module Prism::UntilNode::UntilNode; end +module Prism::UntilNode::Visitor; end +module Prism::Visitor::AliasGlobalVariableNode; end +module Prism::Visitor::AliasMethodNode; end +module Prism::Visitor::AlternationPatternNode; end +module Prism::Visitor::AndNode; end +module Prism::Visitor::ArgumentsNode; end +module Prism::Visitor::ArrayNode; end +module Prism::Visitor::ArrayPatternNode; end +module Prism::Visitor::AssocNode; end +module Prism::Visitor::AssocSplatNode; end +module Prism::Visitor::BackReferenceReadNode; end +module Prism::Visitor::BeginNode; end +module Prism::Visitor::BlockArgumentNode; end +module Prism::Visitor::BlockLocalVariableNode; end +module Prism::Visitor::BlockNode; end +module Prism::Visitor::BlockParameterNode; end +module Prism::Visitor::BlockParametersNode; end +module Prism::Visitor::BreakNode; end +module Prism::Visitor::CallAndWriteNode; end +module Prism::Visitor::CallNode; end +module Prism::Visitor::CallOperatorWriteNode; end +module Prism::Visitor::CallOrWriteNode; end +module Prism::Visitor::CapturePatternNode; end +module Prism::Visitor::CaseNode; end +module Prism::Visitor::ClassNode; end +module Prism::Visitor::ClassVariableAndWriteNode; end +module Prism::Visitor::ClassVariableOperatorWriteNode; end +module Prism::Visitor::ClassVariableOrWriteNode; end +module Prism::Visitor::ClassVariableReadNode; end +module Prism::Visitor::ClassVariableTargetNode; end +module Prism::Visitor::ClassVariableWriteNode; end +module Prism::Visitor::ConstantAndWriteNode; end +module Prism::Visitor::ConstantOperatorWriteNode; end +module Prism::Visitor::ConstantOrWriteNode; end +module Prism::Visitor::ConstantPathAndWriteNode; end +module Prism::Visitor::ConstantPathNode; end +module Prism::Visitor::ConstantPathOperatorWriteNode; end +module Prism::Visitor::ConstantPathOrWriteNode; end +module Prism::Visitor::ConstantPathTargetNode; end +module Prism::Visitor::ConstantPathWriteNode; end +module Prism::Visitor::ConstantReadNode; end +module Prism::Visitor::ConstantTargetNode; end +module Prism::Visitor::ConstantWriteNode; end +module Prism::Visitor::DefNode; end +module Prism::Visitor::DefinedNode; end +module Prism::Visitor::ElseNode; end +module Prism::Visitor::EmbeddedStatementsNode; end +module Prism::Visitor::EmbeddedVariableNode; end +module Prism::Visitor::EnsureNode; end +module Prism::Visitor::FalseNode; end +module Prism::Visitor::FindPatternNode; end +module Prism::Visitor::FlipFlopNode; end +module Prism::Visitor::FloatNode; end +module Prism::Visitor::ForNode; end +module Prism::Visitor::ForwardingArgumentsNode; end +module Prism::Visitor::ForwardingParameterNode; end +module Prism::Visitor::ForwardingSuperNode; end +module Prism::Visitor::GlobalVariableAndWriteNode; end +module Prism::Visitor::GlobalVariableOperatorWriteNode; end +module Prism::Visitor::GlobalVariableOrWriteNode; end +module Prism::Visitor::GlobalVariableReadNode; end +module Prism::Visitor::GlobalVariableTargetNode; end +module Prism::Visitor::GlobalVariableWriteNode; end +module Prism::Visitor::HashNode; end +module Prism::Visitor::HashPatternNode; end +module Prism::Visitor::IfNode; end +module Prism::Visitor::ImaginaryNode; end +module Prism::Visitor::ImplicitNode; end +module Prism::Visitor::InNode; end +module Prism::Visitor::IndexAndWriteNode; end +module Prism::Visitor::IndexOperatorWriteNode; end +module Prism::Visitor::IndexOrWriteNode; end +module Prism::Visitor::InstanceVariableAndWriteNode; end +module Prism::Visitor::InstanceVariableOperatorWriteNode; end +module Prism::Visitor::InstanceVariableOrWriteNode; end +module Prism::Visitor::InstanceVariableReadNode; end +module Prism::Visitor::InstanceVariableTargetNode; end +module Prism::Visitor::InstanceVariableWriteNode; end +module Prism::Visitor::IntegerNode; end +module Prism::Visitor::InterpolatedMatchLastLineNode; end +module Prism::Visitor::InterpolatedRegularExpressionNode; end +module Prism::Visitor::InterpolatedStringNode; end +module Prism::Visitor::InterpolatedSymbolNode; end +module Prism::Visitor::InterpolatedXStringNode; end +module Prism::Visitor::KeywordHashNode; end +module Prism::Visitor::KeywordParameterNode; end +module Prism::Visitor::KeywordRestParameterNode; end +module Prism::Visitor::LambdaNode; end +module Prism::Visitor::LocalVariableAndWriteNode; end +module Prism::Visitor::LocalVariableOperatorWriteNode; end +module Prism::Visitor::LocalVariableOrWriteNode; end +module Prism::Visitor::LocalVariableReadNode; end +module Prism::Visitor::LocalVariableTargetNode; end +module Prism::Visitor::LocalVariableWriteNode; end +module Prism::Visitor::MatchLastLineNode; end +module Prism::Visitor::MatchPredicateNode; end +module Prism::Visitor::MatchRequiredNode; end +module Prism::Visitor::MatchWriteNode; end +module Prism::Visitor::MissingNode; end +module Prism::Visitor::ModuleNode; end +module Prism::Visitor::MultiTargetNode; end +module Prism::Visitor::MultiWriteNode; end +module Prism::Visitor::NextNode; end +module Prism::Visitor::NilNode; end +module Prism::Visitor::NoKeywordsParameterNode; end +module Prism::Visitor::NumberedReferenceReadNode; end +module Prism::Visitor::OptionalParameterNode; end +module Prism::Visitor::OrNode; end +module Prism::Visitor::ParametersNode; end +module Prism::Visitor::ParenthesesNode; end +module Prism::Visitor::PinnedExpressionNode; end +module Prism::Visitor::PinnedVariableNode; end +module Prism::Visitor::PostExecutionNode; end +module Prism::Visitor::PreExecutionNode; end +module Prism::Visitor::ProgramNode; end +module Prism::Visitor::RangeNode; end +module Prism::Visitor::RationalNode; end +module Prism::Visitor::RedoNode; end +module Prism::Visitor::RegularExpressionNode; end +module Prism::Visitor::RequiredParameterNode; end +module Prism::Visitor::RescueModifierNode; end +module Prism::Visitor::RescueNode; end +module Prism::Visitor::RestParameterNode; end +module Prism::Visitor::RetryNode; end +module Prism::Visitor::ReturnNode; end +module Prism::Visitor::SelfNode; end +module Prism::Visitor::SingletonClassNode; end +module Prism::Visitor::SourceEncodingNode; end +module Prism::Visitor::SourceFileNode; end +module Prism::Visitor::SourceLineNode; end +module Prism::Visitor::SplatNode; end +module Prism::Visitor::StatementsNode; end +module Prism::Visitor::StringConcatNode; end +module Prism::Visitor::StringNode; end +module Prism::Visitor::SuperNode; end +module Prism::Visitor::SymbolNode; end +module Prism::Visitor::TrueNode; end +module Prism::Visitor::UndefNode; end +module Prism::Visitor::UnlessNode; end +module Prism::Visitor::UntilNode; end +module Prism::Visitor::WhenNode; end +module Prism::Visitor::WhileNode; end +module Prism::Visitor::XStringNode; end +module Prism::Visitor::YieldNode; end +module Prism::WhenNode::Location; end +module Prism::WhenNode::Node; end +module Prism::WhenNode::StatementsNode; end +module Prism::WhenNode::Token; end +module Prism::WhenNode::Visitor; end +module Prism::WhenNode::WhenNode; end +module Prism::WhileNode::Location; end +module Prism::WhileNode::Node; end +module Prism::WhileNode::StatementsNode; end +module Prism::WhileNode::Token; end +module Prism::WhileNode::Visitor; end +module Prism::WhileNode::WhileNode; end +module Prism::XStringNode::Location; end +module Prism::XStringNode::Node; end +module Prism::XStringNode::Token; end +module Prism::XStringNode::Visitor; end +module Prism::XStringNode::XStringNode; end +module Prism::YieldNode::ArgumentsNode; end +module Prism::YieldNode::Location; end +module Prism::YieldNode::Node; end +module Prism::YieldNode::Token; end +module Prism::YieldNode::Visitor; end +module Prism::YieldNode::YieldNode; end module RSpec::Core::Example; end module RSpec::Core::Formatters::ConsoleCodes; end module RSpec::Expectations::ExpectationNotMetError; end