From ecfe247b658e2fe53395c022cf5b2d439f5650d3 Mon Sep 17 00:00:00 2001 From: Reese Armstrong Date: Wed, 24 Jan 2024 12:20:13 -0600 Subject: [PATCH] Remove Sorbet (#57) --- Gemfile | 1 - Gemfile.lock | 1 - sorbet/config | 4 - sorbet/rbi/annotations/actionmailer.rbi | 10 - sorbet/rbi/annotations/actionpack.rbi | 428 - sorbet/rbi/annotations/actionview.rbi | 77 - sorbet/rbi/annotations/activerecord.rbi | 77 - sorbet/rbi/annotations/activesupport.rbi | 128 - sorbet/rbi/annotations/globalid.rbi | 30 - sorbet/rbi/annotations/railties.rbi | 58 - sorbet/rbi/annotations/rainbow.rbi | 269 - sorbet/rbi/gems/actioncable@7.0.4.2.rbi | 2759 - sorbet/rbi/gems/actionmailbox@7.0.4.2.rbi | 1777 - sorbet/rbi/gems/actionmailer@7.0.4.2.rbi | 2364 - sorbet/rbi/gems/actionpack@7.0.4.2.rbi | 19691 ------ sorbet/rbi/gems/actiontext@7.0.4.2.rbi | 1606 - sorbet/rbi/gems/actionview@7.0.4.2.rbi | 15480 ----- sorbet/rbi/gems/activejob@7.0.4.2.rbi | 2545 - sorbet/rbi/gems/activemodel@7.0.4.2.rbi | 6018 -- sorbet/rbi/gems/activerecord@7.0.4.2.rbi | 37845 ----------- sorbet/rbi/gems/activestorage@7.0.4.2.rbi | 3366 - sorbet/rbi/gems/activesupport@7.0.4.2.rbi | 19219 ------ sorbet/rbi/gems/addressable@2.8.1.rbi | 1398 - sorbet/rbi/gems/ast@2.4.2.rbi | 584 - sorbet/rbi/gems/backport@1.2.0.rbi | 522 - sorbet/rbi/gems/benchmark@0.2.1.rbi | 596 - sorbet/rbi/gems/bindex@0.8.1.rbi | 8 - sorbet/rbi/gems/bootsnap@1.16.0.rbi | 955 - sorbet/rbi/gems/builder@3.2.4.rbi | 8 - sorbet/rbi/gems/capybara@3.38.0.rbi | 9579 --- sorbet/rbi/gems/concurrent-ruby@1.2.2.rbi | 11494 ---- sorbet/rbi/gems/crass@1.0.6.rbi | 622 - sorbet/rbi/gems/dalli@3.2.4.rbi | 2325 - sorbet/rbi/gems/date@3.3.3.rbi | 74 - sorbet/rbi/gems/diff-lcs@1.5.0.rbi | 1079 - sorbet/rbi/gems/dnsimple@8.1.0.rbi | 5161 -- sorbet/rbi/gems/dotenv-rails@2.8.1.rbi | 147 - sorbet/rbi/gems/dotenv@2.8.1.rbi | 234 - sorbet/rbi/gems/e2mmap@0.1.0.rbi | 8 - sorbet/rbi/gems/erb-formatter@0.4.2.rbi | 280 - sorbet/rbi/gems/erubi@1.12.0.rbi | 146 - sorbet/rbi/gems/ffi@1.15.5.rbi | 8 - sorbet/rbi/gems/globalid@1.1.0.rbi | 521 - sorbet/rbi/gems/httparty@0.21.0.rbi | 2094 - sorbet/rbi/gems/i18n@1.12.0.rbi | 2296 - sorbet/rbi/gems/importmap-rails@1.1.5.rbi | 258 - sorbet/rbi/gems/io-console@0.6.0.rbi | 8 - sorbet/rbi/gems/irb@1.6.2.rbi | 342 - sorbet/rbi/gems/jaro_winkler@1.5.4.rbi | 19 - sorbet/rbi/gems/jbuilder@2.11.5.rbi | 549 - sorbet/rbi/gems/jsbundling-rails@1.1.1.rbi | 19 - sorbet/rbi/gems/json@2.6.3.rbi | 1532 - sorbet/rbi/gems/kramdown-parser-gfm@1.1.0.rbi | 127 - sorbet/rbi/gems/kramdown@2.4.0.rbi | 3261 - sorbet/rbi/gems/listen@3.8.0.rbi | 1181 - sorbet/rbi/gems/loofah@2.19.1.rbi | 904 - sorbet/rbi/gems/mail@2.8.1.rbi | 8644 --- sorbet/rbi/gems/marcel@1.0.2.rbi | 220 - sorbet/rbi/gems/matrix@0.4.2.rbi | 1884 - sorbet/rbi/gems/method_source@1.0.0.rbi | 272 - sorbet/rbi/gems/mini_mime@1.1.2.rbi | 170 - sorbet/rbi/gems/minitest@5.17.0.rbi | 1457 - sorbet/rbi/gems/msgpack@1.6.0.rbi | 321 - sorbet/rbi/gems/multi_xml@0.6.0.rbi | 101 - sorbet/rbi/gems/net-imap@0.3.4.rbi | 3781 -- sorbet/rbi/gems/net-pop@0.1.2.rbi | 926 - sorbet/rbi/gems/net-protocol@0.2.1.rbi | 291 - sorbet/rbi/gems/net-smtp@0.3.3.rbi | 1111 - sorbet/rbi/gems/netrc@0.11.0.rbi | 158 - sorbet/rbi/gems/nio4r@2.5.8.rbi | 292 - sorbet/rbi/gems/nokogiri@1.14.2.rbi | 7237 -- sorbet/rbi/gems/parallel@1.22.1.rbi | 277 - sorbet/rbi/gems/parser@3.2.1.0.rbi | 7252 -- sorbet/rbi/gems/prettier_print@1.2.0.rbi | 951 - sorbet/rbi/gems/public_suffix@5.0.1.rbi | 935 - sorbet/rbi/gems/puma@5.6.5.rbi | 4153 -- sorbet/rbi/gems/racc@1.6.2.rbi | 155 - sorbet/rbi/gems/rack-test@2.0.2.rbi | 763 - sorbet/rbi/gems/rack@2.2.6.2.rbi | 5630 -- sorbet/rbi/gems/rails-dom-testing@2.0.3.rbi | 455 - .../rbi/gems/rails-html-sanitizer@1.5.0.rbi | 539 - sorbet/rbi/gems/rails@7.0.4.2.rbi | 8 - sorbet/rbi/gems/rails_hotreload@0.1.2.rbi | 37 - sorbet/rbi/gems/railties@7.0.4.2.rbi | 3549 - sorbet/rbi/gems/rainbow@3.1.1.rbi | 402 - sorbet/rbi/gems/rake@13.0.6.rbi | 2977 - sorbet/rbi/gems/rb-fsevent@0.11.2.rbi | 8 - sorbet/rbi/gems/rb-inotify@0.10.1.rbi | 8 - sorbet/rbi/gems/rbi@0.0.16.rbi | 3008 - sorbet/rbi/gems/redis@4.8.1.rbi | 5162 -- sorbet/rbi/gems/regexp_parser@2.7.0.rbi | 3580 - sorbet/rbi/gems/reline@0.3.2.rbi | 8 - sorbet/rbi/gems/reverse_markdown@2.1.1.rbi | 389 - sorbet/rbi/gems/rexml@3.2.5.rbi | 4717 -- sorbet/rbi/gems/rubocop-ast@1.27.0.rbi | 7052 -- sorbet/rbi/gems/rubocop@1.46.0.rbi | 54549 ---------------- sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi | 1239 - sorbet/rbi/gems/rubyzip@2.3.2.rbi | 2401 - sorbet/rbi/gems/selenium-webdriver@4.8.1.rbi | 8281 --- sorbet/rbi/gems/solargraph@0.48.0.rbi | 9133 --- sorbet/rbi/gems/spoom@1.1.16.rbi | 2396 - sorbet/rbi/gems/sprockets-rails@3.4.2.rbi | 1260 - sorbet/rbi/gems/sprockets@4.2.0.rbi | 5400 -- sorbet/rbi/gems/sqlite3@1.6.1.rbi | 1673 - sorbet/rbi/gems/stimulus-rails@1.2.1.rbi | 29 - sorbet/rbi/gems/syntax_tree@5.3.0.rbi | 21991 ------- sorbet/rbi/gems/tailwindcss-rails@2.0.23.rbi | 59 - sorbet/rbi/gems/tapioca@0.11.1.rbi | 3249 - sorbet/rbi/gems/thor@1.2.1.rbi | 3956 -- sorbet/rbi/gems/tilt@2.1.0.rbi | 848 - sorbet/rbi/gems/timeout@0.3.2.rbi | 148 - sorbet/rbi/gems/turbo-rails@1.3.3.rbi | 830 - sorbet/rbi/gems/tzinfo@2.0.6.rbi | 5917 -- .../rbi/gems/unicode-display_width@2.4.2.rbi | 65 - sorbet/rbi/gems/unparser@0.6.7.rbi | 4515 -- sorbet/rbi/gems/web-console@4.2.0.rbi | 498 - sorbet/rbi/gems/webdrivers@5.2.0.rbi | 703 - sorbet/rbi/gems/webrick@1.7.0.rbi | 2553 - sorbet/rbi/gems/websocket-driver@0.7.5.rbi | 1003 - .../rbi/gems/websocket-extensions@0.1.5.rbi | 134 - sorbet/rbi/gems/websocket@1.2.9.rbi | 1482 - sorbet/rbi/gems/xpath@3.2.0.rbi | 484 - sorbet/rbi/gems/yard-sorbet@0.8.0.rbi | 441 - sorbet/rbi/gems/yard@0.9.28.rbi | 17912 ----- sorbet/rbi/gems/zeitwerk@2.6.7.rbi | 962 - sorbet/tapioca/config.yml | 13 - sorbet/tapioca/require.rb | 4 - 127 files changed, 395100 deletions(-) delete mode 100644 sorbet/config delete mode 100644 sorbet/rbi/annotations/actionmailer.rbi delete mode 100644 sorbet/rbi/annotations/actionpack.rbi delete mode 100644 sorbet/rbi/annotations/actionview.rbi delete mode 100644 sorbet/rbi/annotations/activerecord.rbi delete mode 100644 sorbet/rbi/annotations/activesupport.rbi delete mode 100644 sorbet/rbi/annotations/globalid.rbi delete mode 100644 sorbet/rbi/annotations/railties.rbi delete mode 100644 sorbet/rbi/annotations/rainbow.rbi delete mode 100644 sorbet/rbi/gems/actioncable@7.0.4.2.rbi delete mode 100644 sorbet/rbi/gems/actionmailbox@7.0.4.2.rbi delete mode 100644 sorbet/rbi/gems/actionmailer@7.0.4.2.rbi delete mode 100644 sorbet/rbi/gems/actionpack@7.0.4.2.rbi delete mode 100644 sorbet/rbi/gems/actiontext@7.0.4.2.rbi delete mode 100644 sorbet/rbi/gems/actionview@7.0.4.2.rbi delete mode 100644 sorbet/rbi/gems/activejob@7.0.4.2.rbi delete mode 100644 sorbet/rbi/gems/activemodel@7.0.4.2.rbi delete mode 100644 sorbet/rbi/gems/activerecord@7.0.4.2.rbi delete mode 100644 sorbet/rbi/gems/activestorage@7.0.4.2.rbi delete mode 100644 sorbet/rbi/gems/activesupport@7.0.4.2.rbi delete mode 100644 sorbet/rbi/gems/addressable@2.8.1.rbi delete mode 100644 sorbet/rbi/gems/ast@2.4.2.rbi delete mode 100644 sorbet/rbi/gems/backport@1.2.0.rbi delete mode 100644 sorbet/rbi/gems/benchmark@0.2.1.rbi delete mode 100644 sorbet/rbi/gems/bindex@0.8.1.rbi delete mode 100644 sorbet/rbi/gems/bootsnap@1.16.0.rbi delete mode 100644 sorbet/rbi/gems/builder@3.2.4.rbi delete mode 100644 sorbet/rbi/gems/capybara@3.38.0.rbi delete mode 100644 sorbet/rbi/gems/concurrent-ruby@1.2.2.rbi delete mode 100644 sorbet/rbi/gems/crass@1.0.6.rbi delete mode 100644 sorbet/rbi/gems/dalli@3.2.4.rbi delete mode 100644 sorbet/rbi/gems/date@3.3.3.rbi delete mode 100644 sorbet/rbi/gems/diff-lcs@1.5.0.rbi delete mode 100644 sorbet/rbi/gems/dnsimple@8.1.0.rbi delete mode 100644 sorbet/rbi/gems/dotenv-rails@2.8.1.rbi delete mode 100644 sorbet/rbi/gems/dotenv@2.8.1.rbi delete mode 100644 sorbet/rbi/gems/e2mmap@0.1.0.rbi delete mode 100644 sorbet/rbi/gems/erb-formatter@0.4.2.rbi delete mode 100644 sorbet/rbi/gems/erubi@1.12.0.rbi delete mode 100644 sorbet/rbi/gems/ffi@1.15.5.rbi delete mode 100644 sorbet/rbi/gems/globalid@1.1.0.rbi delete mode 100644 sorbet/rbi/gems/httparty@0.21.0.rbi delete mode 100644 sorbet/rbi/gems/i18n@1.12.0.rbi delete mode 100644 sorbet/rbi/gems/importmap-rails@1.1.5.rbi delete mode 100644 sorbet/rbi/gems/io-console@0.6.0.rbi delete mode 100644 sorbet/rbi/gems/irb@1.6.2.rbi delete mode 100644 sorbet/rbi/gems/jaro_winkler@1.5.4.rbi delete mode 100644 sorbet/rbi/gems/jbuilder@2.11.5.rbi delete mode 100644 sorbet/rbi/gems/jsbundling-rails@1.1.1.rbi delete mode 100644 sorbet/rbi/gems/json@2.6.3.rbi delete mode 100644 sorbet/rbi/gems/kramdown-parser-gfm@1.1.0.rbi delete mode 100644 sorbet/rbi/gems/kramdown@2.4.0.rbi delete mode 100644 sorbet/rbi/gems/listen@3.8.0.rbi delete mode 100644 sorbet/rbi/gems/loofah@2.19.1.rbi delete mode 100644 sorbet/rbi/gems/mail@2.8.1.rbi delete mode 100644 sorbet/rbi/gems/marcel@1.0.2.rbi delete mode 100644 sorbet/rbi/gems/matrix@0.4.2.rbi delete mode 100644 sorbet/rbi/gems/method_source@1.0.0.rbi delete mode 100644 sorbet/rbi/gems/mini_mime@1.1.2.rbi delete mode 100644 sorbet/rbi/gems/minitest@5.17.0.rbi delete mode 100644 sorbet/rbi/gems/msgpack@1.6.0.rbi delete mode 100644 sorbet/rbi/gems/multi_xml@0.6.0.rbi delete mode 100644 sorbet/rbi/gems/net-imap@0.3.4.rbi delete mode 100644 sorbet/rbi/gems/net-pop@0.1.2.rbi delete mode 100644 sorbet/rbi/gems/net-protocol@0.2.1.rbi delete mode 100644 sorbet/rbi/gems/net-smtp@0.3.3.rbi delete mode 100644 sorbet/rbi/gems/netrc@0.11.0.rbi delete mode 100644 sorbet/rbi/gems/nio4r@2.5.8.rbi delete mode 100644 sorbet/rbi/gems/nokogiri@1.14.2.rbi delete mode 100644 sorbet/rbi/gems/parallel@1.22.1.rbi delete mode 100644 sorbet/rbi/gems/parser@3.2.1.0.rbi delete mode 100644 sorbet/rbi/gems/prettier_print@1.2.0.rbi delete mode 100644 sorbet/rbi/gems/public_suffix@5.0.1.rbi delete mode 100644 sorbet/rbi/gems/puma@5.6.5.rbi delete mode 100644 sorbet/rbi/gems/racc@1.6.2.rbi delete mode 100644 sorbet/rbi/gems/rack-test@2.0.2.rbi delete mode 100644 sorbet/rbi/gems/rack@2.2.6.2.rbi delete mode 100644 sorbet/rbi/gems/rails-dom-testing@2.0.3.rbi delete mode 100644 sorbet/rbi/gems/rails-html-sanitizer@1.5.0.rbi delete mode 100644 sorbet/rbi/gems/rails@7.0.4.2.rbi delete mode 100644 sorbet/rbi/gems/rails_hotreload@0.1.2.rbi delete mode 100644 sorbet/rbi/gems/railties@7.0.4.2.rbi delete mode 100644 sorbet/rbi/gems/rainbow@3.1.1.rbi delete mode 100644 sorbet/rbi/gems/rake@13.0.6.rbi delete mode 100644 sorbet/rbi/gems/rb-fsevent@0.11.2.rbi delete mode 100644 sorbet/rbi/gems/rb-inotify@0.10.1.rbi delete mode 100644 sorbet/rbi/gems/rbi@0.0.16.rbi delete mode 100644 sorbet/rbi/gems/redis@4.8.1.rbi delete mode 100644 sorbet/rbi/gems/regexp_parser@2.7.0.rbi delete mode 100644 sorbet/rbi/gems/reline@0.3.2.rbi delete mode 100644 sorbet/rbi/gems/reverse_markdown@2.1.1.rbi delete mode 100644 sorbet/rbi/gems/rexml@3.2.5.rbi delete mode 100644 sorbet/rbi/gems/rubocop-ast@1.27.0.rbi delete mode 100644 sorbet/rbi/gems/rubocop@1.46.0.rbi delete mode 100644 sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi delete mode 100644 sorbet/rbi/gems/rubyzip@2.3.2.rbi delete mode 100644 sorbet/rbi/gems/selenium-webdriver@4.8.1.rbi delete mode 100644 sorbet/rbi/gems/solargraph@0.48.0.rbi delete mode 100644 sorbet/rbi/gems/spoom@1.1.16.rbi delete mode 100644 sorbet/rbi/gems/sprockets-rails@3.4.2.rbi delete mode 100644 sorbet/rbi/gems/sprockets@4.2.0.rbi delete mode 100644 sorbet/rbi/gems/sqlite3@1.6.1.rbi delete mode 100644 sorbet/rbi/gems/stimulus-rails@1.2.1.rbi delete mode 100644 sorbet/rbi/gems/syntax_tree@5.3.0.rbi delete mode 100644 sorbet/rbi/gems/tailwindcss-rails@2.0.23.rbi delete mode 100644 sorbet/rbi/gems/tapioca@0.11.1.rbi delete mode 100644 sorbet/rbi/gems/thor@1.2.1.rbi delete mode 100644 sorbet/rbi/gems/tilt@2.1.0.rbi delete mode 100644 sorbet/rbi/gems/timeout@0.3.2.rbi delete mode 100644 sorbet/rbi/gems/turbo-rails@1.3.3.rbi delete mode 100644 sorbet/rbi/gems/tzinfo@2.0.6.rbi delete mode 100644 sorbet/rbi/gems/unicode-display_width@2.4.2.rbi delete mode 100644 sorbet/rbi/gems/unparser@0.6.7.rbi delete mode 100644 sorbet/rbi/gems/web-console@4.2.0.rbi delete mode 100644 sorbet/rbi/gems/webdrivers@5.2.0.rbi delete mode 100644 sorbet/rbi/gems/webrick@1.7.0.rbi delete mode 100644 sorbet/rbi/gems/websocket-driver@0.7.5.rbi delete mode 100644 sorbet/rbi/gems/websocket-extensions@0.1.5.rbi delete mode 100644 sorbet/rbi/gems/websocket@1.2.9.rbi delete mode 100644 sorbet/rbi/gems/xpath@3.2.0.rbi delete mode 100644 sorbet/rbi/gems/yard-sorbet@0.8.0.rbi delete mode 100644 sorbet/rbi/gems/yard@0.9.28.rbi delete mode 100644 sorbet/rbi/gems/zeitwerk@2.6.7.rbi delete mode 100644 sorbet/tapioca/config.yml delete mode 100644 sorbet/tapioca/require.rb diff --git a/Gemfile b/Gemfile index 5623e83..b231813 100644 --- a/Gemfile +++ b/Gemfile @@ -51,7 +51,6 @@ group :development, :test do # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem gem "debug", platforms: %i[mri mingw x64_mingw] gem "rubocop" - gem "sorbet" gem "tapioca", require: false gem "solargraph" end diff --git a/Gemfile.lock b/Gemfile.lock index 0ac1c73..84d0f91 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -465,7 +465,6 @@ DEPENDENCIES solargraph solid_cache (~> 0.2.0) solid_queue (~> 0.1.2) - sorbet sorbet-runtime sqlite3 (~> 1.4) standard (~> 1.33) diff --git a/sorbet/config b/sorbet/config deleted file mode 100644 index 983d2f1..0000000 --- a/sorbet/config +++ /dev/null @@ -1,4 +0,0 @@ ---dir -. ---ignore=tmp/ ---ignore=vendor/ diff --git a/sorbet/rbi/annotations/actionmailer.rbi b/sorbet/rbi/annotations/actionmailer.rbi deleted file mode 100644 index e806f99..0000000 --- a/sorbet/rbi/annotations/actionmailer.rbi +++ /dev/null @@ -1,10 +0,0 @@ -# typed: strict - -# DO NOT EDIT MANUALLY -# This file was pulled from a central RBI files repository. -# Please run `bin/tapioca annotations` to update it. - -class ActionMailer::Base - sig { params(headers: T.untyped, block: T.nilable(T.proc.void)).returns(Mail::Message) } - def mail(headers = nil, &block); end -end diff --git a/sorbet/rbi/annotations/actionpack.rbi b/sorbet/rbi/annotations/actionpack.rbi deleted file mode 100644 index a54231b..0000000 --- a/sorbet/rbi/annotations/actionpack.rbi +++ /dev/null @@ -1,428 +0,0 @@ -# typed: strict - -# DO NOT EDIT MANUALLY -# This file was pulled from a central RBI files repository. -# Please run `bin/tapioca annotations` to update it. - -class ActionController::API - MODULES = T.let(T.unsafe(nil), T::Array[T.untyped]) -end - -module ActionController::Flash::ClassMethods - sig { params(types: Symbol).void } - def add_flash_types(*types); end -end - -module ActionController::Helpers::ClassMethods - sig { returns(ActionView::Base) } - def helpers; end -end - -class ActionController::Metal < AbstractController::Base - sig { returns(ActionController::Parameters) } - def params; end - - sig { returns(ActionDispatch::Request) } - def request; end - - sig { returns(ActionDispatch::Response) } - def response; end -end - -module ActionController::MimeResponds - sig { params(mimes: T.nilable(Symbol), block: T.nilable(T.proc.params(arg0: ActionController::MimeResponds::Collector).void)).void } - def respond_to(*mimes, &block); end -end - -class ActionController::Parameters - sig { params(other: T.any(String, ActionController::Parameters)).returns(T::Boolean) } - def ==(other); end - - sig { params(key: T.any(String, Symbol), value: T.untyped).void } - def []=(key, value); end - - sig { returns(T.nilable(T::Array[T.any(String, Symbol)])) } - def always_permitted_parameters; end - - sig { params(obj: T.nilable(T::Array[T.any(String, Symbol)])).void } - def always_permitted_parameters=(obj); end - - sig { returns(T.untyped) } - def deep_dup; end - - sig { params(key: T.any(String, Symbol), block: T.untyped).returns(T.untyped) } - def delete(key, &block); end - - sig { params(keys: T.any(String, Symbol)).returns(T.untyped) } - def dig(*keys); end - - sig { params(block: T.untyped).returns(T.untyped) } - def each_pair(&block); end - - # each is an alias of each_pair - sig { params(block: T.untyped).returns(T.untyped) } - def each(&block); end - - sig { params(keys: T.any(String, Symbol)).returns(ActionController::Parameters) } - def except(*keys); end - - sig { params(keys: T.any(String, Symbol)).returns(T.untyped) } - def extract!(*keys); end - - sig { params(key: T.any(String, Symbol), args: T.untyped).returns(T.untyped) } - def fetch(key, *args); end - - 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).returns(ActionController::Parameters) } - def merge(other_hash); end - - sig { returns(T.untyped) } - def parameters; end - - sig { returns(T.self_type) } - def permit!; end - - # You can pass _a lot_ of stuff to permit, so filters is left untyped for now. - sig { params(filters: T.untyped).returns(ActionController::Parameters) } - def permit(*filters); end - - sig { params(new_permitted: T.untyped).void } - def permitted=(new_permitted); end - - sig { returns(T::Boolean) } - def permitted?; end - - sig { params(block: T.untyped).returns(T.untyped) } - def reject!(&block); end - - # delete_if is an alias of reject! - sig { params(block: T.untyped).returns(T.untyped) } - def delete_if(&block); end - - sig { params(block: T.untyped).returns(T.untyped) } - def reject(&block); end - - sig { params(key: T.any(String, Symbol)).returns(T.nilable(T.any(String, Numeric, ActionController::Parameters))) } - def [](key); end - - sig { params(key: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(T.any(String, Numeric, T::Array[T.untyped], ActionController::Parameters)) } - def require(key); end - - # required is an alias of require - sig { params(key: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(T.any(String, Numeric, T::Array[T.untyped], ActionController::Parameters)) } - def required(key); end - - sig { params(other_hash: T.untyped).returns(ActionController::Parameters) } - def reverse_merge!(other_hash); end - - # with_defaults! is an alias of reverse_merge! - sig { params(other_hash: T.untyped).returns(ActionController::Parameters) } - def with_defaults!(other_hash); end - - sig { params(other_hash: T.untyped).returns(ActionController::Parameters) } - def reverse_merge(other_hash); end - - # with_defaults is an alias of reverse_merge - sig { params(other_hash: T.untyped).returns(ActionController::Parameters) } - def with_defaults(other_hash); end - - sig { params(block: T.untyped).returns(T.nilable(ActionController::Parameters)) } - def select!(&block); end - - # keep_if is an alias of select! - sig { params(block: T.untyped).returns(T.nilable(ActionController::Parameters)) } - def keep_if(&block); end - - sig { params(block: T.untyped).returns(ActionController::Parameters) } - def select(&block); end - - sig { returns(T.any(Symbol, T::Boolean)) } - def self.action_on_unpermitted_parameters; end - - sig { params(obj: T.any(Symbol, T::Boolean)).void } - def self.action_on_unpermitted_parameters=(obj); end - - sig { returns(T::Array[T.any(String, Symbol)]) } - def self.always_permitted_parameters; end - - sig { params(obj: T::Array[T.any(String, Symbol)]).void } - def self.always_permitted_parameters=(obj); end - - sig { returns(T::Boolean) } - def self.permit_all_parameters; end - - sig { params(obj: T::Boolean).void } - def self.permit_all_parameters=(obj); end - - sig { params(keys: T.any(String, Symbol)).returns(ActionController::Parameters) } - def slice!(*keys); end - - sig { params(keys: T.any(String, Symbol)).returns(ActionController::Parameters) } - def slice(*keys); end - - sig { returns(ActiveSupport::HashWithIndifferentAccess) } - def to_h; end - - sig { returns(T::Hash[T.untyped, T.untyped]) } - def to_hash; end - - # to_param is an alias of to_query - sig { params(args: String).returns(T.nilable(String)) } - def to_param(*args); end - - sig { params(args: String).returns(T.nilable(String)) } - def to_query(*args); end - - sig { returns(ActiveSupport::HashWithIndifferentAccess) } - def to_unsafe_h; end - - # to_unsafe_hash is an alias of to_unsafe_h - sig { returns(ActiveSupport::HashWithIndifferentAccess) } - def to_unsafe_hash; end - - sig { params(block: T.untyped).returns(ActionController::Parameters) } - def transform_keys!(&block); end - - sig { params(block: T.untyped).returns(ActionController::Parameters) } - def transform_keys(&block); end - - sig { returns(ActionController::Parameters) } - def transform_values!; end - - sig { returns(ActionController::Parameters) } - def transform_values; end - - sig { params(keys: T.any(String, Symbol)).returns(T.untyped) } - def values_at(*keys); end -end - -module ActionController::RequestForgeryProtection - sig { returns(T::Boolean) } - def protect_against_forgery?; end - - sig { params(form_options: T::Hash[T.untyped, T.untyped]).returns(String) } - def form_authenticity_token(form_options: {}); end -end - -module ActionController::RequestForgeryProtection::ClassMethods - sig { params(options: T::Hash[T.untyped, T.untyped]).void } - def skip_forgery_protection(options = T.unsafe(nil)); end -end - -module ActionController::StrongParameters - sig { returns(ActionController::Parameters) } - def params; end -end - -module ActionDispatch::Http::Parameters - sig { returns(ActionController::Parameters) } - def parameters; end - - # params is an alias of parameters - sig { returns(ActionController::Parameters) } - def params; end -end - -module ActionDispatch::Integration::Runner - # @method_missing: delegated to ActionDispatch::Integration::Session - sig { params(host: String).returns(String) } - def host!(host); end - - # @method_missing: delegated to ActionDispatch::Integration::Session - sig { params(flag: T::Boolean).returns(T::Boolean) } - def https!(flag = true); end -end - -class ActionDispatch::IntegrationTest - # The following methods are accessible on `IntegrationTest` - # through the following delegation chain: - # - `IntegrationTest` includes `IntegrationTest::Behavior` - # - `IntegrationTest::Behavior` includes `Integration::Runner` - # - `Integration::Runner#method_missing` delegates to `Integration::Session` - # - # Then `Integration::Session` either implements the methods - # directly or further delegates to `TestProcess` (included) or - # `TestResponse` / `Request` (via `delegate`). - # - # Cf. https://github.com/Shopify/rbi-central/pull/138 for more context. - # @method_missing: delegated to ActionDispatch::TestProcess - sig { returns(ActionDispatch::Flash::FlashHash) } - def flash; end - - # @method_missing: delegated to ActionDispatch::TestProcess - sig { returns(ActionDispatch::Request::Session) } - def session; end - - # @method_missing: delegated to ActionDispatch::TestResponse - sig { returns(T.nilable(Integer)) } - def status; end - - # @method_missing: delegated to ActionDispatch::TestResponse - sig { returns(T.nilable(String)) } - def status_message; end - - # @method_missing: delegated to ActionDispatch::TestResponse - sig { returns(T.nilable(ActionDispatch::Response::Header)) } - def headers; end - - # @method_missing: delegated to ActionDispatch::TestResponse - sig { returns(T.nilable(String)) } - def body; end - - # @method_missing: delegated to ActionDispatch::TestResponse - sig { returns(T.nilable(T::Boolean)) } - def redirect?; end - - # @method_missing: delegated to ActionDispatch::Request - sig { returns(T.nilable(String)) } - def path; end - - # @method_missing: delegated to ActionDispatch::Integration::Session - sig { returns(String) } - def host; end - - # @method_missing: delegated to ActionDispatch::Integration::Session - sig { params(host: String).returns(String) } - attr_writer :host - - # @method_missing: delegated to ActionDispatch::Integration::Session - sig { returns(T.nilable(String)) } - attr_accessor :remote_addr - - # @method_missing: delegated to ActionDispatch::Integration::Session - sig { returns(T.nilable(String)) } - attr_accessor :accept - - # @method_missing: delegated to ActionDispatch::Integration::Session - sig { returns(Rack::Test::CookieJar) } - def cookies; end - - # @method_missing: delegated to ActionDispatch::Integration::Session - sig { returns(T.nilable(ActionController::Base)) } - attr_reader :controller - - # @method_missing: delegated to ActionDispatch::Integration::Session - sig { returns(ActionDispatch::TestRequest) } - attr_reader :request - - # @method_missing: delegated to ActionDispatch::Integration::Session - sig { returns(ActionDispatch::TestResponse) } - attr_reader :response - - # @method_missing: delegated to ActionDispatch::Integration::Session - sig { returns(Integer) } - attr_accessor :request_count -end - -class ActionDispatch::Request - # Provides access to the request's HTTP headers, for example: - # - # ```ruby - # request.headers["Content-Type"] # => "text/plain" - # ``` - sig { returns(ActionDispatch::Http::Headers) } - def headers; end - - # Returns a `String` with the last requested path including their params. - # - # ```ruby - # # get '/foo' - # request.original_fullpath # => '/foo' - # - # # get '/foo?bar' - # request.original_fullpath # => '/foo?bar' - # ``` - sig { returns(String) } - def original_fullpath; end - - # Returns the `String` full path including params of the last URL requested. - # - # ```ruby - # # get "/articles" - # request.fullpath # => "/articles" - # - # # get "/articles?page=2" - # request.fullpath # => "/articles?page=2" - # ``` - sig { returns(String) } - def fullpath; end - - # Returns the original request URL as a `String`. - # - # ```ruby - # # get "/articles?page=2" - # request.original_url # => "http://www.example.com/articles?page=2" - # ``` - sig { returns(String) } - def original_url; end - - # The `String` MIME type of the request. - # - # ``` - # # get "/articles" - # request.media_type # => "application/x-www-form-urlencoded" - # ``` - sig { returns(String) } - def media_type; end - - # Returns the content length of the request as an integer. - sig { returns(Integer) } - def content_length; end - - # Returns the IP address of client as a `String`. - sig { returns(String) } - def ip; end - - # Returns the IP address of client as a `String`, - # usually set by the RemoteIp middleware. - sig { returns(String) } - def remote_ip; 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). - # - # 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. - sig { returns(String) } - def request_id; end - - # Returns true if the request has a header matching the given key parameter. - # - # ```ruby - # request.key? :ip_spoofing_check # => true - # ``` - sig { params(key: Symbol).returns(T::Boolean) } - def key?(key); end - - # True if the request came from localhost, 127.0.0.1, or ::1. - sig { returns(T::Boolean) } - def local?; end -end - -module ActionDispatch::Routing::Mapper::Resources - sig { params(name: T.untyped).returns(T.untyped) } - def action_path(name); end - - sig { params(block: T.untyped).returns(T.untyped) } - def collection(&block); end - - sig { params(block: T.untyped).returns(T.untyped) } - def member(&block); end - - sig { returns(T.untyped) } - def shallow; end - - sig { returns(T::Boolean) } - def shallow?; end -end - -class ActionDispatch::Routing::RouteSet - sig { params(block: T.proc.bind(ActionDispatch::Routing::Mapper).void).void } - def draw(&block); end -end diff --git a/sorbet/rbi/annotations/actionview.rbi b/sorbet/rbi/annotations/actionview.rbi deleted file mode 100644 index 1a40cd0..0000000 --- a/sorbet/rbi/annotations/actionview.rbi +++ /dev/null @@ -1,77 +0,0 @@ -# typed: strong - -# 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 -} - - class MissingTemplate < ActionView::ActionViewError - sig { returns(String) } - def path; end - end -end - -class ActionView::Helpers::FormBuilder - sig { returns(T.untyped) } - def object; end -end - -module ActionView::Helpers::NumberHelper - sig { params(number: T.untyped, options: T::Hash[T.untyped, T.untyped]).returns(T.nilable(String)) } - def number_to_currency(number, options = T.unsafe(nil)); end - - sig { params(number: T.untyped, options: T::Hash[T.untyped, T.untyped]).returns(T.nilable(String)) } - def number_to_human(number, options = T.unsafe(nil)); end - - sig { params(number: T.untyped, options: T::Hash[T.untyped, T.untyped]).returns(T.nilable(String)) } - def number_to_human_size(number, options = T.unsafe(nil)); end - - sig { params(number: T.untyped, options: T::Hash[T.untyped, T.untyped]).returns(T.nilable(String)) } - def number_to_percentage(number, options = T.unsafe(nil)); end - - sig { params(number: T.untyped, options: T::Hash[T.untyped, T.untyped]).returns(T.nilable(String)) } - def number_to_phone(number, options = T.unsafe(nil)); end - - sig { params(number: T.untyped, options: T::Hash[T.untyped, T.untyped]).returns(T.nilable(String)) } - def number_with_delimiter(number, options = T.unsafe(nil)); end - - sig { params(number: T.untyped, options: T::Hash[T.untyped, T.untyped]).returns(T.nilable(String)) } - def number_with_precision(number, options = T.unsafe(nil)); end -end - -module ActionView::Helpers::SanitizeHelper - mixes_in_class_methods ActionView::Helpers::SanitizeHelper::ClassMethods -end - -module ActionView::Helpers::UrlHelper - extend ActiveSupport::Concern - include ActionView::Helpers::TagHelper - mixes_in_class_methods ActionView::Helpers::UrlHelper::ClassMethods - - sig { params(name: String, options: T.untyped, html_options: T.untyped, block: T.untyped).returns(ActiveSupport::SafeBuffer) } - def link_to(name = nil, options = nil, html_options = nil, &block); end - - sig { params(condition: T.untyped, name: String, options: T.untyped, html_options: T.untyped, block: T.untyped).returns(T.untyped) } - def link_to_if(condition, name, options = {}, html_options = {}, &block); end -end - -module ActionView::Layouts - mixes_in_class_methods ActionView::Layouts::ClassMethods -end - -module ActionView::Rendering - mixes_in_class_methods ActionView::Rendering::ClassMethods -end - -module ActionView::ViewPaths - mixes_in_class_methods ActionView::ViewPaths::ClassMethods -end - -module ActionView::ViewPaths::ClassMethods - sig { params(value: T.any(String, T::Array[String])).void } - def append_view_path(value); end -end diff --git a/sorbet/rbi/annotations/activerecord.rbi b/sorbet/rbi/annotations/activerecord.rbi deleted file mode 100644 index 82e9f9c..0000000 --- a/sorbet/rbi/annotations/activerecord.rbi +++ /dev/null @@ -1,77 +0,0 @@ -# typed: strict - -# DO NOT EDIT MANUALLY -# This file was pulled from a central RBI files repository. -# Please run `bin/tapioca annotations` to update it. - -class ActiveRecord::Schema - sig { params(info: T::Hash[T.untyped, T.untyped], blk: T.proc.bind(ActiveRecord::Schema).void).void } - def self.define(info = nil, &blk); end -end - -class ActiveRecord::Migration - # @shim: Methods on migration are delegated to `SchemaStatements` using `method_missing` - include ActiveRecord::ConnectionAdapters::SchemaStatements - - # @shim: Methods on migration are delegated to `DatabaseaStatements` using `method_missing` - include ActiveRecord::ConnectionAdapters::DatabaseStatements -end - -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_initialize(*args, **options, &block); end - - 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_find(*args, **options, &block); end - - 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_touch(*args, **options, &block); end - - 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.before_validation(*args, **options, &block); end - - 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_validation(*args, **options, &block); end - - 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.before_save(*args, **options, &block); end - - 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.around_save(*args, **options, &block); end - - 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_save(*args, **options, &block); end - - 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.before_create(*args, **options, &block); end - - 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.around_create(*args, **options, &block); end - - 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_create(*args, **options, &block); end - - 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.before_update(*args, **options, &block); end - - 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.around_update(*args, **options, &block); end - - 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_update(*args, **options, &block); end - - 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.before_destroy(*args, **options, &block); end - - 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.around_destroy(*args, **options, &block); end - - 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_destroy(*args, **options, &block); end - - 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_commit(*args, **options, &block); end - - 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 -end diff --git a/sorbet/rbi/annotations/activesupport.rbi b/sorbet/rbi/annotations/activesupport.rbi deleted file mode 100644 index dd812a5..0000000 --- a/sorbet/rbi/annotations/activesupport.rbi +++ /dev/null @@ -1,128 +0,0 @@ -# typed: strict - -# DO NOT EDIT MANUALLY -# This file was pulled from a central RBI files repository. -# Please run `bin/tapioca annotations` to update it. - -module ActiveSupport::Testing::Declarative - sig { params(name: String, block: T.proc.bind(T.untyped).void).void } - def test(name, &block); end -end - -class ActiveSupport::EnvironmentInquirer - sig { returns(T::Boolean) } - def development?; end - - sig { returns(T::Boolean) } - def production?; end - - sig { returns(T::Boolean) } - def test?; end - - # @method_missing: delegated to String through ActiveSupport::StringInquirer - sig { returns(T::Boolean) } - def staging?; end -end - -module ActiveSupport::Testing::SetupAndTeardown::ClassMethods - sig { params(args: T.untyped, block: T.nilable(T.proc.bind(T.untyped).void)).void } - def setup(*args, &block); end - - sig { params(args: T.untyped, block: T.nilable(T.proc.bind(T.untyped).void)).void } - def teardown(*args, &block); end -end - -class ActiveSupport::TestCase - sig { params(args: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).void)).void } - def self.setup(*args, &block); end - - sig { params(args: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).void)).void } - def self.teardown(*args, &block); end - - sig { params(name: String, block: T.proc.bind(T.attached_class).void).void } - def self.test(name, &block); end -end - -class Object - sig { returns(T::Boolean) } - def blank?; end - - sig { returns(T::Boolean) } - def present?; end -end - -class Hash - sig { returns(T::Boolean) } - def extractable_options?; end -end - -class Array - sig { params(position: Integer).returns(T.self_type) } - def from(position); end - - sig { params(position: Integer).returns(T.self_type) } - def to(position); end - - sig { params(elements: T.untyped).returns(T::Array[T.untyped]) } - def including(*elements); end - - sig { params(elements: T.untyped).returns(T.self_type) } - def excluding(*elements); end - - sig { params(elements: T.untyped).returns(T.self_type) } - def without(*elements); end - - sig { returns(T.nilable(Elem)) } - def second; end - - sig { returns(T.nilable(Elem)) } - def third; end - - sig { returns(T.nilable(Elem)) } - def fourth; end - - sig { returns(T.nilable(Elem)) } - def fifth; end - - sig { returns(T.nilable(Elem)) } - def forty_two; end - - sig { returns(T.nilable(Elem)) } - def third_to_last; end - - sig { returns(T.nilable(Elem)) } - def second_to_last; end - - sig { params(options: T::Hash[T.untyped, T.untyped]).returns(String) } - def to_sentence(options = {}); end - - sig { params(format: Symbol).returns(String) } - def to_fs(format = :default); end - - sig { params(format: Symbol).returns(String) } - def to_formatted_s(format = :default); end - - sig { returns(String) } - def to_xml; end - - sig { returns(T::Hash[T.untyped, T.untyped]) } - def extract_options!; end - - sig { type_parameters(:FillType).params(number: Integer, fill_with: T.type_parameter(:FillType), block: T.nilable(T.proc.params(group: T::Array[T.any(Elem, T.type_parameter(:FillType))]).void)).returns(T::Array[T::Array[T.any(Elem, T.type_parameter(:FillType))]]) } - def in_groups(number, fill_with = T.unsafe(nil), &block); end - - sig { type_parameters(:FillType).params(number: Integer, fill_with: T.type_parameter(:FillType), block: T.nilable(T.proc.params(group: T::Array[T.any(Elem, T.type_parameter(:FillType))]).void)).returns(T::Array[T::Array[T.any(Elem, T.type_parameter(:FillType))]]) } - def in_groups_of(number, fill_with = T.unsafe(nil), &block); end - - sig { params(value: T.untyped, block: T.nilable(T.proc.params(element: Elem).returns(T.untyped))).returns(T::Array[T::Array[Elem]]) } - def split(value = nil, &block); end - - sig { params(object: T.untyped).returns(T::Array[T.untyped]) } - def self.wrap(object); end - - sig { returns(T.untyped) } - def extract!; end - - sig { returns(ActiveSupport::ArrayInquirer) } - def inquiry; end -end diff --git a/sorbet/rbi/annotations/globalid.rbi b/sorbet/rbi/annotations/globalid.rbi deleted file mode 100644 index e70d46b..0000000 --- a/sorbet/rbi/annotations/globalid.rbi +++ /dev/null @@ -1,30 +0,0 @@ -# typed: strict - -# DO NOT EDIT MANUALLY -# This file was pulled from a central RBI files repository. -# Please run `bin/tapioca annotations` to update it. - -class ActiveRecord::Base - # @shim: this is included at runtime https://github.com/rails/globalid/blob/v1.0.0/lib/global_id/railtie.rb#L38 - include GlobalID::Identification -end - -module GlobalID::Identification - sig { params(options: T::Hash[T.untyped, T.untyped]).returns(GlobalID) } - def to_gid(options = {}); end - - sig { params(options: T::Hash[T.untyped, T.untyped]).returns(String) } - def to_gid_param(options = {}); end - - sig { params(options: T::Hash[T.untyped, T.untyped]).returns(GlobalID) } - def to_global_id(options = {}); end - - sig { params(options: T::Hash[T.untyped, T.untyped]).returns(SignedGlobalID) } - def to_sgid(options = {}); end - - sig { params(options: T::Hash[T.untyped, T.untyped]).returns(String) } - def to_sgid_param(options = {}); end - - sig { params(options: T::Hash[T.untyped, T.untyped]).returns(SignedGlobalID) } - def to_signed_global_id(options = {}); end -end diff --git a/sorbet/rbi/annotations/railties.rbi b/sorbet/rbi/annotations/railties.rbi deleted file mode 100644 index f71f135..0000000 --- a/sorbet/rbi/annotations/railties.rbi +++ /dev/null @@ -1,58 +0,0 @@ -# typed: strong - -# DO NOT EDIT MANUALLY -# This file was pulled from a central RBI files repository. -# Please run `bin/tapioca annotations` to update it. - -module Rails - class << self - sig { returns(Rails::Application) } - def application; end - - sig { returns(ActiveSupport::BacktraceCleaner) } - def backtrace_cleaner; end - - sig { returns(ActiveSupport::Cache::Store) } - def cache; end - - sig { returns(ActiveSupport::EnvironmentInquirer) } - def env; end - - sig { returns(ActiveSupport::Logger) } - def logger; end - - sig { returns(Pathname) } - def root; end - - sig { returns(String) } - def version; end - end -end - -class Rails::Application < ::Rails::Engine - class << self - sig { params(block: T.proc.bind(Rails::Application).void).void } - def configure(&block); end - end - - sig { params(block: T.proc.bind(Rails::Application).void).void } - def configure(&block); end - - sig { returns(T.untyped) } - def config; end -end - -class Rails::Engine < ::Rails::Railtie - sig { params(block: T.untyped).returns(ActionDispatch::Routing::RouteSet) } - def routes(&block); end -end - -class Rails::Railtie - sig { params(block: T.proc.bind(Rails::Railtie).void).void } - def configure(&block); end -end - -class Rails::Railtie::Configuration - sig { params(blk: T.proc.bind(ActiveSupport::Reloader).void).void } - def to_prepare(&blk); end -end diff --git a/sorbet/rbi/annotations/rainbow.rbi b/sorbet/rbi/annotations/rainbow.rbi deleted file mode 100644 index 60ba90a..0000000 --- a/sorbet/rbi/annotations/rainbow.rbi +++ /dev/null @@ -1,269 +0,0 @@ -# typed: strict - -# DO NOT EDIT MANUALLY -# This file was pulled from a central RBI files repository. -# Please run `bin/tapioca annotations` to update it. - -module Rainbow - # @shim: https://github.com/sickill/rainbow/blob/master/lib/rainbow.rb#L10-L12 - sig { returns(T::Boolean) } - attr_accessor :enabled - - class Color - sig { returns(Symbol) } - attr_reader :ground - - sig { params(ground: Symbol, values: T.any([Integer], [Integer, Integer, Integer])).returns(Color) } - def self.build(ground, values); end - - sig { params(hex: String).returns([Integer, Integer, Integer]) } - def self.parse_hex_color(hex); end - - class Indexed < Rainbow::Color - sig { returns(Integer) } - attr_reader :num - - sig { params(ground: Symbol, num: Integer).void } - def initialize(ground, num); end - - sig { returns(T::Array[Integer]) } - def codes; end - end - - class Named < Rainbow::Color::Indexed - NAMES = T.let(nil, T::Hash[Symbol, Integer]) - - sig { params(ground: Symbol, name: Symbol).void } - def initialize(ground, name); end - - sig { returns(T::Array[Symbol]) } - def self.color_names; end - - sig { returns(String) } - def self.valid_names; end - end - - class RGB < Rainbow::Color::Indexed - sig { returns(Integer) } - attr_reader :r, :g, :b - - sig { params(ground: Symbol, values: Integer).void } - def initialize(ground, *values); end - - sig { returns(T::Array[Integer]) } - def codes; end - - sig { params(value: Numeric).returns(Integer) } - def self.to_ansi_domain(value); end - end - - class X11Named < Rainbow::Color::RGB - include Rainbow::X11ColorNames - - sig { returns(T::Array[Symbol]) } - def self.color_names; end - - sig { returns(String) } - def self.valid_names; end - - sig { params(ground: Symbol, name: Symbol).void } - def initialize(ground, name); end - end - end - - sig { returns(Wrapper) } - def self.global; end - - sig { returns(T::Boolean) } - def self.enabled; end - - sig { params(value: T::Boolean).returns(T::Boolean) } - def self.enabled=(value); end - - sig { params(string: String).returns(String) } - def self.uncolor(string); end - - class NullPresenter < String - sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) } - def color(*values); end - - sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) } - def foreground(*values); end - - sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) } - def fg(*values); end - - sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) } - def background(*values); end - - sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) } - def bg(*values); end - - sig { returns(NullPresenter) } - def reset; end - - sig { returns(NullPresenter) } - def bright; end - - sig { returns(NullPresenter) } - def faint; end - - sig { returns(NullPresenter) } - def italic; end - - sig { returns(NullPresenter) } - def underline; end - - sig { returns(NullPresenter) } - def blink; end - - sig { returns(NullPresenter) } - def inverse; end - - sig { returns(NullPresenter) } - def hide; end - - sig { returns(NullPresenter) } - def cross_out; end - - sig { returns(NullPresenter) } - def black; end - - sig { returns(NullPresenter) } - def red; end - - sig { returns(NullPresenter) } - def green; end - - sig { returns(NullPresenter) } - def yellow; end - - sig { returns(NullPresenter) } - def blue; end - - sig { returns(NullPresenter) } - def magenta; end - - sig { returns(NullPresenter) } - def cyan; end - - sig { returns(NullPresenter) } - def white; end - - sig { returns(NullPresenter) } - def bold; end - - sig { returns(NullPresenter) } - def dark; end - - sig { returns(NullPresenter) } - def strike; end - end - - class Presenter < String - TERM_EFFECTS = T.let(nil, T::Hash[Symbol, Integer]) - - sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) } - def color(*values); end - - sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) } - def foreground(*values); end - - sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) } - def fg(*values); end - - sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) } - def background(*values); end - - sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) } - def bg(*values); end - - sig { returns(Presenter) } - def reset; end - - sig { returns(Presenter) } - def bright; end - - sig { returns(Presenter) } - def faint; end - - sig { returns(Presenter) } - def italic; end - - sig { returns(Presenter) } - def underline; end - - sig { returns(Presenter) } - def blink; end - - sig { returns(Presenter) } - def inverse; end - - sig { returns(Presenter) } - def hide; end - - sig { returns(Presenter) } - def cross_out; end - - sig { returns(Presenter) } - def black; end - - sig { returns(Presenter) } - def red; end - - sig { returns(Presenter) } - def green; end - - sig { returns(Presenter) } - def yellow; end - - sig { returns(Presenter) } - def blue; end - - sig { returns(Presenter) } - def magenta; end - - sig { returns(Presenter) } - def cyan; end - - sig { returns(Presenter) } - def white; end - - sig { returns(Presenter) } - def bold; end - - sig { returns(Presenter) } - def dark; end - - sig { returns(Presenter) } - def strike; end - end - - class StringUtils - sig { params(string: String, codes: T::Array[Integer]).returns(String) } - def self.wrap_with_sgr(string, codes); end - - sig { params(string: String).returns(String) } - def self.uncolor(string); end - end - - VERSION = T.let(nil, String) - - class Wrapper - sig { returns(T::Boolean) } - attr_accessor :enabled - - sig { params(enabled: T::Boolean).void } - def initialize(enabled = true); end - - sig { params(string: String).returns(T.any(Rainbow::Presenter, Rainbow::NullPresenter)) } - def wrap(string); end - end - - module X11ColorNames - NAMES = T.let(nil, T::Hash[Symbol, [Integer, Integer, Integer]]) - end -end - -sig { params(string: String).returns(Rainbow::Presenter) } -def Rainbow(string); end diff --git a/sorbet/rbi/gems/actioncable@7.0.4.2.rbi b/sorbet/rbi/gems/actioncable@7.0.4.2.rbi deleted file mode 100644 index 6782a6f..0000000 --- a/sorbet/rbi/gems/actioncable@7.0.4.2.rbi +++ /dev/null @@ -1,2759 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# 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 -module ActionCable - extend ::ActiveSupport::Autoload - - private - - # Singleton instance of the server - # - # source://actioncable//lib/action_cable.rb#51 - def server; end - - class << self - # 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 - def server; end - - # 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 - -# 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. -# -# Channel instances are long-lived. A channel object will be instantiated when the cable consumer becomes a subscriber, and then -# lives until the consumer disconnects. This may be seconds, minutes, hours, or even days. That means you have to take special care -# not to do anything silly in a channel that would balloon its memory footprint or whatever. The references are forever, so they won't be released -# as is normally the case with a controller instance that gets thrown away after every request. -# -# Long-lived channels (and connections) also mean you're responsible for ensuring that the data is fresh. If you hold a reference to a user -# record, but the name is changed while that reference is held, you may be sending stale data if you don't take precautions to avoid it. -# -# The upside of long-lived channel instances is that you can use instance variables to keep reference to objects that future subscriber requests -# can interact with. Here's a quick example: -# -# class ChatChannel < ApplicationCable::Channel -# def subscribed -# @room = Chat::Room[params[:room_number]] -# end -# -# def speak(data) -# @room.speak data, user: current_user -# end -# end -# -# The #speak action simply uses the Chat::Room object that was created when the channel was first subscribed to by the consumer when that -# subscriber wants to say something in the room. -# -# == Action processing -# -# Unlike subclasses of ActionController::Base, channels do not follow a RESTful -# constraint form for their actions. Instead, Action Cable operates through a -# remote-procedure call model. You can declare any public method on the -# channel (optionally taking a data argument), and this method is -# automatically exposed as callable to the client. -# -# Example: -# -# class AppearanceChannel < ApplicationCable::Channel -# def subscribed -# @connection_token = generate_connection_token -# end -# -# def unsubscribed -# current_user.disappear @connection_token -# end -# -# def appear(data) -# current_user.appear @connection_token, on: data['appearing_on'] -# end -# -# def away -# current_user.away @connection_token -# end -# -# private -# def generate_connection_token -# SecureRandom.hex(36) -# end -# end -# -# In this example, the subscribed and unsubscribed methods are not callable methods, as they -# were already declared in ActionCable::Channel::Base, but #appear -# and #away are. #generate_connection_token is also not -# callable, since it's a private method. You'll see that appear accepts a data -# parameter, which it then uses as part of its model call. #away -# does not, since it's simply a trigger action. -# -# Also note that in this example, current_user is available because -# it was marked as an identifying attribute on the connection. All such -# identifiers will automatically create a delegation method of the same name -# on the channel instance. -# -# == Rejecting subscription requests -# -# A channel can reject a subscription request in the #subscribed callback by -# invoking the #reject method: -# -# class ChatChannel < ApplicationCable::Channel -# def subscribed -# @room = Chat::Room[params[:room_number]] -# reject unless current_user.can_access?(@room) -# end -# end -# -# In this example, the subscription will be rejected if the -# current_user does not have access to the chat room. On the -# 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 -class ActionCable::Channel::Base - include ::ActiveSupport::Callbacks - include ::ActionCable::Channel::Callbacks - include ::ActionCable::Channel::PeriodicTimers - include ::ActionCable::Channel::Streams - include ::ActionCable::Channel::Naming - include ::ActionCable::Channel::Broadcasting - include ::ActiveSupport::Rescuable - extend ::ActiveSupport::Callbacks::ClassMethods - extend ::ActiveSupport::DescendantsTracker - extend ::ActionCable::Channel::Callbacks::ClassMethods - extend ::ActionCable::Channel::PeriodicTimers::ClassMethods - extend ::ActionCable::Channel::Naming::ClassMethods - extend ::ActionCable::Channel::Broadcasting::ClassMethods - extend ::ActiveSupport::Rescuable::ClassMethods - - # @return [Base] a new instance of Base - # - # source://actioncable//lib/action_cable/channel/base.rb#144 - def initialize(connection, identifier, params = T.unsafe(nil)); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#928 - def _run_subscribe_callbacks(&block); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#928 - def _run_unsubscribe_callbacks(&block); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#940 - def _subscribe_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#940 - def _unsubscribe_callbacks; end - - # Returns the value of attribute connection. - # - # source://actioncable//lib/action_cable/channel/base.rb#105 - def connection; end - - # Returns the value of attribute identifier. - # - # source://actioncable//lib/action_cable/channel/base.rb#105 - def identifier; end - - # source://actioncable//lib/action_cable/channel/base.rb#106 - def logger(*_arg0, **_arg1, &_arg2); end - - # Returns the value of attribute params. - # - # source://actioncable//lib/action_cable/channel/base.rb#105 - 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 - def perform_action(data); end - - # source://actioncable//lib/action_cable/channel/periodic_timers.rb#9 - def periodic_timers=(_arg0); end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers; end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers=(_arg0); end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - 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 - 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 - def unsubscribe_from_channel; end - - private - - # source://actioncable//lib/action_cable/channel/base.rb#276 - def action_signature(action, data); end - - # source://actioncable//lib/action_cable/channel/base.rb#228 - def defer_subscription_confirmation!; end - - # @return [Boolean] - # - # source://actioncable//lib/action_cable/channel/base.rb#232 - def defer_subscription_confirmation?; end - - # source://actioncable//lib/action_cable/channel/base.rb#248 - def delegate_connection_identifiers; end - - # source://actioncable//lib/action_cable/channel/base.rb#264 - def dispatch_action(action, data); end - - # source://actioncable//lib/action_cable/channel/base.rb#222 - def ensure_confirmation_sent; end - - # source://actioncable//lib/action_cable/channel/base.rb#256 - def extract_action(data); end - - # @return [Boolean] - # - # source://actioncable//lib/action_cable/channel/base.rb#260 - def processable_action?(action); end - - # source://actioncable//lib/action_cable/channel/base.rb#240 - def reject; end - - # source://actioncable//lib/action_cable/channel/base.rb#295 - 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 - def subscribed; end - - # @return [Boolean] - # - # source://actioncable//lib/action_cable/channel/base.rb#236 - def subscription_confirmation_sent?; end - - # @return [Boolean] - # - # source://actioncable//lib/action_cable/channel/base.rb#244 - 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 - def transmit(data, via: T.unsafe(nil)); end - - # source://actioncable//lib/action_cable/channel/base.rb#284 - def transmit_subscription_confirmation; end - - # source://actioncable//lib/action_cable/channel/base.rb#300 - 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 - def unsubscribed; end - - class << self - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#932 - def _subscribe_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#936 - def _subscribe_callbacks=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#932 - def _unsubscribe_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#936 - def _unsubscribe_callbacks=(value); end - - # A list of method names that should be considered actions. This - # includes all public instance methods on a channel, less - # any internal methods (defined on Base), adding back in - # any methods that are internal, but still exist on the class - # itself. - # - # ==== Returns - # * Set - A set of all methods that should be considered actions. - # - # source://actioncable//lib/action_cable/channel/base.rb#117 - def action_methods; end - - # source://actioncable//lib/action_cable/channel/periodic_timers.rb#9 - def periodic_timers; end - - # source://actioncable//lib/action_cable/channel/periodic_timers.rb#9 - def periodic_timers=(value); end - - # source://actioncable//lib/action_cable/channel/periodic_timers.rb#9 - def periodic_timers?; end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers; end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers?; end - - private - - # action_methods are cached and there is sometimes need to refresh - # 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 - 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 - def method_added(name); end - end -end - -# source://actioncable//lib/action_cable/channel/broadcasting.rb#7 -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 -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 - def broadcast_to(model, message); end - - # Returns a unique broadcasting identifier for this model in this channel: - # - # CommentsChannel.broadcasting_for("all") # => "comments:all" - # - # 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 - def broadcasting_for(model); end - - # source://actioncable//lib/action_cable/channel/broadcasting.rb#28 - def serialize_broadcasting(object); end -end - -# source://actioncable//lib/action_cable/channel/callbacks.rb#7 -module ActionCable::Channel::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::Channel::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/channel/callbacks.rb#16 -module ActionCable::Channel::Callbacks::ClassMethods - # source://actioncable//lib/action_cable/channel/callbacks.rb#21 - def after_subscribe(*methods, &block); end - - # source://actioncable//lib/action_cable/channel/callbacks.rb#30 - def after_unsubscribe(*methods, &block); end - - # source://actioncable//lib/action_cable/channel/callbacks.rb#17 - def before_subscribe(*methods, &block); end - - # source://actioncable//lib/action_cable/channel/callbacks.rb#26 - def before_unsubscribe(*methods, &block); end - - # source://actioncable//lib/action_cable/channel/callbacks.rb#21 - def on_subscribe(*methods, &block); end - - # source://actioncable//lib/action_cable/channel/callbacks.rb#30 - def on_unsubscribe(*methods, &block); end -end - -# 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 -module ActionCable::Channel::ChannelStub - # @return [Boolean] - # - # source://actioncable//lib/action_cable/channel/test_case.rb#22 - def confirmed?; end - - # @return [Boolean] - # - # source://actioncable//lib/action_cable/channel/test_case.rb#26 - def rejected?; end - - # Make periodic timers no-op - # - # source://actioncable//lib/action_cable/channel/test_case.rb#43 - def start_periodic_timers; end - - # source://actioncable//lib/action_cable/channel/test_case.rb#34 - def stop_all_streams; end - - # Make periodic timers no-op - # - # source://actioncable//lib/action_cable/channel/test_case.rb#43 - def stop_periodic_timers; end - - # source://actioncable//lib/action_cable/channel/test_case.rb#30 - def stream_from(broadcasting, *_arg1); end - - # source://actioncable//lib/action_cable/channel/test_case.rb#38 - def streams; end -end - -# source://actioncable//lib/action_cable/channel/test_case.rb#47 -class ActionCable::Channel::ConnectionStub - # @return [ConnectionStub] a new instance of ConnectionStub - # - # source://actioncable//lib/action_cable/channel/test_case.rb#50 - def initialize(identifiers = T.unsafe(nil)); end - - # source://actioncable//lib/action_cable/channel/test_case.rb#66 - def connection_identifier; end - - # Returns the value of attribute identifiers. - # - # source://actioncable//lib/action_cable/channel/test_case.rb#48 - def identifiers; end - - # Returns the value of attribute logger. - # - # source://actioncable//lib/action_cable/channel/test_case.rb#48 - def logger; end - - # Returns the value of attribute subscriptions. - # - # source://actioncable//lib/action_cable/channel/test_case.rb#48 - def subscriptions; end - - # Returns the value of attribute transmissions. - # - # source://actioncable//lib/action_cable/channel/test_case.rb#48 - def transmissions; end - - # source://actioncable//lib/action_cable/channel/test_case.rb#62 - def transmit(cable_message); end - - private - - # source://actioncable//lib/action_cable/channel/test_case.rb#71 - def connection_gid(ids); end -end - -# source://actioncable//lib/action_cable/channel/naming.rb#5 -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 -module ActionCable::Channel::Naming::ClassMethods - # Returns the name of the channel, underscored, without the Channel ending. - # If the channel is in a namespace, then the namespaces are represented by single - # colon separators in the channel name. - # - # ChatChannel.channel_name # => 'chat' - # Chats::AppearancesChannel.channel_name # => 'chats:appearances' - # FooChats::BarAppearancesChannel.channel_name # => 'foo_chats:bar_appearances' - # - # source://actioncable//lib/action_cable/channel/naming.rb#16 - def channel_name; end -end - -# source://actioncable//lib/action_cable/channel/test_case.rb#10 -class ActionCable::Channel::NonInferrableChannelError < ::StandardError - # @return [NonInferrableChannelError] a new instance of NonInferrableChannelError - # - # source://actioncable//lib/action_cable/channel/test_case.rb#11 - def initialize(name); end -end - -# source://actioncable//lib/action_cable/channel/periodic_timers.rb#5 -module ActionCable::Channel::PeriodicTimers - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActionCable::Channel::PeriodicTimers::ClassMethods - - private - - # source://actioncable//lib/action_cable/channel/periodic_timers.rb#56 - def active_periodic_timers; end - - # source://actioncable//lib/action_cable/channel/periodic_timers.rb#66 - def start_periodic_timer(callback, every:); end - - # source://actioncable//lib/action_cable/channel/periodic_timers.rb#60 - def start_periodic_timers; end - - # source://actioncable//lib/action_cable/channel/periodic_timers.rb#72 - def stop_periodic_timers; end - - module GeneratedClassMethods - def periodic_timers; end - def periodic_timers=(value); end - def periodic_timers?; end - end - - module GeneratedInstanceMethods - def periodic_timers=(value); end - end -end - -# source://actioncable//lib/action_cable/channel/periodic_timers.rb#15 -module ActionCable::Channel::PeriodicTimers::ClassMethods - # Periodically performs a task on the channel, like updating an online - # user counter, polling a backend for new status messages, sending - # regular "heartbeat" messages, or doing some internal work and giving - # progress updates. - # - # Pass a method name or lambda argument or provide a block to call. - # Specify the calling period in seconds using the every: - # keyword argument. - # - # periodically :transmit_progress, every: 5.seconds - # - # periodically every: 3.minutes do - # transmit action: :update_count, count: current_count - # end - # - # source://actioncable//lib/action_cable/channel/periodic_timers.rb#31 - def periodically(callback_or_method_name = T.unsafe(nil), every:, &block); end -end - -# 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. -# -# Most commonly, the streamed broadcast is sent straight to the subscriber on the client-side. The channel just acts as a connector between -# the two parties (the broadcaster and the channel subscriber). Here's an example of a channel that allows subscribers to get all new -# comments on a given page: -# -# class CommentsChannel < ApplicationCable::Channel -# def follow(data) -# stream_from "comments_for_#{data['recording_id']}" -# end -# -# def unfollow -# stop_all_streams -# end -# end -# -# Based on the above example, the subscribers of this channel will get whatever data is put into the, -# let's say, comments_for_45 broadcasting as soon as it's put there. -# -# An example broadcasting for this channel looks like so: -# -# ActionCable.server.broadcast "comments_for_45", { author: 'DHH', content: 'Rails is just swell' } -# -# If you have a stream that is related to a model, then the broadcasting used can be generated from the model and channel. -# The following example would subscribe to a broadcasting like comments:Z2lkOi8vVGVzdEFwcC9Qb3N0LzE. -# -# class CommentsChannel < ApplicationCable::Channel -# def subscribed -# post = Post.find(params[:id]) -# stream_for post -# end -# end -# -# You can then broadcast to this channel using: -# -# CommentsChannel.broadcast_to(@post, @comment) -# -# If you don't just want to parlay the broadcast unfiltered to the subscriber, you can also supply a callback that lets you alter what is sent out. -# The below example shows how you can use this to provide performance introspection in the process: -# -# class ChatChannel < ApplicationCable::Channel -# def subscribed -# @room = Chat::Room[params[:room_number]] -# -# stream_for @room, coder: ActiveSupport::JSON do |message| -# if message['originated_at'].present? -# elapsed_time = (Time.now.to_f - message['originated_at']).round(2) -# -# ActiveSupport::Notifications.instrument :performance, measurement: 'Chat.message_delay', value: elapsed_time, action: :timing -# logger.info "Message took #{elapsed_time}s to arrive" -# end -# -# transmit message -# end -# end -# end -# -# You can stop streaming from all broadcasts by calling #stop_all_streams. -# -# source://actioncable//lib/action_cable/channel/streams.rb#65 -module ActionCable::Channel::Streams - extend ::ActiveSupport::Concern - - # source://actioncable//lib/action_cable/channel/streams.rb#138 - 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 - def stop_all_streams; end - - # Unsubscribes streams for the model. - # - # source://actioncable//lib/action_cable/channel/streams.rb#115 - def stop_stream_for(model); end - - # Unsubscribes streams from the named broadcasting. - # - # source://actioncable//lib/action_cable/channel/streams.rb#106 - def stop_stream_from(broadcasting); end - - # Start streaming the pubsub queue for the model in this channel. Optionally, you can pass a - # callback that'll be used instead of the default of just transmitting the updates straight - # to the subscriber. - # - # 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 - 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 - # instead of the default of just transmitting the updates straight to the subscriber. - # 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 - 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 - def stream_or_reject_for(model); end - - private - - # May be overridden to change the default stream handling behavior - # which decodes JSON and transmits to the client. - # - # TODO: Tests demonstrating this. - # - # TODO: Room for optimization. Update transmit API to be coder-aware - # 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 - def default_stream_handler(broadcasting, coder:); end - - # source://actioncable//lib/action_cable/channel/streams.rb#195 - def identity_handler; end - - # source://actioncable//lib/action_cable/channel/streams.rb#179 - def stream_decoder(handler = T.unsafe(nil), coder:); end - - # May be overridden to add instrumentation, logging, specialized error - # handling, or other forms of handler decoration. - # - # TODO: Tests demonstrating this. - # - # source://actioncable//lib/action_cable/channel/streams.rb#158 - def stream_handler(broadcasting, user_handler, coder: T.unsafe(nil)); end - - # source://actioncable//lib/action_cable/channel/streams.rb#187 - def stream_transmitter(handler = T.unsafe(nil), broadcasting:); end - - # source://actioncable//lib/action_cable/channel/streams.rb#140 - 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 - def worker_pool_stream_handler(broadcasting, user_handler, coder: T.unsafe(nil)); end -end - -# Superclass for Action Cable channel functional tests. -# -# == Basic example -# -# Functional tests are written as follows: -# 1. First, one uses the +subscribe+ method to simulate subscription creation. -# 2. Then, one asserts whether the current state is as expected. "State" can be anything: -# transmitted messages, subscribed streams, etc. -# -# For example: -# -# class ChatChannelTest < ActionCable::Channel::TestCase -# def test_subscribed_with_room_number -# # Simulate a subscription creation -# subscribe room_number: 1 -# -# # Asserts that the subscription was successfully created -# assert subscription.confirmed? -# -# # Asserts that the channel subscribes connection to a stream -# assert_has_stream "chat_1" -# -# # Asserts that the channel subscribes connection to a specific -# # stream created for a model -# assert_has_stream_for Room.find(1) -# end -# -# def test_does_not_stream_with_incorrect_room_number -# subscribe room_number: -1 -# -# # Asserts that not streams was started -# assert_no_streams -# end -# -# def test_does_not_subscribe_without_room_number -# subscribe -# -# # Asserts that the subscription was rejected -# assert subscription.rejected? -# end -# end -# -# You can also perform actions: -# def test_perform_speak -# subscribe room_number: 1 -# -# perform :speak, message: "Hello, Rails!" -# -# assert_equal "Hello, Rails!", transmissions.last["text"] -# end -# -# == Special methods -# -# ActionCable::Channel::TestCase will also automatically provide the following instance -# methods for use in the tests: -# -# connection:: -# An ActionCable::Channel::ConnectionStub, representing the current HTTP connection. -# subscription:: -# An instance of the current channel, created when you call +subscribe+. -# transmissions:: -# A list of all messages that have been transmitted into the channel. -# -# -# == Channel is automatically inferred -# -# ActionCable::Channel::TestCase will automatically infer the channel under test -# from the test class name. If the channel cannot be inferred from the test -# class name, you can explicitly set it with +tests+. -# -# class SpecialEdgeCaseChannelTest < ActionCable::Channel::TestCase -# tests SpecialChannel -# end -# -# == Specifying connection identifiers -# -# You need to set up your connection manually to provide values for the identifiers. -# To do this just use: -# -# stub_connection(user: users(:john)) -# -# == Testing broadcasting -# -# ActionCable::Channel::TestCase enhances ActionCable::TestHelper assertions (e.g. -# +assert_broadcasts+) to handle broadcasting to models: -# -# -# # in your channel -# def speak(data) -# broadcast_to room, text: data["message"] -# end -# -# def test_speak -# subscribe room_id: rooms(:chat).id -# -# assert_broadcast_on(rooms(:chat), text: "Hello, Rails!") do -# perform :speak, message: "Hello, Rails!" -# end -# end -# -# source://actioncable//lib/action_cable/channel/test_case.rb#181 -class ActionCable::Channel::TestCase < ::ActiveSupport::TestCase - include ::ActiveSupport::Testing::ConstantLookup - include ::ActionCable::TestHelper - include ::ActionCable::Channel::TestCase::Behavior - extend ::ActiveSupport::Testing::ConstantLookup::ClassMethods - extend ::ActionCable::Channel::TestCase::Behavior::ClassMethods - - # source://actioncable//lib/action_cable/channel/test_case.rb#191 - def _channel_class; end - - # source://actioncable//lib/action_cable/channel/test_case.rb#191 - def _channel_class=(_arg0); end - - # source://actioncable//lib/action_cable/channel/test_case.rb#191 - def _channel_class?; end - - # source://actioncable//lib/action_cable/channel/test_case.rb#193 - def connection; end - - # source://actioncable//lib/action_cable/channel/test_case.rb#193 - def subscription; end - - class << self - # source://actioncable//lib/action_cable/channel/test_case.rb#191 - def _channel_class; end - - # source://actioncable//lib/action_cable/channel/test_case.rb#191 - def _channel_class=(value); end - - # source://actioncable//lib/action_cable/channel/test_case.rb#191 - def _channel_class?; end - end -end - -# source://actioncable//lib/action_cable/channel/test_case.rb#182 -module ActionCable::Channel::TestCase::Behavior - include ::ActionCable::TestHelper - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - include ::ActiveSupport::Testing::ConstantLookup - - mixes_in_class_methods GeneratedClassMethods - 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 - 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 - def assert_broadcasts(stream_or_object, *args); end - - # Asserts that the specified stream has been started. - # - # def test_assert_started_stream - # subscribe - # assert_has_stream 'messages' - # end - # - # source://actioncable//lib/action_cable/channel/test_case.rb#295 - def assert_has_stream(stream); end - - # Asserts that the specified stream for a model has started. - # - # def test_assert_started_stream_for - # subscribe id: 42 - # assert_has_stream_for User::User.find(42) - # end - # - # source://actioncable//lib/action_cable/channel/test_case.rb#306 - def assert_has_stream_for(object); end - - # Asserts that no streams have been started. - # - # def test_assert_no_started_stream - # subscribe - # assert_no_streams - # end - # - # source://actioncable//lib/action_cable/channel/test_case.rb#284 - def assert_no_streams; end - - # Perform action on a channel. - # - # NOTE: Must be subscribed. - # - # source://actioncable//lib/action_cable/channel/test_case.rb#256 - def perform(action, data = T.unsafe(nil)); end - - # Set up test connection with the specified identifiers: - # - # class ApplicationCable < ActionCable::Connection::Base - # identified_by :user, :token - # end - # - # stub_connection(user: users[:john], token: 'my-secret-token') - # - # source://actioncable//lib/action_cable/channel/test_case.rb#234 - 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 - def subscribe(params = T.unsafe(nil)); end - - # Returns messages transmitted into channel - # - # source://actioncable//lib/action_cable/channel/test_case.rb#262 - def transmissions; end - - # Unsubscribe the subscription under test. - # - # source://actioncable//lib/action_cable/channel/test_case.rb#248 - def unsubscribe; end - - private - - # source://actioncable//lib/action_cable/channel/test_case.rb#315 - def broadcasting_for(stream_or_object); end - - # source://actioncable//lib/action_cable/channel/test_case.rb#311 - def check_subscribed!; end - - module GeneratedClassMethods - def _channel_class; end - def _channel_class=(value); end - def _channel_class?; end - end - - module GeneratedInstanceMethods - def _channel_class; end - def _channel_class=(value); end - def _channel_class?; end - end -end - -# source://actioncable//lib/action_cable/channel/test_case.rb#188 -ActionCable::Channel::TestCase::Behavior::CHANNEL_IDENTIFIER = T.let(T.unsafe(nil), String) - -# source://actioncable//lib/action_cable/channel/test_case.rb#198 -module ActionCable::Channel::TestCase::Behavior::ClassMethods - # source://actioncable//lib/action_cable/channel/test_case.rb#210 - def channel_class; end - - # @raise [NonInferrableChannelError] - # - # source://actioncable//lib/action_cable/channel/test_case.rb#218 - def determine_default_channel(name); end - - # source://actioncable//lib/action_cable/channel/test_case.rb#199 - 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/test_case.rb#20 -module ActionCable::Connection::Assertions - # Asserts that the connection is rejected (via +reject_unauthorized_connection+). - # - # # Asserts that connection without user_id fails - # assert_reject_connection { connect params: { user_id: '' } } - # - # source://actioncable//lib/action_cable/connection/test_case.rb#25 - def assert_reject_connection(&block); end -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. - # - # @raise [UnauthorizedError] - # - # source://actioncable//lib/action_cable/connection/authorization.rb#9 - def reject_unauthorized_connection; end -end - -# source://actioncable//lib/action_cable/connection/authorization.rb#6 -class ActionCable::Connection::Authorization::UnauthorizedError < ::StandardError; end - -# 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 -# authentication and authorization. -# -# Here's a basic example: -# -# module ApplicationCable -# class Connection < ActionCable::Connection::Base -# identified_by :current_user -# -# def connect -# self.current_user = find_verified_user -# logger.add_tags current_user.name -# end -# -# def disconnect -# # Any cleanup work needed when the cable connection is cut. -# end -# -# private -# def find_verified_user -# User::User.find_by_identity(cookies.encrypted[:identity_id]) || -# reject_unauthorized_connection -# end -# end -# end -# -# First, we declare that this connection can be identified by its current_user. This allows us to later be able to find all connections -# established for that current_user (and potentially disconnect them). You can declare as many -# identification indexes as you like. Declaring an identification means that an attr_accessor is automatically set for that key. -# -# Second, we rely on the fact that the WebSocket connection is established with the cookies from the domain being sent along. This makes -# it easy to use signed cookies that were set when logging in via a web interface to authorize the WebSocket connection. -# -# Finally, we add a tag to the connection-specific logger with the name of the current user to easily distinguish their messages in the log. -# -# Pretty simple, eh? -# -# source://actioncable//lib/action_cable/connection/base.rb#46 -class ActionCable::Connection::Base - include ::ActionCable::Connection::Identification - include ::ActionCable::Connection::InternalChannel - include ::ActionCable::Connection::Authorization - include ::ActiveSupport::Rescuable - extend ::ActionCable::Connection::Identification::ClassMethods - extend ::ActiveSupport::Rescuable::ClassMethods - - # @return [Base] a new instance of Base - # - # source://actioncable//lib/action_cable/connection/base.rb#55 - def initialize(server, env, coder: T.unsafe(nil)); end - - # source://actioncable//lib/action_cable/connection/base.rb#125 - def beat; end - - # Close the WebSocket connection. - # - # source://actioncable//lib/action_cable/connection/base.rb#100 - def close(reason: T.unsafe(nil), reconnect: T.unsafe(nil)); end - - # source://actioncable//lib/action_cable/connection/base.rb#87 - def dispatch_websocket_message(websocket_message); end - - # Returns the value of attribute env. - # - # source://actioncable//lib/action_cable/connection/base.rb#52 - def env; end - - # source://actioncable//lib/action_cable/connection/base.rb#53 - def event_loop(*_arg0, **_arg1, &_arg2); end - - # source://actioncable//lib/action_cable/connection/identification.rb#11 - def identifiers; end - - # source://actioncable//lib/action_cable/connection/identification.rb#11 - def identifiers=(_arg0); end - - # source://actioncable//lib/action_cable/connection/identification.rb#11 - def identifiers?; end - - # Returns the value of attribute logger. - # - # source://actioncable//lib/action_cable/connection/base.rb#52 - def logger; end - - # source://actioncable//lib/action_cable/connection/base.rb#142 - def on_close(reason, code); end - - # source://actioncable//lib/action_cable/connection/base.rb#137 - def on_error(message); end - - # source://actioncable//lib/action_cable/connection/base.rb#133 - def on_message(message); end - - # source://actioncable//lib/action_cable/connection/base.rb#129 - 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 - def process; end - - # Returns the value of attribute protocol. - # - # source://actioncable//lib/action_cable/connection/base.rb#52 - def protocol; end - - # source://actioncable//lib/action_cable/connection/base.rb#53 - 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 - def receive(websocket_message); end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers; end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers=(_arg0); end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - 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 - def send_async(method, *arguments); end - - # Returns the value of attribute server. - # - # source://actioncable//lib/action_cable/connection/base.rb#52 - 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 - def statistics; end - - # Returns the value of attribute subscriptions. - # - # source://actioncable//lib/action_cable/connection/base.rb#52 - def subscriptions; end - - # source://actioncable//lib/action_cable/connection/base.rb#95 - def transmit(cable_message); end - - # Returns the value of attribute worker_pool. - # - # source://actioncable//lib/action_cable/connection/base.rb#52 - def worker_pool; end - - private - - # @return [Boolean] - # - # source://actioncable//lib/action_cable/connection/base.rb#201 - 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 - def cookies; end - - # source://actioncable//lib/action_cable/connection/base.rb#167 - def decode(websocket_message); end - - # source://actioncable//lib/action_cable/connection/base.rb#163 - def encode(cable_message); end - - # source://actioncable//lib/action_cable/connection/base.rb#243 - def finished_request_message; end - - # source://actioncable//lib/action_cable/connection/base.rb#183 - def handle_close; end - - # source://actioncable//lib/action_cable/connection/base.rb#171 - def handle_open; end - - # source://actioncable//lib/action_cable/connection/base.rb#251 - def invalid_request_message; end - - # Returns the value of attribute message_buffer. - # - # source://actioncable//lib/action_cable/connection/base.rb#148 - 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 - 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 - def request; end - - # source://actioncable//lib/action_cable/connection/base.rb#220 - def respond_to_invalid_request; end - - # source://actioncable//lib/action_cable/connection/base.rb#215 - def respond_to_successful_request; end - - # source://actioncable//lib/action_cable/connection/base.rb#194 - def send_welcome_message; end - - # source://actioncable//lib/action_cable/connection/base.rb#234 - def started_request_message; end - - # source://actioncable//lib/action_cable/connection/base.rb#257 - def successful_request_message; end - - # Returns the value of attribute websocket. - # - # source://actioncable//lib/action_cable/connection/base.rb#147 - def websocket; end - - class << self - # source://actioncable//lib/action_cable/connection/identification.rb#11 - def identifiers; end - - # source://actioncable//lib/action_cable/connection/identification.rb#11 - def identifiers=(value); end - - # source://actioncable//lib/action_cable/connection/identification.rb#11 - def identifiers?; end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers; end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers?; end - end -end - -# source://actioncable//lib/action_cable/connection/client_socket.rb#11 -class ActionCable::Connection::ClientSocket - # @return [ClientSocket] a new instance of ClientSocket - # - # source://actioncable//lib/action_cable/connection/client_socket.rb#34 - def initialize(env, event_target, event_loop, protocols); end - - # @return [Boolean] - # - # source://actioncable//lib/action_cable/connection/client_socket.rb#112 - def alive?; end - - # source://actioncable//lib/action_cable/connection/client_socket.rb#108 - def client_gone; end - - # source://actioncable//lib/action_cable/connection/client_socket.rb#90 - def close(code = T.unsafe(nil), reason = T.unsafe(nil)); end - - # Returns the value of attribute env. - # - # source://actioncable//lib/action_cable/connection/client_socket.rb#32 - def env; end - - # source://actioncable//lib/action_cable/connection/client_socket.rb#104 - def parse(data); end - - # source://actioncable//lib/action_cable/connection/client_socket.rb#116 - def protocol; end - - # source://actioncable//lib/action_cable/connection/client_socket.rb#69 - def rack_response; end - - # source://actioncable//lib/action_cable/connection/client_socket.rb#57 - def start_driver; end - - # source://actioncable//lib/action_cable/connection/client_socket.rb#80 - def transmit(message); end - - # Returns the value of attribute url. - # - # source://actioncable//lib/action_cable/connection/client_socket.rb#32 - def url; end - - # source://actioncable//lib/action_cable/connection/client_socket.rb#74 - def write(data); end - - private - - # source://actioncable//lib/action_cable/connection/client_socket.rb#140 - def begin_close(reason, code); end - - # source://actioncable//lib/action_cable/connection/client_socket.rb#134 - def emit_error(message); end - - # source://actioncable//lib/action_cable/connection/client_socket.rb#149 - def finalize_close; end - - # source://actioncable//lib/action_cable/connection/client_socket.rb#121 - def open; end - - # source://actioncable//lib/action_cable/connection/client_socket.rb#128 - def receive_message(data); end - - class << self - # source://actioncable//lib/action_cable/connection/client_socket.rb#12 - def determine_url(env); end - - # @return [Boolean] - # - # source://actioncable//lib/action_cable/connection/client_socket.rb#17 - def secure_request?(env); end - end -end - -# source://actioncable//lib/action_cable/connection/client_socket.rb#30 -ActionCable::Connection::ClientSocket::CLOSED = T.let(T.unsafe(nil), Integer) - -# source://actioncable//lib/action_cable/connection/client_socket.rb#29 -ActionCable::Connection::ClientSocket::CLOSING = T.let(T.unsafe(nil), Integer) - -# source://actioncable//lib/action_cable/connection/client_socket.rb#27 -ActionCable::Connection::ClientSocket::CONNECTING = T.let(T.unsafe(nil), Integer) - -# source://actioncable//lib/action_cable/connection/client_socket.rb#28 -ActionCable::Connection::ClientSocket::OPEN = T.let(T.unsafe(nil), Integer) - -# source://actioncable//lib/action_cable/connection/identification.rb#7 -module ActionCable::Connection::Identification - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActionCable::Connection::Identification::ClassMethods - - # Return a single connection identifier that combines the value of all the registered identifiers into a single gid. - # - # source://actioncable//lib/action_cable/connection/identification.rb#27 - def connection_identifier; end - - private - - # source://actioncable//lib/action_cable/connection/identification.rb#36 - def connection_gid(ids); end - - module GeneratedClassMethods - def identifiers; end - def identifiers=(value); end - def identifiers?; end - end - - module GeneratedInstanceMethods - def identifiers; end - def identifiers=(value); end - def identifiers?; end - end -end - -# source://actioncable//lib/action_cable/connection/identification.rb#14 -module ActionCable::Connection::Identification::ClassMethods - # Mark a key as being a connection identifier index that can then be used to find the specific connection again later. - # Common identifiers are current_user and current_account, but could be anything, really. - # - # Note that anything marked as an identifier will automatically create a delegate by the same name on any - # channel instances created off the connection. - # - # source://actioncable//lib/action_cable/connection/identification.rb#20 - def identified_by(*identifiers); end -end - -# Makes it possible for the RemoteConnection to disconnect a specific connection. -# -# source://actioncable//lib/action_cable/connection/internal_channel.rb#6 -module ActionCable::Connection::InternalChannel - extend ::ActiveSupport::Concern - - private - - # source://actioncable//lib/action_cable/connection/internal_channel.rb#10 - def internal_channel; end - - # source://actioncable//lib/action_cable/connection/internal_channel.rb#31 - def process_internal_message(message); end - - # source://actioncable//lib/action_cable/connection/internal_channel.rb#14 - def subscribe_to_internal_channel; end - - # source://actioncable//lib/action_cable/connection/internal_channel.rb#25 - def unsubscribe_from_internal_channel; end -end - -# Allows us to buffer messages received from the WebSocket before the Connection has been fully initialized, and is ready to receive them. -# -# source://actioncable//lib/action_cable/connection/message_buffer.rb#6 -class ActionCable::Connection::MessageBuffer - # @return [MessageBuffer] a new instance of MessageBuffer - # - # source://actioncable//lib/action_cable/connection/message_buffer.rb#7 - def initialize(connection); end - - # source://actioncable//lib/action_cable/connection/message_buffer.rb#12 - def append(message); end - - # source://actioncable//lib/action_cable/connection/message_buffer.rb#28 - def process!; end - - # @return [Boolean] - # - # source://actioncable//lib/action_cable/connection/message_buffer.rb#24 - def processing?; end - - private - - # source://actioncable//lib/action_cable/connection/message_buffer.rb#45 - def buffer(message); end - - # Returns the value of attribute buffered_messages. - # - # source://actioncable//lib/action_cable/connection/message_buffer.rb#35 - def buffered_messages; end - - # Returns the value of attribute connection. - # - # source://actioncable//lib/action_cable/connection/message_buffer.rb#34 - def connection; end - - # source://actioncable//lib/action_cable/connection/message_buffer.rb#41 - def receive(message); end - - # source://actioncable//lib/action_cable/connection/message_buffer.rb#49 - def receive_buffered_messages; end - - # @return [Boolean] - # - # source://actioncable//lib/action_cable/connection/message_buffer.rb#37 - def valid?(message); end -end - -# source://actioncable//lib/action_cable/connection/test_case.rb#12 -class ActionCable::Connection::NonInferrableConnectionError < ::StandardError - # @return [NonInferrableConnectionError] a new instance of NonInferrableConnectionError - # - # source://actioncable//lib/action_cable/connection/test_case.rb#13 - def initialize(name); end -end - -# source://actioncable//lib/action_cable/connection/stream.rb#11 -class ActionCable::Connection::Stream - # @return [Stream] a new instance of Stream - # - # source://actioncable//lib/action_cable/connection/stream.rb#12 - def initialize(event_loop, socket); end - - # source://actioncable//lib/action_cable/connection/stream.rb#28 - def close; end - - # source://actioncable//lib/action_cable/connection/stream.rb#24 - def each(&callback); end - - # source://actioncable//lib/action_cable/connection/stream.rb#72 - def flush_write_buffer; end - - # source://actioncable//lib/action_cable/connection/stream.rb#98 - def hijack_rack_socket; end - - # source://actioncable//lib/action_cable/connection/stream.rb#94 - def receive(data); end - - # source://actioncable//lib/action_cable/connection/stream.rb#33 - def shutdown; end - - # source://actioncable//lib/action_cable/connection/stream.rb#37 - def write(data); end - - private - - # source://actioncable//lib/action_cable/connection/stream.rb#110 - def clean_rack_hijack; end -end - -# source://actioncable//lib/action_cable/connection/stream_event_loop.rb#8 -class ActionCable::Connection::StreamEventLoop - # @return [StreamEventLoop] a new instance of StreamEventLoop - # - # source://actioncable//lib/action_cable/connection/stream_event_loop.rb#9 - def initialize; end - - # source://actioncable//lib/action_cable/connection/stream_event_loop.rb#29 - def attach(io, stream); end - - # source://actioncable//lib/action_cable/connection/stream_event_loop.rb#37 - def detach(io, stream); end - - # source://actioncable//lib/action_cable/connection/stream_event_loop.rb#22 - def post(task = T.unsafe(nil), &block); end - - # source://actioncable//lib/action_cable/connection/stream_event_loop.rb#55 - def stop; end - - # source://actioncable//lib/action_cable/connection/stream_event_loop.rb#18 - def timer(interval, &block); end - - # source://actioncable//lib/action_cable/connection/stream_event_loop.rb#46 - def writes_pending(io); end - - private - - # source://actioncable//lib/action_cable/connection/stream_event_loop.rb#85 - def run; end - - # source://actioncable//lib/action_cable/connection/stream_event_loop.rb#61 - def spawn; end - - # source://actioncable//lib/action_cable/connection/stream_event_loop.rb#81 - def wakeup; end -end - -# 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 -class ActionCable::Connection::Subscriptions - # @return [Subscriptions] a new instance of Subscriptions - # - # source://actioncable//lib/action_cable/connection/subscriptions.rb#10 - def initialize(connection); end - - # source://actioncable//lib/action_cable/connection/subscriptions.rb#28 - def add(data); end - - # source://actioncable//lib/action_cable/connection/subscriptions.rb#15 - def execute_command(data); end - - # source://actioncable//lib/action_cable/connection/subscriptions.rb#59 - def identifiers; end - - # source://actioncable//lib/action_cable/connection/subscriptions.rb#69 - def logger(*_arg0, **_arg1, &_arg2); end - - # source://actioncable//lib/action_cable/connection/subscriptions.rb#55 - def perform_action(data); end - - # source://actioncable//lib/action_cable/connection/subscriptions.rb#45 - def remove(data); end - - # source://actioncable//lib/action_cable/connection/subscriptions.rb#50 - def remove_subscription(subscription); end - - # source://actioncable//lib/action_cable/connection/subscriptions.rb#63 - def unsubscribe_from_all; end - - private - - # Returns the value of attribute connection. - # - # source://actioncable//lib/action_cable/connection/subscriptions.rb#68 - def connection; end - - # source://actioncable//lib/action_cable/connection/subscriptions.rb#71 - def find(data); end - - # Returns the value of attribute subscriptions. - # - # source://actioncable//lib/action_cable/connection/subscriptions.rb#68 - def subscriptions; end -end - -# 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 -class ActionCable::Connection::TaggedLoggerProxy - # @return [TaggedLoggerProxy] a new instance of TaggedLoggerProxy - # - # source://actioncable//lib/action_cable/connection/tagged_logger_proxy.rb#11 - def initialize(logger, tags:); end - - # source://actioncable//lib/action_cable/connection/tagged_logger_proxy.rb#16 - 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#31 - def error(message); 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#31 - def info(message); end - - # source://actioncable//lib/action_cable/connection/tagged_logger_proxy.rb#21 - def tag(logger, &block); end - - # Returns the value of attribute tags. - # - # source://actioncable//lib/action_cable/connection/tagged_logger_proxy.rb#9 - 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#31 - def warn(message); end - - private - - # source://actioncable//lib/action_cable/connection/tagged_logger_proxy.rb#37 - def log(type, message); end -end - -# Unit test Action Cable connections. -# -# Useful to check whether a connection's +identified_by+ gets assigned properly -# and that any improper connection requests are rejected. -# -# == Basic example -# -# Unit tests are written as follows: -# -# 1. Simulate a connection attempt by calling +connect+. -# 2. Assert state, e.g. identifiers, has been assigned. -# -# -# class ApplicationCable::ConnectionTest < ActionCable::Connection::TestCase -# def test_connects_with_proper_cookie -# # Simulate the connection request with a cookie. -# cookies["user_id"] = users(:john).id -# -# connect -# -# # Assert the connection identifier matches the fixture. -# assert_equal users(:john).id, connection.user.id -# end -# -# def test_rejects_connection_without_proper_cookie -# assert_reject_connection { connect } -# end -# end -# -# +connect+ accepts additional information about the HTTP request with the -# +params+, +headers+, +session+, and Rack +env+ options. -# -# def test_connect_with_headers_and_query_string -# connect params: { user_id: 1 }, headers: { "X-API-TOKEN" => "secret-my" } -# -# assert_equal "1", connection.user.id -# assert_equal "secret-my", connection.token -# end -# -# def test_connect_with_params -# connect params: { user_id: 1 } -# -# assert_equal "1", connection.user.id -# end -# -# You can also set up the correct cookies before the connection request: -# -# def test_connect_with_cookies -# # Plain cookies: -# cookies["user_id"] = 1 -# -# # Or signed/encrypted: -# # cookies.signed["user_id"] = 1 -# # cookies.encrypted["user_id"] = 1 -# -# connect -# -# assert_equal "1", connection.user_id -# end -# -# == 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 -# class name, you can explicitly set it with +tests+. -# -# class ConnectionTest < ActionCable::Connection::TestCase -# tests ApplicationCable::Connection -# end -# -# source://actioncable//lib/action_cable/connection/test_case.rb#129 -class ActionCable::Connection::TestCase < ::ActiveSupport::TestCase - include ::ActiveSupport::Testing::ConstantLookup - include ::ActionCable::Connection::Assertions - include ::ActionCable::Connection::TestCase::Behavior - extend ::ActiveSupport::Testing::ConstantLookup::ClassMethods - extend ::ActionCable::Connection::TestCase::Behavior::ClassMethods - - # source://actioncable//lib/action_cable/connection/test_case.rb#139 - def _connection_class; end - - # source://actioncable//lib/action_cable/connection/test_case.rb#139 - def _connection_class=(_arg0); end - - # source://actioncable//lib/action_cable/connection/test_case.rb#139 - def _connection_class?; end - - # source://actioncable//lib/action_cable/connection/test_case.rb#141 - def connection; end - - class << self - # source://actioncable//lib/action_cable/connection/test_case.rb#139 - def _connection_class; end - - # source://actioncable//lib/action_cable/connection/test_case.rb#139 - def _connection_class=(value); end - - # source://actioncable//lib/action_cable/connection/test_case.rb#139 - def _connection_class?; end - end -end - -# source://actioncable//lib/action_cable/connection/test_case.rb#130 -module ActionCable::Connection::TestCase::Behavior - include ::ActionCable::Connection::Assertions - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - include ::ActiveSupport::Testing::ConstantLookup - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveSupport::Testing::ConstantLookup::ClassMethods - mixes_in_class_methods ::ActionCable::Connection::TestCase::Behavior::ClassMethods - - # Performs connection attempt to exert #connect on the connection under test. - # - # Accepts request path as the first argument and the following request options: - # - # - params – URL parameters (Hash) - # - headers – request headers (Hash) - # - session – session data (Hash) - # - env – additional Rack env configuration (Hash) - # - # source://actioncable//lib/action_cable/connection/test_case.rb#183 - def connect(path = T.unsafe(nil), **request_params); end - - # source://actioncable//lib/action_cable/connection/test_case.rb#203 - def cookies; end - - # Exert #disconnect on the connection under test. - # - # source://actioncable//lib/action_cable/connection/test_case.rb#196 - def disconnect; end - - private - - # source://actioncable//lib/action_cable/connection/test_case.rb#208 - def build_test_request(path, params: T.unsafe(nil), headers: T.unsafe(nil), session: T.unsafe(nil), env: T.unsafe(nil)); end - - module GeneratedClassMethods - def _connection_class; end - def _connection_class=(value); end - def _connection_class?; end - end - - module GeneratedInstanceMethods - def _connection_class; end - def _connection_class=(value); end - def _connection_class?; end - end -end - -# source://actioncable//lib/action_cable/connection/test_case.rb#146 -module ActionCable::Connection::TestCase::Behavior::ClassMethods - # source://actioncable//lib/action_cable/connection/test_case.rb#158 - def connection_class; end - - # @raise [NonInferrableConnectionError] - # - # source://actioncable//lib/action_cable/connection/test_case.rb#166 - def determine_default_connection(name); end - - # source://actioncable//lib/action_cable/connection/test_case.rb#147 - def tests(connection); end -end - -# source://actioncable//lib/action_cable/connection/test_case.rb#133 -ActionCable::Connection::TestCase::Behavior::DEFAULT_PATH = T.let(T.unsafe(nil), String) - -# source://actioncable//lib/action_cable/connection/test_case.rb#47 -module ActionCable::Connection::TestConnection - # source://actioncable//lib/action_cable/connection/test_case.rb#50 - def initialize(request); end - - # Returns the value of attribute logger. - # - # source://actioncable//lib/action_cable/connection/test_case.rb#48 - def logger; end - - # Returns the value of attribute request. - # - # source://actioncable//lib/action_cable/connection/test_case.rb#48 - def request; end -end - -# We don't want to use the whole "encryption stack" for connection -# unit-tests, but we want to make sure that users test against the correct types -# of cookies (i.e. signed or encrypted or plain) -# -# source://actioncable//lib/action_cable/connection/test_case.rb#33 -class ActionCable::Connection::TestCookieJar < ::ActiveSupport::HashWithIndifferentAccess - # source://actioncable//lib/action_cable/connection/test_case.rb#38 - def encrypted; end - - # source://actioncable//lib/action_cable/connection/test_case.rb#34 - def signed; end -end - -# source://actioncable//lib/action_cable/connection/test_case.rb#43 -class ActionCable::Connection::TestRequest < ::ActionDispatch::TestRequest - # Returns the value of attribute cookie_jar. - # - # source://actioncable//lib/action_cable/connection/test_case.rb#44 - def cookie_jar; end - - # Sets the attribute cookie_jar - # - # @param value the value to set the attribute cookie_jar to. - # - # source://actioncable//lib/action_cable/connection/test_case.rb#44 - def cookie_jar=(_arg0); end - - # Returns the value of attribute session. - # - # source://actioncable//lib/action_cable/connection/test_case.rb#44 - def session; end - - # Sets the attribute session - # - # @param value the value to set the attribute session to. - # - # source://actioncable//lib/action_cable/connection/test_case.rb#44 - def session=(_arg0); end -end - -# Wrap the real socket to minimize the externally-presented API -# -# source://actioncable//lib/action_cable/connection/web_socket.rb#8 -class ActionCable::Connection::WebSocket - # @return [WebSocket] a new instance of WebSocket - # - # source://actioncable//lib/action_cable/connection/web_socket.rb#9 - def initialize(env, event_target, event_loop, protocols: T.unsafe(nil)); end - - # @return [Boolean] - # - # source://actioncable//lib/action_cable/connection/web_socket.rb#17 - def alive?; end - - # source://actioncable//lib/action_cable/connection/web_socket.rb#25 - def close; end - - # @return [Boolean] - # - # source://actioncable//lib/action_cable/connection/web_socket.rb#13 - def possible?; end - - # source://actioncable//lib/action_cable/connection/web_socket.rb#29 - def protocol; end - - # source://actioncable//lib/action_cable/connection/web_socket.rb#33 - def rack_response; end - - # source://actioncable//lib/action_cable/connection/web_socket.rb#21 - def transmit(data); end - - private - - # Returns the value of attribute websocket. - # - # source://actioncable//lib/action_cable/connection/web_socket.rb#38 - def websocket; end -end - -# source://actioncable//lib/action_cable/engine.rb#9 -class ActionCable::Engine < ::Rails::Engine - class << self - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - end -end - -# source://actioncable//lib/action_cable/helpers/action_cable_helper.rb#4 -module ActionCable::Helpers; end - -# source://actioncable//lib/action_cable/helpers/action_cable_helper.rb#5 -module ActionCable::Helpers::ActionCableHelper - # Returns an "action-cable-url" meta tag with the value of the URL specified in your - # configuration. Ensure this is above your JavaScript tag: - # - # - # <%= action_cable_meta_tag %> - # <%= javascript_include_tag 'application', 'data-turbo-track' => 'reload' %> - # - # - # This is then used by Action Cable to determine the URL of your WebSocket server. - # Your JavaScript can then connect to the server without needing to specify the - # URL directly: - # - # import Cable from "@rails/actioncable" - # window.Cable = Cable - # window.App = {} - # App.cable = Cable.createConsumer() - # - # Make sure to specify the correct server location in each of your environment - # config files: - # - # config.action_cable.mount_path = "/cable123" - # <%= action_cable_meta_tag %> would render: - # => - # - # config.action_cable.url = "ws://actioncable.com" - # <%= action_cable_meta_tag %> would render: - # => - # - # source://actioncable//lib/action_cable/helpers/action_cable_helper.rb#34 - def action_cable_meta_tag; end -end - -# source://actioncable//lib/action_cable.rb#33 -ActionCable::INTERNAL = T.let(T.unsafe(nil), Hash) - -# 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: -# -# module ApplicationCable -# class Connection < ActionCable::Connection::Base -# identified_by :current_user -# .... -# end -# end -# -# ActionCable.server.remote_connections.where(current_user: User::User.find(1)).disconnect -# -# This will disconnect all the connections established for -# User::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 -class ActionCable::RemoteConnections - # @return [RemoteConnections] a new instance of RemoteConnections - # - # source://actioncable//lib/action_cable/remote_connections.rb#25 - def initialize(server); end - - # Returns the value of attribute server. - # - # source://actioncable//lib/action_cable/remote_connections.rb#23 - def server; end - - # source://actioncable//lib/action_cable/remote_connections.rb#29 - def where(identifier); end -end - -# 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 -class ActionCable::RemoteConnections::RemoteConnection - include ::ActionCable::Connection::InternalChannel - include ::ActionCable::Connection::Identification - extend ::ActionCable::Connection::Identification::ClassMethods - - # @return [RemoteConnection] a new instance of RemoteConnection - # - # source://actioncable//lib/action_cable/remote_connections.rb#41 - 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#52 - def identifiers; end - - # source://actioncable//lib/action_cable/connection/identification.rb#11 - def identifiers=(_arg0); end - - # source://actioncable//lib/action_cable/connection/identification.rb#11 - def identifiers?; end - - protected - - # Returns the value of attribute server. - # - # source://actioncable//lib/action_cable/remote_connections.rb#57 - def server; end - - private - - # @raise [InvalidIdentifiersError] - # - # source://actioncable//lib/action_cable/remote_connections.rb#60 - def set_identifier_instance_vars(ids); end - - # @return [Boolean] - # - # source://actioncable//lib/action_cable/remote_connections.rb#65 - def valid_identifiers?(ids); end - - class << self - # source://actioncable//lib/action_cable/connection/identification.rb#11 - def identifiers; end - - # source://actioncable//lib/action_cable/connection/identification.rb#11 - def identifiers=(value); end - - # source://actioncable//lib/action_cable/connection/identification.rb#11 - def identifiers?; end - end -end - -# source://actioncable//lib/action_cable/remote_connections.rb#37 -class ActionCable::RemoteConnections::RemoteConnection::InvalidIdentifiersError < ::StandardError; end - -# source://actioncable//lib/action_cable/server.rb#4 -module ActionCable::Server - extend ::ActiveSupport::Autoload -end - -# 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 -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 - def initialize(config: T.unsafe(nil)); end - - # Called by Rack to set up the server. - # - # source://actioncable//lib/action_cable/server/base.rb#31 - def call(env); end - - # Returns the value of attribute config. - # - # source://actioncable//lib/action_cable/server/base.rb#17 - 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 - 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 - def disconnect(identifiers); end - - # source://actioncable//lib/action_cable/server/base.rb#62 - def event_loop; end - - # source://actioncable//lib/action_cable/server/base.rb#20 - def logger(*_arg0, **_arg1, &_arg2); end - - # Returns the value of attribute mutex. - # - # source://actioncable//lib/action_cable/server/base.rb#22 - def mutex; end - - # Adapter used for all streams/broadcasting. - # - # source://actioncable//lib/action_cable/server/base.rb#82 - def pubsub; end - - # Gateway to RemoteConnections. See that class for details. - # - # source://actioncable//lib/action_cable/server/base.rb#58 - def remote_connections; end - - # source://actioncable//lib/action_cable/server/base.rb#41 - 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. - # The worker pool is an executor service that's backed by a pool of threads working from a task queue. The thread pool size maxes out - # at 4 worker threads by default. Tune the size yourself with config.action_cable.worker_pool_size. - # - # Using Active Record, Redis, etc within your channel actions means you'll get a separate connection from each thread in the worker pool. - # Plan your deployment accordingly: 5 servers each running 5 Puma workers each running an 8-thread worker pool means at least 200 database - # connections. - # - # Also, ensure that your database connection pool size is as least as large as your worker pool size. Otherwise, workers may oversubscribe - # 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 - def worker_pool; end - - class << self - # source://actioncable//lib/action_cable/server/base.rb#15 - def config; end - - # source://actioncable//lib/action_cable/server/base.rb#15 - def config=(val); end - - # source://actioncable//lib/action_cable/server/base.rb#19 - def logger; end - end -end - -# 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: -# -# class WebNotificationsChannel < ApplicationCable::Channel -# def subscribed -# stream_from "web_notifications_#{current_user.id}" -# end -# end -# -# # Somewhere in your app this is called, perhaps from a NewCommentJob: -# ActionCable.server.broadcast \ -# "web_notifications_1", { title: "New things!", body: "All that's fit for print" } -# -# # Client-side CoffeeScript, which assumes you've already requested the right to send web notifications: -# App.cable.subscriptions.create "WebNotificationsChannel", -# received: (data) -> -# new Notification data['title'], body: data['body'] -# -# source://actioncable//lib/action_cable/server/broadcasting.rb#22 -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 - 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 - def broadcaster_for(broadcasting, coder: T.unsafe(nil)); end -end - -# source://actioncable//lib/action_cable/server/broadcasting.rb#35 -class ActionCable::Server::Broadcasting::Broadcaster - # @return [Broadcaster] a new instance of Broadcaster - # - # source://actioncable//lib/action_cable/server/broadcasting.rb#38 - def initialize(server, broadcasting, coder:); end - - # source://actioncable//lib/action_cable/server/broadcasting.rb#42 - def broadcast(message); end - - # Returns the value of attribute broadcasting. - # - # source://actioncable//lib/action_cable/server/broadcasting.rb#36 - def broadcasting; end - - # Returns the value of attribute coder. - # - # source://actioncable//lib/action_cable/server/broadcasting.rb#36 - def coder; end - - # Returns the value of attribute server. - # - # source://actioncable//lib/action_cable/server/broadcasting.rb#36 - def server; end -end - -# 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. -# -# source://actioncable//lib/action_cable/server/configuration.rb#7 -class ActionCable::Server::Configuration - # @return [Configuration] a new instance of Configuration - # - # source://actioncable//lib/action_cable/server/configuration.rb#14 - def initialize; end - - # Returns the value of attribute allow_same_origin_as_host. - # - # source://actioncable//lib/action_cable/server/configuration.rb#10 - 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 - 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 - 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 - def allowed_request_origins=(_arg0); end - - # Returns the value of attribute cable. - # - # source://actioncable//lib/action_cable/server/configuration.rb#11 - 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 - def cable=(_arg0); end - - # Returns the value of attribute connection_class. - # - # source://actioncable//lib/action_cable/server/configuration.rb#9 - 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 - def connection_class=(_arg0); end - - # Returns the value of attribute disable_request_forgery_protection. - # - # source://actioncable//lib/action_cable/server/configuration.rb#10 - 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 - def disable_request_forgery_protection=(_arg0); end - - # Returns the value of attribute log_tags. - # - # source://actioncable//lib/action_cable/server/configuration.rb#8 - 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 - def log_tags=(_arg0); end - - # Returns the value of attribute logger. - # - # source://actioncable//lib/action_cable/server/configuration.rb#8 - 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 - def logger=(_arg0); end - - # Returns the value of attribute mount_path. - # - # source://actioncable//lib/action_cable/server/configuration.rb#11 - 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 - def mount_path=(_arg0); end - - # Returns the value of attribute precompile_assets. - # - # source://actioncable//lib/action_cable/server/configuration.rb#12 - 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 - 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 - def pubsub_adapter; end - - # Returns the value of attribute url. - # - # source://actioncable//lib/action_cable/server/configuration.rb#11 - 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 - def url=(_arg0); end - - # Returns the value of attribute worker_pool_size. - # - # source://actioncable//lib/action_cable/server/configuration.rb#9 - 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 - def worker_pool_size=(_arg0); end -end - -# 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 -module ActionCable::Server::Connections - # source://actioncable//lib/action_cable/server/connections.rb#14 - def add_connection(connection); end - - # source://actioncable//lib/action_cable/server/connections.rb#10 - def connections; end - - # source://actioncable//lib/action_cable/server/connections.rb#31 - def open_connections_statistics; end - - # source://actioncable//lib/action_cable/server/connections.rb#18 - 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 - def setup_heartbeat_timer; end -end - -# source://actioncable//lib/action_cable/server/connections.rb#8 -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 -class ActionCable::Server::Worker - include ::ActiveSupport::Callbacks - include ::ActionCable::Server::Worker::ActiveRecordConnectionManagement - extend ::ActiveSupport::Callbacks::ClassMethods - extend ::ActiveSupport::DescendantsTracker - - # @return [Worker] a new instance of Worker - # - # source://actioncable//lib/action_cable/server/worker.rb#20 - def initialize(max_size: T.unsafe(nil)); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#928 - def _run_work_callbacks(&block); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#940 - def _work_callbacks; end - - # source://actioncable//lib/action_cable/server/worker.rb#47 - def async_exec(receiver, *args, connection:, &block); end - - # source://actioncable//lib/action_cable/server/worker.rb#51 - def async_invoke(receiver, method, *args, connection: T.unsafe(nil), &block); end - - # source://activesupport/7.0.4.2/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#56 - def connection; end - - # source://activesupport/7.0.4.2/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#100 - def connection=(obj); end - - # Returns the value of attribute executor. - # - # source://actioncable//lib/action_cable/server/worker.rb#18 - 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 - def halt; end - - # source://actioncable//lib/action_cable/server/worker.rb#57 - def invoke(receiver, method, *args, connection:, &block); end - - # @return [Boolean] - # - # source://actioncable//lib/action_cable/server/worker.rb#35 - def stopping?; end - - # source://actioncable//lib/action_cable/server/worker.rb#39 - def work(connection, &block); end - - private - - # source://actioncable//lib/action_cable/server/worker.rb#69 - def logger; end - - class << self - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#932 - def _work_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#936 - def _work_callbacks=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#48 - def connection; end - - # source://activesupport/7.0.4.2/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#92 - def connection=(obj); end - end -end - -# source://actioncable//lib/action_cable/server/worker/active_record_connection_management.rb#6 -module ActionCable::Server::Worker::ActiveRecordConnectionManagement - extend ::ActiveSupport::Concern - - # source://actioncable//lib/action_cable/server/worker/active_record_connection_management.rb#15 - 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#7 -class ActionCable::SubscriptionAdapter::Async < ::ActionCable::SubscriptionAdapter::Inline - private - - # source://actioncable//lib/action_cable/subscription_adapter/async.rb#9 - def new_subscriber_map; end -end - -# source://actioncable//lib/action_cable/subscription_adapter/async.rb#13 -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 - def initialize(event_loop); end - - # source://actioncable//lib/action_cable/subscription_adapter/async.rb#19 - def add_subscriber(*_arg0); end - - # source://actioncable//lib/action_cable/subscription_adapter/async.rb#23 - def invoke_callback(*_arg0); end -end - -# source://actioncable//lib/action_cable/subscription_adapter/base.rb#5 -class ActionCable::SubscriptionAdapter::Base - # @return [Base] a new instance of Base - # - # source://actioncable//lib/action_cable/subscription_adapter/base.rb#8 - def initialize(server); end - - # @raise [NotImplementedError] - # - # source://actioncable//lib/action_cable/subscription_adapter/base.rb#13 - def broadcast(channel, payload); end - - # source://actioncable//lib/action_cable/subscription_adapter/base.rb#29 - def identifier; end - - # Returns the value of attribute logger. - # - # source://actioncable//lib/action_cable/subscription_adapter/base.rb#6 - def logger; end - - # Returns the value of attribute server. - # - # source://actioncable//lib/action_cable/subscription_adapter/base.rb#6 - def server; end - - # @raise [NotImplementedError] - # - # source://actioncable//lib/action_cable/subscription_adapter/base.rb#25 - def shutdown; end - - # @raise [NotImplementedError] - # - # source://actioncable//lib/action_cable/subscription_adapter/base.rb#17 - def subscribe(channel, message_callback, success_callback = T.unsafe(nil)); end - - # @raise [NotImplementedError] - # - # source://actioncable//lib/action_cable/subscription_adapter/base.rb#21 - def unsubscribe(channel, message_callback); end -end - -# source://actioncable//lib/action_cable/subscription_adapter/channel_prefix.rb#5 -module ActionCable::SubscriptionAdapter::ChannelPrefix - # source://actioncable//lib/action_cable/subscription_adapter/channel_prefix.rb#6 - def broadcast(channel, payload); end - - # source://actioncable//lib/action_cable/subscription_adapter/channel_prefix.rb#11 - def subscribe(channel, callback, success_callback = T.unsafe(nil)); end - - # source://actioncable//lib/action_cable/subscription_adapter/channel_prefix.rb#16 - def unsubscribe(channel, callback); end - - private - - # Returns the channel name, including channel_prefix specified in cable.yml - # - # source://actioncable//lib/action_cable/subscription_adapter/channel_prefix.rb#23 - def channel_with_prefix(channel); end -end - -# source://actioncable//lib/action_cable/subscription_adapter/inline.rb#5 -class ActionCable::SubscriptionAdapter::Inline < ::ActionCable::SubscriptionAdapter::Base - # @return [Inline] a new instance of Inline - # - # source://actioncable//lib/action_cable/subscription_adapter/inline.rb#6 - def initialize(*_arg0); end - - # source://actioncable//lib/action_cable/subscription_adapter/inline.rb#11 - def broadcast(channel, payload); end - - # source://actioncable//lib/action_cable/subscription_adapter/inline.rb#23 - def shutdown; end - - # source://actioncable//lib/action_cable/subscription_adapter/inline.rb#15 - def subscribe(channel, callback, success_callback = T.unsafe(nil)); end - - # source://actioncable//lib/action_cable/subscription_adapter/inline.rb#19 - def unsubscribe(channel, callback); end - - private - - # source://actioncable//lib/action_cable/subscription_adapter/inline.rb#32 - def new_subscriber_map; end - - # source://actioncable//lib/action_cable/subscription_adapter/inline.rb#28 - def subscriber_map; end -end - -# source://actioncable//lib/action_cable/subscription_adapter/subscriber_map.rb#5 -class ActionCable::SubscriptionAdapter::SubscriberMap - # @return [SubscriberMap] a new instance of SubscriberMap - # - # source://actioncable//lib/action_cable/subscription_adapter/subscriber_map.rb#6 - def initialize; end - - # source://actioncable//lib/action_cable/subscription_adapter/subscriber_map.rb#47 - def add_channel(channel, on_success); end - - # source://actioncable//lib/action_cable/subscription_adapter/subscriber_map.rb#11 - def add_subscriber(channel, subscriber, on_success); end - - # source://actioncable//lib/action_cable/subscription_adapter/subscriber_map.rb#36 - def broadcast(channel, message); end - - # source://actioncable//lib/action_cable/subscription_adapter/subscriber_map.rb#54 - def invoke_callback(callback, message); end - - # source://actioncable//lib/action_cable/subscription_adapter/subscriber_map.rb#51 - def remove_channel(channel); end - - # source://actioncable//lib/action_cable/subscription_adapter/subscriber_map.rb#25 - def remove_subscriber(channel, subscriber); end -end - -# == 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. -# -# 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, -# so it could be used in system tests too. -# -# source://actioncable//lib/action_cable/subscription_adapter/test.rb#16 -class ActionCable::SubscriptionAdapter::Test < ::ActionCable::SubscriptionAdapter::Async - # source://actioncable//lib/action_cable/subscription_adapter/test.rb#17 - def broadcast(channel, payload); end - - # source://actioncable//lib/action_cable/subscription_adapter/test.rb#22 - def broadcasts(channel); end - - # source://actioncable//lib/action_cable/subscription_adapter/test.rb#30 - def clear; end - - # source://actioncable//lib/action_cable/subscription_adapter/test.rb#26 - def clear_messages(channel); end - - private - - # source://actioncable//lib/action_cable/subscription_adapter/test.rb#35 - def channels_data; end -end - -# source://actioncable//lib/action_cable/test_case.rb#6 -class ActionCable::TestCase < ::ActiveSupport::TestCase - include ::ActionCable::TestHelper -end - -# Provides helper methods for testing Action Cable broadcasting -# -# source://actioncable//lib/action_cable/test_helper.rb#5 -module ActionCable::TestHelper - # source://actioncable//lib/action_cable/test_helper.rb#16 - def after_teardown; end - - # Asserts that the specified message has been sent to the stream. - # - # def test_assert_transmitted_message - # ActionCable.server.broadcast 'messages', text: 'hello' - # assert_broadcast_on('messages', text: 'hello') - # end - # - # If a block is passed, that block should cause a message with the specified data to be sent. - # - # def test_assert_broadcast_on_again - # assert_broadcast_on('messages', text: 'hello') do - # ActionCable.server.broadcast 'messages', text: 'hello' - # end - # end - # - # source://actioncable//lib/action_cable/test_helper.rb#97 - def assert_broadcast_on(stream, data, &block); end - - # Asserts that the number of broadcasted messages to the stream matches the given number. - # - # def test_broadcasts - # assert_broadcasts 'messages', 0 - # ActionCable.server.broadcast 'messages', { text: 'hello' } - # assert_broadcasts 'messages', 1 - # ActionCable.server.broadcast 'messages', { text: 'world' } - # assert_broadcasts 'messages', 2 - # end - # - # If a block is passed, that block should cause the specified number of - # messages to be broadcasted. - # - # def test_broadcasts_again - # assert_broadcasts('messages', 1) do - # ActionCable.server.broadcast 'messages', { text: 'hello' } - # end - # - # assert_broadcasts('messages', 2) do - # ActionCable.server.broadcast 'messages', { text: 'hi' } - # ActionCable.server.broadcast 'messages', { text: 'how are you?' } - # end - # end - # - # source://actioncable//lib/action_cable/test_helper.rb#45 - def assert_broadcasts(stream, number, &block); end - - # Asserts that no messages have been sent to the stream. - # - # def test_no_broadcasts - # assert_no_broadcasts 'messages' - # ActionCable.server.broadcast 'messages', { text: 'hi' } - # assert_broadcasts 'messages', 1 - # end - # - # If a block is passed, that block should not cause any message to be sent. - # - # def test_broadcasts_again - # assert_no_broadcasts 'messages' do - # # No job messages should be sent from this block - # end - # end - # - # Note: This assertion is simply a shortcut for: - # - # assert_broadcasts 'messages', 0, &block - # - # source://actioncable//lib/action_cable/test_helper.rb#78 - 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 - def broadcasts(*_arg0, **_arg1, &_arg2); end - - # source://actioncable//lib/action_cable/test_helper.rb#126 - def clear_messages(*_arg0, **_arg1, &_arg2); end - - # source://actioncable//lib/action_cable/test_helper.rb#122 - def pubsub_adapter; end - - private - - # source://actioncable//lib/action_cable/test_helper.rb#129 - def broadcasts_size(channel); end -end - -# source://actioncable//lib/action_cable/gem_version.rb#9 -module ActionCable::VERSION; end - -# source://actioncable//lib/action_cable/gem_version.rb#10 -ActionCable::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) - -# source://actioncable//lib/action_cable/gem_version.rb#11 -ActionCable::VERSION::MINOR = T.let(T.unsafe(nil), Integer) - -# source://actioncable//lib/action_cable/gem_version.rb#13 -ActionCable::VERSION::PRE = T.let(T.unsafe(nil), String) - -# source://actioncable//lib/action_cable/gem_version.rb#15 -ActionCable::VERSION::STRING = T.let(T.unsafe(nil), String) - -# source://actioncable//lib/action_cable/gem_version.rb#12 -ActionCable::VERSION::TINY = T.let(T.unsafe(nil), Integer) diff --git a/sorbet/rbi/gems/actionmailbox@7.0.4.2.rbi b/sorbet/rbi/gems/actionmailbox@7.0.4.2.rbi deleted file mode 100644 index cb35a32..0000000 --- a/sorbet/rbi/gems/actionmailbox@7.0.4.2.rbi +++ /dev/null @@ -1,1777 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# 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 -module ActionMailbox - extend ::ActiveSupport::Autoload - - # source://actionmailbox//lib/action_mailbox.rb#14 - def incinerate; end - - # source://actionmailbox//lib/action_mailbox.rb#14 - def incinerate=(val); end - - # source://actionmailbox//lib/action_mailbox.rb#15 - def incinerate_after; end - - # source://actionmailbox//lib/action_mailbox.rb#15 - def incinerate_after=(val); end - - # source://actionmailbox//lib/action_mailbox.rb#12 - def ingress; end - - # source://actionmailbox//lib/action_mailbox.rb#12 - def ingress=(val); end - - # source://actionmailbox//lib/action_mailbox.rb#13 - def logger; end - - # source://actionmailbox//lib/action_mailbox.rb#13 - def logger=(val); end - - # source://actionmailbox//lib/action_mailbox.rb#16 - def queues; end - - # source://actionmailbox//lib/action_mailbox.rb#16 - def queues=(val); end - - # source://actionmailbox//lib/action_mailbox.rb#17 - def storage_service; end - - # source://actionmailbox//lib/action_mailbox.rb#17 - def storage_service=(val); end - - class << self - # source://actionmailbox//lib/action_mailbox.rb#14 - def incinerate; end - - # source://actionmailbox//lib/action_mailbox.rb#14 - def incinerate=(val); end - - # source://actionmailbox//lib/action_mailbox.rb#15 - def incinerate_after; end - - # source://actionmailbox//lib/action_mailbox.rb#15 - def incinerate_after=(val); end - - # source://actionmailbox//lib/action_mailbox.rb#12 - def ingress; end - - # source://actionmailbox//lib/action_mailbox.rb#12 - def ingress=(val); end - - # source://actionmailbox//lib/action_mailbox.rb#13 - def logger; end - - # source://actionmailbox//lib/action_mailbox.rb#13 - def logger=(val); end - - # source://actionmailbox//lib/action_mailbox.rb#16 - def queues; end - - # source://actionmailbox//lib/action_mailbox.rb#16 - def queues=(val); end - - # source://railties/7.0.4.2/lib/rails/engine.rb#405 - def railtie_helpers_paths; end - - # source://railties/7.0.4.2/lib/rails/engine.rb#394 - def railtie_namespace; end - - # source://railties/7.0.4.2/lib/rails/engine.rb#409 - def railtie_routes_url_helpers(include_path_helpers = T.unsafe(nil)); end - - # source://actionmailbox//lib/action_mailbox.rb#17 - def storage_service; end - - # source://actionmailbox//lib/action_mailbox.rb#17 - def storage_service=(val); end - - # source://railties/7.0.4.2/lib/rails/engine.rb#397 - def table_name_prefix; end - - # source://railties/7.0.4.2/lib/rails/engine.rb#401 - def use_relative_model_naming?; end - end -end - -# 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: -# -# class ApplicationMailbox < ActionMailbox::Base -# # Any of the recipients of the mail (whether to, cc, bcc) are matched against the regexp. -# routing /^replies@/i => :replies -# -# # Any of the recipients of the mail (whether to, cc, bcc) needs to be an exact match for the string. -# routing "help@example.com" => :help -# -# # Any callable (proc, lambda, etc) object is passed the inbound_email record and is a match if true. -# routing ->(inbound_email) { inbound_email.mail.to.size > 2 } => :multiple_recipients -# -# # Any object responding to #match? is called with the inbound_email record as an argument. Match if true. -# routing CustomAddress.new => :custom -# -# # Any inbound_email that has not been already matched will be sent to the BackstopMailbox. -# routing :all => :backstop -# 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 -# using +before_processing+ callbacks. -# -# If a precondition fails to be met, you can halt the processing using the +#bounced!+ method, -# which will silently prevent any further processing, but not actually send out any bounce notice. You -# can also pair this behavior with the invocation of an Action Mailer class responsible for sending out -# an actual bounce email. This is done using the #bounce_with method, which takes the mail object returned -# by an Action Mailer method, like so: -# -# class ForwardsMailbox < ApplicationMailbox -# before_processing :ensure_sender_is_a_user -# -# private -# def ensure_sender_is_a_user -# unless User::User.exist?(email_address: mail.from) -# bounce_with UserRequiredMailer.missing(inbound_email) -# end -# end -# end -# -# During the processing of the inbound email, the status will be tracked. Before processing begins, -# the email will normally have the +pending+ status. Once processing begins, just before callbacks -# and the #process method is called, the status is changed to +processing+. If processing is allowed to -# complete, the status is changed to +delivered+. If a bounce is triggered, then +bounced+. If an unhandled -# exception is bubbled up, then +failed+. -# -# Exceptions can be handled at the class level using the familiar +Rescuable+ approach: -# -# class ForwardsMailbox < ApplicationMailbox -# rescue_from(ApplicationSpecificVerificationError) { bounced! } -# end -# -# source://actionmailbox//lib/action_mailbox/base.rb#63 -class ActionMailbox::Base - include ::ActiveSupport::Rescuable - include ::ActionMailbox::Routing - include ::ActiveSupport::Callbacks - include ::ActionMailbox::Callbacks - extend ::ActiveSupport::Rescuable::ClassMethods - extend ::ActionMailbox::Routing::ClassMethods - extend ::ActiveSupport::Callbacks::ClassMethods - extend ::ActiveSupport::DescendantsTracker - extend ::ActionMailbox::Callbacks::ClassMethods - - # @return [Base] a new instance of Base - # - # source://actionmailbox//lib/action_mailbox/base.rb#76 - def initialize(inbound_email); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#940 - def _process_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#928 - def _run_process_callbacks(&block); end - - # Enqueues the given +message+ for delivery and changes the inbound email's status to +:bounced+. - # - # source://actionmailbox//lib/action_mailbox/base.rb#101 - def bounce_with(message); end - - # source://actionmailbox//lib/action_mailbox/base.rb#68 - def bounced!(*_arg0, **_arg1, &_arg2); end - - # source://actionmailbox//lib/action_mailbox/base.rb#68 - def delivered!(*_arg0, **_arg1, &_arg2); end - - # @return [Boolean] - # - # source://actionmailbox//lib/action_mailbox/base.rb#95 - def finished_processing?; end - - # Returns the value of attribute inbound_email. - # - # source://actionmailbox//lib/action_mailbox/base.rb#67 - def inbound_email; end - - # source://actionmailbox//lib/action_mailbox/base.rb#70 - def logger(*_arg0, **_arg1, &_arg2); end - - # source://actionmailbox//lib/action_mailbox/base.rb#68 - def mail(*_arg0, **_arg1, &_arg2); end - - # source://actionmailbox//lib/action_mailbox/base.rb#80 - def perform_processing; end - - # source://actionmailbox//lib/action_mailbox/base.rb#91 - def process; end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers; end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers=(_arg0); end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers?; end - - # source://actionmailbox//lib/action_mailbox/routing.rb#9 - def router; end - - # source://actionmailbox//lib/action_mailbox/routing.rb#9 - def router=(val); end - - private - - # source://actionmailbox//lib/action_mailbox/base.rb#107 - def track_status_of_inbound_email; end - - class << self - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#932 - def _process_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#936 - def _process_callbacks=(value); end - - # source://actionmailbox//lib/action_mailbox/base.rb#72 - def receive(inbound_email); end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers; end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers?; end - - # source://actionmailbox//lib/action_mailbox/routing.rb#9 - def router; end - - # source://actionmailbox//lib/action_mailbox/routing.rb#9 - def router=(val); end - end -end - -class ActionMailbox::BaseController < ::ActionController::Base - private - - # source://actionview/7.0.4.2/lib/action_view/layouts.rb#328 - def _layout(lookup_context, formats); end - - def _layout_from_proc; end - def authenticate_by_password; end - def ensure_configured; end - def ingress_name; end - def password; end - - class << self - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://actionpack/7.0.4.2/lib/action_controller/metal.rb#210 - def middleware_stack; end - end -end - -# Defines the callbacks related to processing. -# -# source://actionmailbox//lib/action_mailbox/callbacks.rb#7 -module ActionMailbox::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 ::ActionMailbox::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://actionmailbox//lib/action_mailbox/callbacks.rb#0 -module ActionMailbox::Callbacks::ClassMethods - # source://actionmailbox//lib/action_mailbox/callbacks.rb#25 - def after_processing(*methods, &block); end - - # source://actionmailbox//lib/action_mailbox/callbacks.rb#29 - def around_processing(*methods, &block); end - - # source://actionmailbox//lib/action_mailbox/callbacks.rb#21 - def before_processing(*methods, &block); end -end - -# source://actionmailbox//lib/action_mailbox/callbacks.rb#11 -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.4.2/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.4.2/lib/active_record/autosave_association.rb#160 - def autosave_associated_records_for_raw_email_attachment(*args); end - - # source://activerecord/7.0.4.2/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.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activerecord/7.0.4.2/lib/active_record/reflection.rb#11 - def _reflections; end - - # source://activemodel/7.0.4.2/lib/active_model/validations.rb#52 - def _validators; end - - # source://activestorage/7.0.4.2/lib/active_storage/reflection.rb#53 - def attachment_reflections; end - - # source://activerecord/7.0.4.2/lib/active_record/attributes.rb#11 - def attributes_to_define_after_schema_loads; end - - # source://activerecord/7.0.4.2/lib/active_record/scoping/named.rb#174 - def bounced(*args, **_arg1); end - - # source://activerecord/7.0.4.2/lib/active_record/enum.rb#116 - def defined_enums; end - - # source://activerecord/7.0.4.2/lib/active_record/scoping/named.rb#174 - def delivered(*args, **_arg1); end - - # source://activerecord/7.0.4.2/lib/active_record/scoping/named.rb#174 - def failed(*args, **_arg1); end - - # source://activerecord/7.0.4.2/lib/active_record/scoping/named.rb#174 - def not_bounced(*args, **_arg1); end - - # source://activerecord/7.0.4.2/lib/active_record/scoping/named.rb#174 - def not_delivered(*args, **_arg1); end - - # source://activerecord/7.0.4.2/lib/active_record/scoping/named.rb#174 - def not_failed(*args, **_arg1); end - - # source://activerecord/7.0.4.2/lib/active_record/scoping/named.rb#174 - def not_pending(*args, **_arg1); end - - # source://activerecord/7.0.4.2/lib/active_record/scoping/named.rb#174 - def not_processing(*args, **_arg1); end - - # source://activerecord/7.0.4.2/lib/active_record/scoping/named.rb#174 - def pending(*args, **_arg1); end - - # source://activerecord/7.0.4.2/lib/active_record/scoping/named.rb#174 - def processing(*args, **_arg1); end - - # source://activerecord/7.0.4.2/lib/active_record/enum.rb#188 - def statuses; end - - # source://activerecord/7.0.4.2/lib/active_record/scoping/named.rb#174 - def with_attached_raw_email(*args, **_arg1); end - end -end - -module ActionMailbox::InboundEmail::GeneratedAssociationMethods - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/singular_association.rb#28 - def build_raw_email_attachment(*args, &block); end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/singular_association.rb#28 - def build_raw_email_blob(*args, &block); end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/singular_association.rb#32 - def create_raw_email_attachment(*args, &block); end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/singular_association.rb#36 - def create_raw_email_attachment!(*args, &block); end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/singular_association.rb#32 - def create_raw_email_blob(*args, &block); end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/singular_association.rb#36 - def create_raw_email_blob!(*args, &block); end - - # source://activestorage/7.0.4.2/lib/active_storage/attached/model.rb#55 - def raw_email; end - - # source://activestorage/7.0.4.2/lib/active_storage/attached/model.rb#60 - def raw_email=(attachable); end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/association.rb#103 - def raw_email_attachment; end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/association.rb#111 - def raw_email_attachment=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/association.rb#103 - def raw_email_blob; end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/association.rb#111 - def raw_email_blob=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/singular_association.rb#19 - def reload_raw_email_attachment; end - - # source://activerecord/7.0.4.2/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.4.2/lib/active_job/queue_name.rb#56 - def queue_name; end - - # source://activesupport/7.0.4.2/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.4.2/lib/action_view/layouts.rb#328 - def _layout(lookup_context, formats); end - - def _layout_from_proc; end - def authenticate; end - def authenticated?; end - def key; end - def mail; end - - class << self - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://actionpack/7.0.4.2/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.4.2/lib/action_view/layouts.rb#328 - def _layout(lookup_context, formats); end - - def _layout_from_proc; end - def authenticate; end - def authenticated?; end - def events; end - def key; end - def raw_emails; end - - class << self - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://actionpack/7.0.4.2/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.4.2/lib/action_view/layouts.rb#328 - def _layout(lookup_context, formats); end - - def _layout_from_proc; end - - class << self - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://actionpack/7.0.4.2/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.4.2/lib/action_view/layouts.rb#328 - def _layout(lookup_context, formats); end - - def _layout_from_proc; end - def require_valid_rfc822_message; end - - class << self - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://actionpack/7.0.4.2/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.4.2/lib/action_view/layouts.rb#328 - def _layout(lookup_context, formats); end - - def _layout_from_proc; end - def envelope; end - def mail; end - - class << self - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://actionpack/7.0.4.2/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.4.2/lib/active_model/validations.rb#52 - def _validators; end - - # source://activerecord/7.0.4.2/lib/active_record/enum.rb#116 - def defined_enums; end - end -end - -module ActionMailbox::Record::GeneratedAssociationMethods; end -module ActionMailbox::Record::GeneratedAttributeMethods; end - -# 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 -class ActionMailbox::Router - # @return [Router] a new instance of Router - # - # source://actionmailbox//lib/action_mailbox/router.rb#9 - def initialize; end - - # source://actionmailbox//lib/action_mailbox/router.rb#19 - def add_route(address, to:); end - - # source://actionmailbox//lib/action_mailbox/router.rb#13 - def add_routes(routes); end - - # source://actionmailbox//lib/action_mailbox/router.rb#33 - def mailbox_for(inbound_email); end - - # source://actionmailbox//lib/action_mailbox/router.rb#23 - def route(inbound_email); end - - private - - # Returns the value of attribute routes. - # - # source://actionmailbox//lib/action_mailbox/router.rb#38 - def routes; end -end - -# source://actionmailbox//lib/action_mailbox/router/route.rb#7 -class ActionMailbox::Router::Route - # source://actionmailbox//lib/action_mailbox/router/route.rb#10 - def initialize(address, to:); end - - # source://actionmailbox//lib/action_mailbox/router/route.rb#8 - def address; end - - # source://actionmailbox//lib/action_mailbox/router/route.rb#31 - def mailbox_class; end - - # source://actionmailbox//lib/action_mailbox/router/route.rb#8 - def mailbox_name; end - - # source://actionmailbox//lib/action_mailbox/router/route.rb#16 - def match?(inbound_email); end - - private - - # source://actionmailbox//lib/action_mailbox/router/route.rb#36 - def ensure_valid_address; end -end - -# source://actionmailbox//lib/action_mailbox/router.rb#7 -class ActionMailbox::Router::RoutingError < ::StandardError; end - -# See ActionMailbox::Base for how to specify routing. -# -# source://actionmailbox//lib/action_mailbox/routing.rb#5 -module ActionMailbox::Routing - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActionMailbox::Routing::ClassMethods -end - -# source://actionmailbox//lib/action_mailbox/routing.rb#0 -module ActionMailbox::Routing::ClassMethods - # source://actionmailbox//lib/action_mailbox/routing.rb#21 - def mailbox_for(inbound_email); end - - # source://actionmailbox//lib/action_mailbox/routing.rb#17 - def route(inbound_email); end - - # source://actionmailbox//lib/action_mailbox/routing.rb#13 - def routing(routes); end -end - -class ActionMailbox::RoutingJob < ::ActiveJob::Base - def perform(inbound_email); end - - class << self - # source://activejob/7.0.4.2/lib/active_job/queue_name.rb#56 - def queue_name; end - end -end - -# source://actionmailbox//lib/action_mailbox/test_case.rb#7 -class ActionMailbox::TestCase < ::ActiveSupport::TestCase - include ::ActionMailbox::TestHelper -end - -# source://actionmailbox//lib/action_mailbox/test_helper.rb#6 -module ActionMailbox::TestHelper - # Create an InboundEmail record using an eml fixture in the format of message/rfc822 - # referenced with +fixture_name+ located in +test/fixtures/files/fixture_name+. - # - # source://actionmailbox//lib/action_mailbox/test_helper.rb#9 - def create_inbound_email_from_fixture(fixture_name, status: T.unsafe(nil)); end - - # Creates an InboundEmail by specifying through options or a block. - # - # ==== Options - # - # * :status - The +status+ to set for the created InboundEmail. - # For possible statuses, see its documentation. - # - # ==== Creating a simple email - # - # When you only need to set basic fields like +from+, +to+, +subject+, and - # +body+, you can pass them directly as options. - # - # create_inbound_email_from_mail(from: "david@loudthinking.com", subject: "Hello!") - # - # ==== Creating a multi-part email - # - # When you need to create a more intricate email, like a multi-part email - # that contains both a plaintext version and an HTML version, you can pass a - # block. - # - # create_inbound_email_from_mail do - # to "David Heinemeier Hansson " - # from "Bilbo Baggins " - # subject "Come down to the Shire!" - # - # text_part do - # body "Please join us for a party at Bag End" - # end - # - # html_part do - # body "

Please join us for a party at Bag End

" - # end - # end - # - # As with +Mail.new+, you can also use a block parameter to define the parts - # of the message: - # - # create_inbound_email_from_mail do |mail| - # mail.to "David Heinemeier Hansson " - # mail.from "Bilbo Baggins " - # mail.subject "Come down to the Shire!" - # - # mail.text_part do |part| - # part.body "Please join us for a party at Bag End" - # end - # - # mail.html_part do |part| - # part.body "

Please join us for a party at Bag End

" - # end - # end - # - # source://actionmailbox//lib/action_mailbox/test_helper.rb#63 - def create_inbound_email_from_mail(status: T.unsafe(nil), **mail_options, &block); end - - # Create an InboundEmail using the raw rfc822 +source+ as text. - # - # source://actionmailbox//lib/action_mailbox/test_helper.rb#72 - def create_inbound_email_from_source(source, status: T.unsafe(nil)); end - - # Create an InboundEmail from fixture using the same arguments as create_inbound_email_from_fixture - # and immediately route it to processing. - # - # source://actionmailbox//lib/action_mailbox/test_helper.rb#79 - def receive_inbound_email_from_fixture(*args); end - - # Create an InboundEmail using the same options or block as - # create_inbound_email_from_mail, then immediately route it for processing. - # - # source://actionmailbox//lib/action_mailbox/test_helper.rb#85 - def receive_inbound_email_from_mail(**kwargs, &block); end - - # Create an InboundEmail using the same arguments as create_inbound_email_from_source and immediately route it - # to processing. - # - # source://actionmailbox//lib/action_mailbox/test_helper.rb#91 - def receive_inbound_email_from_source(*args); end -end - -# source://actionmailbox//lib/action_mailbox/mail_ext/address_equality.rb#3 -module Mail - class << self - # source://mail/2.8.1/lib/mail/mail.rb#163 - def all(*args, &block); end - - # source://mail/2.8.1/lib/mail/mail.rb#183 - def connection(&block); end - - # source://mail/2.8.1/lib/mail/mail.rb#98 - def defaults(&block); end - - # source://mail/2.8.1/lib/mail/mail.rb#174 - def delete_all(*args, &block); end - - # source://mail/2.8.1/lib/mail/mail.rb#131 - def deliver(*args, &block); end - - # source://mail/2.8.1/lib/mail/mail.rb#103 - def delivery_method; end - - # source://mail/2.8.1/lib/mail.rb#35 - def eager_autoload!; end - - # source://mail/2.8.1/lib/mail/mail.rb#139 - def find(*args, &block); end - - # source://mail/2.8.1/lib/mail/mail.rb#145 - def find_and_delete(*args, &block); end - - # source://mail/2.8.1/lib/mail/mail.rb#151 - def first(*args, &block); end - - # source://actionmailbox//lib/action_mailbox/mail_ext/from_source.rb#4 - def from_source(source); end - - # source://mail/2.8.1/lib/mail/mail.rb#233 - def inform_interceptors(mail); end - - # source://mail/2.8.1/lib/mail/mail.rb#227 - def inform_observers(mail); end - - # source://mail/2.8.1/lib/mail/mail.rb#157 - def last(*args, &block); end - - # source://mail/2.8.1/lib/mail/mail.rb#50 - def new(*args, &block); end - - # source://mail/2.8.1/lib/mail/mail.rb#243 - def random_tag; end - - # source://mail/2.8.1/lib/mail/mail.rb#168 - def read(filename); end - - # source://mail/2.8.1/lib/mail/mail.rb#179 - def read_from_string(mail_as_string); end - - # source://mail/2.8.1/lib/mail.rb#23 - def register_autoload(name, path); end - - # source://mail/2.8.1/lib/mail/mail.rb#215 - def register_interceptor(interceptor); end - - # source://mail/2.8.1/lib/mail/mail.rb#196 - def register_observer(observer); end - - # source://mail/2.8.1/lib/mail/mail.rb#108 - def retriever_method; end - - # source://mail/2.8.1/lib/mail/mail.rb#252 - def something_random; end - - # source://mail/2.8.1/lib/mail/mail.rb#256 - def uniq; end - - # source://mail/2.8.1/lib/mail/mail.rb#223 - def unregister_interceptor(interceptor); end - - # source://mail/2.8.1/lib/mail/mail.rb#204 - def unregister_observer(observer); end - end -end - -# source://actionmailbox//lib/action_mailbox/mail_ext/address_equality.rb#4 -class Mail::Address - # source://mail/2.8.1/lib/mail/elements/address.rb#25 - def initialize(value = T.unsafe(nil)); end - - # source://actionmailbox//lib/action_mailbox/mail_ext/address_equality.rb#5 - def ==(other_address); end - - # source://mail/2.8.1/lib/mail/elements/address.rb#65 - def address(output_type = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/elements/address.rb#79 - def address=(value); end - - # source://mail/2.8.1/lib/mail/elements/address.rb#132 - def comments; end - - # source://mail/2.8.1/lib/mail/elements/address.rb#173 - def decoded; end - - # source://mail/2.8.1/lib/mail/elements/address.rb#87 - def display_name(output_type = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/elements/address.rb#99 - def display_name=(str); end - - # source://mail/2.8.1/lib/mail/elements/address.rb#118 - def domain(output_type = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/elements/address.rb#169 - def encoded; end - - # source://mail/2.8.1/lib/mail/elements/address.rb#47 - def format(output_type = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/elements/address.rb#177 - def group; end - - # source://mail/2.8.1/lib/mail/elements/address.rb#164 - def inspect; end - - # source://mail/2.8.1/lib/mail/elements/address.rb#108 - def local(output_type = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/elements/address.rb#147 - def name; end - - # source://mail/2.8.1/lib/mail/elements/address.rb#36 - def raw; end - - # source://mail/2.8.1/lib/mail/elements/address.rb#156 - def to_s; end - - private - - # source://mail/2.8.1/lib/mail/elements/address.rb#237 - def format_comments; end - - # source://mail/2.8.1/lib/mail/elements/address.rb#254 - def get_comments; end - - # source://mail/2.8.1/lib/mail/elements/address.rb#218 - def get_display_name; end - - # source://mail/2.8.1/lib/mail/elements/address.rb#250 - def get_domain; end - - # source://mail/2.8.1/lib/mail/elements/address.rb#246 - def get_local; end - - # source://mail/2.8.1/lib/mail/elements/address.rb#227 - def get_name; end - - # source://mail/2.8.1/lib/mail/elements/address.rb#183 - def parse(value = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/elements/address.rb#198 - def strip_all_comments(string); end - - # source://mail/2.8.1/lib/mail/elements/address.rb#207 - def strip_domain_comments(value); end - - class << self - # source://actionmailbox//lib/action_mailbox/mail_ext/address_wrapping.rb#5 - def wrap(address); end - end -end - -# source://actionmailbox//lib/action_mailbox/mail_ext/addresses.rb#4 -class Mail::Message - # source://mail/2.8.1/lib/mail/message.rb#107 - def initialize(*args, &block); end - - # source://mail/2.8.1/lib/mail/message.rb#334 - def <=>(other); end - - # source://mail/2.8.1/lib/mail/message.rb#373 - def ==(other); end - - # source://mail/2.8.1/lib/mail/message.rb#1334 - def [](name); end - - # source://mail/2.8.1/lib/mail/message.rb#1316 - def []=(name, value); end - - # source://mail/2.8.1/lib/mail/message.rb#1558 - def action; end - - # source://mail/2.8.1/lib/mail/message.rb#1472 - def add_charset; end - - # source://mail/2.8.1/lib/mail/message.rb#1487 - def add_content_transfer_encoding; end - - # source://mail/2.8.1/lib/mail/message.rb#1465 - def add_content_type; end - - # source://mail/2.8.1/lib/mail/message.rb#1448 - def add_date(date_val = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/message.rb#1757 - def add_file(values); end - - # source://mail/2.8.1/lib/mail/message.rb#1438 - def add_message_id(msg_id_val = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/message.rb#1458 - def add_mime_version(ver_val = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/message.rb#1701 - def add_part(part); end - - # source://mail/2.8.1/lib/mail/message.rb#1927 - def all_parts; end - - # source://mail/2.8.1/lib/mail/message.rb#1918 - def attachment; end - - # source://mail/2.8.1/lib/mail/message.rb#1913 - def attachment?; end - - # source://mail/2.8.1/lib/mail/message.rb#1626 - def attachments; end - - # source://mail/2.8.1/lib/mail/message.rb#500 - def bcc(val = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/message.rb#512 - def bcc=(val); end - - # source://actionmailbox//lib/action_mailbox/mail_ext/addresses.rb#21 - def bcc_addresses; end - - # source://mail/2.8.1/lib/mail/message.rb#1306 - def bcc_addrs; end - - # source://mail/2.8.1/lib/mail/message.rb#1251 - def body(value = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/message.rb#1237 - def body=(value); end - - # source://mail/2.8.1/lib/mail/message.rb#1260 - def body_encoding(value = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/message.rb#1268 - def body_encoding=(value); end - - # source://mail/2.8.1/lib/mail/message.rb#1554 - def bounced?; end - - # source://mail/2.8.1/lib/mail/message.rb#1583 - def boundary; end - - # source://mail/2.8.1/lib/mail/message.rb#541 - def cc(val = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/message.rb#553 - def cc=(val); end - - # source://actionmailbox//lib/action_mailbox/mail_ext/addresses.rb#17 - def cc_addresses; end - - # source://mail/2.8.1/lib/mail/message.rb#1300 - def cc_addrs; end - - # source://mail/2.8.1/lib/mail/message.rb#1497 - def charset; end - - # source://mail/2.8.1/lib/mail/message.rb#1506 - def charset=(value); end - - # source://mail/2.8.1/lib/mail/message.rb#557 - def comments(val = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/message.rb#561 - def comments=(val); end - - # source://mail/2.8.1/lib/mail/message.rb#565 - def content_description(val = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/message.rb#569 - def content_description=(val); end - - # source://mail/2.8.1/lib/mail/message.rb#573 - def content_disposition(val = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/message.rb#577 - def content_disposition=(val); end - - # source://mail/2.8.1/lib/mail/message.rb#581 - def content_id(val = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/message.rb#585 - def content_id=(val); end - - # source://mail/2.8.1/lib/mail/message.rb#589 - def content_location(val = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/message.rb#593 - def content_location=(val); end - - # source://mail/2.8.1/lib/mail/message.rb#597 - def content_transfer_encoding(val = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/message.rb#601 - def content_transfer_encoding=(val); end - - # source://mail/2.8.1/lib/mail/message.rb#605 - def content_type(val = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/message.rb#609 - def content_type=(val); end - - # source://mail/2.8.1/lib/mail/message.rb#1523 - def content_type_parameters; end - - # source://mail/2.8.1/lib/mail/message.rb#1773 - def convert_to_multipart; end - - # source://mail/2.8.1/lib/mail/message.rb#613 - def date(val = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/message.rb#617 - def date=(val); end - - # source://mail/2.8.1/lib/mail/message.rb#1907 - def decode_body; end - - # source://mail/2.8.1/lib/mail/message.rb#1886 - def decoded; end - - # source://mail/2.8.1/lib/mail/message.rb#1204 - def default(sym, val = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/message.rb#250 - def deliver; end - - # source://mail/2.8.1/lib/mail/message.rb#267 - def deliver!; end - - # source://mail/2.8.1/lib/mail/message.rb#199 - def delivery_handler; end - - # source://mail/2.8.1/lib/mail/message.rb#199 - def delivery_handler=(_arg0); end - - # source://mail/2.8.1/lib/mail/message.rb#274 - def delivery_method(method = T.unsafe(nil), settings = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/message.rb#1543 - def delivery_status_part; end - - # source://mail/2.8.1/lib/mail/message.rb#1538 - def delivery_status_report?; end - - # source://mail/2.8.1/lib/mail/message.rb#1282 - def destinations; end - - # source://mail/2.8.1/lib/mail/message.rb#1570 - def diagnostic_code; end - - # source://mail/2.8.1/lib/mail/message.rb#1803 - def encoded; end - - # source://mail/2.8.1/lib/mail/message.rb#418 - def envelope_date; end - - # source://mail/2.8.1/lib/mail/message.rb#414 - def envelope_from; end - - # source://mail/2.8.1/lib/mail/message.rb#1566 - def error_status; end - - # source://mail/2.8.1/lib/mail/message.rb#471 - def errors; end - - # source://mail/2.8.1/lib/mail/message.rb#1923 - def filename; end - - # source://mail/2.8.1/lib/mail/message.rb#1562 - def final_recipient; end - - # source://mail/2.8.1/lib/mail/message.rb#1931 - def find_first_mime_type(mt); end - - # source://mail/2.8.1/lib/mail/message.rb#658 - def from(val = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/message.rb#670 - def from=(val); end - - # source://actionmailbox//lib/action_mailbox/mail_ext/addresses.rb#5 - def from_address; end - - # source://mail/2.8.1/lib/mail/message.rb#1288 - def from_addrs; end - - # source://mail/2.8.1/lib/mail/message.rb#1630 - def has_attachments?; end - - # source://mail/2.8.1/lib/mail/message.rb#1423 - def has_charset?; end - - # source://mail/2.8.1/lib/mail/message.rb#1428 - def has_content_transfer_encoding?; end - - # source://mail/2.8.1/lib/mail/message.rb#1418 - def has_content_type?; end - - # source://mail/2.8.1/lib/mail/message.rb#1408 - def has_date?; end - - # source://mail/2.8.1/lib/mail/message.rb#1402 - def has_message_id?; end - - # source://mail/2.8.1/lib/mail/message.rb#1414 - def has_mime_version?; end - - # source://mail/2.8.1/lib/mail/message.rb#443 - def header(value = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/message.rb#428 - def header=(value); end - - # source://mail/2.8.1/lib/mail/message.rb#1396 - def header_fields; end - - # source://mail/2.8.1/lib/mail/message.rb#448 - def headers(hash = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/message.rb#1635 - def html_part(&block); end - - # source://mail/2.8.1/lib/mail/message.rb#1655 - def html_part=(msg); end - - # source://mail/2.8.1/lib/mail/message.rb#674 - def in_reply_to(val = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/message.rb#678 - def in_reply_to=(val); end - - # source://mail/2.8.1/lib/mail/message.rb#240 - def inform_interceptors; end - - # source://mail/2.8.1/lib/mail/message.rb#236 - def inform_observers; end - - # source://mail/2.8.1/lib/mail/message.rb#1873 - def inspect; end - - # source://mail/2.8.1/lib/mail/message.rb#1877 - def inspect_structure; end - - # source://mail/2.8.1/lib/mail/message.rb#1960 - def is_marked_for_delete?; end - - # source://mail/2.8.1/lib/mail/message.rb#682 - def keywords(val = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/message.rb#686 - def keywords=(val); end - - # source://mail/2.8.1/lib/mail/message.rb#1513 - def main_type; end - - # source://mail/2.8.1/lib/mail/message.rb#1947 - def mark_for_delete=(value = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/message.rb#703 - def message_id(val = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/message.rb#712 - def message_id=(val); end - - # source://mail/2.8.1/lib/mail/message.rb#1377 - def method_missing(name, *args, &block); end - - # source://mail/2.8.1/lib/mail/message.rb#1492 - def mime_type; end - - # source://mail/2.8.1/lib/mail/message.rb#729 - def mime_version(val = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/message.rb#739 - def mime_version=(val); end - - # source://mail/2.8.1/lib/mail/message.rb#1528 - def multipart?; end - - # source://mail/2.8.1/lib/mail/message.rb#1533 - def multipart_report?; end - - # source://mail/2.8.1/lib/mail/message.rb#1722 - def part(params = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/message.rb#1588 - def parts; end - - # source://mail/2.8.1/lib/mail/message.rb#223 - def perform_deliveries; end - - # source://mail/2.8.1/lib/mail/message.rb#223 - def perform_deliveries=(_arg0); end - - # source://mail/2.8.1/lib/mail/message.rb#230 - def raise_delivery_errors; end - - # source://mail/2.8.1/lib/mail/message.rb#230 - def raise_delivery_errors=(_arg0); end - - # source://mail/2.8.1/lib/mail/message.rb#410 - def raw_envelope; end - - # source://mail/2.8.1/lib/mail/message.rb#397 - def raw_source; end - - # source://mail/2.8.1/lib/mail/message.rb#1899 - def read; end - - # source://mail/2.8.1/lib/mail/message.rb#1791 - def ready_to_send!; end - - # source://mail/2.8.1/lib/mail/message.rb#743 - def received(val = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/message.rb#751 - def received=(val); end - - # source://actionmailbox//lib/action_mailbox/mail_ext/recipients.rb#5 - def recipients; end - - # source://actionmailbox//lib/action_mailbox/mail_ext/addresses.rb#9 - def recipients_addresses; end - - # source://mail/2.8.1/lib/mail/message.rb#755 - def references(val = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/message.rb#759 - def references=(val); end - - # source://mail/2.8.1/lib/mail/message.rb#1574 - def remote_mta; end - - # source://mail/2.8.1/lib/mail/message.rb#282 - def reply(*args, &block); end - - # source://mail/2.8.1/lib/mail/message.rb#788 - def reply_to(val = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/message.rb#800 - def reply_to=(val); end - - # source://mail/2.8.1/lib/mail/message.rb#829 - def resent_bcc(val = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/message.rb#841 - def resent_bcc=(val); end - - # source://mail/2.8.1/lib/mail/message.rb#870 - def resent_cc(val = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/message.rb#882 - def resent_cc=(val); end - - # source://mail/2.8.1/lib/mail/message.rb#886 - def resent_date(val = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/message.rb#890 - def resent_date=(val); end - - # source://mail/2.8.1/lib/mail/message.rb#919 - def resent_from(val = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/message.rb#931 - def resent_from=(val); end - - # source://mail/2.8.1/lib/mail/message.rb#935 - def resent_message_id(val = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/message.rb#939 - def resent_message_id=(val); end - - # source://mail/2.8.1/lib/mail/message.rb#958 - def resent_sender(val = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/message.rb#968 - def resent_sender=(val); end - - # source://mail/2.8.1/lib/mail/message.rb#997 - def resent_to(val = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/message.rb#1009 - def resent_to=(val); end - - # source://mail/2.8.1/lib/mail/message.rb#1578 - def retryable?; end - - # source://mail/2.8.1/lib/mail/message.rb#1014 - def return_path(val = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/message.rb#1019 - def return_path=(val); end - - # source://mail/2.8.1/lib/mail/message.rb#1037 - def sender(val = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/message.rb#1047 - def sender=(val); end - - # source://mail/2.8.1/lib/mail/message.rb#402 - def set_envelope(val); end - - # source://mail/2.8.1/lib/mail/message.rb#1939 - def skip_deletion; end - - # source://mail/2.8.1/lib/mail/message.rb#1067 - def smtp_envelope_from(val = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/message.rb#1081 - def smtp_envelope_from=(val); end - - # source://mail/2.8.1/lib/mail/message.rb#1100 - def smtp_envelope_to(val = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/message.rb#1117 - def smtp_envelope_to=(val); end - - # source://mail/2.8.1/lib/mail/message.rb#1518 - def sub_type; end - - # source://mail/2.8.1/lib/mail/message.rb#1142 - def subject(val = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/message.rb#1152 - def subject=(val); end - - # source://mail/2.8.1/lib/mail/message.rb#1964 - def text?; end - - # source://mail/2.8.1/lib/mail/message.rb#1644 - def text_part(&block); end - - # source://mail/2.8.1/lib/mail/message.rb#1679 - def text_part=(msg); end - - # source://mail/2.8.1/lib/mail/message.rb#1181 - def to(val = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/message.rb#1193 - def to=(val); end - - # source://actionmailbox//lib/action_mailbox/mail_ext/addresses.rb#13 - def to_addresses; end - - # source://mail/2.8.1/lib/mail/message.rb#1294 - def to_addrs; end - - # source://mail/2.8.1/lib/mail/message.rb#1869 - def to_s; end - - # source://mail/2.8.1/lib/mail/message.rb#1823 - def to_yaml(opts = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/message.rb#621 - def transport_encoding(val = T.unsafe(nil)); end - - # source://mail/2.8.1/lib/mail/message.rb#629 - def transport_encoding=(val); end - - # source://mail/2.8.1/lib/mail/message.rb#1811 - def without_attachments!; end - - # source://actionmailbox//lib/action_mailbox/mail_ext/addresses.rb#25 - def x_original_to_addresses; end - - private - - # source://mail/2.8.1/lib/mail/message.rb#2067 - def add_boundary; end - - # source://mail/2.8.1/lib/mail/message.rb#2032 - def add_encoding_to_body; end - - # source://mail/2.8.1/lib/mail/message.rb#2062 - def add_multipart_alternate_header; end - - # source://mail/2.8.1/lib/mail/message.rb#2079 - def add_multipart_mixed_header; end - - # source://mail/2.8.1/lib/mail/message.rb#2048 - def add_required_fields; end - - # source://mail/2.8.1/lib/mail/message.rb#2056 - def add_required_message_fields; end - - # source://mail/2.8.1/lib/mail/message.rb#2025 - def allowed_encodings; end - - # source://mail/2.8.1/lib/mail/message.rb#1990 - def body_lazy(value); end - - # source://mail/2.8.1/lib/mail/message.rb#2152 - def decode_body_as_text; end - - # source://mail/2.8.1/lib/mail/message.rb#2142 - def do_delivery; end - - # source://mail/2.8.1/lib/mail/message.rb#2124 - def find_attachment; end - - # source://mail/2.8.1/lib/mail/message.rb#2038 - def identify_and_set_transfer_encoding; end - - # source://mail/2.8.1/lib/mail/message.rb#2086 - def init_with_hash(hash); end - - # source://mail/2.8.1/lib/mail/message.rb#2116 - def init_with_string(string); end - - # source://mail/2.8.1/lib/mail/message.rb#384 - def initialize_copy(original); end - - # source://mail/2.8.1/lib/mail/message.rb#1979 - def parse_message; end - - # source://mail/2.8.1/lib/mail/message.rb#2005 - def process_body_raw; end - - # source://mail/2.8.1/lib/mail/message.rb#1985 - def raw_source=(value); end - - # source://mail/2.8.1/lib/mail/message.rb#2021 - def separate_parts; end - - # source://mail/2.8.1/lib/mail/message.rb#2013 - def set_envelope_header; end - - class << self - # source://mail/2.8.1/lib/mail/message.rb#232 - def default_charset; end - - # source://mail/2.8.1/lib/mail/message.rb#233 - def default_charset=(charset); end - - # source://mail/2.8.1/lib/mail/message.rb#1865 - def from_hash(hash); end - - # source://mail/2.8.1/lib/mail/message.rb#1843 - def from_yaml(str); end - end -end - -module Rails - class << self - # source://railties/7.0.4.2/lib/rails.rb#38 - def app_class; end - - # source://railties/7.0.4.2/lib/rails.rb#38 - def app_class=(_arg0); end - - # source://railties/7.0.4.2/lib/rails.rb#39 - def application; end - - # source://railties/7.0.4.2/lib/rails.rb#37 - def application=(_arg0); end - - # source://railties/7.0.4.2/lib/rails.rb#123 - def autoloaders; end - - # source://railties/7.0.4.2/lib/rails.rb#50 - def backtrace_cleaner; end - - # source://railties/7.0.4.2/lib/rails.rb#38 - def cache; end - - # source://railties/7.0.4.2/lib/rails.rb#38 - def cache=(_arg0); end - - # source://railties/7.0.4.2/lib/rails.rb#46 - def configuration; end - - # source://railties/7.0.4.2/lib/rails.rb#72 - def env; end - - # source://railties/7.0.4.2/lib/rails.rb#79 - def env=(environment); end - - # source://railties/7.0.4.2/lib/rails.rb#90 - def error; end - - # source://railties/7.0.4.2/lib/rails/gem_version.rb#5 - def gem_version; end - - # source://railties/7.0.4.2/lib/rails.rb#103 - def groups(*groups); end - - # source://railties/7.0.4.2/lib/rails.rb#43 - def initialize!(*_arg0, **_arg1, &_arg2); end - - # source://railties/7.0.4.2/lib/rails.rb#43 - def initialized?(*_arg0, **_arg1, &_arg2); end - - # source://railties/7.0.4.2/lib/rails.rb#38 - def logger; end - - # source://railties/7.0.4.2/lib/rails.rb#38 - def logger=(_arg0); end - - # source://railties/7.0.4.2/lib/rails.rb#119 - def public_path; end - - # source://railties/7.0.4.2/lib/rails.rb#63 - def root; end - - # source://railties/7.0.4.2/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.4.2/lib/action_view/layouts.rb#328 - def _layout(lookup_context, formats); end - - class << self - # source://actionpack/7.0.4.2/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.4.2/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.4.2/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.4.2/lib/action_view/layouts.rb#328 - def _layout(lookup_context, formats); end - - class << self - # source://actionpack/7.0.4.2/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.4.2/lib/action_view/layouts.rb#328 - def _layout(lookup_context, formats); end - - def reroute(inbound_email); end - - class << self - # source://actionpack/7.0.4.2/lib/action_controller/metal.rb#210 - def middleware_stack; end - end -end - -class Rails::Conductor::BaseController < ::ActionController::Base - private - - # source://actionview/7.0.4.2/lib/action_view/layouts.rb#328 - def _layout(lookup_context, formats); end - - def _layout_from_proc; end - def ensure_development_env; end - - class << self - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://actionview/7.0.4.2/lib/action_view/layouts.rb#209 - def _layout; end - - # source://actionview/7.0.4.2/lib/action_view/layouts.rb#210 - def _layout_conditions; end - - # source://actionpack/7.0.4.2/lib/action_controller/metal.rb#210 - def middleware_stack; end - end -end diff --git a/sorbet/rbi/gems/actionmailer@7.0.4.2.rbi b/sorbet/rbi/gems/actionmailer@7.0.4.2.rbi deleted file mode 100644 index 65e5b59..0000000 --- a/sorbet/rbi/gems/actionmailer@7.0.4.2.rbi +++ /dev/null @@ -1,2364 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `actionmailer` gem. -# Please instead update this file by running `bin/tapioca gem actionmailer`. - -# source://actionmailer//lib/action_mailer/gem_version.rb#3 -module ActionMailer - extend ::ActiveSupport::Autoload - - class << self - # source://actionmailer//lib/action_mailer.rb#56 - def eager_load!; end - - # 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. - # - # source://actionmailer//lib/action_mailer/version.rb#8 - def version; end - end -end - -# Action Mailer allows you to send email from your application using a mailer model and views. -# -# = Mailer Models -# -# To use Action Mailer, you need to create a mailer model. -# -# $ bin/rails generate mailer Notifier -# -# The generated model inherits from ApplicationMailer which in turn -# inherits from ActionMailer::Base. A mailer model defines methods -# 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. -# -# class ApplicationMailer < ActionMailer::Base -# default from: 'from@example.com' -# layout 'mailer' -# end -# -# class NotifierMailer < ApplicationMailer -# default from: 'no-reply@example.com', -# return_path: 'system@example.com' -# -# def welcome(recipient) -# @account = recipient -# mail(to: recipient.email_address_with_name, -# bcc: ["bcc@example.com", "Order Watcher "]) -# end -# end -# -# Within the mailer method, you have access to the following methods: -# -# * attachments[]= - Allows you to add attachments to your email in an intuitive -# manner; attachments['filename.png'] = File.read('path/to/filename.png') -# -# * attachments.inline[]= - Allows you to add an inline attachment to your email -# in the same manner as attachments[]= -# -# * headers[]= - Allows you to specify any header field in your email such -# as headers['X-No-Spam'] = 'True'. Note that declaring a header multiple times -# will add many fields of the same name. Read #headers doc for more information. -# -# * headers(hash) - Allows you to specify multiple headers in your email such -# as headers({'X-No-Spam' => 'True', 'In-Reply-To' => '1234@message.id'}) -# -# * 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 -# 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 -# the same name as the method, so the above action would send the +welcome.text.erb+ view -# file as well as the +welcome.html.erb+ view file in a +multipart/alternative+ email. -# -# If you want to explicitly render only certain templates, pass a block: -# -# mail(to: user.email) do |format| -# format.text -# format.html -# end -# -# The block syntax is also useful in providing information specific to a part: -# -# mail(to: user.email) do |format| -# format.html -# end -# -# Or even to render a special view: -# -# mail(to: user.email) do |format| -# format.text -# format.html { render "some_other_template" } -# end -# -# = Mailer views -# -# Like Action Controller, each mailer class has a corresponding view directory in which each -# method of the class looks for a template with its name. -# -# To define a template to be used with a mailer, create an .erb file with the same -# name as the method in your mailer model. For example, in the mailer defined above, the template at -# app/views/notifier_mailer/welcome.text.erb would be used to generate the email. -# -# Variables defined in the methods of your mailer model are accessible as instance variables in their -# corresponding view. -# -# Emails by default are sent in plain text, so a sample view for our model example might look like this: -# -# Hi <%= @account.name %>, -# Thanks for joining our service! Please check back often. -# -# You can even use Action View helpers in these views. For example: -# -# You got a new note! -# <%= truncate(@note.body, length: 25) %> -# -# If you need to access the subject, from, or the recipients in the view, you can do that through message object: -# -# You got a new note from <%= message.from %>! -# <%= truncate(@note.body, length: 25) %> -# -# -# = Generating URLs -# -# URLs can be generated in mailer views using url_for or named routes. Unlike controllers from -# Action Pack, the mailer instance doesn't have any context about the incoming request, so you'll need -# to provide all of the details needed to generate a URL. -# -# When using url_for you'll need to provide the :host, :controller, and :action: -# -# <%= url_for(host: "example.com", controller: "welcome", action: "greeting") %> -# -# When using named routes you only need to supply the :host: -# -# <%= users_url(host: "example.com") %> -# -# You should use the named_route_url style (which generates absolute URLs) and avoid using the -# named_route_path style (which generates relative URLs), since clients reading the mail will -# have no concept of a current URL from which to determine a relative path. -# -# It is also possible to set a default host that will be used in all mailers by setting the :host -# option as a configuration option in config/application.rb: -# -# config.action_mailer.default_url_options = { host: "example.com" } -# -# You can also define a default_url_options method on individual mailers to override these -# default settings per-mailer. -# -# By default when config.force_ssl is +true+, URLs generated for hosts will use the HTTPS protocol. -# -# = Sending mail -# -# Once a mailer action and template are defined, you can deliver your message or defer its creation and -# delivery for later: -# -# NotifierMailer.welcome(User::User.first).deliver_now # sends the email -# mail = NotifierMailer.welcome(User::User.first) # => an ActionMailer::MessageDelivery object -# 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, -# you can call the message method on the ActionMailer::MessageDelivery object. -# -# NotifierMailer.welcome(User::User.first).message # => a Mail::Message object -# -# Action Mailer is nicely integrated with Active Job so you can generate and send emails in the background -# (example: outside of the request-response cycle, so the user doesn't have to wait on it): -# -# NotifierMailer.welcome(User::User.first).deliver_later # enqueue the email sending to Active Job -# -# Note that deliver_later will execute your method from the background job. -# -# You never instantiate your mailer class. Rather, you just call the method you defined on the class itself. -# All instance methods are expected to return a message object to be sent. -# -# = Multipart Emails -# -# Multipart messages can also be used implicitly because Action Mailer will automatically detect and use -# multipart templates, where each template is named after the name of the action, followed by the content -# type. Each such detected template will be added to the message, as a separate part. -# -# For example, if the following templates exist: -# * signup_notification.text.erb -# * signup_notification.html.erb -# * signup_notification.xml.builder -# * signup_notification.yml.erb -# -# Each would be rendered and added as a separate part to the message, with the corresponding content -# type. The content type for the entire message is automatically set to multipart/alternative, -# which indicates that the email contains multiple different representations of the same email -# body. The same instance variables defined in the action are passed to all email templates. -# -# Implicit template rendering is not performed if any attachments or parts have been added to the email. -# This means that you'll have to manually add each part to the email and set the content type of the email -# to multipart/alternative. -# -# = Attachments -# -# Sending attachment in emails is easy: -# -# class NotifierMailer < ApplicationMailer -# def welcome(recipient) -# attachments['free_book.pdf'] = File.read('path/to/file.pdf') -# mail(to: recipient, subject: "New account information") -# end -# end -# -# Which will (if it had both a welcome.text.erb and welcome.html.erb -# template in the view directory), send a complete multipart/mixed email with two parts, -# the first part being a multipart/alternative with the text and HTML email parts inside, -# and the second being a application/pdf with a Base64 encoded copy of the file.pdf book -# with the filename +free_book.pdf+. -# -# If you need to send attachments with no content, you need to create an empty view for it, -# or add an empty body parameter like this: -# -# class NotifierMailer < ApplicationMailer -# def welcome(recipient) -# attachments['free_book.pdf'] = File.read('path/to/file.pdf') -# mail(to: recipient, subject: "New account information", body: "") -# end -# end -# -# 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 -# def welcome(recipient) -# attachments["free_book.pdf"] = File.read("path/to/file.pdf") -# mail(to: recipient, -# subject: "New account information", -# content_type: "text/html", -# body: "Hello there") -# end -# end -# -# = Inline Attachments -# -# You can also specify that a file should be displayed inline with other HTML. This is useful -# if you want to display a corporate logo or a photo. -# -# class NotifierMailer < ApplicationMailer -# def welcome(recipient) -# attachments.inline['photo.png'] = File.read('path/to/photo.png') -# mail(to: recipient, subject: "Here is what we look like") -# end -# end -# -# And then to reference the image in the view, you create a welcome.html.erb file and -# make a call to +image_tag+ passing in the attachment you want to display and then call -# +url+ on the attachment to get the relative content id path for the image source: -# -#

Please Don't Cringe

-# -# <%= image_tag attachments['photo.png'].url -%> -# -# As we are using Action View's +image_tag+ method, you can pass in any other options you want: -# -#

Please Don't Cringe

-# -# <%= image_tag attachments['photo.png'].url, alt: 'Our Photo', class: 'photo' -%> -# -# = Observing and Intercepting Mails -# -# Action Mailer provides hooks into the Mail observer and interceptor methods. These allow you to -# register classes that are called during the mail delivery life cycle. -# -# An observer class must implement the :delivered_email(message) method which will be -# called once for every email sent after the email has been sent. -# -# 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. -# -# = Default Hash -# -# Action Mailer provides some intelligent defaults for your emails, these are usually specified in a -# default method inside the class definition: -# -# class NotifierMailer < ApplicationMailer -# 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: -# -# * 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, -# 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 -# an underscored symbol, so the following will work: -# -# class NotifierMailer < ApplicationMailer -# default 'Content-Transfer-Encoding' => '7bit', -# content_description: 'This is a description' -# end -# -# Finally, Action Mailer also supports passing Proc and Lambda objects into the default hash, -# so you can define methods that evaluate as the message is being generated: -# -# class NotifierMailer < ApplicationMailer -# default 'X-Special-Header' => Proc.new { my_method }, to: -> { @inviter.email_address } -# -# private -# def my_method -# 'some complex call' -# end -# end -# -# Note that the proc/lambda is evaluated right at the start of the mail message generation, so if you -# set something in the default hash using a proc, and then set the same thing inside of your -# mailer method, it will get overwritten by the mailer method. -# -# It is also possible to set these default options that will be used in all mailers through -# the default_options= configuration in config/application.rb: -# -# config.action_mailer.default_options = { from: "no-reply@example.org" } -# -# = 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: -# -# class NotifierMailer < ApplicationMailer -# before_action :add_inline_attachment! -# -# def welcome -# mail -# end -# -# private -# def add_inline_attachment! -# attachments.inline["footer.jpg"] = File.read('/path/to/filename.jpg') -# end -# end -# -# 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. -# -# Note that unless you have a specific reason to do so, you should prefer -# using before_action rather than after_action in your -# Action Mailer classes so that headers are parsed properly. -# -# = Rescuing Errors -# -# +rescue+ blocks inside of a mailer method cannot rescue errors that occur -# outside of rendering -- for example, record deserialization errors in a -# background job, or errors from a third-party mail delivery service. -# -# To rescue errors that occur during any part of the mailing process, use -# {rescue_from}[rdoc-ref:ActiveSupport::Rescuable::ClassMethods#rescue_from]: -# -# class NotifierMailer < ApplicationMailer -# rescue_from ActiveJob::DeserializationError do -# # ... -# end -# -# rescue_from "SomeThirdPartyService::ApiError" do -# # ... -# end -# -# def notify(recipient) -# mail(to: recipient, subject: "Notification") -# end -# 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 -# with database data, you'll need to write some scenarios to load messages with fake data: -# -# class NotifierMailerPreview < ActionMailer::Preview -# def welcome -# NotifierMailer.welcome(User::User.first) -# end -# end -# -# 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 -# of test/mailers/previews: -# -# config.action_mailer.preview_path = "#{Rails.root}/lib/mailer_previews" -# -# An overview of all previews is accessible at http://localhost:3000/rails/mailers -# on a running development server instance. -# -# Previews can also be intercepted in a similar manner as deliveries can be by registering -# a preview interceptor that has a previewing_email method: -# -# class CssInlineStyler -# def self.previewing_email(message) -# # inline CSS styles -# end -# end -# -# config.action_mailer.preview_interceptors :css_inline_styler -# -# Note that interceptors need to be registered both with register_interceptor -# and register_preview_interceptor if they should operate on both sending and -# previewing emails. -# -# = Configuration options -# -# These options are specified on the class level, like -# ActionMailer::Base.raise_delivery_errors = true -# -# * default_options - You can pass this in at a class level as well as within the class itself as -# per the above section. -# -# * logger - the logger is used for generating information on the mailing run if available. -# Can be set to +nil+ for no logging. Compatible with both Ruby's own +Logger+ and Log4r loggers. -# -# * smtp_settings - Allows detailed configuration for :smtp delivery method: -# * :address - Allows you to use a remote mail server. Just change it from its default -# "localhost" setting. -# * :port - On the off chance that your mail server doesn't run on port 25, you can change it. -# * :domain - If you need to specify a HELO domain, you can do it here. -# * :user_name - If your mail server requires authentication, set the username in this setting. -# * :password - If your mail server requires authentication, set the password in this setting. -# * :authentication - If your mail server requires authentication, you need to specify the -# authentication type here. -# 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_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). -# * :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 -# added automatically before the message is sent. -# -# * file_settings - Allows you to override options for the :file delivery method. -# * :location - The directory into which emails will be written. Defaults to the application -# tmp/mails. -# -# * raise_delivery_errors - Whether or not errors should be raised if the email fails to be delivered. -# -# * delivery_method - Defines a delivery method. Possible values are :smtp (default), -# :sendmail, :test, and :file. Or you may provide a custom delivery method -# object e.g. +MyOwnDeliveryMethodClass+. See the Mail gem documentation on the interface you need to -# implement for a custom delivery agent. -# -# * perform_deliveries - Determines whether emails are actually sent from Action Mailer when you -# call .deliver on an email message or on an Action Mailer method. This is on by default but can -# be turned off to aid in functional testing. -# -# * 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+. -# -# * deliver_later_queue_name - The name of the queue used with deliver_later. -# -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://actionmailer//lib/action_mailer/base.rb#466 -class ActionMailer::Base < ::AbstractController::Base - include ::ActionMailer::DeliveryMethods - include ::ActiveSupport::Rescuable - include ::ActionMailer::Rescuable - include ::ActionMailer::Parameterized - include ::ActionMailer::Previews - include ::ActionView::ViewPaths - include ::AbstractController::Rendering - include ::AbstractController::Logger - include ::ActiveSupport::Benchmarkable - 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::DeliveryMethods::ClassMethods - extend ::ActiveSupport::Rescuable::ClassMethods - extend ::ActionMailer::Rescuable::ClassMethods - extend ::ActionMailer::Parameterized::ClassMethods - extend ::ActionMailer::Previews::ClassMethods - extend ::ActionView::ViewPaths::ClassMethods - extend ::AbstractController::Helpers::ClassMethods - extend ::ActiveSupport::Callbacks::ClassMethods - extend ::AbstractController::Callbacks::ClassMethods - extend ::AbstractController::Caching::Fragments::ClassMethods - extend ::AbstractController::Caching::ClassMethods - extend ::AbstractController::Caching::ConfigMethods - extend ::ActionView::Rendering::ClassMethods - extend ::ActionView::Layouts::ClassMethods - - # @return [Base] a new instance of Base - # - # source://actionmailer//lib/action_mailer/base.rb#632 - def initialize; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://actionpack/7.0.4.2/lib/abstract_controller/helpers.rb#11 - def _helper_methods; end - - # source://actionpack/7.0.4.2/lib/abstract_controller/helpers.rb#11 - def _helper_methods=(_arg0); end - - # source://actionpack/7.0.4.2/lib/abstract_controller/helpers.rb#11 - def _helper_methods?; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#940 - def _process_action_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#928 - def _run_process_action_callbacks(&block); end - - # source://actionpack/7.0.4.2/lib/abstract_controller/caching.rb#42 - def _view_cache_dependencies; end - - # source://actionpack/7.0.4.2/lib/abstract_controller/caching.rb#42 - def _view_cache_dependencies=(_arg0); end - - # source://actionpack/7.0.4.2/lib/abstract_controller/caching.rb#42 - def _view_cache_dependencies?; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def asset_host; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def asset_host=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def assets_dir; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def assets_dir=(value); end - - # Allows you to add attachments to an email, like so: - # - # mail.attachments['filename.jpg'] = File.read('/path/to/filename.jpg') - # - # If you do this, then Mail will take the file name and work out the mime type. - # It will also set the Content-Type, Content-Disposition, Content-Transfer-Encoding - # and encode the contents of the attachment in Base64. - # - # You can also specify overrides if you want by passing a hash instead of a string: - # - # mail.attachments['filename.jpg'] = {mime_type: 'application/gzip', - # content: File.read('/path/to/filename.jpg')} - # - # If you want to use encoding other than Base64 then you will need to pass encoding - # type along with the pre-encoded content as Mail doesn't know how to decode the - # data: - # - # file_content = SpecialEncode(File.read('/path/to/filename.jpg')) - # mail.attachments['filename.jpg'] = {mime_type: 'application/gzip', - # content: file_content } - # - # You can also search for specific attachments: - # - # # By Filename - # mail.attachments['filename.jpg'] # => Mail::Part object or nil - # - # # or by index - # mail.attachments[0] # => Mail::Part (first attachment) - # - # source://actionmailer//lib/action_mailer/base.rb#749 - def attachments; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def default_asset_host_protocol; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def default_asset_host_protocol=(value); end - - # source://actionmailer//lib/action_mailer/base.rb#490 - def default_params; end - - # source://actionmailer//lib/action_mailer/base.rb#490 - def default_params=(_arg0); end - - # source://actionmailer//lib/action_mailer/base.rb#490 - def default_params?; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def default_static_extension; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def default_static_extension=(value); end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#15 - 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/base.rb#489 - def delivery_job; end - - # source://actionmailer//lib/action_mailer/base.rb#489 - def delivery_job=(_arg0); end - - # source://actionmailer//lib/action_mailer/base.rb#489 - def delivery_job?; end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#18 - def delivery_method; end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#18 - def delivery_method=(_arg0); end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#18 - def delivery_method?; end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#17 - def delivery_methods; end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#17 - def delivery_methods=(_arg0); end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#17 - 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 - def email_address_with_name(address, name); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def enable_fragment_cache_logging; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def enable_fragment_cache_logging=(value); end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 - def file_settings; end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 - def file_settings=(_arg0); end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 - def file_settings?; end - - # source://actionpack/7.0.4.2/lib/abstract_controller/caching/fragments.rb#23 - def fragment_cache_keys; end - - # source://actionpack/7.0.4.2/lib/abstract_controller/caching/fragments.rb#23 - def fragment_cache_keys=(_arg0); end - - # source://actionpack/7.0.4.2/lib/abstract_controller/caching/fragments.rb#23 - def fragment_cache_keys?; end - - # 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: - # - # headers 'X-Special-Domain-Specific-Header' => "SecretValue", - # 'In-Reply-To' => incoming.message_id - # - # The resulting Mail::Message will have the following in its header: - # - # X-Special-Domain-Specific-Header: SecretValue - # - # Note about replacing already defined headers: - # - # * +subject+ - # * +sender+ - # * +from+ - # * +to+ - # * +cc+ - # * +bcc+ - # * +reply-to+ - # * +orig-date+ - # * +message-id+ - # * +references+ - # - # Fields can only appear once in email headers while other fields such as - # X-Anything can appear multiple times. - # - # If you want to replace any header which already exists, first set it to - # +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 - def headers(args = T.unsafe(nil)); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def javascripts_dir; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def javascripts_dir=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def logger; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def logger=(value); end - - # The main method that creates the message and renders the email templates. There are - # two ways to call this method, with a block, or without a block. - # - # It accepts a headers hash. This hash allows you to specify - # 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 - # [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 - # of addresses. - # * +:from+ - Who the message is from - # * +:cc+ - Who you would like to Carbon-Copy on this email, can be a string of addresses, - # or an array of addresses. - # * +:bcc+ - Who you would like to Blind-Carbon-Copy on this email, can be a string of - # addresses, or an array of addresses. - # * +:reply_to+ - Who to set the Reply-To header of the email to. - # * +:date+ - The date to say the email was sent on. - # - # You can set default values for any of the above headers (except +:date+) - # by using the ::default class method: - # - # class Notifier < ActionMailer::Base - # default from: 'no-reply@test.lindsaar.net', - # bcc: 'email_logger@test.lindsaar.net', - # reply_to: 'bounces@test.lindsaar.net' - # end - # - # If you need other headers not listed above, you can either pass them in - # as part of the headers hash or use the headers['name'] = value - # method. - # - # When a +:return_path+ is specified as header, that value will be used as - # the 'envelope from' address for the Mail message. Setting this is useful - # when you want delivery notifications sent to a different address than the - # one in +:from+. Mail will actually use the +:return_path+ in preference - # to the +:sender+ in preference to the +:from+ field for the 'envelope - # from' value. - # - # If you do not pass a block to the +mail+ method, it will find all - # 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 - # ready to call :deliver on to send. - # - # For example: - # - # class Notifier < ActionMailer::Base - # default from: 'no-reply@test.lindsaar.net' - # - # def welcome - # mail(to: 'mikel@test.lindsaar.net') - # end - # end - # - # Will look for all templates at "app/views/notifier" with name "welcome". - # If no welcome template exists, it will raise an ActionView::MissingTemplate error. - # - # However, those can be customized: - # - # mail(template_path: 'notifications', template_name: 'another') - # - # And now it will look for all templates at "app/views/notifications" with name "another". - # - # If you do pass a block, you can render specific templates of your choice: - # - # mail(to: 'mikel@test.lindsaar.net') do |format| - # format.text - # format.html - # end - # - # You can even render plain text directly without using a template: - # - # mail(to: 'mikel@test.lindsaar.net') do |format| - # format.text { render plain: "Hello Mikel!" } - # format.html { render html: "

Hello Mikel!

".html_safe } - # end - # - # Which will render a +multipart/alternative+ email with +text/plain+ and - # +text/html+ parts. - # - # The block syntax also allows you to customize the part headers if desired: - # - # mail(to: 'mikel@test.lindsaar.net') do |format| - # format.html - # end - # - # source://actionmailer//lib/action_mailer/base.rb#858 - def mail(headers = T.unsafe(nil), &block); end - - # Returns the name of the mailer object. - # - # source://actionmailer//lib/action_mailer/base.rb#666 - def mailer_name; end - - # source://activesupport/7.0.4.2/lib/active_support/core_ext/module/attr_internal.rb#33 - def message; end - - # source://activesupport/7.0.4.2/lib/active_support/core_ext/module/attr_internal.rb#33 - def message=(_arg0); end - - # source://actionmailer//lib/action_mailer/parameterized.rb#91 - def params; end - - # source://actionmailer//lib/action_mailer/parameterized.rb#91 - def params=(_arg0); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def perform_caching; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def perform_caching=(value); end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#14 - def perform_deliveries; end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#14 - 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 - - # source://actionmailer//lib/action_mailer/base.rb#638 - def process(method_name, *args, **_arg2); end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#13 - def raise_delivery_errors; end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#13 - def raise_delivery_errors=(val); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def relative_url_root; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def relative_url_root=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers; end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers=(_arg0); end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers?; end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 - def sendmail_settings; end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 - def sendmail_settings=(_arg0); end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 - 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 - def smtp_settings; end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 - def smtp_settings=(_arg0); end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 - def smtp_settings?; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def stylesheets_dir; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def stylesheets_dir=(value); end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 - def test_settings; end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 - def test_settings=(_arg0); end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 - def test_settings?; end - - private - - # source://actionview/7.0.4.2/lib/action_view/layouts.rb#328 - def _layout(lookup_context, formats); end - - # source://actionmailer//lib/action_mailer/base.rb#1059 - def _protected_ivars; end - - # source://actionmailer//lib/action_mailer/base.rb#935 - def apply_defaults(headers); end - - # source://actionmailer//lib/action_mailer/base.rb#955 - def assign_headers_to_message(message, headers); end - - # source://actionmailer//lib/action_mailer/base.rb#961 - def collect_responses(headers, &block); end - - # @yield [collector] - # - # source://actionmailer//lib/action_mailer/base.rb#971 - def collect_responses_from_block(headers); end - - # source://actionmailer//lib/action_mailer/base.rb#985 - def collect_responses_from_templates(headers); end - - # source://actionmailer//lib/action_mailer/base.rb#978 - def collect_responses_from_text(headers); end - - # source://actionmailer//lib/action_mailer/base.rb#945 - def compute_default(value); end - - # source://actionmailer//lib/action_mailer/base.rb#1028 - def create_parts_from_responses(m, responses); end - - # 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 - def default_i18n_subject(interpolations = T.unsafe(nil)); end - - # source://actionmailer//lib/action_mailer/base.rb#998 - def each_template(paths, name, &block); end - - # source://actionmailer//lib/action_mailer/base.rb#1041 - def insert_part(container, response, charset); end - - # source://actionmailer//lib/action_mailer/base.rb#1055 - def instrument_name; end - - # This and #instrument_name is for caching instrument - # - # source://actionmailer//lib/action_mailer/base.rb#1048 - def instrument_payload(key); end - - # Used by #mail to set the content type of the message. - # - # It will use the given +user_content_type+, or multipart if the mail - # message has any attachments. If the attachments are inline, the content - # type will be "multipart/related", otherwise "multipart/mixed". - # - # If there is no content type passed in via headers, and there are no - # attachments, or the message is multipart, then the default content type is - # used. - # - # source://actionmailer//lib/action_mailer/base.rb#903 - def set_content_type(m, user_content_type, class_default); end - - # source://actionmailer//lib/action_mailer/base.rb#1007 - def wrap_inline_attachments(message); end - - class << self - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://actionpack/7.0.4.2/lib/abstract_controller/helpers.rb#11 - def _helper_methods; end - - # source://actionpack/7.0.4.2/lib/abstract_controller/helpers.rb#11 - def _helper_methods=(value); end - - # source://actionpack/7.0.4.2/lib/abstract_controller/helpers.rb#11 - def _helper_methods?; end - - # source://actionpack/7.0.4.2/lib/abstract_controller/helpers.rb#15 - def _helpers; end - - # source://actionview/7.0.4.2/lib/action_view/layouts.rb#209 - def _layout; end - - # source://actionview/7.0.4.2/lib/action_view/layouts.rb#209 - def _layout=(value); end - - # source://actionview/7.0.4.2/lib/action_view/layouts.rb#209 - def _layout?; end - - # source://actionview/7.0.4.2/lib/action_view/layouts.rb#210 - def _layout_conditions; end - - # source://actionview/7.0.4.2/lib/action_view/layouts.rb#210 - def _layout_conditions=(value); end - - # source://actionview/7.0.4.2/lib/action_view/layouts.rb#210 - def _layout_conditions?; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#932 - def _process_action_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#936 - def _process_action_callbacks=(value); end - - # source://actionpack/7.0.4.2/lib/abstract_controller/caching.rb#42 - def _view_cache_dependencies; end - - # source://actionpack/7.0.4.2/lib/abstract_controller/caching.rb#42 - def _view_cache_dependencies=(value); end - - # source://actionpack/7.0.4.2/lib/abstract_controller/caching.rb#42 - def _view_cache_dependencies?; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def asset_host; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def asset_host=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def assets_dir; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - 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 - def controller_path; end - - # Sets the defaults through app configuration: - # - # config.action_mailer.default(from: "no-reply@example.org") - # - # Aliased by ::default_options= - # - # source://actionmailer//lib/action_mailer/base.rb#570 - def default(value = T.unsafe(nil)); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def default_asset_host_protocol; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def default_asset_host_protocol=(value); end - - # Sets the defaults through app configuration: - # - # config.action_mailer.default(from: "no-reply@example.org") - # - # Aliased by ::default_options= - # Allows to set defaults through app configuration: - # - # config.action_mailer.default_options = { from: "no-reply@example.org" } - # - # source://actionmailer//lib/action_mailer/base.rb#570 - def default_options=(value = T.unsafe(nil)); end - - # source://actionmailer//lib/action_mailer/base.rb#490 - def default_params; end - - # source://actionmailer//lib/action_mailer/base.rb#490 - def default_params=(value); end - - # source://actionmailer//lib/action_mailer/base.rb#490 - def default_params?; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def default_static_extension; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def default_static_extension=(value); end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#15 - def deliver_later_queue_name; end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#15 - def deliver_later_queue_name=(val); end - - # 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 - # nothing except tell the logger you sent the email. - # - # source://actionmailer//lib/action_mailer/base.rb#585 - def deliver_mail(mail); end - - # source://actionmailer//lib/action_mailer/base.rb#489 - def delivery_job; end - - # source://actionmailer//lib/action_mailer/base.rb#489 - def delivery_job=(value); end - - # source://actionmailer//lib/action_mailer/base.rb#489 - def delivery_job?; end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#18 - def delivery_method; end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#18 - def delivery_method=(value); end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#18 - def delivery_method?; end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#17 - def delivery_methods; end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#17 - def delivery_methods=(value); end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#17 - 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 - def email_address_with_name(address, name); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def enable_fragment_cache_logging; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def enable_fragment_cache_logging=(value); end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 - def file_settings; end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 - def file_settings=(value); end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 - def file_settings?; end - - # source://actionpack/7.0.4.2/lib/abstract_controller/caching/fragments.rb#23 - def fragment_cache_keys; end - - # source://actionpack/7.0.4.2/lib/abstract_controller/caching/fragments.rb#23 - def fragment_cache_keys=(value); end - - # source://actionpack/7.0.4.2/lib/abstract_controller/caching/fragments.rb#23 - def fragment_cache_keys?; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def javascripts_dir; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def javascripts_dir=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def logger; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - 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 - def mailer_name; end - - # Allows to set the name of current mailer. - # - # source://actionmailer//lib/action_mailer/base.rb#562 - def mailer_name=(_arg0); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def perform_caching; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def perform_caching=(value); end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#14 - def perform_deliveries; end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#14 - def perform_deliveries=(val); end - - # source://actionmailer//lib/action_mailer/preview.rb#25 - def preview_interceptors; end - - # source://actionmailer//lib/action_mailer/preview.rb#25 - def preview_interceptors=(val); end - - # source://actionmailer//lib/action_mailer/preview.rb#14 - def preview_path; end - - # source://actionmailer//lib/action_mailer/preview.rb#14 - def preview_path=(val); end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#13 - def raise_delivery_errors; end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#13 - def raise_delivery_errors=(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 - 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 - 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 - 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 - def register_observers(*observers); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def relative_url_root; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def relative_url_root=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers; end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers?; end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 - def sendmail_settings; end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 - def sendmail_settings=(value); end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 - def sendmail_settings?; end - - # source://actionmailer//lib/action_mailer/preview.rb#22 - def show_previews; end - - # source://actionmailer//lib/action_mailer/preview.rb#22 - def show_previews=(val); end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 - def smtp_settings; end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 - def smtp_settings=(value); end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 - def smtp_settings?; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def stylesheets_dir; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def stylesheets_dir=(value); end - - # Emails do not support relative path links. - # - # @return [Boolean] - # - # source://actionmailer//lib/action_mailer/base.rb#931 - def supports_path?; end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 - def test_settings; end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 - def test_settings=(value); end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 - 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 - def unregister_interceptor(interceptor); end - - # Unregister one or more previously registered Interceptors. - # - # source://actionmailer//lib/action_mailer/base.rb#514 - 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 - def unregister_observer(observer); end - - # Unregister one or more previously registered Observers. - # - # source://actionmailer//lib/action_mailer/base.rb#504 - def unregister_observers(*observers); end - - private - - # source://actionmailer//lib/action_mailer/base.rb#616 - def method_missing(method_name, *args, **_arg2); end - - # source://actionmailer//lib/action_mailer/base.rb#546 - def observer_class_for(value); end - - # @return [Boolean] - # - # source://actionmailer//lib/action_mailer/base.rb#625 - def respond_to_missing?(method, include_all = T.unsafe(nil)); end - - # source://actionmailer//lib/action_mailer/base.rb#603 - def set_payload_for_mail(payload, mail); end - end -end - -# source://actionmailer//lib/action_mailer/base.rb#0 -module ActionMailer::Base::HelperMethods - include ::ActionMailer::MailHelper - include ::ActionText::ContentHelper - include ::ActionText::TagHelper - - # source://actionpack/7.0.4.2/lib/abstract_controller/caching/fragments.rb#31 - def combined_fragment_cache_key(*args, **_arg1, &block); end - - # source://actionpack/7.0.4.2/lib/abstract_controller/caching.rb#43 - def view_cache_dependencies(*args, **_arg1, &block); end -end - -# source://actionmailer//lib/action_mailer/base.rb#757 -class ActionMailer::Base::LateAttachmentsProxy < ::SimpleDelegator - # source://actionmailer//lib/action_mailer/base.rb#759 - def []=(_name, _content); end - - # source://actionmailer//lib/action_mailer/base.rb#758 - def inline; end - - private - - # @raise [RuntimeError] - # - # source://actionmailer//lib/action_mailer/base.rb#762 - def _raise_error; end -end - -# source://actionmailer//lib/action_mailer/base.rb#652 -class ActionMailer::Base::NullMail - # source://actionmailer//lib/action_mailer/base.rb#653 - def body; end - - # source://actionmailer//lib/action_mailer/base.rb#654 - def header; end - - # source://actionmailer//lib/action_mailer/base.rb#660 - def method_missing(*args); end - - # @return [Boolean] - # - # source://actionmailer//lib/action_mailer/base.rb#656 - def respond_to?(string, include_all = T.unsafe(nil)); end -end - -# source://actionmailer//lib/action_mailer/base.rb#485 -ActionMailer::Base::PROTECTED_IVARS = T.let(T.unsafe(nil), Array) - -# source://actionmailer//lib/action_mailer/collector.rb#8 -class ActionMailer::Collector - include ::AbstractController::Collector - - # @return [Collector] a new instance of Collector - # - # source://actionmailer//lib/action_mailer/collector.rb#12 - def initialize(context, &block); end - - # @raise [ArgumentError] - # - # source://actionmailer//lib/action_mailer/collector.rb#18 - def all(*args, &block); end - - # @raise [ArgumentError] - # - # source://actionmailer//lib/action_mailer/collector.rb#18 - def any(*args, &block); end - - # source://actionmailer//lib/action_mailer/collector.rb#25 - def custom(mime, options = T.unsafe(nil)); end - - # Returns the value of attribute responses. - # - # source://actionmailer//lib/action_mailer/collector.rb#10 - def responses; end -end - -# 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 -module ActionMailer::DeliveryMethods - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActionMailer::DeliveryMethods::ClassMethods - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#78 - def wrap_delivery_behavior!(*args); end - - module GeneratedClassMethods - def delivery_method; end - def delivery_method=(value); end - def delivery_method?; end - def delivery_methods; end - def delivery_methods=(value); end - def delivery_methods?; end - def file_settings; end - def file_settings=(value); end - def file_settings?; end - def sendmail_settings; end - def sendmail_settings=(value); end - def sendmail_settings?; end - def smtp_settings; end - def smtp_settings=(value); end - def smtp_settings?; end - def test_settings; end - def test_settings=(value); end - def test_settings?; end - end - - module GeneratedInstanceMethods - def delivery_method; end - def delivery_method=(value); end - def delivery_method?; end - def delivery_methods; end - def delivery_methods=(value); end - def delivery_methods?; end - def file_settings; end - def file_settings=(value); end - def file_settings?; end - def sendmail_settings; end - def sendmail_settings=(value); end - def sendmail_settings?; end - def smtp_settings; end - def smtp_settings=(value); end - def smtp_settings?; end - def test_settings; end - def test_settings=(value); end - def test_settings?; end - end -end - -# Helpers for creating and wrapping delivery behavior, used by DeliveryMethods. -# -# source://actionmailer//lib/action_mailer/delivery_methods.rb#40 -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' - # - # source://actionmailer//lib/action_mailer/delivery_methods.rb#50 - 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#42 - def deliveries=(arg); end - - # source://actionmailer//lib/action_mailer/delivery_methods.rb#56 - def wrap_delivery_behavior(mail, method = T.unsafe(nil), options = T.unsafe(nil)); end -end - -# 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. -# -# This interceptor is enabled by default. To disable it, delete it from the -# ActionMailer::Base.preview_interceptors array: -# -# ActionMailer::Base.preview_interceptors.delete(ActionMailer::InlinePreviewInterceptor) -# -# source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#15 -class ActionMailer::InlinePreviewInterceptor - include ::Base64 - - # @return [InlinePreviewInterceptor] a new instance of InlinePreviewInterceptor - # - # source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#24 - def initialize(message); end - - # source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#28 - def transform!; end - - private - - # source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#49 - def data_url(part); end - - # source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#53 - def find_part(cid); end - - # source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#45 - def html_part; end - - # Returns the value of attribute message. - # - # source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#43 - def message; end - - class << self - # source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#20 - def previewing_email(message); end - end -end - -# source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#16 -ActionMailer::InlinePreviewInterceptor::PATTERN = T.let(T.unsafe(nil), Regexp) - -# Implements the ActiveSupport::LogSubscriber for logging notifications when -# email is delivered or received. -# -# source://actionmailer//lib/action_mailer/log_subscriber.rb#9 -class ActionMailer::LogSubscriber < ::ActiveSupport::LogSubscriber - # An email was delivered. - # - # source://actionmailer//lib/action_mailer/log_subscriber.rb#10 - def deliver(event); end - - # Use the logger configured for ActionMailer::Base. - # - # source://actionmailer//lib/action_mailer/log_subscriber.rb#33 - def logger; end - - # An email was generated. - # - # source://actionmailer//lib/action_mailer/log_subscriber.rb#24 - def process(event); end -end - -# 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 -class ActionMailer::MailDeliveryJob < ::ActiveJob::Base - # source://actionmailer//lib/action_mailer/mail_delivery_job.rb#16 - 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 - 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 - def mailer_class; end - - class << self - # source://activejob/7.0.4.2/lib/active_job/queue_name.rb#56 - def queue_name; end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers; end - end -end - -# 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 -module ActionMailer::MailHelper - # Access the message attachments list. - # - # source://actionmailer//lib/action_mailer/mail_helper.rb#43 - def attachments; end - - # Take the text and format it, indented two spaces for each line, and - # wrapped at 72 columns: - # - # text = <<-TEXT - # This is - # the paragraph. - # - # * item1 * item2 - # TEXT - # - # block_format text - # # => " This is the paragraph.\n\n * item1\n * item2\n" - # - # source://actionmailer//lib/action_mailer/mail_helper.rb#20 - def block_format(text); end - - # Returns +text+ wrapped at +len+ columns and indented +indent+ spaces. - # By default column length +len+ equals 72 characters and indent - # +indent+ equal two spaces. - # - # my_text = 'Here is a sample text with more than 40 characters' - # - # 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 - 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 - def mailer; end - - # Access the message instance. - # - # source://actionmailer//lib/action_mailer/mail_helper.rb#38 - def message; end -end - -# 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 -# through Active Job. -# -# Notifier.welcome(User::User.first) # an ActionMailer::MessageDelivery object -# Notifier.welcome(User::User.first).deliver_now # sends the email -# Notifier.welcome(User::User.first).deliver_later # enqueue email delivery as a job through Active Job -# Notifier.welcome(User::User.first).message # a Mail::Message object -# -# source://actionmailer//lib/action_mailer/message_delivery.rb#17 -class ActionMailer::MessageDelivery - # @return [MessageDelivery] a new instance of MessageDelivery - # - # source://actionmailer//lib/action_mailer/message_delivery.rb#18 - 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 - def __getobj__; end - - # Unused except for delegator internals (dup, marshalling). - # - # source://actionmailer//lib/action_mailer/message_delivery.rb#34 - def __setobj__(mail_message); end - - # Enqueues the email to be delivered through Active Job. When the - # job runs it will send the email using +deliver_now+. - # - # Notifier.welcome(User::User.first).deliver_later - # Notifier.welcome(User::User.first).deliver_later(wait: 1.hour) - # Notifier.welcome(User::User.first).deliver_later(wait_until: 10.hours.from_now) - # Notifier.welcome(User::User.first).deliver_later(priority: 10) - # - # Options: - # - # * :wait - Enqueue the email to be delivered with a delay. - # * :wait_until - Enqueue the email to be delivered at (after) a specific date / time. - # * :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+. - # - # class AccountRegistrationMailer < ApplicationMailer - # self.delivery_job = RegistrationDeliveryJob - # end - # - # source://actionmailer//lib/action_mailer/message_delivery.rb#98 - def deliver_later(options = T.unsafe(nil)); end - - # Enqueues the email to be delivered through Active Job. When the - # job runs it will send the email using +deliver_now!+. That means - # that the message will be sent bypassing checking +perform_deliveries+ - # and +raise_delivery_errors+, so use with caution. - # - # Notifier.welcome(User::User.first).deliver_later! - # Notifier.welcome(User::User.first).deliver_later!(wait: 1.hour) - # Notifier.welcome(User::User.first).deliver_later!(wait_until: 10.hours.from_now) - # Notifier.welcome(User::User.first).deliver_later!(priority: 10) - # - # Options: - # - # * :wait - Enqueue the email to be delivered with a delay - # * :wait_until - Enqueue the email to be delivered at (after) a specific date / time - # * :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+. - # - # class AccountRegistrationMailer < ApplicationMailer - # self.delivery_job = RegistrationDeliveryJob - # end - # - # source://actionmailer//lib/action_mailer/message_delivery.rb#72 - def deliver_later!(options = T.unsafe(nil)); end - - # Delivers an email: - # - # Notifier.welcome(User::User.first).deliver_now - # - # source://actionmailer//lib/action_mailer/message_delivery.rb#117 - def deliver_now; end - - # Delivers an email without checking +perform_deliveries+ and +raise_delivery_errors+, - # so use with caution. - # - # Notifier.welcome(User::User.first).deliver_now! - # - # source://actionmailer//lib/action_mailer/message_delivery.rb#107 - def deliver_now!; end - - # Returns the resulting Mail::Message - # - # source://actionmailer//lib/action_mailer/message_delivery.rb#39 - 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 - def processed?; end - - private - - # source://actionmailer//lib/action_mailer/message_delivery.rb#132 - 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. - # - # source://actionmailer//lib/action_mailer/message_delivery.rb#126 - def processed_mailer; end -end - -# source://actionmailer//lib/action_mailer/test_case.rb#7 -class ActionMailer::NonInferrableMailerError < ::StandardError - # @return [NonInferrableMailerError] a new instance of NonInferrableMailerError - # - # source://actionmailer//lib/action_mailer/test_case.rb#8 - def initialize(name); end -end - -# Provides the option to parameterize mailers in order to share instance variable -# setup, processing, and common headers. -# -# Consider this example that does not use parameterization: -# -# class InvitationsMailer < ApplicationMailer -# def account_invitation(inviter, invitee) -# @account = inviter.account -# @inviter = inviter -# @invitee = invitee -# -# subject = "#{@inviter.name} invited you to their Basecamp (#{@account.name})" -# -# mail \ -# subject: subject, -# to: invitee.email_address, -# from: common_address(inviter), -# reply_to: inviter.email_address_with_name -# end -# -# def project_invitation(project, inviter, invitee) -# @account = inviter.account -# @project = project -# @inviter = inviter -# @invitee = invitee -# @summarizer = ProjectInvitationSummarizer.new(@project.bucket) -# -# subject = "#{@inviter.name.familiar} added you to a project in Basecamp (#{@account.name})" -# -# mail \ -# subject: subject, -# to: invitee.email_address, -# from: common_address(inviter), -# reply_to: inviter.email_address_with_name -# end -# -# def bulk_project_invitation(projects, inviter, invitee) -# @account = inviter.account -# @projects = projects.sort_by(&:name) -# @inviter = inviter -# @invitee = invitee -# -# subject = "#{@inviter.name.familiar} added you to some new stuff in Basecamp (#{@account.name})" -# -# mail \ -# subject: subject, -# to: invitee.email_address, -# from: common_address(inviter), -# reply_to: inviter.email_address_with_name -# end -# end -# -# InvitationsMailer.account_invitation(person_a, person_b).deliver_later -# -# Using parameterized mailers, this can be rewritten as: -# -# class InvitationsMailer < ApplicationMailer -# before_action { @inviter, @invitee = params[:inviter], params[:invitee] } -# before_action { @account = params[:inviter].account } -# -# default to: -> { @invitee.email_address }, -# from: -> { common_address(@inviter) }, -# reply_to: -> { @inviter.email_address_with_name } -# -# def account_invitation -# mail subject: "#{@inviter.name} invited you to their Basecamp (#{@account.name})" -# end -# -# def project_invitation -# @project = params[:project] -# @summarizer = ProjectInvitationSummarizer.new(@project.bucket) -# -# mail subject: "#{@inviter.name.familiar} added you to a project in Basecamp (#{@account.name})" -# end -# -# def bulk_project_invitation -# @projects = params[:projects].sort_by(&:name) -# -# mail subject: "#{@inviter.name.familiar} added you to some new stuff in Basecamp (#{@account.name})" -# end -# end -# -# InvitationsMailer.with(inviter: person_a, invitee: person_b).account_invitation.deliver_later -# -# source://actionmailer//lib/action_mailer/parameterized.rb#87 -module ActionMailer::Parameterized - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActionMailer::Parameterized::ClassMethods -end - -# source://actionmailer//lib/action_mailer/parameterized.rb#94 -module ActionMailer::Parameterized::ClassMethods - # Provide the parameters to the mailer in order to use them in the instance methods and callbacks. - # - # InvitationsMailer.with(inviter: person_a, invitee: person_b).account_invitation.deliver_later - # - # See Parameterized documentation for full example. - # - # source://actionmailer//lib/action_mailer/parameterized.rb#100 - def with(params); end -end - -# source://actionmailer//lib/action_mailer/parameterized.rb#105 -class ActionMailer::Parameterized::Mailer - # @return [Mailer] a new instance of Mailer - # - # source://actionmailer//lib/action_mailer/parameterized.rb#106 - def initialize(mailer, params); end - - private - - # source://actionmailer//lib/action_mailer/parameterized.rb#111 - def method_missing(method_name, *args, **_arg2); end - - # @return [Boolean] - # - # source://actionmailer//lib/action_mailer/parameterized.rb#120 - def respond_to_missing?(method, include_all = T.unsafe(nil)); end -end - -# source://actionmailer//lib/action_mailer/parameterized.rb#125 -class ActionMailer::Parameterized::MessageDelivery < ::ActionMailer::MessageDelivery - # @return [MessageDelivery] a new instance of MessageDelivery - # - # source://actionmailer//lib/action_mailer/parameterized.rb#126 - def initialize(mailer_class, action, params, *args, **_arg4); end - - private - - # source://actionmailer//lib/action_mailer/parameterized.rb#140 - def enqueue_delivery(delivery_method, options = T.unsafe(nil)); end - - # source://actionmailer//lib/action_mailer/parameterized.rb#133 - def processed_mailer; end -end - -# source://actionmailer//lib/action_mailer/preview.rb#69 -class ActionMailer::Preview - extend ::ActiveSupport::DescendantsTracker - - # @return [Preview] a new instance of Preview - # - # source://actionmailer//lib/action_mailer/preview.rb#74 - def initialize(params = T.unsafe(nil)); end - - # Returns the value of attribute params. - # - # source://actionmailer//lib/action_mailer/preview.rb#72 - def params; end - - class << self - # Returns all mailer preview classes. - # - # source://actionmailer//lib/action_mailer/preview.rb#80 - 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 - def call(email, params = T.unsafe(nil)); end - - # Returns +true+ if the email exists. - # - # @return [Boolean] - # - # source://actionmailer//lib/action_mailer/preview.rb#101 - def email_exists?(email); end - - # Returns all of the available email previews. - # - # source://actionmailer//lib/action_mailer/preview.rb#96 - def emails; end - - # Returns +true+ if the preview exists. - # - # @return [Boolean] - # - # source://actionmailer//lib/action_mailer/preview.rb#106 - def exists?(preview); end - - # Find a mailer preview by its underscored class name. - # - # source://actionmailer//lib/action_mailer/preview.rb#111 - def find(preview); end - - # Returns the underscored name of the mailer preview without the suffix. - # - # source://actionmailer//lib/action_mailer/preview.rb#116 - def preview_name; end - - private - - # source://actionmailer//lib/action_mailer/preview.rb#135 - def inform_preview_interceptors(message); end - - # source://actionmailer//lib/action_mailer/preview.rb#121 - def load_previews; end - - # source://actionmailer//lib/action_mailer/preview.rb#127 - def preview_path; end - - # source://actionmailer//lib/action_mailer/preview.rb#131 - def show_previews; end - end -end - -# source://actionmailer//lib/action_mailer/preview.rb#6 -module ActionMailer::Previews - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActionMailer::Previews::ClassMethods -end - -# source://actionmailer//lib/action_mailer/preview.rb#28 -module ActionMailer::Previews::ClassMethods - # 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 - 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 - 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 - def unregister_preview_interceptor(interceptor); end - - # Unregister one or more previously registered Interceptors. - # - # source://actionmailer//lib/action_mailer/preview.rb#35 - def unregister_preview_interceptors(*interceptors); end - - private - - # source://actionmailer//lib/action_mailer/preview.rb#58 - def interceptor_class_for(interceptor); end -end - -# source://actionmailer//lib/action_mailer/railtie.rb#9 -class ActionMailer::Railtie < ::Rails::Railtie; end - -# Provides +rescue_from+ for mailers. Wraps mailer action processing, -# mail job processing, and mail delivery. -# -# source://actionmailer//lib/action_mailer/rescuable.rb#6 -module ActionMailer::Rescuable - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - include ::ActiveSupport::Rescuable - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveSupport::Rescuable::ClassMethods - mixes_in_class_methods ::ActionMailer::Rescuable::ClassMethods - - # source://actionmailer//lib/action_mailer/rescuable.rb#16 - def handle_exceptions; end - - private - - # source://actionmailer//lib/action_mailer/rescuable.rb#23 - def process(*_arg0, **_arg1, &_arg2); end - - module GeneratedClassMethods - def rescue_handlers; end - def rescue_handlers=(value); end - def rescue_handlers?; end - end - - module GeneratedInstanceMethods - def rescue_handlers; end - def rescue_handlers=(value); end - def rescue_handlers?; end - end -end - -# source://actionmailer//lib/action_mailer/rescuable.rb#0 -module ActionMailer::Rescuable::ClassMethods - # source://actionmailer//lib/action_mailer/rescuable.rb#11 - def handle_exception(exception); end -end - -# source://actionmailer//lib/action_mailer/test_case.rb#15 -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 - extend ::ActiveSupport::Testing::ConstantLookup::ClassMethods - extend ::ActionMailer::TestCase::Behavior::ClassMethods - - # source://actionmailer//lib/action_mailer/test_case.rb#41 - def _mailer_class; end - - # source://actionmailer//lib/action_mailer/test_case.rb#41 - def _mailer_class=(_arg0); end - - # source://actionmailer//lib/action_mailer/test_case.rb#41 - def _mailer_class?; end - - class << self - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://actionmailer//lib/action_mailer/test_case.rb#41 - def _mailer_class; end - - # source://actionmailer//lib/action_mailer/test_case.rb#41 - def _mailer_class=(value); end - - # source://actionmailer//lib/action_mailer/test_case.rb#41 - def _mailer_class?; end - end -end - -# source://actionmailer//lib/action_mailer/test_case.rb#32 -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 - include GeneratedInstanceMethods - include ::ActiveSupport::Testing::ConstantLookup - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveSupport::Testing::ConstantLookup::ClassMethods - mixes_in_class_methods ::ActionMailer::TestCase::Behavior::ClassMethods - - private - - # source://actionmailer//lib/action_mailer/test_case.rb#106 - def charset; end - - # source://actionmailer//lib/action_mailer/test_case.rb#110 - def encode(subject); end - - # source://actionmailer//lib/action_mailer/test_case.rb#78 - 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 - def restore_delivery_method; end - - # source://actionmailer//lib/action_mailer/test_case.rb#85 - def restore_test_deliveries; end - - # source://actionmailer//lib/action_mailer/test_case.rb#90 - def set_delivery_method(method); end - - # source://actionmailer//lib/action_mailer/test_case.rb#100 - def set_expected_mail; end - - module GeneratedClassMethods - def _mailer_class; end - def _mailer_class=(value); end - def _mailer_class?; end - end - - module GeneratedInstanceMethods - def _mailer_class; end - def _mailer_class=(value); end - def _mailer_class?; end - end -end - -# source://actionmailer//lib/action_mailer/test_case.rb#48 -module ActionMailer::TestCase::Behavior::ClassMethods - # @raise [NonInferrableMailerError] - # - # source://actionmailer//lib/action_mailer/test_case.rb#68 - def determine_default_mailer(name); end - - # source://actionmailer//lib/action_mailer/test_case.rb#60 - def mailer_class; end - - # source://actionmailer//lib/action_mailer/test_case.rb#49 - def tests(mailer); end -end - -# source://actionmailer//lib/action_mailer/test_case.rb#16 -module ActionMailer::TestCase::ClearTestDeliveries - extend ::ActiveSupport::Concern - - private - - # source://actionmailer//lib/action_mailer/test_case.rb#25 - def clear_test_deliveries; end -end - -# Provides helper methods for testing Action Mailer, including #assert_emails -# and #assert_no_emails. -# -# source://actionmailer//lib/action_mailer/test_helper.rb#8 -module ActionMailer::TestHelper - include ::ActiveSupport::Testing::Assertions - include ::ActiveJob::TestHelper - - # Asserts that the number of emails sent matches the given number. - # - # def test_emails - # assert_emails 0 - # ContactMailer.welcome.deliver_now - # assert_emails 1 - # ContactMailer.welcome.deliver_now - # assert_emails 2 - # end - # - # If a block is passed, that block should cause the specified number of - # emails to be sent. - # - # def test_emails_again - # assert_emails 1 do - # ContactMailer.welcome.deliver_now - # end - # - # assert_emails 2 do - # ContactMailer.welcome.deliver_now - # ContactMailer.welcome.deliver_later - # end - # end - # - # source://actionmailer//lib/action_mailer/test_helper.rb#34 - def assert_emails(number, &block); end - - # Asserts that a specific email has been enqueued, optionally - # matching arguments. - # - # def test_email - # ContactMailer.welcome.deliver_later - # assert_enqueued_email_with ContactMailer, :welcome - # end - # - # def test_email_with_arguments - # ContactMailer.welcome("Hello", "Goodbye").deliver_later - # assert_enqueued_email_with ContactMailer, :welcome, args: ["Hello", "Goodbye"] - # end - # - # If a block is passed, that block should cause the specified email - # to be enqueued. - # - # def test_email_in_block - # assert_enqueued_email_with ContactMailer, :welcome do - # ContactMailer.welcome.deliver_later - # end - # end - # - # If +args+ is provided as a Hash, a parameterized email is matched. - # - # def test_parameterized_email - # assert_enqueued_email_with ContactMailer, :welcome, - # args: {email: 'user@example.com'} do - # ContactMailer.with(email: 'user@example.com').welcome.deliver_later - # 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 - - # Asserts that the number of emails enqueued for later delivery matches - # the given number. - # - # def test_emails - # assert_enqueued_emails 0 - # ContactMailer.welcome.deliver_later - # assert_enqueued_emails 1 - # ContactMailer.welcome.deliver_later - # assert_enqueued_emails 2 - # end - # - # If a block is passed, that block should cause the specified number of - # emails to be enqueued. - # - # def test_emails_again - # assert_enqueued_emails 1 do - # ContactMailer.welcome.deliver_later - # end - # - # assert_enqueued_emails 2 do - # ContactMailer.welcome.deliver_later - # ContactMailer.welcome.deliver_later - # end - # end - # - # source://actionmailer//lib/action_mailer/test_helper.rb#92 - def assert_enqueued_emails(number, &block); end - - # Asserts that no emails have been sent. - # - # def test_emails - # assert_no_emails - # ContactMailer.welcome.deliver_now - # assert_emails 1 - # end - # - # If a block is passed, that block should not cause any emails to be sent. - # - # def test_emails_again - # assert_no_emails do - # # No emails should be sent from this block - # end - # end - # - # Note: This assertion is simply a shortcut for: - # - # assert_emails 0, &block - # - # source://actionmailer//lib/action_mailer/test_helper.rb#64 - def assert_no_emails(&block); end - - # Asserts that no emails are enqueued for later delivery. - # - # def test_no_emails - # assert_no_enqueued_emails - # ContactMailer.welcome.deliver_later - # assert_enqueued_emails 1 - # end - # - # If a block is provided, it should not cause any emails to be enqueued. - # - # def test_no_emails - # assert_no_enqueued_emails do - # # No emails should be enqueued from this block - # end - # end - # - # source://actionmailer//lib/action_mailer/test_helper.rb#150 - def assert_no_enqueued_emails(&block); end - - private - - # source://actionmailer//lib/action_mailer/test_helper.rb#155 - def delivery_job_filter(job); end -end - -# source://actionmailer//lib/action_mailer/gem_version.rb#9 -module ActionMailer::VERSION; end - -# source://actionmailer//lib/action_mailer/gem_version.rb#10 -ActionMailer::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) - -# source://actionmailer//lib/action_mailer/gem_version.rb#11 -ActionMailer::VERSION::MINOR = T.let(T.unsafe(nil), Integer) - -# source://actionmailer//lib/action_mailer/gem_version.rb#13 -ActionMailer::VERSION::PRE = T.let(T.unsafe(nil), String) - -# source://actionmailer//lib/action_mailer/gem_version.rb#15 -ActionMailer::VERSION::STRING = T.let(T.unsafe(nil), String) - -# source://actionmailer//lib/action_mailer/gem_version.rb#12 -ActionMailer::VERSION::TINY = T.let(T.unsafe(nil), Integer) diff --git a/sorbet/rbi/gems/actionpack@7.0.4.2.rbi b/sorbet/rbi/gems/actionpack@7.0.4.2.rbi deleted file mode 100644 index e9c50ea..0000000 --- a/sorbet/rbi/gems/actionpack@7.0.4.2.rbi +++ /dev/null @@ -1,19691 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# 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 -module AbstractController - extend ::ActiveSupport::Autoload - - class << self - # source://actionpack//lib/abstract_controller.rb#24 - def eager_load!; end - end -end - -# Raised when a non-existing controller action is triggered. -# -# source://actionpack//lib/abstract_controller/base.rb#11 -class AbstractController::ActionNotFound < ::StandardError - include ::DidYouMean::Correctable - - # @return [ActionNotFound] a new instance of ActionNotFound - # - # source://actionpack//lib/abstract_controller/base.rb#14 - def initialize(message = T.unsafe(nil), controller = T.unsafe(nil), action = T.unsafe(nil)); end - - # source://actionpack//lib/abstract_controller/base.rb#12 - def action; end - - # source://actionpack//lib/abstract_controller/base.rb#12 - def controller; end - - # source://actionpack//lib/abstract_controller/base.rb#23 - def corrections; end -end - -# source://actionpack//lib/abstract_controller/asset_paths.rb#4 -module AbstractController::AssetPaths - extend ::ActiveSupport::Concern -end - -# 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 -# different things depending on the context. -# -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://actionpack//lib/abstract_controller/base.rb#33 -class AbstractController::Base - include ::ActiveSupport::Configurable - extend ::ActiveSupport::Configurable::ClassMethods - extend ::ActiveSupport::DescendantsTracker - - # Delegates to the class's ::action_methods. - # - # source://actionpack//lib/abstract_controller/base.rb#161 - def action_methods; end - - # Returns the name of the action this controller is processing. - # - # source://activesupport/7.0.4.2/lib/active_support/core_ext/module/attr_internal.rb#33 - def action_name; end - - # source://activesupport/7.0.4.2/lib/active_support/core_ext/module/attr_internal.rb#33 - def action_name=(_arg0); end - - # Returns true if a method for the action is available and - # can be dispatched, false otherwise. - # - # Notice that action_methods.include?("foo") may return - # false and available_action?("foo") returns true because - # this method considers actions that are also available - # through other means, for example, implicit render ones. - # - # ==== Parameters - # * action_name - The name of an action to be tested - # - # @return [Boolean] - # - # source://actionpack//lib/abstract_controller/base.rb#175 - def available_action?(action_name); end - - # Delegates to the class's ::controller_path. - # - # source://actionpack//lib/abstract_controller/base.rb#156 - def controller_path; end - - # Returns the formats that can be processed by the controller. - # - # source://activesupport/7.0.4.2/lib/active_support/core_ext/module/attr_internal.rb#33 - def formats; end - - # source://activesupport/7.0.4.2/lib/active_support/core_ext/module/attr_internal.rb#33 - def formats=(_arg0); end - - # source://actionpack//lib/abstract_controller/base.rb#194 - def inspect; end - - # Tests if a response body is set. Used to determine if the - # +process_action+ callback needs to be terminated in - # AbstractController::Callbacks. - # - # @return [Boolean] - # - # source://actionpack//lib/abstract_controller/base.rb#182 - def performed?; end - - # 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 - # AbstractController::ActionNotFound error is raised. - # - # ==== Returns - # * self - # - # source://actionpack//lib/abstract_controller/base.rb#142 - def process(action, *args, **_arg2); end - - # Returns the body of the HTTP response sent by the controller. - # - # source://activesupport/7.0.4.2/lib/active_support/core_ext/module/attr_internal.rb#33 - def response_body; end - - # source://activesupport/7.0.4.2/lib/active_support/core_ext/module/attr_internal.rb#33 - def response_body=(_arg0); end - - # Actually call the method associated with the action. Override - # this method if you wish to change how action methods are called, - # not to add additional behavior around it. For example, you would - # override #send_action if you want to inject arguments into the - # method. - def send_action(*_arg0); end - - private - - # Takes an action name and returns the name of the method that will - # handle the action. - # - # It checks if the action name is valid and returns false otherwise. - # - # See method_for_action for more information. - # - # ==== Parameters - # * action_name - An action name to find a method name for - # - # ==== Returns - # * string - The name of the method that handles the action - # * false - No valid method name could be found. - # Raise +AbstractController::ActionNotFound+. - # - # source://actionpack//lib/abstract_controller/base.rb#246 - 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 - 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 - def _valid_action_name?(action_name); end - - # Returns true if the name can be considered an action because - # it has a method defined in the controller. - # - # ==== Parameters - # * name - The name of an action to be tested - # - # @return [Boolean] - # - # source://actionpack//lib/abstract_controller/base.rb#204 - def action_method?(name); end - - # Takes an action name and returns the name of the method that will - # handle the action. In normal cases, this method returns the same - # name as it receives. By default, if #method_for_action receives - # a name that is not an action, it will look for an #action_missing - # method and return "_handle_action_missing" if one is found. - # - # Subclasses may override this method to add additional conditions - # that should be considered an action. For instance, an HTTP controller - # with a template matching the action name is considered to exist. - # - # If you override this method to handle additional cases, you may - # also provide a method (like +_handle_method_missing+) to handle - # the case. - # - # If none of these conditions are true, and +method_for_action+ - # returns +nil+, an +AbstractController::ActionNotFound+ exception will be raised. - # - # ==== Parameters - # * action_name - An action name to find a method name for - # - # ==== Returns - # * 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 - def method_for_action(action_name); end - - # Call the action. Override this in a subclass to modify the - # behavior around processing an action. This, and not #process, - # is the intended way to override action dispatching. - # - # 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 - def process_action(*_arg0, **_arg1, &_arg2); end - - class << self - # Returns the value of attribute abstract. - # - # source://actionpack//lib/abstract_controller/base.rb#50 - def abstract; end - - # Define a controller as abstract. See internal_methods for more - # details. - # - # source://actionpack//lib/abstract_controller/base.rb#55 - def abstract!; end - - # Returns the value of attribute abstract. - # - # source://actionpack//lib/abstract_controller/base.rb#50 - def abstract?; end - - # A list of method names that should be considered actions. This - # includes all public instance methods on a controller, less - # any internal methods (see internal_methods), adding back in - # any methods that are internal, but still exist on the class - # itself. - # - # ==== Returns - # * Set - A set of all methods that should be considered actions. - # - # source://actionpack//lib/abstract_controller/base.rb#89 - 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 - def clear_action_methods!; end - - # Returns the full controller name, underscored, without the ending Controller. - # - # class MyApp::MyPostsController < AbstractController::Base - # - # end - # - # MyApp::MyPostsController.controller_path # => "my_app/my_posts" - # - # ==== Returns - # * String - # - # source://actionpack//lib/abstract_controller/base.rb#121 - def controller_path; end - - # source://actionpack//lib/abstract_controller/base.rb#59 - def inherited(klass); end - - # A list of all internal methods for a controller. This finds the first - # abstract superclass of a controller, and gets a list of all public - # 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) - # - # source://actionpack//lib/abstract_controller/base.rb#74 - def internal_methods; end - - # Refresh the cached action_methods when a new action_method is added. - # - # source://actionpack//lib/abstract_controller/base.rb#126 - def method_added(name); end - - # Returns true if the given controller is capable of rendering - # a path. A subclass of +AbstractController::Base+ - # may return false. An Email controller for example does not - # support paths, only full URLs. - # - # @return [Boolean] - # - # source://actionpack//lib/abstract_controller/base.rb#190 - def supports_path?; end - end -end - -# source://actionpack//lib/abstract_controller/caching.rb#4 -module AbstractController::Caching - include ::AbstractController::Caching::ConfigMethods - extend ::ActiveSupport::Concern - extend ::ActiveSupport::Autoload - include GeneratedInstanceMethods - include ::AbstractController::Caching::Fragments - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::AbstractController::Caching::Fragments::ClassMethods - mixes_in_class_methods ::AbstractController::Caching::ClassMethods - mixes_in_class_methods ::AbstractController::Caching::ConfigMethods - - # source://actionpack//lib/abstract_controller/caching.rb#52 - def view_cache_dependencies; end - - private - - # Convenience accessor. - # - # source://actionpack//lib/abstract_controller/caching.rb#58 - def cache(key, options = T.unsafe(nil), &block); end - - module GeneratedClassMethods - def _view_cache_dependencies; end - def _view_cache_dependencies=(value); end - def _view_cache_dependencies?; end - def fragment_cache_keys; end - def fragment_cache_keys=(value); end - def fragment_cache_keys?; end - end - - module GeneratedInstanceMethods - def _view_cache_dependencies; end - def _view_cache_dependencies=(value); end - def _view_cache_dependencies?; end - def fragment_cache_keys; end - def fragment_cache_keys=(value); end - def fragment_cache_keys?; end - end -end - -# source://actionpack//lib/abstract_controller/caching.rb#46 -module AbstractController::Caching::ClassMethods - # source://actionpack//lib/abstract_controller/caching.rb#47 - def view_cache_dependency(&dependency); end -end - -# source://actionpack//lib/abstract_controller/caching.rb#12 -module AbstractController::Caching::ConfigMethods - # source://actionpack//lib/abstract_controller/caching.rb#13 - def cache_store; end - - # source://actionpack//lib/abstract_controller/caching.rb#17 - def cache_store=(store); end - - private - - # @return [Boolean] - # - # source://actionpack//lib/abstract_controller/caching.rb#22 - def cache_configured?; end -end - -# 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 -# depend on complicated state while other parts rarely change or -# can be shared amongst multiple parties. The caching is done using -# the +cache+ helper available in the Action View. See -# ActionView::Helpers::CacheHelper for more information. -# -# While it's strongly recommended that you use key-based cache -# expiration (see links in CacheHelper for more information), -# it is also possible to manually expire caches. For example: -# -# expire_fragment('name_of_cache') -# -# source://actionpack//lib/abstract_controller/caching/fragments.rb#18 -module AbstractController::Caching::Fragments - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::AbstractController::Caching::Fragments::ClassMethods - - # Given a key (as described in +expire_fragment+), returns - # a key array suitable for use in reading, writing, or expiring a - # cached fragment. All keys begin with :views, - # followed by ENV["RAILS_CACHE_ID"] or ENV["RAILS_APP_VERSION"] if set, - # followed by any controller-wide key prefix values, ending - # with the specified +key+ value. - # - # source://actionpack//lib/abstract_controller/caching/fragments.rb#68 - def combined_fragment_cache_key(key); end - - # Removes fragments from the cache. - # - # +key+ can take one of three forms: - # - # * String - This would normally take the form of a path, like - # pages/45/notes. - # * Hash - Treated as an implicit call to +url_for+, like - # { controller: 'pages', action: 'notes', id: 45} - # * Regexp - Will remove any fragment that matches, so - # %r{pages/\d*/notes} might remove all notes. Make sure you - # don't use anchors in the regex (^ or $) because - # the actual filename matched looks like - # ./cache/filename/path.cache. Note: Regexp expiration is - # only supported on caches that can iterate over all keys (unlike - # memcached). - # - # +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 - def expire_fragment(key, options = T.unsafe(nil)); end - - # Check if a cached fragment from the location signified by - # +key+ exists (see +expire_fragment+ for acceptable formats). - # - # @return [Boolean] - # - # source://actionpack//lib/abstract_controller/caching/fragments.rb#105 - def fragment_exist?(key, options = T.unsafe(nil)); end - - # source://actionpack//lib/abstract_controller/caching/fragments.rb#145 - 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 - 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 - def write_fragment(key, content, options = T.unsafe(nil)); end - - module GeneratedClassMethods - def fragment_cache_keys; end - def fragment_cache_keys=(value); end - def fragment_cache_keys?; end - end - - module GeneratedInstanceMethods - def fragment_cache_keys; end - def fragment_cache_keys=(value); end - def fragment_cache_keys?; end - end -end - -# source://actionpack//lib/abstract_controller/caching/fragments.rb#35 -module AbstractController::Caching::Fragments::ClassMethods - # Allows you to specify controller-wide key prefixes for - # cache fragments. Pass either a constant +value+, or a block - # which computes a value each time a cache key is generated. - # - # For example, you may want to prefix all fragment cache keys - # with a global version identifier, so you can easily - # invalidate all caches. - # - # class ApplicationController - # fragment_cache_key "v1" - # end - # - # When it's time to invalidate all fragments, simply change - # the string constant. Or, progressively roll out the cache - # invalidation using a computed value: - # - # class ApplicationController - # fragment_cache_key do - # @account.id.odd? ? "v1" : "v2" - # end - # end - # - # source://actionpack//lib/abstract_controller/caching/fragments.rb#57 - def fragment_cache_key(value = T.unsafe(nil), &key); end -end - -# = 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: -# -# * after_action -# * append_after_action -# * append_around_action -# * append_before_action -# * around_action -# * before_action -# * prepend_after_action -# * prepend_around_action -# * prepend_before_action -# * skip_after_action -# * skip_around_action -# * skip_before_action -# -# NOTE: Calling the same callback multiple times will overwrite previous callback definitions. -# -# source://actionpack//lib/abstract_controller/callbacks.rb#24 -module AbstractController::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 ::AbstractController::Callbacks::ClassMethods - - private - - # Override AbstractController::Base#process_action to run the - # process_action callbacks around the normal behavior. - # - # source://actionpack//lib/abstract_controller/callbacks.rb#232 - def process_action(*_arg0, **_arg1, &_arg2); end - - module GeneratedClassMethods - def __callbacks; end - def __callbacks=(value); end - def __callbacks?; end - end - - module GeneratedInstanceMethods - def __callbacks; end - def __callbacks?; end - end -end - -# source://actionpack//lib/abstract_controller/callbacks.rb#38 -class AbstractController::Callbacks::ActionFilter - # @return [ActionFilter] a new instance of ActionFilter - # - # source://actionpack//lib/abstract_controller/callbacks.rb#39 - def initialize(actions); end - - # @return [Boolean] - # - # source://actionpack//lib/abstract_controller/callbacks.rb#43 - def after(controller); end - - # @return [Boolean] - # - # source://actionpack//lib/abstract_controller/callbacks.rb#43 - def around(controller); end - - # @return [Boolean] - # - # source://actionpack//lib/abstract_controller/callbacks.rb#43 - def before(controller); end - - # @return [Boolean] - # - # source://actionpack//lib/abstract_controller/callbacks.rb#43 - def match?(controller); end -end - -# source://actionpack//lib/abstract_controller/callbacks.rb#52 -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 - # the normalization across several methods that use it. - # - # ==== Parameters - # * callbacks - An array of callbacks, with an optional - # options hash as the last parameter. - # * block - A proc that should be added to the callbacks. - # - # ==== Block Parameters - # * 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 - def _insert_callbacks(callbacks, block = T.unsafe(nil)); end - - # source://actionpack//lib/abstract_controller/callbacks.rb#77 - def _normalize_callback_option(options, from, to); end - - # If +:only+ or +:except+ are used, convert the options into the - # +:if+ and +:unless+ options of ActiveSupport::Callbacks. - # - # The basic idea is that :only => :index gets converted to - # :if => proc {|c| c.action_name == "index" }. - # - # Note that :only has priority over :if in case they - # are used together. - # - # only: :index, if: -> { true } # the :if option will be ignored. - # - # Note that :if has priority over :except in case they - # are used together. - # - # except: :index, if: -> { true } # the :except option will be ignored. - # - # ==== Options - # * 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 - def _normalize_callback_options(options); end - - # source://actionpack//lib/abstract_controller/callbacks.rb#204 - def after_action(*names, &blk); end - - # source://actionpack//lib/abstract_controller/callbacks.rb#204 - def append_after_action(*names, &blk); end - - # source://actionpack//lib/abstract_controller/callbacks.rb#204 - def append_around_action(*names, &blk); end - - # source://actionpack//lib/abstract_controller/callbacks.rb#204 - def append_before_action(*names, &blk); end - - # source://actionpack//lib/abstract_controller/callbacks.rb#204 - def around_action(*names, &blk); end - - # source://actionpack//lib/abstract_controller/callbacks.rb#204 - def before_action(*names, &blk); end - - # source://actionpack//lib/abstract_controller/callbacks.rb#210 - def prepend_after_action(*names, &blk); end - - # source://actionpack//lib/abstract_controller/callbacks.rb#210 - def prepend_around_action(*names, &blk); end - - # source://actionpack//lib/abstract_controller/callbacks.rb#210 - def prepend_before_action(*names, &blk); end - - # source://actionpack//lib/abstract_controller/callbacks.rb#218 - def skip_after_action(*names); end - - # source://actionpack//lib/abstract_controller/callbacks.rb#218 - def skip_around_action(*names); end - - # source://actionpack//lib/abstract_controller/callbacks.rb#218 - def skip_before_action(*names); end -end - -# source://actionpack//lib/abstract_controller/collector.rb#6 -module AbstractController::Collector - # source://actionpack//lib/abstract_controller/collector.rb#10 - def atom(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def bmp(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def css(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def csv(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def gif(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def gzip(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def html(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def ics(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def jpeg(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def js(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def json(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def m4a(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def mp3(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def mp4(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def mpeg(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def multipart_form(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def ogg(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def otf(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def pdf(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def png(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def rss(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def svg(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def text(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def tiff(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def ttf(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def turbo_stream(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def url_encoded_form(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def vcf(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def vtt(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def webm(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def woff(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def woff2(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def xml(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def yaml(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def zip(*args, **_arg1, &block); end - - private - - # source://actionpack//lib/abstract_controller/collector.rb#26 - def method_missing(symbol, *args, **_arg2, &block); end - - class << self - # source://actionpack//lib/abstract_controller/collector.rb#7 - def generate_method_for_mime(mime); end - end -end - -# source://actionpack//lib/abstract_controller/rendering.rb#9 -class AbstractController::DoubleRenderError < ::AbstractController::Error - # @return [DoubleRenderError] a new instance of DoubleRenderError - # - # source://actionpack//lib/abstract_controller/rendering.rb#12 - def initialize(message = T.unsafe(nil)); end -end - -# source://actionpack//lib/abstract_controller/rendering.rb#10 -AbstractController::DoubleRenderError::DEFAULT_MESSAGE = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/abstract_controller/error.rb#4 -class AbstractController::Error < ::StandardError; end - -# source://actionpack//lib/abstract_controller/helpers.rb#7 -module AbstractController::Helpers - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::AbstractController::Helpers::ClassMethods - - # source://actionpack//lib/abstract_controller/helpers.rb#40 - def _helpers; end - - module GeneratedClassMethods - def _helper_methods; end - def _helper_methods=(value); end - def _helper_methods?; end - end - - module GeneratedInstanceMethods - def _helper_methods; end - def _helper_methods=(value); end - def _helper_methods?; end - end -end - -# source://actionpack//lib/abstract_controller/helpers.rb#44 -module AbstractController::Helpers::ClassMethods - # Sets the attribute _helpers - # - # @param value the value to set the attribute _helpers to. - # - # source://actionpack//lib/abstract_controller/helpers.rb#56 - def _helpers=(_arg0); end - - # source://actionpack//lib/abstract_controller/helpers.rb#184 - 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#158 - def clear_helpers; end - - # Includes the given modules in the template class. - # - # Modules can be specified in different ways. All of the following calls - # include +FooHelper+: - # - # # Module, recommended. - # helper FooHelper - # - # # String/symbol without the "helper" suffix, camel or snake case. - # helper "Foo" - # helper :Foo - # helper "foo" - # helper :foo - # - # The last two assume that "foo".camelize returns "Foo". - # - # When strings or symbols are passed, the method finds the actual module - # object using String#constantize. Therefore, if the module has not been - # yet loaded, it has to be autoloadable, which is normally the case. - # - # Namespaces are supported. The following calls include +Foo::BarHelper+: - # - # # Module, recommended. - # helper Foo::BarHelper - # - # # String/symbol without the "helper" suffix, camel or snake case. - # helper "Foo::Bar" - # helper :"Foo::Bar" - # helper "foo/bar" - # helper :"foo/bar" - # - # The last two assume that "foo/bar".camelize returns "Foo::Bar". - # - # The method accepts a block too. If present, the block is evaluated in - # the context of the controller helper module. This simple call makes the - # +wadus+ method available in templates of the enclosing controller: - # - # helper do - # def wadus - # "wadus" - # end - # end - # - # Furthermore, all the above styles can be mixed together: - # - # helper FooHelper, "woo", "bar/baz" do - # def wadus - # "wadus" - # end - # end - # - # source://actionpack//lib/abstract_controller/helpers.rb#147 - def helper(*args, &block); end - - # Declare a controller method as a helper. For example, the following - # makes the +current_user+ and +logged_in?+ controller methods available - # to the view: - # class ApplicationController < ActionController::Base - # helper_method :current_user, :logged_in? - # - # def current_user - # @current_user ||= User::User.find_by(id: session[:user]) - # end - # - # def logged_in? - # current_user != nil - # end - # end - # - # In a view: - # <% if logged_in? -%>Welcome, <%= current_user.name %><% end -%> - # - # ==== Parameters - # * 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#79 - 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 - 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#169 - def modules_for_helpers(modules_or_helper_prefixes); end - - private - - # source://actionpack//lib/abstract_controller/helpers.rb#203 - def default_helper_module!; end - - # source://actionpack//lib/abstract_controller/helpers.rb#192 - 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 - def initialize(error, path); end -end - -# source://actionpack//lib/abstract_controller/logger.rb#6 -module AbstractController::Logger - extend ::ActiveSupport::Concern - include ::ActiveSupport::Benchmarkable -end - -# source://actionpack//lib/abstract_controller/railties/routes_helpers.rb#6 -module AbstractController::Railties; end - -# source://actionpack//lib/abstract_controller/railties/routes_helpers.rb#7 -module AbstractController::Railties::RoutesHelpers - class << self - # source://actionpack//lib/abstract_controller/railties/routes_helpers.rb#8 - def with(routes, include_path_helpers = T.unsafe(nil)); end - end -end - -# source://actionpack//lib/abstract_controller/rendering.rb#17 -module AbstractController::Rendering - extend ::ActiveSupport::Concern - include ::ActionView::ViewPaths - - mixes_in_class_methods ::ActionView::ViewPaths::ClassMethods - - # Normalizes arguments, options and then delegates render_to_body and - # sticks the result in self.response_body. - # - # source://actionpack//lib/abstract_controller/rendering.rb#23 - def render(*args, &block); end - - # Performs the actual template rendering. - # - # source://actionpack//lib/abstract_controller/rendering.rb#51 - def render_to_body(options = T.unsafe(nil)); end - - # Raw rendering of a template to a string. - # - # It is similar to render, except that it does not - # set the +response_body+ and it should be guaranteed - # to always return a string. - # - # If a component extends the semantics of +response_body+ - # (as ActionController extends it to be anything that - # responds to the method each), this method needs to be - # overridden in order to still return a string. - # - # source://actionpack//lib/abstract_controller/rendering.rb#45 - def render_to_string(*args, &block); end - - # Returns Content-Type of rendered content. - # - # source://actionpack//lib/abstract_controller/rendering.rb#55 - def rendered_format; end - - # This method should return a hash with assigns. - # You can overwrite this configuration per controller. - # - # source://actionpack//lib/abstract_controller/rendering.rb#63 - def view_assigns; end - - private - - # Normalize args by converting render "foo" to - # render :action => "foo" and render "foo/bar" to - # render :file => "foo/bar". - # - # source://actionpack//lib/abstract_controller/rendering.rb#75 - def _normalize_args(action = T.unsafe(nil), options = T.unsafe(nil)); end - - # Normalize options. - # - # source://actionpack//lib/abstract_controller/rendering.rb#90 - def _normalize_options(options); end - - # Normalize args and options. - # - # source://actionpack//lib/abstract_controller/rendering.rb#116 - def _normalize_render(*args, &block); end - - # Process the rendered format. - # - # source://actionpack//lib/abstract_controller/rendering.rb#100 - def _process_format(format); end - - # Process extra options. - # - # source://actionpack//lib/abstract_controller/rendering.rb#95 - def _process_options(options); end - - # source://actionpack//lib/abstract_controller/rendering.rb#103 - def _process_variant(options); end - - # source://actionpack//lib/abstract_controller/rendering.rb#123 - def _protected_ivars; end - - # source://actionpack//lib/abstract_controller/rendering.rb#106 - def _set_html_content_type; end - - # source://actionpack//lib/abstract_controller/rendering.rb#112 - def _set_rendered_content_type(format); end - - # source://actionpack//lib/abstract_controller/rendering.rb#109 - def _set_vary_header; end -end - -# source://actionpack//lib/abstract_controller/rendering.rb#59 -AbstractController::Rendering::DEFAULT_PROTECTED_INSTANCE_VARIABLES = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/abstract_controller/translation.rb#6 -module AbstractController::Translation - # Delegates to I18n.localize. Also aliased as l. - # - # source://actionpack//lib/abstract_controller/translation.rb#33 - def l(object, **options); end - - # Delegates to I18n.localize. Also aliased as l. - # - # source://actionpack//lib/abstract_controller/translation.rb#33 - 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. Also aliased as t. - # - # When the given key starts with a period, it will be scoped by the current - # controller and action. So if you call translate(".foo") from - # PeopleController#index, it will convert the call to - # I18n.translate("people.index.foo"). This makes it less repetitive - # 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 - def t(key, **options); end - - # Delegates to I18n.translate. Also aliased as t. - # - # When the given key starts with a period, it will be scoped by the current - # controller and action. So if you call translate(".foo") from - # PeopleController#index, it will convert the call to - # I18n.translate("people.index.foo"). This makes it less repetitive - # 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 - 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 - -# 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. -# -# 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 -module AbstractController::UrlFor - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - include ::ActionDispatch::Routing::UrlFor - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::AbstractController::UrlFor::ClassMethods - - # source://actionpack//lib/abstract_controller/url_for.rb#14 - def _routes; end - - module GeneratedClassMethods - def default_url_options; end - def default_url_options=(value); end - def default_url_options?; end - end - - module GeneratedInstanceMethods - def default_url_options; end - def default_url_options=(value); end - def default_url_options?; end - end -end - -# source://actionpack//lib/abstract_controller/url_for.rb#19 -module AbstractController::UrlFor::ClassMethods - # source://actionpack//lib/abstract_controller/url_for.rb#20 - def _routes; end - - # source://actionpack//lib/abstract_controller/url_for.rb#24 - def action_methods; end -end - -# source://actionpack//lib/action_controller/metal/strong_parameters.rb#13 -module ActionController - extend ::ActiveSupport::Autoload - - class << self - # See Renderers.add - # - # source://actionpack//lib/action_controller/metal/renderers.rb#7 - def add_renderer(key, &block); end - - # See Renderers.remove - # - # source://actionpack//lib/action_controller/metal/renderers.rb#12 - def remove_renderer(key); end - end -end - -# 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 -# features that you need for API only applications. -# -# An API Controller is different from a normal controller in the sense that -# by default it doesn't include a number of features that are usually required -# by browser access only: layouts and templates rendering, -# flash, assets, and so on. This makes the entire controller stack thinner, -# suitable for API applications. It doesn't mean you won't have such -# features if you need them: they're all available for you to include in -# 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 -# +ApplicationController+. -# -# A sample controller could look like this: -# -# class PostsController < ApplicationController -# def index -# posts = Post.all -# render json: posts -# end -# end -# -# Request, response, and parameters objects all work the exact same way as -# ActionController::Base. -# -# == Renders -# -# The default API Controller stack includes all renderers, which means you -# can use render :json and siblings freely in your controllers. Keep -# in mind that templates are not going to be rendered, so you need to ensure -# your controller is calling either render or redirect_to in -# all actions, otherwise it will return 204 No Content. -# -# def show -# post = Post.find(params[:id]) -# render json: post -# end -# -# == Redirects -# -# Redirects are used to move from one action to another. You can use the -# redirect_to method in your controllers in the same way as in -# ActionController::Base. For example: -# -# def create -# redirect_to root_url and return if not_authorized? -# # do stuff here -# end -# -# == Adding New Behavior -# -# 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 -# 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 -# application: -# -# class ApplicationController < ActionController::API -# include ActionController::MimeResponds -# end -# -# class PostsController < ApplicationController -# def index -# posts = Post.all -# -# respond_to do |format| -# format.json { render json: posts } -# format.xml { render xml: posts } -# end -# end -# 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. -# -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://actionpack//lib/action_controller/api.rb#89 -class ActionController::API < ::ActionController::Metal - include ::ActionView::ViewPaths - include ::AbstractController::Rendering - include ::ActionDispatch::Routing::PolymorphicRoutes - include ::ActionDispatch::Routing::UrlFor - include ::AbstractController::UrlFor - include ::ActionController::UrlFor - include ::AbstractController::Logger - include ::ActiveSupport::Benchmarkable - include ::ActionController::Redirecting - include ::ActionController::ApiRendering - include ::ActionController::Rendering - include ::ActionController::Renderers - include ::ActionController::Renderers::All - include ::ActionController::Head - include ::ActionController::ConditionalGet - include ::ActionController::BasicImplicitRender - include ::ActionController::StrongParameters - include ::ActionController::DataStreaming - include ::ActionController::DefaultHeaders - include ::ActionController::Logging - include ::ActiveSupport::Callbacks - include ::AbstractController::Callbacks - include ::ActiveSupport::Rescuable - include ::ActionController::Rescue - include ::ActionController::Instrumentation - include ::ActionController::ParamsWrapper - extend ::ActionView::ViewPaths::ClassMethods - extend ::AbstractController::UrlFor::ClassMethods - extend ::ActionController::Rendering::ClassMethods - extend ::ActionController::Renderers::ClassMethods - extend ::ActionController::ConditionalGet::ClassMethods - extend ::ActionController::DefaultHeaders::ClassMethods - extend ::ActionController::Logging::ClassMethods - extend ::ActiveSupport::Callbacks::ClassMethods - extend ::AbstractController::Callbacks::ClassMethods - extend ::ActiveSupport::Rescuable::ClassMethods - extend ::ActionController::Instrumentation::ClassMethods - extend ::ActionController::ParamsWrapper::ClassMethods - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#940 - def _process_action_callbacks; end - - # source://actionpack//lib/action_controller/metal/renderers.rb#31 - def _renderers; end - - # source://actionpack//lib/action_controller/metal/renderers.rb#31 - def _renderers=(_arg0); end - - # source://actionpack//lib/action_controller/metal/renderers.rb#31 - def _renderers?; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#928 - def _run_process_action_callbacks(&block); end - - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 - def _wrapper_options; end - - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 - def _wrapper_options=(_arg0); end - - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 - def _wrapper_options?; end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options; end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options=(_arg0); end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options?; end - - # source://actionpack//lib/action_controller/metal/conditional_get.rb#13 - def etaggers; end - - # source://actionpack//lib/action_controller/metal/conditional_get.rb#13 - def etaggers=(_arg0); end - - # source://actionpack//lib/action_controller/metal/conditional_get.rb#13 - def etaggers?; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def logger; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def logger=(value); end - - # source://actionpack//lib/action_controller/metal/redirecting.rb#13 - def raise_on_open_redirects; end - - # source://actionpack//lib/action_controller/metal/redirecting.rb#13 - def raise_on_open_redirects=(val); end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers; end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers=(_arg0); end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers?; end - - class << self - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#932 - def _process_action_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#936 - def _process_action_callbacks=(value); end - - # source://actionpack//lib/action_controller/metal/renderers.rb#31 - def _renderers; end - - # source://actionpack//lib/action_controller/metal/renderers.rb#31 - def _renderers=(value); end - - # source://actionpack//lib/action_controller/metal/renderers.rb#31 - def _renderers?; end - - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 - def _wrapper_options; end - - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 - def _wrapper_options=(value); end - - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 - def _wrapper_options?; end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options; end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options=(value); end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options?; end - - # source://actionpack//lib/action_controller/metal/conditional_get.rb#13 - def etaggers; end - - # source://actionpack//lib/action_controller/metal/conditional_get.rb#13 - def etaggers=(value); end - - # source://actionpack//lib/action_controller/metal/conditional_get.rb#13 - def etaggers?; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def logger; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def logger=(value); end - - # source://actionpack//lib/action_controller/metal.rb#210 - def middleware_stack; end - - # source://actionpack//lib/action_controller/metal/redirecting.rb#13 - def raise_on_open_redirects; end - - # source://actionpack//lib/action_controller/metal/redirecting.rb#13 - def raise_on_open_redirects=(val); end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers; end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers?; end - - # Shortcut helper that returns all the ActionController::API modules except - # the ones passed as arguments: - # - # class MyAPIBaseController < ActionController::Metal - # ActionController::API.without_modules(:UrlFor).each do |left| - # include left - # end - # end - # - # This gives better control over what you want to exclude and makes it easier - # to create an API controller class, instead of listing the modules required - # manually. - # - # source://actionpack//lib/action_controller/api.rb#104 - def without_modules(*modules); end - end -end - -# source://actionpack//lib/action_controller/api.rb#112 -ActionController::API::MODULES = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_controller/metal/exceptions.rb#4 -class ActionController::ActionControllerError < ::StandardError; end - -# source://actionpack//lib/action_controller/api/api_rendering.rb#4 -module ActionController::ApiRendering - extend ::ActiveSupport::Concern - include ::ActionController::Rendering - - mixes_in_class_methods ::ActionController::Rendering::ClassMethods - - # source://actionpack//lib/action_controller/api/api_rendering.rb#11 - def render_to_body(options = T.unsafe(nil)); end -end - -# source://actionpack//lib/action_controller/metal/exceptions.rb#7 -class ActionController::BadRequest < ::ActionController::ActionControllerError - # @return [BadRequest] a new instance of BadRequest - # - # source://actionpack//lib/action_controller/metal/exceptions.rb#8 - def initialize(msg = T.unsafe(nil)); end -end - -# 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 -# controllers inherit from ApplicationController. This gives you one class to configure things such as -# request forgery protection and filtering of sensitive request parameters. -# -# A sample controller could look like this: -# -# class PostsController < ApplicationController -# def index -# @posts = Post.all -# end -# -# def create -# @post = Post.create params[:post] -# redirect_to posts_path -# end -# end -# -# Actions, by default, render a template in the app/views directory corresponding to the name of the controller and action -# after executing code in the action. For example, the +index+ action of the PostsController would render the -# template app/views/posts/index.html.erb by default after populating the @posts instance variable. -# -# Unlike index, the create action will not render a template. After performing its main purpose (creating a -# new post), it initiates a redirect instead. This redirect works by returning an external -# 302 Moved HTTP response that takes the user to the index action. -# -# These two methods represent the two basic action archetypes used in Action Controllers: Get-and-show and do-and-redirect. -# Most actions are variations on these themes. -# -# == Requests -# -# For every request, the router determines the value of the +controller+ and +action+ keys. These determine which controller -# and action are called. The remaining request parameters, the session (if one is available), and the full request with -# all the HTTP headers are made available to the action through accessor methods. Then the action is performed. -# -# The full request object is available via the request accessor and is primarily used to query for HTTP headers: -# -# def server_ip -# location = request.env["REMOTE_ADDR"] -# render plain: "This server hosted at #{location}" -# end -# -# == Parameters -# -# All request parameters, whether they come from a query string in the URL or form data submitted through a POST request are -# available through the params method which returns a hash. For example, an action that was performed through -# /posts?category=All&limit=5 will include { "category" => "All", "limit" => "5" } in params. -# -# It's also possible to construct multi-dimensional parameter hashes by specifying keys using brackets, such as: -# -# -# -# -# A request coming from a form holding these inputs will include { "post" => { "name" => "david", "address" => "hyacintvej" } }. -# If the address input had been named post[address][street], the params would have included -# { "post" => { "address" => { "street" => "hyacintvej" } } }. There's no limit to the depth of the nesting. -# -# == Sessions -# -# Sessions allow you to store objects in between requests. This is useful for objects that are not yet ready to be persisted, -# such as a Signup object constructed in a multi-paged process, or objects that don't change much and are needed all the time, such -# as a User object for a system that requires login. The session should not be used, however, as a cache for objects where it's likely -# they could be changed unknowingly. It's usually too much work to keep it all synchronized -- something databases already excel at. -# -# You can place objects in the session by using the session method, which accesses a hash: -# -# session[:person] = Person.authenticate(user_name, password) -# -# You can retrieve it again through the same hash: -# -# "Hello #{session[:person]}" -# -# For removing objects from the session, you can either assign a single key to +nil+: -# -# # removes :person from session -# session[:person] = nil -# -# or you can remove the entire session with +reset_session+. -# -# By default, sessions are stored in an encrypted browser cookie (see -# ActionDispatch::Session::CookieStore). Thus the user will not be able to -# read or edit the session data. However, the user can keep a copy of the -# cookie even after it has expired, so you should avoid storing sensitive -# information in cookie-based sessions. -# -# == Responses -# -# Each action results in a response, which holds the headers and document to be sent to the user's browser. The actual response -# object is generated automatically through the use of renders and redirects and requires no user intervention. -# -# == Renders -# -# Action Controller sends content to the user by using one of five rendering methods. The most versatile and common is the rendering -# of a template. Included in the Action Pack is the Action View, which enables rendering of ERB templates. It's automatically configured. -# The controller passes objects to the view by assigning instance variables: -# -# def show -# @post = Post.find(params[:id]) -# end -# -# Which are then automatically available to the view: -# -# Title: <%= @post.title %> -# -# You don't have to rely on the automated rendering. For example, actions that could result in the rendering of different templates -# will use the manual rendering methods: -# -# def search -# @results = Search.find(params[:query]) -# case @results.count -# when 0 then render action: "no_results" -# when 1 then render action: "show" -# when 2..10 then render action: "show_many" -# end -# end -# -# Read more about writing ERB and Builder templates in ActionView::Base. -# -# == Redirects -# -# Redirects are used to move from one action to another. For example, after a create action, which stores a blog entry to the -# database, we might like to show the user the new entry. Because we're following good DRY principles (Don't Repeat Yourself), we're -# going to reuse (and redirect to) a show action that we'll assume has already been created. The code might look like this: -# -# def create -# @entry = Entry.new(params[:entry]) -# if @entry.save -# # The entry was saved correctly, redirect to show -# redirect_to action: 'show', id: @entry.id -# else -# # things didn't go so well, do something else -# end -# end -# -# In this case, after saving our new entry to the database, the user is redirected to the show method, which is then executed. -# Note that this is an external HTTP-level redirection which will cause the browser to make a second request (a GET to the show action), -# and not some internal re-routing which calls both "create" and then "show" within one request. -# -# Learn more about redirect_to and what options you have in ActionController::Redirecting. -# -# == Calling multiple redirects or renders -# -# An action may contain only a single render or a single redirect. Attempting to try to do either again will result in a DoubleRenderError: -# -# def do_something -# redirect_to action: "elsewhere" -# render action: "overthere" # raises DoubleRenderError -# end -# -# If you need to redirect on the condition of something, then be sure to add "and return" to halt execution. -# -# def do_something -# redirect_to(action: "elsewhere") and return if monkeys.nil? -# render action: "overthere" # won't be called if monkeys is nil -# end -# -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://actionpack//lib/action_controller/base.rb#167 -class ActionController::Base < ::ActionController::Metal - include ::ActionView::ViewPaths - include ::AbstractController::Rendering - include ::AbstractController::Translation - include ::AbstractController::AssetPaths - include ::AbstractController::Helpers - include ::ActionController::Helpers - include ::ActionDispatch::Routing::PolymorphicRoutes - include ::ActionDispatch::Routing::UrlFor - include ::AbstractController::UrlFor - include ::ActionController::UrlFor - include ::AbstractController::Logger - include ::ActiveSupport::Benchmarkable - include ::ActionController::Redirecting - include ::ActionView::Rendering - include ::ActionView::Layouts - include ::ActionController::Rendering - include ::ActionController::Renderers - include ::ActionController::Renderers::All - include ::ActionController::Head - include ::ActionController::ConditionalGet - include ::ActionController::EtagWithTemplateDigest - include ::ActionController::EtagWithFlash - include ::ActionController::Caching - include ::AbstractController::Caching::Fragments - include ::AbstractController::Caching::ConfigMethods - include ::AbstractController::Caching - include ::ActionController::MimeResponds - include ::ActionController::BasicImplicitRender - include ::ActionController::ImplicitRender - include ::ActionController::StrongParameters - include ::ActionController::ParameterEncoding - include ::ActionController::Cookies - include ::ActionController::Flash - include ::ActionController::FormBuilder - include ::ActiveSupport::Callbacks - include ::AbstractController::Callbacks - include ::ActionController::RequestForgeryProtection - include ::ActionController::ContentSecurityPolicy - include ::ActionController::PermissionsPolicy - include ::ActionController::Streaming - include ::ActionController::DataStreaming - include ::ActionController::HttpAuthentication::Basic::ControllerMethods - include ::ActionController::HttpAuthentication::Digest::ControllerMethods - include ::ActionController::HttpAuthentication::Token::ControllerMethods - include ::ActionController::DefaultHeaders - include ::ActionController::Logging - include ::ActiveSupport::Rescuable - include ::ActionController::Rescue - include ::ActionController::Instrumentation - include ::ActionController::ParamsWrapper - include ::Turbo::Native::Navigation - include ::Turbo::Frames::FrameRequest - include ::Turbo::Streams::TurboStreamsTagBuilder - extend ::ActionView::ViewPaths::ClassMethods - extend ::AbstractController::Helpers::ClassMethods - extend ::ActionController::Helpers::ClassMethods - extend ::AbstractController::UrlFor::ClassMethods - extend ::ActionView::Rendering::ClassMethods - extend ::ActionView::Layouts::ClassMethods - extend ::ActionController::Rendering::ClassMethods - extend ::ActionController::Renderers::ClassMethods - extend ::ActionController::ConditionalGet::ClassMethods - extend ::AbstractController::Caching::Fragments::ClassMethods - extend ::AbstractController::Caching::ClassMethods - extend ::AbstractController::Caching::ConfigMethods - extend ::ActionController::ParameterEncoding::ClassMethods - extend ::ActionController::Flash::ClassMethods - extend ::ActionController::FormBuilder::ClassMethods - extend ::ActiveSupport::Callbacks::ClassMethods - extend ::AbstractController::Callbacks::ClassMethods - extend ::ActionController::RequestForgeryProtection::ClassMethods - extend ::ActionController::ContentSecurityPolicy::ClassMethods - extend ::ActionController::PermissionsPolicy::ClassMethods - extend ::ActionController::HttpAuthentication::Basic::ControllerMethods::ClassMethods - extend ::ActionController::DefaultHeaders::ClassMethods - extend ::ActionController::Logging::ClassMethods - extend ::ActiveSupport::Rescuable::ClassMethods - extend ::ActionController::Instrumentation::ClassMethods - extend ::ActionController::ParamsWrapper::ClassMethods - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://actionpack//lib/abstract_controller/helpers.rb#11 - def _helper_methods; end - - # source://actionpack//lib/abstract_controller/helpers.rb#11 - def _helper_methods=(_arg0); end - - # source://actionpack//lib/abstract_controller/helpers.rb#11 - def _helper_methods?; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#940 - def _process_action_callbacks; end - - # source://actionpack//lib/action_controller/metal/renderers.rb#31 - def _renderers; end - - # source://actionpack//lib/action_controller/metal/renderers.rb#31 - def _renderers=(_arg0); end - - # source://actionpack//lib/action_controller/metal/renderers.rb#31 - def _renderers?; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#928 - def _run_process_action_callbacks(&block); end - - # source://actionpack//lib/abstract_controller/caching.rb#42 - def _view_cache_dependencies; end - - # source://actionpack//lib/abstract_controller/caching.rb#42 - def _view_cache_dependencies=(_arg0); end - - # source://actionpack//lib/abstract_controller/caching.rb#42 - def _view_cache_dependencies?; end - - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 - def _wrapper_options; end - - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 - def _wrapper_options=(_arg0); end - - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 - def _wrapper_options?; end - - # source://actionpack//lib/action_controller/metal/flash.rb#36 - def alert; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def allow_forgery_protection; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def allow_forgery_protection=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def asset_host; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def asset_host=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def assets_dir; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def assets_dir=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def default_asset_host_protocol; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def default_asset_host_protocol=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def default_protect_from_forgery; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def default_protect_from_forgery=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def default_static_extension; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def default_static_extension=(value); end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options; end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options=(_arg0); end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options?; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def enable_fragment_cache_logging; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def enable_fragment_cache_logging=(value); end - - # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#27 - def etag_with_template_digest; end - - # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#27 - def etag_with_template_digest=(_arg0); end - - # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#27 - def etag_with_template_digest?; end - - # source://actionpack//lib/action_controller/metal/conditional_get.rb#13 - def etaggers; end - - # source://actionpack//lib/action_controller/metal/conditional_get.rb#13 - def etaggers=(_arg0); end - - # source://actionpack//lib/action_controller/metal/conditional_get.rb#13 - def etaggers?; end - - # source://actionpack//lib/action_controller/metal/flash.rb#10 - def flash(*_arg0, **_arg1, &_arg2); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def forgery_protection_origin_check; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def forgery_protection_origin_check=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def forgery_protection_strategy; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def forgery_protection_strategy=(value); end - - # source://actionpack//lib/abstract_controller/caching/fragments.rb#23 - def fragment_cache_keys; end - - # source://actionpack//lib/abstract_controller/caching/fragments.rb#23 - def fragment_cache_keys=(_arg0); end - - # source://actionpack//lib/abstract_controller/caching/fragments.rb#23 - def fragment_cache_keys?; end - - # source://actionpack//lib/action_controller/metal/helpers.rb#63 - def helpers_path; end - - # source://actionpack//lib/action_controller/metal/helpers.rb#63 - def helpers_path=(_arg0); end - - # source://actionpack//lib/action_controller/metal/helpers.rb#63 - def helpers_path?; end - - # source://actionpack//lib/action_controller/metal/helpers.rb#64 - def include_all_helpers; end - - # source://actionpack//lib/action_controller/metal/helpers.rb#64 - def include_all_helpers=(_arg0); end - - # source://actionpack//lib/action_controller/metal/helpers.rb#64 - def include_all_helpers?; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def javascripts_dir; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def javascripts_dir=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def log_warning_on_csrf_failure; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def log_warning_on_csrf_failure=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def logger; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def logger=(value); end - - # source://actionpack//lib/action_controller/metal/flash.rb#36 - def notice; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def per_form_csrf_tokens; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def per_form_csrf_tokens=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def perform_caching; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def perform_caching=(value); end - - # source://actionpack//lib/action_controller/metal/redirecting.rb#13 - def raise_on_open_redirects; end - - # source://actionpack//lib/action_controller/metal/redirecting.rb#13 - def raise_on_open_redirects=(val); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def relative_url_root; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def relative_url_root=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def request_forgery_protection_token; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def request_forgery_protection_token=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers; end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers=(_arg0); end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers?; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def stylesheets_dir; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def stylesheets_dir=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def urlsafe_csrf_tokens; end - - private - - # source://actionview/7.0.4.2/lib/action_view/layouts.rb#328 - def _layout(lookup_context, formats); end - - def _layout_from_proc; end - - # source://actionpack//lib/action_controller/base.rb#266 - def _protected_ivars; end - - class << self - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://actionpack//lib/action_controller/form_builder.rb#31 - def _default_form_builder; end - - # source://actionpack//lib/action_controller/form_builder.rb#31 - def _default_form_builder=(value); end - - # source://actionpack//lib/action_controller/form_builder.rb#31 - def _default_form_builder?; end - - # source://actionpack//lib/action_controller/metal/flash.rb#8 - def _flash_types; end - - # source://actionpack//lib/action_controller/metal/flash.rb#8 - def _flash_types=(value); end - - # source://actionpack//lib/action_controller/metal/flash.rb#8 - def _flash_types?; end - - # source://actionpack//lib/abstract_controller/helpers.rb#11 - def _helper_methods; end - - # source://actionpack//lib/abstract_controller/helpers.rb#11 - def _helper_methods=(value); end - - # source://actionpack//lib/abstract_controller/helpers.rb#11 - def _helper_methods?; end - - # source://actionpack//lib/abstract_controller/helpers.rb#15 - def _helpers; end - - # source://actionview/7.0.4.2/lib/action_view/layouts.rb#209 - def _layout; end - - # source://actionview/7.0.4.2/lib/action_view/layouts.rb#209 - def _layout=(value); end - - # source://actionview/7.0.4.2/lib/action_view/layouts.rb#209 - def _layout?; end - - # source://actionview/7.0.4.2/lib/action_view/layouts.rb#210 - def _layout_conditions; end - - # source://actionview/7.0.4.2/lib/action_view/layouts.rb#210 - def _layout_conditions=(value); end - - # source://actionview/7.0.4.2/lib/action_view/layouts.rb#210 - def _layout_conditions?; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#932 - def _process_action_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#936 - def _process_action_callbacks=(value); end - - # source://actionpack//lib/action_controller/metal/renderers.rb#31 - def _renderers; end - - # source://actionpack//lib/action_controller/metal/renderers.rb#31 - def _renderers=(value); end - - # source://actionpack//lib/action_controller/metal/renderers.rb#31 - def _renderers?; end - - # source://actionpack//lib/abstract_controller/caching.rb#42 - def _view_cache_dependencies; end - - # source://actionpack//lib/abstract_controller/caching.rb#42 - def _view_cache_dependencies=(value); end - - # source://actionpack//lib/abstract_controller/caching.rb#42 - def _view_cache_dependencies?; end - - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 - def _wrapper_options; end - - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 - def _wrapper_options=(value); end - - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 - def _wrapper_options?; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def allow_forgery_protection; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def allow_forgery_protection=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def asset_host; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def asset_host=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def assets_dir; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def assets_dir=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def default_asset_host_protocol; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def default_asset_host_protocol=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def default_protect_from_forgery; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def default_protect_from_forgery=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def default_static_extension; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def default_static_extension=(value); end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options; end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options=(value); end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options?; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def enable_fragment_cache_logging; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def enable_fragment_cache_logging=(value); end - - # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#27 - def etag_with_template_digest; end - - # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#27 - def etag_with_template_digest=(value); end - - # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#27 - def etag_with_template_digest?; end - - # source://actionpack//lib/action_controller/metal/conditional_get.rb#13 - def etaggers; end - - # source://actionpack//lib/action_controller/metal/conditional_get.rb#13 - def etaggers=(value); end - - # source://actionpack//lib/action_controller/metal/conditional_get.rb#13 - def etaggers?; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def forgery_protection_origin_check; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def forgery_protection_origin_check=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def forgery_protection_strategy; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def forgery_protection_strategy=(value); end - - # source://actionpack//lib/abstract_controller/caching/fragments.rb#23 - def fragment_cache_keys; end - - # source://actionpack//lib/abstract_controller/caching/fragments.rb#23 - def fragment_cache_keys=(value); end - - # source://actionpack//lib/abstract_controller/caching/fragments.rb#23 - def fragment_cache_keys?; end - - # source://actionpack//lib/action_controller/metal/helpers.rb#63 - def helpers_path; end - - # source://actionpack//lib/action_controller/metal/helpers.rb#63 - def helpers_path=(value); end - - # source://actionpack//lib/action_controller/metal/helpers.rb#63 - def helpers_path?; end - - # source://actionpack//lib/action_controller/metal/helpers.rb#64 - def include_all_helpers; end - - # source://actionpack//lib/action_controller/metal/helpers.rb#64 - def include_all_helpers=(value); end - - # source://actionpack//lib/action_controller/metal/helpers.rb#64 - def include_all_helpers?; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def javascripts_dir; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def javascripts_dir=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def log_warning_on_csrf_failure; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def log_warning_on_csrf_failure=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def logger; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def logger=(value); end - - # source://actionpack//lib/action_controller/metal.rb#210 - def middleware_stack; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def per_form_csrf_tokens; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def per_form_csrf_tokens=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def perform_caching; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def perform_caching=(value); end - - # source://actionpack//lib/action_controller/metal/redirecting.rb#13 - def raise_on_open_redirects; end - - # source://actionpack//lib/action_controller/metal/redirecting.rb#13 - def raise_on_open_redirects=(val); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def relative_url_root; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def relative_url_root=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def request_forgery_protection_token; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def request_forgery_protection_token=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers; end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers?; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def stylesheets_dir; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def stylesheets_dir=(value); end - - # source://activesupport/7.0.4.2/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: - # - # class MyBaseController < ActionController::Metal - # ActionController::Base.without_modules(:ParamsWrapper, :Streaming).each do |left| - # include left - # end - # end - # - # This gives better control over what you want to exclude and makes it - # easier to create a bare controller class, instead of listing the modules - # required manually. - # - # source://actionpack//lib/action_controller/base.rb#198 - def without_modules(*modules); end - end -end - -# source://actionpack//lib/action_controller/base.rb#0 -module ActionController::Base::HelperMethods - include ::ActionText::ContentHelper - include ::ActionText::TagHelper - include ::Importmap::ImportmapTagsHelper - include ::Turbo::DriveHelper - include ::Turbo::FramesHelper - include ::Turbo::IncludesHelper - include ::Turbo::StreamsHelper - include ::ActionView::Helpers::CaptureHelper - include ::ActionView::Helpers::OutputSafetyHelper - include ::ActionView::Helpers::TagHelper - include ::Turbo::Streams::ActionHelper - - # source://actionpack//lib/action_controller/metal/flash.rb#39 - def alert(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/caching/fragments.rb#31 - def combined_fragment_cache_key(*args, **_arg1, &block); end - - # source://actionpack//lib/action_controller/metal/content_security_policy.rb#11 - def content_security_policy?(*args, **_arg1, &block); end - - # source://actionpack//lib/action_controller/metal/content_security_policy.rb#12 - def content_security_policy_nonce(*args, **_arg1, &block); end - - # 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 - 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 - 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 -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 -ActionController::Base::PROTECTED_IVARS = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_controller/metal/basic_implicit_render.rb#4 -module ActionController::BasicImplicitRender - # source://actionpack//lib/action_controller/metal/basic_implicit_render.rb#9 - def default_render; end - - # source://actionpack//lib/action_controller/metal/basic_implicit_render.rb#5 - def send_action(method, *args); end -end - -# \Caching is a cheap way of speeding up slow applications by keeping the result of -# calculations, renderings, and database calls around for subsequent requests. -# -# You can read more about each approach by clicking the modules below. -# -# Note: To turn off all caching provided by Action Controller, set -# config.action_controller.perform_caching = false -# -# == \Caching stores -# -# All the caching stores from ActiveSupport::Cache are available to be used as backends -# for Action Controller caching. -# -# Configuration examples (FileStore is the default): -# -# config.action_controller.cache_store = :memory_store -# config.action_controller.cache_store = :file_store, '/path/to/cache/directory' -# config.action_controller.cache_store = :mem_cache_store, 'localhost' -# 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 -module ActionController::Caching - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - include ::AbstractController::Caching::Fragments - include ::AbstractController::Caching - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::AbstractController::Caching::Fragments::ClassMethods - mixes_in_class_methods ::AbstractController::Caching::ClassMethods - mixes_in_class_methods ::AbstractController::Caching::ConfigMethods - - private - - # source://actionpack//lib/action_controller/caching.rb#40 - def instrument_name; end - - # source://actionpack//lib/action_controller/caching.rb#32 - def instrument_payload(key); end - - module GeneratedClassMethods - def _view_cache_dependencies; end - def _view_cache_dependencies=(value); end - def _view_cache_dependencies?; end - def fragment_cache_keys; end - def fragment_cache_keys=(value); end - def fragment_cache_keys?; end - end - - module GeneratedInstanceMethods - def _view_cache_dependencies; end - def _view_cache_dependencies=(value); end - def _view_cache_dependencies?; end - def fragment_cache_keys; end - def fragment_cache_keys=(value); end - def fragment_cache_keys?; end - end -end - -# source://actionpack//lib/action_controller/metal/conditional_get.rb#7 -module ActionController::ConditionalGet - include ::ActionController::Head - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActionController::ConditionalGet::ClassMethods - - # Sets an HTTP 1.1 Cache-Control header. Defaults to issuing a +private+ - # instruction, so that intermediate caches must not cache the response. - # - # expires_in 20.minutes - # expires_in 3.hours, public: true - # expires_in 3.hours, public: true, must_revalidate: true - # - # This method will overwrite an existing Cache-Control header. - # See https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html for more possibilities. - # - # HTTP Cache-Control Extensions for Stale Content. See https://tools.ietf.org/html/rfc5861 - # It helps to cache an asset and serve it while is being revalidated and/or returning with an error. - # - # expires_in 3.hours, public: true, stale_while_revalidate: 60.seconds - # expires_in 3.hours, public: true, stale_while_revalidate: 60.seconds, stale_if_error: 5.minutes - # - # HTTP Cache-Control Extensions other values: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control - # Any additional key-value pairs are concatenated onto the Cache-Control header in the response: - # - # expires_in 3.hours, public: true, "s-maxage": 3.hours, "no-transform": true - # - # The method will also ensure an HTTP Date header for client compatibility. - # - # source://actionpack//lib/action_controller/metal/conditional_get.rb#276 - def expires_in(seconds, options = T.unsafe(nil)); end - - # Sets an HTTP 1.1 Cache-Control header of no-cache. This means the - # resource will be marked as stale, so clients must always revalidate. - # Intermediate/browser caches may still store the asset. - # - # source://actionpack//lib/action_controller/metal/conditional_get.rb#294 - def expires_now; end - - # Sets the +etag+, +last_modified+, or both on the response and renders a - # 304 Not Modified response if the request is already fresh. - # - # === Parameters: - # - # * :etag Sets a "weak" ETag validator on the response. See the - # +:weak_etag+ option. - # * :weak_etag Sets a "weak" ETag validator on the response. - # Requests that set If-None-Match header may return a 304 Not Modified - # response if it matches the ETag exactly. A weak ETag indicates semantic - # equivalence, not byte-for-byte equality, so they're good for caching - # HTML pages in browser caches. They can't be used for responses that - # must be byte-identical, like serving Range requests within a PDF file. - # * :strong_etag Sets a "strong" ETag validator on the response. - # Requests that set If-None-Match header may return a 304 Not Modified - # response if it matches the ETag exactly. A strong ETag implies exact - # equality: the response must match byte for byte. This is necessary for - # doing Range requests within a large video or PDF file, for example, or - # for compatibility with some CDNs that don't support weak ETags. - # * :last_modified Sets a "weak" last-update validator on the - # response. Subsequent requests that set If-Modified-Since may return a - # 304 Not Modified response if last_modified <= If-Modified-Since. - # * :public By default the Cache-Control header is private, set this to - # +true+ if you want your application to be cacheable by other devices (proxy caches). - # * :cache_control When given will overwrite an existing Cache-Control header. - # See https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html for more possibilities. - # * :template By default, the template digest for the current - # controller/action is included in ETags. If the action renders a - # different template, you can include its digest instead. If the action - # doesn't render a template at all, you can pass template: false - # to skip any attempt to check for a template digest. - # - # === Example: - # - # def show - # @article = Article.find(params[:id]) - # fresh_when(etag: @article, last_modified: @article.updated_at, public: true) - # end - # - # This will render the show template if the request isn't sending a matching ETag or - # If-Modified-Since header and just a 304 Not Modified response if there's a match. - # - # You can also just pass a record. In this case +last_modified+ will be set - # by calling +updated_at+ and +etag+ by passing the object itself. - # - # def show - # @article = Article.find(params[:id]) - # fresh_when(@article) - # end - # - # You can also pass an object that responds to +maximum+, such as a - # collection of active records. In this case +last_modified+ will be set by - # calling maximum(:updated_at) on the collection (the timestamp of the - # most recently updated record) and the +etag+ by passing the object itself. - # - # def index - # @articles = Article.all - # fresh_when(@articles) - # end - # - # When passing a record or a collection, you can still set the public header: - # - # def show - # @article = Article.find(params[:id]) - # fresh_when(@article, public: true) - # end - # - # When overwriting Cache-Control header: - # - # def show - # @article = Article.find(params[:id]) - # fresh_when(@article, public: true, cache_control: { no_cache: true }) - # end - # - # This will set in the response Cache-Control = public, no-cache. - # - # When rendering a different template than the default controller/action - # style, you can indicate which digest to include in the ETag: - # - # before_action { fresh_when @article, template: 'widgets/show' } - # - # source://actionpack//lib/action_controller/metal/conditional_get.rb#117 - def fresh_when(object = T.unsafe(nil), etag: T.unsafe(nil), weak_etag: T.unsafe(nil), strong_etag: T.unsafe(nil), last_modified: T.unsafe(nil), public: T.unsafe(nil), cache_control: T.unsafe(nil), template: T.unsafe(nil)); end - - # Cache or yield the block. The cache is supposed to never expire. - # - # You can use this method when you have an HTTP response that never changes, - # and the browser and proxies should cache it indefinitely. - # - # * +public+: By default, HTTP responses are private, cached only on the - # user's web browser. To allow proxies to cache the response, set +true+ to - # indicate that they can serve the cached response to all users. - # - # source://actionpack//lib/action_controller/metal/conditional_get.rb#306 - def http_cache_forever(public: T.unsafe(nil)); end - - # Sets an HTTP 1.1 Cache-Control header of no-store. This means the - # resource may not be stored in any cache. - # - # source://actionpack//lib/action_controller/metal/conditional_get.rb#316 - def no_store; end - - # Sets the +etag+ and/or +last_modified+ on the response and checks it against - # the client request. If the request doesn't match the options provided, the - # request is considered stale and should be generated from scratch. Otherwise, - # it's fresh and we don't need to generate anything and a reply of 304 Not Modified is sent. - # - # === Parameters: - # - # * :etag Sets a "weak" ETag validator on the response. See the - # +:weak_etag+ option. - # * :weak_etag Sets a "weak" ETag validator on the response. - # Requests that set If-None-Match header may return a 304 Not Modified - # response if it matches the ETag exactly. A weak ETag indicates semantic - # equivalence, not byte-for-byte equality, so they're good for caching - # HTML pages in browser caches. They can't be used for responses that - # must be byte-identical, like serving Range requests within a PDF file. - # * :strong_etag Sets a "strong" ETag validator on the response. - # Requests that set If-None-Match header may return a 304 Not Modified - # response if it matches the ETag exactly. A strong ETag implies exact - # equality: the response must match byte for byte. This is necessary for - # doing Range requests within a large video or PDF file, for example, or - # for compatibility with some CDNs that don't support weak ETags. - # * :last_modified Sets a "weak" last-update validator on the - # response. Subsequent requests that set If-Modified-Since may return a - # 304 Not Modified response if last_modified <= If-Modified-Since. - # * :public By default the Cache-Control header is private, set this to - # +true+ if you want your application to be cacheable by other devices (proxy caches). - # * :cache_control When given will overwrite an existing Cache-Control header. - # See https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html for more possibilities. - # * :template By default, the template digest for the current - # controller/action is included in ETags. If the action renders a - # different template, you can include its digest instead. If the action - # doesn't render a template at all, you can pass template: false - # to skip any attempt to check for a template digest. - # - # === Example: - # - # def show - # @article = Article.find(params[:id]) - # - # if stale?(etag: @article, last_modified: @article.updated_at) - # @statistics = @article.really_expensive_call - # respond_to do |format| - # # all the supported formats - # end - # end - # end - # - # You can also just pass a record. In this case +last_modified+ will be set - # by calling +updated_at+ and +etag+ by passing the object itself. - # - # def show - # @article = Article.find(params[:id]) - # - # if stale?(@article) - # @statistics = @article.really_expensive_call - # respond_to do |format| - # # all the supported formats - # end - # end - # end - # - # You can also pass an object that responds to +maximum+, such as a - # collection of active records. In this case +last_modified+ will be set by - # calling maximum(:updated_at) on the collection (the timestamp of the - # most recently updated record) and the +etag+ by passing the object itself. - # - # def index - # @articles = Article.all - # - # if stale?(@articles) - # @statistics = @articles.really_expensive_call - # respond_to do |format| - # # all the supported formats - # end - # end - # end - # - # When passing a record or a collection, you can still set the public header: - # - # def show - # @article = Article.find(params[:id]) - # - # if stale?(@article, public: true) - # @statistics = @article.really_expensive_call - # respond_to do |format| - # # all the supported formats - # end - # end - # end - # - # When overwriting Cache-Control header: - # - # def show - # @article = Article.find(params[:id]) - # - # if stale?(@article, public: true, cache_control: { no_cache: true }) - # @statistics = @articles.really_expensive_call - # respond_to do |format| - # # all the supported formats - # end - # end - # end - # - # This will set in the response Cache-Control = public, no-cache. - # - # When rendering a different template than the default controller/action - # style, you can indicate which digest to include in the ETag: - # - # def show - # super if stale? @article, template: 'widgets/show' - # end - # - # @return [Boolean] - # - # source://actionpack//lib/action_controller/metal/conditional_get.rb#249 - def stale?(object = T.unsafe(nil), **freshness_kwargs); end - - private - - # source://actionpack//lib/action_controller/metal/conditional_get.rb#321 - def combine_etags(validator, options); end - - module GeneratedClassMethods - def etaggers; end - def etaggers=(value); end - def etaggers?; end - end - - module GeneratedInstanceMethods - def etaggers; end - def etaggers=(value); end - def etaggers?; end - end -end - -# source://actionpack//lib/action_controller/metal/conditional_get.rb#16 -module ActionController::ConditionalGet::ClassMethods - # Allows you to consider additional controller-wide information when generating an ETag. - # For example, if you serve pages tailored depending on who's logged in at the moment, you - # may want to add the current user id to be part of the ETag to prevent unauthorized displaying - # of cached pages. - # - # class InvoicesController < ApplicationController - # etag { current_user&.id } - # - # def show - # # Etag will differ even for the same invoice when it's viewed by a different current_user - # @invoice = Invoice.find(params[:id]) - # fresh_when etag: @invoice - # end - # end - # - # source://actionpack//lib/action_controller/metal/conditional_get.rb#31 - def etag(&etagger); end -end - -# source://actionpack//lib/action_controller/metal/content_security_policy.rb#4 -module ActionController::ContentSecurityPolicy - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - include ::AbstractController::Helpers - include ::ActiveSupport::Callbacks - include ::AbstractController::Callbacks - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::AbstractController::Helpers::ClassMethods - mixes_in_class_methods ::ActiveSupport::Callbacks::ClassMethods - mixes_in_class_methods ::ActiveSupport::DescendantsTracker - mixes_in_class_methods ::AbstractController::Callbacks::ClassMethods - mixes_in_class_methods ::ActionController::ContentSecurityPolicy::ClassMethods - - private - - # @return [Boolean] - # - # source://actionpack//lib/action_controller/metal/content_security_policy.rb#73 - def content_security_policy?; end - - # source://actionpack//lib/action_controller/metal/content_security_policy.rb#77 - def content_security_policy_nonce; end - - # source://actionpack//lib/action_controller/metal/content_security_policy.rb#81 - def current_content_security_policy; end - - module GeneratedClassMethods - def __callbacks; end - def __callbacks=(value); end - def __callbacks?; end - def _helper_methods; end - def _helper_methods=(value); end - def _helper_methods?; end - end - - module GeneratedInstanceMethods - def __callbacks; end - def __callbacks?; end - def _helper_methods; end - def _helper_methods=(value); end - def _helper_methods?; end - end -end - -# source://actionpack//lib/action_controller/metal/content_security_policy.rb#15 -module ActionController::ContentSecurityPolicy::ClassMethods - # Overrides parts of the globally configured Content-Security-Policy - # header: - # - # class PostsController < ApplicationController - # content_security_policy do |policy| - # policy.base_uri "https://www.example.com" - # end - # end - # - # Options can be passed similar to +before_action+. For example, pass - # only: :index to override the header on the index action only: - # - # class PostsController < ApplicationController - # content_security_policy(only: :index) do |policy| - # policy.default_src :self, :https - # end - # end - # - # Pass +false+ to remove the Content-Security-Policy header: - # - # class PostsController < ApplicationController - # content_security_policy false, only: :index - # end - # - # source://actionpack//lib/action_controller/metal/content_security_policy.rb#39 - def content_security_policy(enabled = T.unsafe(nil), **options, &block); end - - # Overrides the globally configured Content-Security-Policy-Report-Only - # header: - # - # class PostsController < ApplicationController - # content_security_policy_report_only only: :index - # end - # - # Pass +false+ to remove the Content-Security-Policy-Report-Only header: - # - # class PostsController < ApplicationController - # content_security_policy_report_only false, only: :index - # end - # - # source://actionpack//lib/action_controller/metal/content_security_policy.rb#65 - def content_security_policy_report_only(report_only = T.unsafe(nil), **options); end -end - -# source://actionpack//lib/action_controller/metal/cookies.rb#4 -module ActionController::Cookies - extend ::ActiveSupport::Concern - - private - - # The cookies for the current request. See ActionDispatch::Cookies for - # more information. - # - # source://actionpack//lib/action_controller/metal/cookies.rb#14 - def cookies; end -end - -# 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 -module ActionController::DataStreaming - extend ::ActiveSupport::Concern - include ::ActionController::Rendering - - mixes_in_class_methods ::ActionController::Rendering::ClassMethods - - private - - # Sends the given binary data to the browser. This method is similar to - # render plain: data, but also allows you to specify whether - # the browser should display the response as a file attachment (i.e. in a - # download dialog) or as inline data. You may also set the content type, - # the file name, and other things. - # - # Options: - # * :filename - suggests a filename for the browser to use. - # * :type - specifies an HTTP content type. Defaults to 'application/octet-stream'. - # You can specify either a string or a symbol for a registered type with Mime::Type.register, for example :json. - # If omitted, type will be inferred from the file extension specified in :filename. - # If no content type is registered for the extension, the default type 'application/octet-stream' will be used. - # * :disposition - specifies whether the file will be shown inline or downloaded. - # Valid values are 'inline' and 'attachment' (default). - # * :status - specifies the status code to send with the response. Defaults to 200. - # - # Generic data download: - # - # send_data buffer - # - # Download a dynamically-generated tarball: - # - # send_data generate_tgz('dir'), filename: 'dir.tgz' - # - # Display an image Active Record in the browser: - # - # send_data image.data, type: image.content_type, disposition: 'inline' - # - # See +send_file+ for more information on HTTP Content-* headers and caching. - # - # source://actionpack//lib/action_controller/metal/data_streaming.rb#109 - def send_data(data, options = T.unsafe(nil)); end - - # Sends the file. This uses a server-appropriate method (such as X-Sendfile) - # via the Rack::Sendfile middleware. The header to use is set via - # +config.action_dispatch.x_sendfile_header+. - # Your server can also configure this for you by setting the X-Sendfile-Type header. - # - # Be careful to sanitize the path parameter if it is coming from a web - # page. send_file(params[:path]) allows a malicious user to - # download any file on your server. - # - # Options: - # * :filename - suggests a filename for the browser to use. - # Defaults to File.basename(path). - # * :type - specifies an HTTP content type. - # You can specify either a string or a symbol for a registered type with Mime::Type.register, for example :json. - # If omitted, the type will be inferred from the file extension specified in :filename. - # If no content type is registered for the extension, the default type 'application/octet-stream' will be used. - # * :disposition - specifies whether the file will be shown inline or downloaded. - # Valid values are 'inline' and 'attachment' (default). - # * :status - specifies the status code to send with the response. Defaults to 200. - # * :url_based_filename - set to +true+ if you want the browser to guess the filename from - # the URL, which is necessary for i18n filenames on certain browsers - # (setting :filename overrides this option). - # - # The default Content-Type and Content-Disposition headers are - # set to download arbitrary binary files in as many browsers as - # possible. IE versions 4, 5, 5.5, and 6 are all known to have - # a variety of quirks (especially when downloading over SSL). - # - # Simple download: - # - # send_file '/path/to.zip' - # - # Show a JPEG in the browser: - # - # send_file '/path/to.jpeg', type: 'image/jpeg', disposition: 'inline' - # - # Show a 404 page in the browser: - # - # send_file '/path/to/404.html', type: 'text/html; charset=utf-8', disposition: 'inline', status: 404 - # - # Read about the other Content-* HTTP headers if you'd like to - # provide the user with more information (such as Content-Description) in - # https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11. - # - # Also be aware that the document may be cached by proxies and browsers. - # The Pragma and Cache-Control headers declare how the file may be cached - # by intermediaries. They default to require clients to validate with - # the server before releasing cached responses. See - # https://www.mnot.net/cache_docs/ for an overview of web caching and - # https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9 - # for the Cache-Control header spec. - # - # @raise [MissingFile] - # - # source://actionpack//lib/action_controller/metal/data_streaming.rb#69 - def send_file(path, options = T.unsafe(nil)); end - - # @raise [ArgumentError] - # - # source://actionpack//lib/action_controller/metal/data_streaming.rb#114 - def send_file_headers!(options); end -end - -# source://actionpack//lib/action_controller/metal/data_streaming.rb#15 -ActionController::DataStreaming::DEFAULT_SEND_FILE_DISPOSITION = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_controller/metal/data_streaming.rb#14 -ActionController::DataStreaming::DEFAULT_SEND_FILE_TYPE = T.let(T.unsafe(nil), String) - -# Allows configuring default headers that will be automatically merged into -# each response. -# -# source://actionpack//lib/action_controller/metal/default_headers.rb#6 -module ActionController::DefaultHeaders - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActionController::DefaultHeaders::ClassMethods -end - -# source://actionpack//lib/action_controller/metal/default_headers.rb#9 -module ActionController::DefaultHeaders::ClassMethods - # source://actionpack//lib/action_controller/metal/default_headers.rb#10 - def make_response!(request); end -end - -# 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 -module ActionController::EtagWithFlash - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - include ::ActionController::ConditionalGet - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActionController::ConditionalGet::ClassMethods - - module GeneratedClassMethods - def etaggers; end - def etaggers=(value); end - def etaggers?; end - end - - module GeneratedInstanceMethods - def etaggers; end - def etaggers=(value); end - def etaggers?; end - end -end - -# 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. -# -# Enabled by default for apps that use Action View. Disable by setting -# -# config.action_controller.etag_with_template_digest = false -# -# Override the template to digest by passing +:template+ to +fresh_when+ -# and +stale?+ calls. For example: -# -# # We're going to render widgets/show, not posts/show -# fresh_when @post, template: 'widgets/show' -# -# # 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 -module ActionController::EtagWithTemplateDigest - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - include ::ActionController::ConditionalGet - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActionController::ConditionalGet::ClassMethods - - private - - # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#35 - def determine_template_etag(options); end - - # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#51 - def lookup_and_digest_template(template); end - - # Pick the template digest to include in the ETag. If the +:template+ option - # is present, use the named template. If +:template+ is +nil+ or absent, use - # 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 - def pick_template_for_etag(options); end - - module GeneratedClassMethods - def etag_with_template_digest; end - def etag_with_template_digest=(value); end - def etag_with_template_digest?; end - def etaggers; end - def etaggers=(value); end - def etaggers?; end - end - - module GeneratedInstanceMethods - def etag_with_template_digest; end - def etag_with_template_digest=(value); end - def etag_with_template_digest?; end - def etaggers; end - def etaggers=(value); end - def etaggers?; end - end -end - -# source://actionpack//lib/action_controller/metal/flash.rb#4 -module ActionController::Flash - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActionController::Flash::ClassMethods - - private - - # source://actionpack//lib/action_controller/metal/flash.rb#51 - def redirect_to(options = T.unsafe(nil), response_options_and_flash = T.unsafe(nil)); end - - module GeneratedClassMethods - def _flash_types; end - def _flash_types=(value); end - def _flash_types?; end - end - - module GeneratedInstanceMethods; end -end - -# source://actionpack//lib/action_controller/metal/flash.rb#14 -module ActionController::Flash::ClassMethods - # source://actionpack//lib/action_controller/metal/flash.rb#45 - def action_methods; end - - # Creates new flash types. You can pass as many types as you want to create - # flash types other than the default alert and notice in - # your controllers and views. For instance: - # - # # in application_controller.rb - # class ApplicationController < ActionController::Base - # add_flash_types :warning - # end - # - # # in your controller - # redirect_to user_path(@user), warning: "Incomplete profile" - # - # # in your view - # <%= warning %> - # - # This method will automatically define a new method for each of the given - # names, and it will be available in your views. - # - # source://actionpack//lib/action_controller/metal/flash.rb#32 - def add_flash_types(*types); end -end - -# Override the default form builder for all views rendered by this -# controller and any of its descendants. Accepts a subclass of -# ActionView::Helpers::FormBuilder. -# -# For example, given a form builder: -# -# class AdminFormBuilder < ActionView::Helpers::FormBuilder -# def special_field(name) -# end -# end -# -# The controller specifies a form builder as its default: -# -# class AdminAreaController < ApplicationController -# default_form_builder AdminFormBuilder -# end -# -# Then in the view any form using +form_for+ will be an instance of the -# specified form builder: -# -# <%= form_for(@instance) do |builder| %> -# <%= builder.special_field(:name) %> -# <% end %> -# -# source://actionpack//lib/action_controller/form_builder.rb#27 -module ActionController::FormBuilder - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActionController::FormBuilder::ClassMethods - - # Default form builder for the controller - # - # source://actionpack//lib/action_controller/form_builder.rb#46 - 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://actionpack//lib/action_controller/form_builder.rb#34 -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. - # - # ==== Parameters - # * builder - Default form builder, an instance of ActionView::Helpers::FormBuilder - # - # source://actionpack//lib/action_controller/form_builder.rb#40 - def default_form_builder(builder); end -end - -# source://actionpack//lib/action_controller/metal/head.rb#4 -module ActionController::Head - # Returns a response that has no content (merely headers). The options - # argument is interpreted to be a hash of header names and values. - # This allows you to easily return a response that consists only of - # significant headers: - # - # head :created, location: person_path(@person) - # - # head :created, location: @person - # - # It can also be used to return exceptional conditions: - # - # return head(:method_not_allowed) unless request.post? - # return head(:bad_request) unless valid_request? - # render - # - # See Rack::Utils::SYMBOL_TO_STATUS_CODE for a full list of valid +status+ symbols. - # - # source://actionpack//lib/action_controller/metal/head.rb#21 - def head(status, options = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://actionpack//lib/action_controller/metal/head.rb#52 - def include_content?(status); end -end - -# 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. -# -# In addition to using the standard template helpers provided, creating custom helpers to -# extract complicated logic or reusable functionality is strongly encouraged. By default, each controller -# will include all helpers. These helpers are only accessible on the controller through #helpers -# -# In previous versions of \Rails the controller will include a helper which -# matches the name of the controller, e.g., MyController will automatically -# include MyHelper. You can revert to the old behavior with the following: -# -# # config/application.rb -# class Application < Rails::Application -# config.action_controller.include_all_helpers = false -# end -# -# Additional helpers can be specified using the +helper+ class method in ActionController::Base or any -# controller which inherits from it. -# -# The +to_s+ method from the \Time class can be wrapped in a helper method to display a custom message if -# a \Time object is blank: -# -# module FormattedTimeHelper -# def format_time(time, format=:long, blank_message=" ") -# time.blank? ? blank_message : time.to_fs(format) -# end -# end -# -# FormattedTimeHelper can now be included in a controller, using the +helper+ class method: -# -# class EventsController < ActionController::Base -# helper FormattedTimeHelper -# def index -# @events = Event.all -# end -# end -# -# Then, in any view rendered by EventsController, the format_time method can be called: -# -# <% @events.each do |event| -%> -#

-# <%= format_time(event.time, :short, "N/A") %> | <%= event.name %> -#

-# <% end -%> -# -# Finally, assuming we have two event instances, one which has a time and one which does not, -# the output might look like this: -# -# 23 Aug 11:30 | Carolina Railhawks Soccer Match -# N/A | Carolina Railhawks Training Workshop -# -# source://actionpack//lib/action_controller/metal/helpers.rb#56 -module ActionController::Helpers - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - include ::AbstractController::Helpers - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::AbstractController::Helpers::ClassMethods - mixes_in_class_methods ::ActionController::Helpers::ClassMethods - - # Provides a proxy to access helper methods from outside the view. - # - # source://actionpack//lib/action_controller/metal/helpers.rb#128 - def helpers; end - - class << self - # Returns the value of attribute helpers_path. - # - # source://actionpack//lib/action_controller/metal/helpers.rb#59 - 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 - def helpers_path=(_arg0); end - end - - module GeneratedClassMethods - def _helper_methods; end - def _helper_methods=(value); end - def _helper_methods?; end - def helpers_path; end - def helpers_path=(value); end - def helpers_path?; end - def include_all_helpers; end - def include_all_helpers=(value); end - def include_all_helpers?; end - end - - module GeneratedInstanceMethods - def _helper_methods; end - def _helper_methods=(value); end - def _helper_methods?; end - def helpers_path; end - def helpers_path=(value); end - def helpers_path?; end - def include_all_helpers; end - def include_all_helpers=(value); end - def include_all_helpers?; end - end -end - -# source://actionpack//lib/action_controller/metal/helpers.rb#67 -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: - # attr_accessor :name - # helper_attr :name - # - # ==== Parameters - # * attrs - Names of attributes to be converted into helpers. - # - # source://actionpack//lib/action_controller/metal/helpers.rb#76 - 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 - # using {helper}[rdoc-ref:AbstractController::Helpers::ClassMethods#helper] - # instead when using +capture+. - # - # source://actionpack//lib/action_controller/metal/helpers.rb#86 - def helpers; end - - # Override modules_for_helpers to accept +:all+ as argument, which loads - # all helpers in helpers_path. - # - # ==== Parameters - # * args - A list of helpers - # - # ==== Returns - # * array - A normalized list of modules for the list of helpers provided. - # - # source://actionpack//lib/action_controller/metal/helpers.rb#102 - 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 - def all_application_helpers; end -end - -# HTTP Basic, Digest, and Token authentication. -# -# source://actionpack//lib/action_controller/metal/http_authentication.rb#9 -module ActionController::HttpAuthentication; end - -# = HTTP \Basic authentication -# -# === Simple \Basic example -# -# class PostsController < ApplicationController -# http_basic_authenticate_with name: "dhh", password: "secret", except: :index -# -# def index -# render plain: "Everyone can see me!" -# end -# -# def edit -# render plain: "I'm only accessible if you know the password" -# end -# end -# -# === Advanced \Basic example -# -# Here is a more advanced \Basic example where only Atom feeds and the XML API are protected by HTTP authentication. -# The regular HTML interface is protected by a session approach: -# -# class ApplicationController < ActionController::Base -# before_action :set_account, :authenticate -# -# private -# def set_account -# @account = Account.find_by(url_name: request.subdomains.first) -# end -# -# def authenticate -# case request.format -# when Mime[:xml], Mime[:atom] -# if user = authenticate_with_http_basic { |u, p| @account.users.authenticate(u, p) } -# @current_user = user -# else -# request_http_basic_authentication -# end -# else -# if session_authenticated? -# @current_user = @account.users.find(session[:authenticated][:user_id]) -# else -# redirect_to(login_url) and return false -# end -# end -# end -# end -# -# In your integration tests, you can do something like this: -# -# def test_access_granted_from_xml -# authorization = ActionController::HttpAuthentication::Basic.encode_credentials(users(:dhh).name, users(:dhh).password) -# -# get "/notes/1.xml", headers: { 'HTTP_AUTHORIZATION' => authorization } -# -# assert_equal 200, status -# end -# -# source://actionpack//lib/action_controller/metal/http_authentication.rb#66 -module ActionController::HttpAuthentication::Basic - extend ::ActionController::HttpAuthentication::Basic - - # source://actionpack//lib/action_controller/metal/http_authentication.rb#127 - def auth_param(request); end - - # source://actionpack//lib/action_controller/metal/http_authentication.rb#123 - def auth_scheme(request); end - - # source://actionpack//lib/action_controller/metal/http_authentication.rb#105 - def authenticate(request, &login_procedure); end - - # source://actionpack//lib/action_controller/metal/http_authentication.rb#135 - def authentication_request(controller, realm, message); end - - # source://actionpack//lib/action_controller/metal/http_authentication.rb#119 - def decode_credentials(request); end - - # source://actionpack//lib/action_controller/metal/http_authentication.rb#131 - def encode_credentials(user_name, password); end - - # @return [Boolean] - # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#111 - def has_basic_credentials?(request); end - - # source://actionpack//lib/action_controller/metal/http_authentication.rb#115 - def user_name_and_password(request); end -end - -# source://actionpack//lib/action_controller/metal/http_authentication.rb#69 -module ActionController::HttpAuthentication::Basic::ControllerMethods - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActionController::HttpAuthentication::Basic::ControllerMethods::ClassMethods - - # source://actionpack//lib/action_controller/metal/http_authentication.rb#92 - def authenticate_or_request_with_http_basic(realm = T.unsafe(nil), message = T.unsafe(nil), &login_procedure); end - - # source://actionpack//lib/action_controller/metal/http_authentication.rb#96 - def authenticate_with_http_basic(&login_procedure); end - - # source://actionpack//lib/action_controller/metal/http_authentication.rb#83 - def http_basic_authenticate_or_request_with(name:, password:, realm: T.unsafe(nil), message: T.unsafe(nil)); end - - # source://actionpack//lib/action_controller/metal/http_authentication.rb#100 - def request_http_basic_authentication(realm = T.unsafe(nil), message = T.unsafe(nil)); end -end - -# source://actionpack//lib/action_controller/metal/http_authentication.rb#72 -module ActionController::HttpAuthentication::Basic::ControllerMethods::ClassMethods - # Enables HTTP \Basic authentication. - # - # See ActionController::HttpAuthentication::Basic for example usage. - # - # @raise [ArgumentError] - # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#76 - def http_basic_authenticate_with(name:, password:, realm: T.unsafe(nil), **options); end -end - -# = HTTP \Digest authentication -# -# === Simple \Digest example -# -# require "openssl" -# class PostsController < ApplicationController -# REALM = "SuperSecret" -# USERS = {"dhh" => "secret", #plain text password -# "dap" => OpenSSL::Digest::MD5.hexdigest(["dap",REALM,"secret"].join(":"))} #ha1 digest password -# -# before_action :authenticate, except: [:index] -# -# def index -# render plain: "Everyone can see me!" -# end -# -# def edit -# render plain: "I'm only accessible if you know the password" -# end -# -# private -# def authenticate -# authenticate_or_request_with_http_digest(REALM) do |username| -# USERS[username] -# end -# end -# end -# -# === Notes -# -# The +authenticate_or_request_with_http_digest+ block must return the user's password -# or the ha1 digest hash so the framework can appropriately hash to check the user's -# credentials. Returning +nil+ will cause authentication to fail. -# -# Storing the ha1 hash: MD5(username:realm:password), is better than storing a plain password. If -# the password file or database is compromised, the attacker would be able to use the ha1 hash to -# authenticate as the user at this +realm+, but would not have the user's password to try using at -# other sites. -# -# In rare instances, web servers or front proxies strip authorization headers before -# they reach your application. You can debug this situation by logging all environment -# variables, and check for HTTP_AUTHORIZATION, amongst others. -# -# source://actionpack//lib/action_controller/metal/http_authentication.rb#185 -module ActionController::HttpAuthentication::Digest - extend ::ActionController::HttpAuthentication::Digest - - # Returns false on a valid response, true otherwise. - # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#211 - def authenticate(request, realm, &password_procedure); end - - # source://actionpack//lib/action_controller/metal/http_authentication.rb#269 - def authentication_header(controller, realm); end - - # source://actionpack//lib/action_controller/metal/http_authentication.rb#276 - def authentication_request(controller, realm, message = T.unsafe(nil)); end - - # source://actionpack//lib/action_controller/metal/http_authentication.rb#262 - def decode_credentials(header); end - - # source://actionpack//lib/action_controller/metal/http_authentication.rb#258 - def decode_credentials_header(request); end - - # source://actionpack//lib/action_controller/metal/http_authentication.rb#253 - def encode_credentials(http_method, credentials, password, password_is_ha1); end - - # Returns the expected response for a request of +http_method+ to +uri+ with the decoded +credentials+ and the expected +password+ - # Optional parameter +password_is_ha1+ is set to +true+ by default, since best practice is to store ha1 digest instead - # of a plain-text password. - # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#243 - def expected_response(http_method, uri, credentials, password, password_is_ha1 = T.unsafe(nil)); end - - # source://actionpack//lib/action_controller/metal/http_authentication.rb#249 - def ha1(credentials, password); end - - # Uses an MD5 digest based on time to generate a value to be used only once. - # - # A server-specified data string which should be uniquely generated each time a 401 response is made. - # It is recommended that this string be base64 or hexadecimal data. - # Specifically, since the string is passed in the header lines as a quoted string, the double-quote character is not allowed. - # - # The contents of the nonce are implementation dependent. - # The quality of the implementation depends on a good choice. - # A nonce might, for example, be constructed as the base 64 encoding of - # - # time-stamp H(time-stamp ":" ETag ":" private-key) - # - # where time-stamp is a server-generated time or other non-repeating value, - # ETag is the value of the HTTP ETag header associated with the requested entity, - # and private-key is data known only to the server. - # With a nonce of this form a server would recalculate the hash portion after receiving the client authentication header and - # reject the request if it did not match the nonce from that header or - # if the time-stamp value is not recent enough. In this way the server can limit the time of the nonce's validity. - # The inclusion of the ETag prevents a replay request for an updated version of the resource. - # (Note: including the IP address of the client in the nonce would appear to offer the server the ability - # to limit the reuse of the nonce to the same client that originally got it. - # However, that would break proxy farms, where requests from a single user often go through different proxies in the farm. - # Also, IP address spoofing is not that hard.) - # - # An implementation might choose not to accept a previously used nonce or a previously used digest, in order to - # protect against a replay attack. Or, an implementation might choose to use one-time nonces or digests for - # POST, PUT, or PATCH requests, and a time-stamp for GET requests. For more details on the issues involved see Section 4 - # 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 - # the time cannot be modified by client. - # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#321 - def nonce(secret_key, time = T.unsafe(nil)); end - - # Opaque based on digest of secret key - # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#340 - def opaque(secret_key); end - - # source://actionpack//lib/action_controller/metal/http_authentication.rb#283 - def secret_token(request); end - - # Returns false unless the request credentials response value matches the expected value. - # First try the password as a ha1 digest password. If this fails, then try it as a plain - # text password. - # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#218 - def validate_digest_response(request, realm, &password_procedure); end - - # Might want a shorter timeout depending on whether the request - # is a PATCH, PUT, or POST, and if the client is a browser or web service. - # Can be much shorter if the Stale directive is implemented. This would - # allow a user to use new nonce without prompting the user again for their - # username and password. - # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#333 - def validate_nonce(secret_key, request, value, seconds_to_timeout = T.unsafe(nil)); end -end - -# source://actionpack//lib/action_controller/metal/http_authentication.rb#188 -module ActionController::HttpAuthentication::Digest::ControllerMethods - # Authenticate using an HTTP \Digest, or otherwise render an HTTP header - # requesting the client to send a \Digest. - # - # See ActionController::HttpAuthentication::Digest for example usage. - # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#193 - def authenticate_or_request_with_http_digest(realm = T.unsafe(nil), message = T.unsafe(nil), &password_procedure); end - - # Authenticate using an HTTP \Digest. Returns true if authentication is - # successful, false otherwise. - # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#199 - def authenticate_with_http_digest(realm = T.unsafe(nil), &password_procedure); end - - # Render an HTTP header requesting the client to send a \Digest for - # authentication. - # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#205 - def request_http_digest_authentication(realm = T.unsafe(nil), message = T.unsafe(nil)); end -end - -# = HTTP \Token authentication -# -# === Simple \Token example -# -# class PostsController < ApplicationController -# TOKEN = "secret" -# -# before_action :authenticate, except: [ :index ] -# -# def index -# render plain: "Everyone can see me!" -# end -# -# def edit -# render plain: "I'm only accessible if you know the password" -# end -# -# private -# def authenticate -# authenticate_or_request_with_http_token do |token, options| -# # Compare the tokens in a time-constant manner, to mitigate -# # timing attacks. -# ActiveSupport::SecurityUtils.secure_compare(token, TOKEN) -# end -# end -# end -# -# -# Here is a more advanced Token example where only Atom feeds and the XML API are protected by HTTP token authentication. -# The regular HTML interface is protected by a session approach: -# -# class ApplicationController < ActionController::Base -# before_action :set_account, :authenticate -# -# private -# def set_account -# @account = Account.find_by(url_name: request.subdomains.first) -# end -# -# def authenticate -# case request.format -# when Mime[:xml], Mime[:atom] -# if user = authenticate_with_http_token { |t, o| @account.users.authenticate(t, o) } -# @current_user = user -# else -# request_http_token_authentication -# end -# else -# if session_authenticated? -# @current_user = @account.users.find(session[:authenticated][:user_id]) -# else -# redirect_to(login_url) and return false -# end -# end -# end -# end -# -# -# In your integration tests, you can do something like this: -# -# def test_access_granted_from_xml -# authorization = ActionController::HttpAuthentication::Token.encode_credentials(users(:dhh).token) -# -# get "/notes/1.xml", headers: { 'HTTP_AUTHORIZATION' => authorization } -# -# assert_equal 200, status -# end -# -# -# On shared hosts, Apache sometimes doesn't pass authentication headers to -# FCGI instances. If your environment matches this description and you cannot -# authenticate, try this rule in your Apache setup: -# -# RewriteRule ^(.*)$ dispatch.fcgi [E=X-HTTP_AUTHORIZATION:%{HTTP:Authorization},QSA,L] -# -# source://actionpack//lib/action_controller/metal/http_authentication.rb#419 -module ActionController::HttpAuthentication::Token - extend ::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. - # - # ==== Parameters - # - # * +controller+ - ActionController::Base instance for the current request. - # * +login_procedure+ - Proc to call if a token is present. The Proc - # should take two arguments: - # - # authenticate(controller) { |token, options| ... } - # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#461 - def authenticate(controller, &login_procedure); end - - # Sets a WWW-Authenticate header to let the client know a token is desired. - # - # Returns nothing. - # - # ==== Parameters - # - # * +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 - def authentication_request(controller, realm, message = T.unsafe(nil)); end - - # Encodes the given token and options into an Authorization header value. - # - # Returns String. - # - # ==== Parameters - # - # * +token+ - String token. - # * +options+ - Optional Hash of the options. - # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#526 - 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 - 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 - def raw_params(auth); end - - # This removes the " characters wrapping the value. - # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#501 - def rewrite_param_values(array_params); end - - # Parses the token and options out of the token Authorization header. - # The value for the Authorization header is expected to have the prefix - # "Token" or "Bearer". If the header looks like this: - # - # Authorization: Token token="abc", nonce="def" - # - # Then the returned token is "abc", and the options are - # {nonce: "def"}. - # - # Returns an +Array+ of [String, Hash] if a token is present. - # Returns +nil+ if no token is found. - # - # ==== Parameters - # - # * +request+ - ActionDispatch::Request instance with the current headers. - # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#483 - def token_and_options(request); end - - # source://actionpack//lib/action_controller/metal/http_authentication.rb#491 - def token_params_from(auth); end -end - -# source://actionpack//lib/action_controller/metal/http_authentication.rb#422 -ActionController::HttpAuthentication::Token::AUTHN_PAIR_DELIMITERS = T.let(T.unsafe(nil), Regexp) - -# 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. - # - # See ActionController::HttpAuthentication::Token for example usage. - # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#430 - 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. - # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#436 - 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 - def request_http_token_authentication(realm = T.unsafe(nil), message = T.unsafe(nil)); end -end - -# source://actionpack//lib/action_controller/metal/http_authentication.rb#420 -ActionController::HttpAuthentication::Token::TOKEN_KEY = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_controller/metal/http_authentication.rb#421 -ActionController::HttpAuthentication::Token::TOKEN_REGEX = T.let(T.unsafe(nil), Regexp) - -# Handles implicit rendering for a controller action that does not -# explicitly respond with +render+, +respond_to+, +redirect+, or +head+. -# -# For API controllers, the implicit response is always 204 No Content. -# -# For all other controllers, we use these heuristics to decide whether to -# render a template, raise an error for a missing template, or respond with -# 204 No Content: -# -# First, if we DO find a template, it's rendered. Template lookup accounts -# for the action name, locales, format, variant, template handlers, and more -# (see +render+ for details). -# -# 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. -# -# 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. -# -# 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 -module ActionController::ImplicitRender - include ::ActionController::BasicImplicitRender - - # source://actionpack//lib/action_controller/metal/implicit_render.rb#33 - def default_render; end - - # source://actionpack//lib/action_controller/metal/implicit_render.rb#52 - def method_for_action(action_name); end - - private - - # @return [Boolean] - # - # source://actionpack//lib/action_controller/metal/implicit_render.rb#59 - def interactive_browser_request?; end -end - -# 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 -module ActionController::Instrumentation - extend ::ActiveSupport::Concern - include ::ActiveSupport::Benchmarkable - include ::AbstractController::Logger - - mixes_in_class_methods ::ActionController::Instrumentation::ClassMethods - - # source://actionpack//lib/action_controller/metal/instrumentation.rb#40 - def redirect_to(*_arg0); end - - # source://actionpack//lib/action_controller/metal/instrumentation.rb#19 - def render(*_arg0); end - - # source://actionpack//lib/action_controller/metal/instrumentation.rb#34 - def send_data(data, options = T.unsafe(nil)); end - - # source://actionpack//lib/action_controller/metal/instrumentation.rb#27 - def send_file(path, options = T.unsafe(nil)); end - - def view_runtime; end - def view_runtime=(_arg0); end - - private - - # 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 - def append_info_to_payload(payload); end - - # A hook which allows you to clean up any time, wrongly taken into account in - # views, like database querying time. - # - # def cleanup_view_runtime - # super - time_taken_in_something_expensive - # end - # - # source://actionpack//lib/action_controller/metal/instrumentation.rb#90 - def cleanup_view_runtime; end - - # A hook invoked every time a before callback is halted. - # - # source://actionpack//lib/action_controller/metal/instrumentation.rb#80 - def halted_callback_hook(filter, _); end - - # source://actionpack//lib/action_controller/metal/instrumentation.rb#50 - def process_action(*_arg0); end -end - -# source://actionpack//lib/action_controller/metal/instrumentation.rb#100 -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 - def log_process_action(payload); end -end - -# source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#8 -class ActionController::InvalidAuthenticityToken < ::ActionController::ActionControllerError; end - -# source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#11 -class ActionController::InvalidCrossOriginRequest < ::ActionController::ActionControllerError; end - -# 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. -# -# class MyController < ActionController::Base -# include ActionController::Live -# -# def stream -# response.headers['Content-Type'] = 'text/event-stream' -# 100.times { -# response.stream.write "hello world\n" -# sleep 1 -# } -# ensure -# response.stream.close -# end -# end -# -# There are a few caveats with this module. You *cannot* write headers after the -# response has been committed (Response#committed? will return truthy). -# Calling +write+ or +close+ on the response stream will cause the response -# object to be committed. Make sure all headers are set before calling write -# or close on your stream. -# -# You *must* call close on your stream when you're finished, otherwise the -# socket may be left open forever. -# -# The final caveat is that your actions are executed in a separate thread than -# 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 -module ActionController::Live - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActionController::Live::ClassMethods - - # source://actionpack//lib/action_controller/test_case.rb#24 - def new_controller_thread; end - - # source://actionpack//lib/action_controller/metal/live.rb#249 - def process(name); end - - # source://actionpack//lib/action_controller/metal/live.rb#295 - 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 - # don't want the entire file buffered in memory first. Similar to send_data, but where the data is generated live. - # - # Options: - # * :filename - suggests a filename for the browser to use. - # * :type - specifies an HTTP content type. - # You can specify either a string or a symbol for a registered type with Mime::Type.register, for example :json. - # If omitted, type will be inferred from the file extension specified in :filename. - # If no content type is registered for the extension, the default type 'application/octet-stream' will be used. - # * :disposition - specifies whether the file will be shown inline or downloaded. - # Valid values are 'inline' and 'attachment' (default). - # - # Example of generating a csv export: - # - # send_stream(filename: "subscribers.csv") do |stream| - # stream.write "email_address,updated_at\n" - # - # @subscribers.find_each do |subscriber| - # stream.write "#{subscriber.email_address},#{subscriber.updated_at}\n" - # end - # end - # - # source://actionpack//lib/action_controller/metal/live.rb#321 - def send_stream(filename:, disposition: T.unsafe(nil), type: T.unsafe(nil)); end - - private - - # source://actionpack//lib/action_controller/metal/live.rb#348 - def log_error(exception); end -end - -# source://actionpack//lib/action_controller/metal/live.rb#127 -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 - def initialize(response); end - - # Inform the producer/writing thread that the client has - # disconnected; the reading thread is no longer interested in - # anything that's being written. - # - # See also #close. - # - # source://actionpack//lib/action_controller/metal/live.rb#193 - def abort; end - - # source://actionpack//lib/action_controller/metal/live.rb#212 - def call_on_error; end - - # Write a 'close' event to the buffer; the producer/writing thread - # uses this to notify us that it's finished supplying content. - # - # See also #abort. - # - # source://actionpack//lib/action_controller/metal/live.rb#180 - def close; end - - # Is the client still connected and waiting for content? - # - # The result of calling `write` when this is `false` is determined - # by `ignore_disconnect`. - # - # @return [Boolean] - # - # source://actionpack//lib/action_controller/metal/live.rb#204 - def connected?; end - - # Ignore that the client has disconnected. - # - # If this value is `true`, calling `write` after the client - # disconnects will result in the written content being silently - # discarded. If this value is `false` (the default), a - # ClientDisconnected exception will be raised. - # - # source://actionpack//lib/action_controller/metal/live.rb#141 - def ignore_disconnect; end - - # Ignore that the client has disconnected. - # - # If this value is `true`, calling `write` after the client - # disconnects will result in the written content being silently - # discarded. If this value is `false` (the default), a - # ClientDisconnected exception will be raised. - # - # source://actionpack//lib/action_controller/metal/live.rb#141 - def ignore_disconnect=(_arg0); end - - # source://actionpack//lib/action_controller/metal/live.rb#208 - def on_error(&block); end - - # source://actionpack//lib/action_controller/metal/live.rb#151 - 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 - def writeln(string); end - - private - - # source://actionpack//lib/action_controller/metal/live.rb#228 - def build_queue(queue_size); end - - # source://actionpack//lib/action_controller/metal/live.rb#217 - def each_chunk(&block); end - - class << self - # Returns the value of attribute queue_size. - # - # source://actionpack//lib/action_controller/metal/live.rb#131 - 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 - def queue_size=(_arg0); end - end -end - -# source://actionpack//lib/action_controller/metal/live.rb#40 -module ActionController::Live::ClassMethods - # source://actionpack//lib/action_controller/metal/live.rb#41 - def make_response!(request); end -end - -# source://actionpack//lib/action_controller/metal/live.rb#124 -class ActionController::Live::ClientDisconnected < ::RuntimeError; end - -# source://actionpack//lib/action_controller/metal/live.rb#233 -class ActionController::Live::Response < ::ActionDispatch::Response - private - - # source://actionpack//lib/action_controller/metal/live.rb#235 - def before_committed; end - - # source://actionpack//lib/action_controller/metal/live.rb#242 - def build_buffer(response, body); end -end - -# 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. -# -# Writing an object will convert it into standard SSE format with whatever -# options you have configured. You may choose to set the following options: -# -# 1) Event. If specified, an event with this name will be dispatched on -# the browser. -# 2) Retry. The reconnection time in milliseconds used when attempting -# to send the event. -# 3) Id. If the connection dies while sending an SSE to the browser, then -# the server will receive a +Last-Event-ID+ header with value equal to +id+. -# -# After setting an option in the constructor of the SSE object, all future -# SSEs sent across the stream will use those options unless overridden. -# -# Example Usage: -# -# class MyController < ActionController::Base -# include ActionController::Live -# -# def index -# response.headers['Content-Type'] = 'text/event-stream' -# sse = SSE.new(response.stream, retry: 300, event: "event-name") -# sse.write({ name: 'John'}) -# sse.write({ name: 'John'}, id: 10) -# sse.write({ name: 'John'}, id: 10, event: "other-event") -# sse.write({ name: 'John'}, id: 10, event: "other-event", retry: 500) -# ensure -# sse.close -# end -# 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 -class ActionController::Live::SSE - # @return [SSE] a new instance of SSE - # - # source://actionpack//lib/action_controller/metal/live.rb#91 - def initialize(stream, options = T.unsafe(nil)); end - - # source://actionpack//lib/action_controller/metal/live.rb#96 - def close; end - - # source://actionpack//lib/action_controller/metal/live.rb#100 - def write(object, options = T.unsafe(nil)); end - - private - - # source://actionpack//lib/action_controller/metal/live.rb#110 - def perform_write(json, options); end -end - -# source://actionpack//lib/action_controller/metal/live.rb#89 -ActionController::Live::SSE::PERMITTED_OPTIONS = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_controller/test_case.rb#170 -class ActionController::LiveTestResponse < ::ActionController::Live::Response - # Was there a server-side error? - # - # source://rack/2.2.6.2/lib/rack/response.rb#141 - def error?; end - - # Was the URL not found? - # - # source://rack/2.2.6.2/lib/rack/response.rb#151 - def missing?; end - - # Was the response successful? - # - # source://rack/2.2.6.2/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 - def exist_fragment?(event); end - - # source://actionpack//lib/action_controller/log_subscriber.rb#67 - def expire_fragment(event); end - - # source://actionpack//lib/action_controller/log_subscriber.rb#40 - def halted_callback(event); end - - # source://actionpack//lib/action_controller/log_subscriber.rb#76 - def logger; end - - # source://actionpack//lib/action_controller/log_subscriber.rb#20 - def process_action(event); end - - # source://actionpack//lib/action_controller/log_subscriber.rb#67 - def read_fragment(event); end - - # source://actionpack//lib/action_controller/log_subscriber.rb#48 - def redirect_to(event); end - - # source://actionpack//lib/action_controller/log_subscriber.rb#52 - def send_data(event); end - - # source://actionpack//lib/action_controller/log_subscriber.rb#44 - 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 - def unpermitted_parameters(event); end - - # source://actionpack//lib/action_controller/log_subscriber.rb#67 - def write_fragment(event); end -end - -# source://actionpack//lib/action_controller/log_subscriber.rb#5 -ActionController::LogSubscriber::INTERNAL_PARAMS = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_controller/metal/logging.rb#4 -module ActionController::Logging - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActionController::Logging::ClassMethods -end - -# source://actionpack//lib/action_controller/metal/logging.rb#7 -module ActionController::Logging::ClassMethods - # Set a different log level per request. - # - # # Use the debug log level if a particular cookie is set. - # class ApplicationController < ActionController::Base - # log_at :debug, if: -> { cookies[:debug] } - # end - # - # source://actionpack//lib/action_controller/metal/logging.rb#15 - def log_at(level, **options); end -end - -# ActionController::Metal is the simplest possible controller, providing a -# valid Rack interface without the additional niceties provided by -# ActionController::Base. -# -# A sample metal controller might look like this: -# -# class HelloController < ActionController::Metal -# def index -# self.response_body = "Hello World!" -# end -# end -# -# And then to route requests to your metal controller, you would add -# something like this to config/routes.rb: -# -# get 'hello', to: HelloController.action(:index) -# -# The +action+ method returns a valid Rack application for the \Rails -# router to dispatch to. -# -# == Rendering Helpers -# -# 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 -# can do the following: -# -# class HelloController < ActionController::Metal -# include AbstractController::Rendering -# include ActionView::Layouts -# append_view_path "#{Rails.root}/app/views" -# -# def index -# render "hello/index" -# end -# end -# -# == Redirection Helpers -# -# To add redirection helpers to your metal controller, do the following: -# -# class HelloController < ActionController::Metal -# include ActionController::Redirecting -# include Rails.application.routes.url_helpers -# -# def index -# redirect_to root_url -# end -# end -# -# == 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 -class ActionController::Metal < ::AbstractController::Base - include ::ActionController::Testing::Functional - - # @return [Metal] a new instance of Metal - # - # source://actionpack//lib/action_controller/metal.rb#150 - def initialize; end - - # source://actionpack//lib/action_controller/metal.rb#147 - def content_type(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_controller/metal.rb#147 - def content_type=(arg); end - - # Delegates to the class's ::controller_name. - # - # source://actionpack//lib/action_controller/metal.rb#141 - def controller_name; end - - # source://actionpack//lib/action_controller/metal.rb#185 - def dispatch(name, request, response); end - - # source://actionpack//lib/action_controller/metal.rb#147 - def headers(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_controller/metal.rb#147 - def location(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_controller/metal.rb#147 - def location=(arg); end - - # source://actionpack//lib/action_controller/metal.rb#147 - def media_type(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_controller/metal.rb#210 - def middleware_stack; end - - # source://actionpack//lib/action_controller/metal.rb#210 - def middleware_stack=(_arg0); end - - # source://actionpack//lib/action_controller/metal.rb#210 - def middleware_stack?; end - - # source://actionpack//lib/action_controller/metal.rb#157 - def params; end - - # source://actionpack//lib/action_controller/metal.rb#161 - def params=(val); end - - # Tests if render or redirect has already happened. - # - # @return [Boolean] - # - # source://actionpack//lib/action_controller/metal.rb#181 - def performed?; end - - # source://activesupport/7.0.4.2/lib/active_support/core_ext/module/attr_internal.rb#33 - def request; end - - # source://activesupport/7.0.4.2/lib/active_support/core_ext/module/attr_internal.rb#33 - def request=(_arg0); end - - # source://actionpack//lib/action_controller/metal.rb#206 - def reset_session; end - - # source://activesupport/7.0.4.2/lib/active_support/core_ext/module/attr_internal.rb#33 - def response; end - - # source://activesupport/7.0.4.2/lib/active_support/core_ext/module/attr_internal.rb#33 - def response=(_arg0); end - - # source://actionpack//lib/action_controller/metal.rb#172 - def response_body=(body); end - - # source://actionpack//lib/action_controller/metal.rb#147 - def response_code(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_controller/metal.rb#146 - def session(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_controller/metal.rb#197 - def set_request!(request); end - - # source://actionpack//lib/action_controller/metal.rb#193 - def set_response!(response); end - - # source://actionpack//lib/action_controller/metal.rb#147 - def status(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_controller/metal.rb#147 - def status=(arg); end - - # source://actionpack//lib/action_controller/metal.rb#202 - def to_a; end - - # Basic url_for that can be overridden for more robust functionality. - # - # source://actionpack//lib/action_controller/metal.rb#168 - def url_for(string); end - - class << self - # Returns a Rack endpoint for the given action name. - # - # source://actionpack//lib/action_controller/metal.rb#231 - def action(name); end - - # source://actionpack//lib/action_controller/metal.rb#136 - 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. - # - # ==== Returns - # * string - # - # source://actionpack//lib/action_controller/metal.rb#126 - 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 - 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 - def make_response!(request); end - - # Alias for +middleware_stack+. - # - # source://actionpack//lib/action_controller/metal.rb#226 - def middleware; end - - # source://actionpack//lib/action_controller/metal.rb#210 - def middleware_stack; end - - # source://actionpack//lib/action_controller/metal.rb#210 - def middleware_stack=(value); end - - # source://actionpack//lib/action_controller/metal.rb#210 - 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 - def use(*_arg0, **_arg1, &_arg2); end - end -end - -# source://actionpack//lib/action_controller/metal/exceptions.rb#50 -class ActionController::MethodNotAllowed < ::ActionController::ActionControllerError - # @return [MethodNotAllowed] a new instance of MethodNotAllowed - # - # source://actionpack//lib/action_controller/metal/exceptions.rb#51 - def initialize(*allowed_methods); end -end - -# Extend ActionDispatch middleware stack to make it aware of options -# allowing the following syntax in controllers: -# -# class PostsController < ApplicationController -# use AuthenticationMiddleware, except: [:index, :show] -# end -# -# source://actionpack//lib/action_controller/metal.rb#14 -class ActionController::MiddlewareStack < ::ActionDispatch::MiddlewareStack - # source://actionpack//lib/action_controller/metal.rb#27 - def build(action, app = T.unsafe(nil), &block); end - - private - - # source://actionpack//lib/action_controller/metal.rb#40 - def build_middleware(klass, args, block); end -end - -# source://actionpack//lib/action_controller/metal.rb#37 -ActionController::MiddlewareStack::EXCLUDE = T.let(T.unsafe(nil), Proc) - -# source://actionpack//lib/action_controller/metal.rb#36 -ActionController::MiddlewareStack::INCLUDE = T.let(T.unsafe(nil), Proc) - -# source://actionpack//lib/action_controller/metal.rb#15 -class ActionController::MiddlewareStack::Middleware < ::ActionDispatch::MiddlewareStack::Middleware - # @return [Middleware] a new instance of Middleware - # - # source://actionpack//lib/action_controller/metal.rb#16 - def initialize(klass, args, actions, strategy, block); end - - # @return [Boolean] - # - # source://actionpack//lib/action_controller/metal.rb#22 - def valid?(action); end -end - -# source://actionpack//lib/action_controller/metal.rb#38 -ActionController::MiddlewareStack::NULL = T.let(T.unsafe(nil), Proc) - -# source://actionpack//lib/action_controller/metal/mime_responds.rb#6 -module ActionController::MimeResponds - # Without web-service support, an action which collects the data for displaying a list of people - # might look something like this: - # - # def index - # @people = Person.all - # end - # - # That action implicitly responds to all formats, but formats can also be explicitly enumerated: - # - # def index - # @people = Person.all - # respond_to :html, :js - # end - # - # Here's the same action, with web-service support baked in: - # - # def index - # @people = Person.all - # - # respond_to do |format| - # format.html - # format.js - # format.xml { render xml: @people } - # end - # end - # - # 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.) - # - # 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: - # - # def create - # @company = Company.find_or_create_by(name: params[:company][:name]) - # @person = @company.people.create(params[:person]) - # - # redirect_to(person_list_url) - # end - # - # Here's the same action, with web-service support baked in: - # - # def create - # company = params[:person].delete(:company) - # @company = Company.find_or_create_by(name: company[:name]) - # @person = @company.people.create(params[:person]) - # - # respond_to do |format| - # format.html { redirect_to(person_list_url) } - # format.js - # format.xml { render xml: @person.to_xml(include: @company) } - # end - # end - # - # If the client wants HTML, we just redirect them back to the person list. If they want JavaScript, - # then it is an Ajax request and we render the JavaScript template associated with this action. - # Lastly, if the client wants XML, we render the created person as XML, but with a twist: we also - # include the person's company in the rendered XML, so you get something like this: - # - # - # ... - # ... - # - # ... - # ... - # ... - # - # - # - # Note, however, the extra bit at the top of that action: - # - # company = params[:person].delete(:company) - # @company = Company.find_or_create_by(name: company[:name]) - # - # This is because the incoming XML document (if a web-service request is in process) can only contain a - # single root-node. So, we have to rearrange things so that the request looks like this (url-encoded): - # - # person[name]=...&person[company][name]=...&... - # - # And, like this (xml-encoded): - # - # - # ... - # - # ... - # - # - # - # In other words, we make the request so that it operates on a single entity's person. Then, in the action, - # we extract the company data from the request, find or create the company, and then create the new person - # with the remaining data. - # - # 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. - # - # 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. - # - # Mime::Type.register "image/jpeg", :jpg - # - # +respond_to+ also allows you to specify a common block for different formats by using +any+: - # - # def index - # @people = Person.all - # - # respond_to do |format| - # format.html - # format.any(:xml, :json) { render request.format.to_sym => @people } - # end - # end - # - # In the example above, if the format is xml, it will render: - # - # render xml: @people - # - # Or if the format is json: - # - # render json: @people - # - # +any+ can also be used with no arguments, in which case it will be used for any format requested by - # the user: - # - # respond_to do |format| - # format.html - # format.any { redirect_to support_path } - # end - # - # Formats can have different variants. - # - # The request variant is a specialization of the request format, like :tablet, - # :phone, or :desktop. - # - # We often want to render different html/json/xml templates for phones, - # tablets, and desktop browsers. Variants make it easy. - # - # You can set the variant in a +before_action+: - # - # request.variant = :tablet if /iPad/.match?(request.user_agent) - # - # Respond to variants in the action just like you respond to formats: - # - # respond_to do |format| - # format.html do |variant| - # variant.tablet # renders app/views/projects/show.html+tablet.erb - # variant.phone { extra_setup; render ... } - # variant.none { special_setup } # executed only if there is no variant set - # end - # end - # - # Provide separate templates for each format and variant: - # - # app/views/projects/show.html.erb - # app/views/projects/show.html+tablet.erb - # app/views/projects/show.html+phone.erb - # - # When you're not sharing any code within the format, you can simplify defining variants - # using the inline syntax: - # - # respond_to do |format| - # format.js { render "trash" } - # format.html.phone { redirect_to progress_path } - # format.html.none { render "trash" } - # end - # - # Variants also support common +any+/+all+ block that formats have. - # - # It works for both inline: - # - # respond_to do |format| - # format.html.any { render html: "any" } - # format.html.phone { render html: "phone" } - # end - # - # and block syntax: - # - # respond_to do |format| - # format.html do |variant| - # variant.any(:tablet, :phablet){ render html: "any" } - # variant.phone { render html: "phone" } - # end - # end - # - # You can also set an array of variants: - # - # request.variant = [:tablet, :phone] - # - # This will work similarly to formats and MIME types negotiation. If there - # is no +:tablet+ variant declared, the +:phone+ variant will be used: - # - # respond_to do |format| - # format.html.none - # format.html.phone # this gets rendered - # end - # - # @raise [ArgumentError] - # @yield [collector] - # - # source://actionpack//lib/action_controller/metal/mime_responds.rb#201 - def respond_to(*mimes); end -end - -# A container for responses available from the current controller for -# requests for different mime-types sent to a particular action. -# -# The public controller methods +respond_to+ may be called with a block -# that is used to define responses to different mime-types, e.g. -# for +respond_to+ : -# -# respond_to do |format| -# format.html -# format.xml { render xml: @people } -# end -# -# In this usage, the argument passed to the block (+format+ above) is an -# instance of the ActionController::MimeResponds::Collector class. This -# object serves as a container in which available responses can be stored by -# calling any of the dynamically generated, mime-type-specific methods such -# as +html+, +xml+ etc on the Collector. Each response is represented by a -# corresponding block if present. -# -# A subsequent call to #negotiate_format(request) will enable the Collector -# to determine which specific mime-type it should respond with for the current -# request, with this response then being accessible by calling #response. -# -# source://actionpack//lib/action_controller/metal/mime_responds.rb#242 -class ActionController::MimeResponds::Collector - include ::AbstractController::Collector - - # @return [Collector] a new instance of Collector - # - # source://actionpack//lib/action_controller/metal/mime_responds.rb#246 - def initialize(mimes, variant = T.unsafe(nil)); end - - # source://actionpack//lib/action_controller/metal/mime_responds.rb#253 - def all(*args, &block); end - - # source://actionpack//lib/action_controller/metal/mime_responds.rb#253 - def any(*args, &block); end - - # @return [Boolean] - # - # source://actionpack//lib/action_controller/metal/mime_responds.rb#271 - def any_response?; end - - # source://actionpack//lib/action_controller/metal/mime_responds.rb#262 - def custom(mime_type, &block); end - - # Returns the value of attribute format. - # - # source://actionpack//lib/action_controller/metal/mime_responds.rb#244 - def format; end - - # Sets the attribute format - # - # @param value the value to set the attribute format to. - # - # source://actionpack//lib/action_controller/metal/mime_responds.rb#244 - def format=(_arg0); end - - # source://actionpack//lib/action_controller/metal/mime_responds.rb#288 - def negotiate_format(request); end - - # source://actionpack//lib/action_controller/metal/mime_responds.rb#275 - def response; end -end - -# source://actionpack//lib/action_controller/metal/mime_responds.rb#292 -class ActionController::MimeResponds::Collector::VariantCollector - # @return [VariantCollector] a new instance of VariantCollector - # - # source://actionpack//lib/action_controller/metal/mime_responds.rb#293 - def initialize(variant = T.unsafe(nil)); end - - # source://actionpack//lib/action_controller/metal/mime_responds.rb#298 - def all(*args, &block); end - - # source://actionpack//lib/action_controller/metal/mime_responds.rb#298 - def any(*args, &block); end - - # source://actionpack//lib/action_controller/metal/mime_responds.rb#309 - def method_missing(name, *args, &block); end - - # source://actionpack//lib/action_controller/metal/mime_responds.rb#313 - def variant; end - - private - - # source://actionpack//lib/action_controller/metal/mime_responds.rb#322 - def variant_key; end -end - -# source://actionpack//lib/action_controller/metal/exceptions.rb#94 -class ActionController::MissingExactTemplate < ::ActionController::UnknownFormat; end - -# source://actionpack//lib/action_controller/metal/exceptions.rb#59 -class ActionController::MissingFile < ::ActionController::ActionControllerError; end - -# See Responder#api_behavior -# -# source://actionpack//lib/action_controller/metal/renderers.rb#17 -class ActionController::MissingRenderer < ::LoadError - # @return [MissingRenderer] a new instance of MissingRenderer - # - # source://actionpack//lib/action_controller/metal/renderers.rb#18 - def initialize(format); end -end - -# source://actionpack//lib/action_controller/metal/exceptions.rb#56 -class ActionController::NotImplemented < ::ActionController::MethodNotAllowed; end - -# Specify binary encoding for parameters for a given action. -# -# source://actionpack//lib/action_controller/metal/parameter_encoding.rb#5 -module ActionController::ParameterEncoding - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActionController::ParameterEncoding::ClassMethods -end - -# source://actionpack//lib/action_controller/metal/parameter_encoding.rb#8 -module ActionController::ParameterEncoding::ClassMethods - # source://actionpack//lib/action_controller/metal/parameter_encoding.rb#18 - def action_encoding_template(action); end - - # source://actionpack//lib/action_controller/metal/parameter_encoding.rb#9 - def inherited(klass); end - - # Specify the encoding for a parameter on an action. - # If not specified the default is UTF-8. - # - # You can specify a binary (ASCII_8BIT) parameter with: - # - # class RepositoryController < ActionController::Base - # # This specifies that file_path is not UTF-8 and is instead ASCII_8BIT - # param_encoding :show, :file_path, Encoding::ASCII_8BIT - # - # def show - # @repo = Repository.find_by_filesystem_path params[:file_path] - # - # # params[:repo_name] remains UTF-8 encoded - # @repo_name = params[:repo_name] - # end - # - # def index - # @repositories = Repository.all - # end - # end - # - # The file_path parameter on the show action would be encoded as ASCII-8BIT, - # but all other arguments will remain UTF-8 encoded. - # This is useful in the case where an application must handle data - # but encoding of the data is unknown, like file system data. - # - # source://actionpack//lib/action_controller/metal/parameter_encoding.rb#77 - def param_encoding(action, param, encoding); end - - # source://actionpack//lib/action_controller/metal/parameter_encoding.rb#14 - def setup_param_encode; end - - # Specify that a given action's parameters should all be encoded as - # ASCII-8BIT (it "skips" the encoding default of UTF-8). - # - # For example, a controller would use it like this: - # - # class RepositoryController < ActionController::Base - # skip_parameter_encoding :show - # - # def show - # @repo = Repository.find_by_filesystem_path params[:file_path] - # - # # `repo_name` is guaranteed to be UTF-8, but was ASCII-8BIT, so - # # tag it as such - # @repo_name = params[:repo_name].force_encoding 'UTF-8' - # end - # - # def index - # @repositories = Repository.all - # end - # end - # - # The show action in the above controller would have all parameter values - # encoded as ASCII-8BIT. This is useful in the case where an application - # must handle data but encoding of the data is unknown, like file system data. - # - # source://actionpack//lib/action_controller/metal/parameter_encoding.rb#48 - def skip_parameter_encoding(action); end -end - -# Raised when a required parameter is missing. -# -# params = ActionController::Parameters.new(a: {}) -# params.fetch(:b) -# # => ActionController::ParameterMissing: param is missing or the value is empty: b -# params.require(:a) -# # => ActionController::ParameterMissing: param is missing or the value is empty: a -# -# source://actionpack//lib/action_controller/metal/strong_parameters.rb#21 -class ActionController::ParameterMissing < ::KeyError - # @return [ParameterMissing] a new instance of ParameterMissing - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#24 - def initialize(param, keys = T.unsafe(nil)); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#33 - def corrections; end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#22 - def keys; end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#22 - def param; end -end - -# == 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. -# Provides two methods for this purpose: #require and #permit. The former is -# used to mark parameters as required. The latter is used to set the parameter -# as permitted and limit which attributes should be allowed for mass updating. -# -# params = ActionController::Parameters.new({ -# person: { -# name: "Francesco", -# age: 22, -# role: "admin" -# } -# }) -# -# permitted = params.require(:person).permit(:name, :age) -# permitted # => #"Francesco", "age"=>22} permitted: true> -# permitted.permitted? # => true -# -# Person.first.update!(permitted) -# # => # -# -# It provides two options that controls the top-level behavior of new instances: -# -# * +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: -# * +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. -# * :raise to raise a ActionController::UnpermittedParameters exception. -# -# Examples: -# -# params = ActionController::Parameters.new -# params.permitted? # => false -# -# ActionController::Parameters.permit_all_parameters = true -# -# params = ActionController::Parameters.new -# params.permitted? # => true -# -# params = ActionController::Parameters.new(a: "123", b: "456") -# params.permit(:c) -# # => # -# -# ActionController::Parameters.action_on_unpermitted_parameters = :raise -# -# params = ActionController::Parameters.new(a: "123", b: "456") -# params.permit(:c) -# # => ActionController::UnpermittedParameters: found unpermitted keys: a, b -# -# Please note that these options *are not thread-safe*. In a multi-threaded -# environment they should only be set once at boot-time and never mutated at -# runtime. -# -# 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 -class ActionController::Parameters - # Returns a new instance of ActionController::Parameters. - # Also, sets the +permitted+ attribute to the default value of - # ActionController::Parameters.permit_all_parameters. - # - # class Person < ActiveRecord::Base - # end - # - # params = ActionController::Parameters.new(name: "Francesco") - # params.permitted? # => false - # Person.new(params) # => ActiveModel::ForbiddenAttributesError - # - # ActionController::Parameters.permit_all_parameters = true - # - # params = ActionController::Parameters.new(name: "Francesco") - # params.permitted? # => true - # Person.new(params) # => # - # - # @return [Parameters] a new instance of Parameters - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#267 - 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#275 - def ==(other); end - - # Returns a parameter for the given +key+. If not found, - # returns +nil+. - # - # params = ActionController::Parameters.new(person: { name: "Francesco" }) - # params[:person] # => #"Francesco"} permitted: false> - # params[:none] # => nil - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#643 - 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#649 - def []=(key, value); 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#243 - def always_permitted_parameters=(val); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#233 - def as_json(*_arg0, **_arg1, &_arg2); end - - # Returns a new instance of ActionController::Parameters with +nil+ values removed. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#819 - 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#824 - def compact!; end - - # Returns a new instance of ActionController::Parameters without the blank values. - # Uses Object#blank? for determining if a value is blank. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#830 - 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#836 - def compact_blank!; end - - # Attribute that keeps track of converted arrays, if any, to avoid double - # looping in the common use case permit + mass-assignment. Defined in a - # method to instantiate it only if needed. - # - # Testing membership still loops, but it's going to be faster than our own - # 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#407 - def converted_arrays; end - - # Returns duplicate of object including all parameters. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#921 - def deep_dup; 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#770 - def deep_transform_keys(&block); end - - # Returns the ActionController::Parameters instance changing its 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#779 - def deep_transform_keys!(&block); end - - # Deletes a key-value pair from +Parameters+ and returns the value. If - # +key+ is not found, returns +nil+ (or, with optional code block, yields - # +key+ and returns the result). Cf. #extract!, which returns the - # corresponding +ActionController::Parameters+ object. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#788 - 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#812 - def delete_if(&block); end - - # Extracts the nested parameter from the given +keys+ by calling +dig+ - # at each step. Returns +nil+ if any intermediate step is +nil+. - # - # params = ActionController::Parameters.new(foo: { bar: { baz: 1 } }) - # params.dig(:foo, :bar, :baz) # => 1 - # params.dig(:foo, :zot, :xyz) # => nil - # - # params2 = ActionController::Parameters.new(foo: [10, 11, 12]) - # params2.dig(:foo, 1) # => 11 - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#687 - 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#379 - def each(&block); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#233 - 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#379 - 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#391 - def each_value(&block); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#233 - def empty?(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#916 - def encode_with(coder); end - - # @return [Boolean] - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#283 - def eql?(other); 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#716 - def except(*keys); 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#725 - def extract!(*keys); 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; - # if a second argument is given, then that is returned (converted to an - # instance of ActionController::Parameters if possible); if a block - # is given, then that will be run and its result returned. - # - # params = ActionController::Parameters.new(person: { name: "Francesco" }) - # params.fetch(:person) # => #"Francesco"} permitted: false> - # params.fetch(:none) # => ActionController::ParameterMissing: param is missing or the value is empty: none - # params.fetch(:none, {}) # => # - # params.fetch(:none, "Francesco") # => "Francesco" - # params.fetch(:none) { "Francesco" } # => "Francesco" - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#666 - def fetch(key, *args); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#233 - def has_key?(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#233 - def has_value?(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#289 - def hash; end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#233 - def include?(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#898 - def init_with(coder); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#885 - 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#799 - def keep_if(&block); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#233 - def key?(*_arg0, **_arg1, &_arg2); end - - # :method: values - # - # :call-seq: - # values() - # - # Returns a new array of the values of the parameters. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#233 - def keys(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#233 - def member?(*_arg0, **_arg1, &_arg2); end - - # Returns a new ActionController::Parameters with all keys from - # +other_hash+ merged into current hash. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#848 - def merge(other_hash); end - - # Returns current ActionController::Parameters instance with - # +other_hash+ merged into current hash. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#856 - def merge!(other_hash); end - - # 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. - # - # params = ActionController::Parameters.new(user: { name: "Francesco", age: 22, role: "admin" }) - # permitted = params.require(:user).permit(:name, :age) - # permitted.permitted? # => true - # permitted.has_key?(:name) # => true - # permitted.has_key?(:age) # => true - # permitted.has_key?(:role) # => false - # - # Only permitted scalars pass the filter. For example, given - # - # params.permit(:name) - # - # +:name+ passes if it is a key of +params+ whose associated value is of type - # +String+, +Symbol+, +NilClass+, +Numeric+, +TrueClass+, +FalseClass+, - # +Date+, +Time+, +DateTime+, +StringIO+, +IO+, - # +ActionDispatch::Http::UploadedFile+ or +Rack::Test::UploadedFile+. - # Otherwise, the key +:name+ is filtered out. - # - # You may declare that the parameter should be an array of permitted scalars - # by mapping it to an empty array: - # - # params = ActionController::Parameters.new(tags: ["rails", "parameters"]) - # params.permit(tags: []) - # - # Sometimes it is not possible or convenient to declare the valid keys of - # a hash parameter or its internal structure. Just map to an empty hash: - # - # params.permit(preferences: {}) - # - # Be careful because this opens the door to arbitrary input. In this - # case, +permit+ ensures values in the returned structure are permitted - # scalars and filters out anything else. - # - # You can also use +permit+ on nested parameters, like: - # - # params = ActionController::Parameters.new({ - # person: { - # name: "Francesco", - # age: 22, - # pets: [{ - # name: "Purplish", - # category: "dogs" - # }] - # } - # }) - # - # permitted = params.permit(person: [ :name, { pets: :name } ]) - # permitted.permitted? # => true - # permitted[:person][:name] # => "Francesco" - # permitted[:person][:age] # => nil - # permitted[:person][:pets][0][:name] # => "Purplish" - # permitted[:person][:pets][0][:category] # => nil - # - # Note that if you use +permit+ in a key that points to a hash, - # it won't allow all the hash. You also need to specify which - # attributes inside the hash should be permitted. - # - # params = ActionController::Parameters.new({ - # person: { - # contact: { - # email: "none@test.com", - # phone: "555-1234" - # } - # } - # }) - # - # params.require(:person).permit(:contact) - # # => # - # - # params.require(:person).permit(contact: :phone) - # # => ##"555-1234"} permitted: true>} permitted: true> - # - # params.require(:person).permit(contact: [ :email, :phone ]) - # # => ##"none@test.com", "phone"=>"555-1234"} permitted: true>} permitted: true> - # - # If your parameters specify multiple parameters indexed by a number, - # you can permit each set of parameters under the numeric key to be the same using the same syntax as permitting a single item. - # - # params = ActionController::Parameters.new({ - # person: { - # '0': { - # email: "none@test.com", - # phone: "555-1234" - # }, - # '1': { - # email: "nothing@test.com", - # phone: "555-6789" - # }, - # } - # }) - # params.permit(person: [:email]).to_h - # # => {"person"=>{"0"=>{"email"=>"none@test.com"}, "1"=>{"email"=>"nothing@test.com"}}} - # - # If you want to specify what keys you want from each numeric key, you can instead specify each one individually - # - # params = ActionController::Parameters.new({ - # person: { - # '0': { - # email: "none@test.com", - # phone: "555-1234" - # }, - # '1': { - # email: "nothing@test.com", - # phone: "555-6789" - # }, - # } - # }) - # 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#620 - def permit(*filters); end - - # Sets the +permitted+ attribute to +true+. This can be used to pass - # mass assignment. Returns +self+. - # - # class Person < ActiveRecord::Base - # end - # - # params = ActionController::Parameters.new(name: "Francesco") - # params.permitted? # => false - # Person.new(params) # => ActiveModel::ForbiddenAttributesError - # params.permit! - # params.permitted? # => true - # Person.new(params) # => # - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#433 - def permit!; end - - # Returns +true+ if the parameter is permitted, +false+ otherwise. - # - # params = ActionController::Parameters.new - # params.permitted? # => false - # params.permit! - # params.permitted? # => true - # - # @return [Boolean] - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#417 - def permitted?; end - - # Returns a new instance of ActionController::Parameters with items - # that the block evaluates to true removed. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#807 - def reject(&block); end - - # Removes items that the block evaluates to true and returns self. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#812 - def reject!(&block); end - - # This method accepts both a single key and an array of keys. - # - # When passed a single key, if it exists and its associated value is - # either present or the singleton +false+, returns said value: - # - # ActionController::Parameters.new(person: { name: "Francesco" }).require(:person) - # # => #"Francesco"} permitted: false> - # - # Otherwise raises ActionController::ParameterMissing: - # - # ActionController::Parameters.new.require(:person) - # # ActionController::ParameterMissing: param is missing or the value is empty: person - # - # ActionController::Parameters.new(person: nil).require(:person) - # # ActionController::ParameterMissing: param is missing or the value is empty: person - # - # ActionController::Parameters.new(person: "\t").require(:person) - # # ActionController::ParameterMissing: param is missing or the value is empty: person - # - # ActionController::Parameters.new(person: {}).require(:person) - # # ActionController::ParameterMissing: param is missing or the value is empty: person - # - # When given an array of keys, the method tries to require each one of them - # in order. If it succeeds, an array with the respective return values is - # returned: - # - # params = ActionController::Parameters.new(user: { ... }, profile: { ... }) - # user_params, profile_params = params.require([:user, :profile]) - # - # Otherwise, the method re-raises the first exception found: - # - # params = ActionController::Parameters.new(user: {}, profile: {}) - # user_params, profile_params = params.require([:user, :profile]) - # # ActionController::ParameterMissing: param is missing or the value is empty: user - # - # Technically this method can be used to fetch terminal values: - # - # # CAREFUL - # params = ActionController::Parameters.new(person: { name: "Finn" }) - # name = params.require(:person).require(:name) # CAREFUL - # - # but take into account that at some point those ones have to be permitted: - # - # def person_params - # params.require(:person).permit(:name).tap do |person_params| - # person_params.require(:name) # SAFER - # end - # end - # - # for example. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#494 - def require(key); end - - # This method accepts both a single key and an array of keys. - # - # When passed a single key, if it exists and its associated value is - # either present or the singleton +false+, returns said value: - # - # ActionController::Parameters.new(person: { name: "Francesco" }).require(:person) - # # => #"Francesco"} permitted: false> - # - # Otherwise raises ActionController::ParameterMissing: - # - # ActionController::Parameters.new.require(:person) - # # ActionController::ParameterMissing: param is missing or the value is empty: person - # - # ActionController::Parameters.new(person: nil).require(:person) - # # ActionController::ParameterMissing: param is missing or the value is empty: person - # - # ActionController::Parameters.new(person: "\t").require(:person) - # # ActionController::ParameterMissing: param is missing or the value is empty: person - # - # ActionController::Parameters.new(person: {}).require(:person) - # # ActionController::ParameterMissing: param is missing or the value is empty: person - # - # When given an array of keys, the method tries to require each one of them - # in order. If it succeeds, an array with the respective return values is - # returned: - # - # params = ActionController::Parameters.new(user: { ... }, profile: { ... }) - # user_params, profile_params = params.require([:user, :profile]) - # - # Otherwise, the method re-raises the first exception found: - # - # params = ActionController::Parameters.new(user: {}, profile: {}) - # user_params, profile_params = params.require([:user, :profile]) - # # ActionController::ParameterMissing: param is missing or the value is empty: user - # - # Technically this method can be used to fetch terminal values: - # - # # CAREFUL - # params = ActionController::Parameters.new(person: { name: "Finn" }) - # name = params.require(:person).require(:name) # CAREFUL - # - # but take into account that at some point those ones have to be permitted: - # - # def person_params - # params.require(:person).permit(:name).tap do |person_params| - # person_params.require(:name) # SAFER - # end - # end - # - # for example. - # Alias of #require. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#494 - def required(key); end - - # Returns a new ActionController::Parameters with all keys from - # current hash merged into +other_hash+. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#863 - def reverse_merge(other_hash); end - - # Returns current ActionController::Parameters instance with - # current hash merged into +other_hash+. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#872 - def reverse_merge!(other_hash); end - - # Returns a new instance of ActionController::Parameters with only - # items that the block evaluates to true. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#794 - 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#799 - def select!(&block); end - - # Returns a new ActionController::Parameters instance that - # includes only the given +keys+. If the given +keys+ - # don't exist, returns an empty hash. - # - # params = ActionController::Parameters.new(a: 1, b: 2, c: 3) - # params.slice(:a, :b) # => #1, "b"=>2} permitted: false> - # params.slice(:d) # => # - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#699 - def slice(*keys); end - - # Returns current ActionController::Parameters instance which - # contains only the given +keys+. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#705 - 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#881 - def stringify_keys; end - - # Returns a safe ActiveSupport::HashWithIndifferentAccess - # representation of the parameters with all unpermitted keys removed. - # - # params = ActionController::Parameters.new({ - # name: "Senjougahara Hitagi", - # oddity: "Heavy stone crab" - # }) - # params.to_h - # # => ActionController::UnfilteredParameters: unable to convert unpermitted parameters to hash - # - # safe_params = params.permit(:name) - # safe_params.to_h # => {"name"=>"Senjougahara Hitagi"} - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#305 - def to_h; end - - # Returns a safe Hash representation of the parameters - # with all unpermitted keys removed. - # - # params = ActionController::Parameters.new({ - # name: "Senjougahara Hitagi", - # oddity: "Heavy stone crab" - # }) - # params.to_hash - # # => ActionController::UnfilteredParameters: unable to convert unpermitted parameters to hash - # - # safe_params = params.permit(:name) - # safe_params.to_hash # => {"name"=>"Senjougahara Hitagi"} - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#325 - def to_hash; end - - # Returns a string representation of the receiver suitable for use as a URL - # query string: - # - # params = ActionController::Parameters.new({ - # name: "David", - # nationality: "Danish" - # }) - # params.to_query - # # => ActionController::UnfilteredParameters: unable to convert unpermitted parameters to hash - # - # safe_params = params.permit(:name, :nationality) - # safe_params.to_query - # # => "name=David&nationality=Danish" - # - # An optional namespace can be passed to enclose key names: - # - # params = ActionController::Parameters.new({ - # name: "David", - # nationality: "Danish" - # }) - # safe_params = params.permit(:name, :nationality) - # safe_params.to_query("user") - # # => "user%5Bname%5D=David&user%5Bnationality%5D=Danish" - # - # The string pairs "key=value" that conform the query string - # are sorted lexicographically in ascending order. - # - # This method is also aliased as +to_param+. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#357 - def to_param(*args); end - - # Returns a string representation of the receiver suitable for use as a URL - # query string: - # - # params = ActionController::Parameters.new({ - # name: "David", - # nationality: "Danish" - # }) - # params.to_query - # # => ActionController::UnfilteredParameters: unable to convert unpermitted parameters to hash - # - # safe_params = params.permit(:name, :nationality) - # safe_params.to_query - # # => "name=David&nationality=Danish" - # - # An optional namespace can be passed to enclose key names: - # - # params = ActionController::Parameters.new({ - # name: "David", - # nationality: "Danish" - # }) - # safe_params = params.permit(:name, :nationality) - # safe_params.to_query("user") - # # => "user%5Bname%5D=David&user%5Bnationality%5D=Danish" - # - # The string pairs "key=value" that conform the query string - # are sorted lexicographically in ascending order. - # - # This method is also aliased as +to_param+. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#357 - def to_query(*args); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#233 - def to_s(*_arg0, **_arg1, &_arg2); end - - # Returns an unsafe, unfiltered - # ActiveSupport::HashWithIndifferentAccess representation of the - # parameters. - # - # params = ActionController::Parameters.new({ - # name: "Senjougahara Hitagi", - # oddity: "Heavy stone crab" - # }) - # params.to_unsafe_h - # # => {"name"=>"Senjougahara Hitagi", "oddity" => "Heavy stone crab"} - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#372 - def to_unsafe_h; end - - # Returns an unsafe, unfiltered - # ActiveSupport::HashWithIndifferentAccess representation of the - # parameters. - # - # params = ActionController::Parameters.new({ - # name: "Senjougahara Hitagi", - # oddity: "Heavy stone crab" - # }) - # params.to_unsafe_h - # # => {"name"=>"Senjougahara Hitagi", "oddity" => "Heavy stone crab"} - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#372 - def to_unsafe_hash; end - - # 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#752 - def transform_keys(&block); end - - # Performs keys transformation and returns the altered - # ActionController::Parameters instance. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#761 - def transform_keys!(&block); end - - # Returns a new ActionController::Parameters 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#735 - def transform_values; end - - # Performs values transformation and returns the altered - # ActionController::Parameters instance. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#744 - def transform_values!; end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#233 - def value?(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#233 - def values(*_arg0, **_arg1, &_arg2); end - - # Returns values that were assigned to the given +keys+. Note that all the - # +Hash+ objects will be converted to ActionController::Parameters. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#842 - def values_at(*keys); end - - # Returns a new ActionController::Parameters with all keys from - # current hash merged into +other_hash+. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#863 - def with_defaults(other_hash); end - - # Returns current ActionController::Parameters instance with - # current hash merged into +other_hash+. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#872 - def with_defaults!(other_hash); end - - protected - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#936 - def each_nested_attribute; end - - # @return [Boolean] - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#932 - def nested_attributes?; end - - # Returns the value of attribute parameters. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#928 - 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#930 - def permitted=(_arg0); end - - private - - # @return [Boolean] - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1076 - def array_of_permitted_scalars?(value); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#964 - def convert_hashes_to_parameters(key, value); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#949 - def convert_parameters_to_hashes(value, using); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#970 - def convert_value_to_parameters(value); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#990 - def each_element(object, filter, &block); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1088 - def hash_filter(params, filter); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1147 - def initialize_copy(source); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#943 - def new_instance_with_inherited_permitted_status(hash); end - - # @return [Boolean] - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1082 - def non_scalar?(value); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1132 - def permit_any_in_array(array); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1115 - def permit_any_in_parameters(params); end - - # @return [Boolean] - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1047 - def permitted_scalar?(value); end - - # Adds existing keys to the params if their values are scalar. - # - # For example: - # - # puts self.keys #=> ["zipcode(90210i)"] - # params = {} - # - # permitted_scalar_filter(params, "zipcode") - # - # puts params.keys # => ["zipcode"] - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1061 - def permitted_scalar_filter(params, permitted_key); end - - # @return [Boolean] - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#984 - def specify_numeric_keys?(filter); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1016 - def unpermitted_keys(params); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1003 - def unpermitted_parameters!(params); end - - class << self - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#135 - def action_on_unpermitted_parameters; end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#135 - def action_on_unpermitted_parameters=(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#243 - def always_permitted_parameters=(val); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#889 - def hook_into_yaml_loading; end - - # @return [Boolean] - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#246 - def nested_attribute?(key, value); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#133 - def permit_all_parameters; end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#133 - def permit_all_parameters=(val); end - end -end - -# source://actionpack//lib/action_controller/metal/strong_parameters.rb#1086 -ActionController::Parameters::EMPTY_ARRAY = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_controller/metal/strong_parameters.rb#1087 -ActionController::Parameters::EMPTY_HASH = T.let(T.unsafe(nil), Hash) - -# This is a list of permitted scalar types that includes the ones -# supported in XML and JSON requests. -# -# This list is in particular used to filter ordinary requests, String goes -# as first element to quickly short-circuit the common case. -# -# If you modify this collection please update the API of +permit+ above. -# -# source://actionpack//lib/action_controller/metal/strong_parameters.rb#1031 -ActionController::Parameters::PERMITTED_SCALAR_TYPES = T.let(T.unsafe(nil), Array) - -# Wraps the parameters hash into a nested hash. This will allow clients to -# submit requests without having to specify any root elements. -# -# This functionality is enabled by default for JSON, and can be customized by -# setting the format array: -# -# class ApplicationController < ActionController::Base -# wrap_parameters format: [:json, :xml] -# end -# -# You could also turn it on per controller: -# -# class UsersController < ApplicationController -# wrap_parameters format: [:json, :xml, :url_encoded_form, :multipart_form] -# end -# -# If you enable +ParamsWrapper+ for +:json+ format, instead of having to -# send JSON parameters like this: -# -# {"user": {"name": "Konata"}} -# -# You can send parameters like this: -# -# {"name": "Konata"} -# -# And it will be wrapped into a nested hash with the key name matching the -# controller's name. For example, if you're posting to +UsersController+, -# your new +params+ hash will look like this: -# -# {"name" => "Konata", "user" => {"name" => "Konata"}} -# -# You can also specify the key in which the parameters should be wrapped to, -# and also the list of attributes it should wrap by using either +:include+ or -# +:exclude+ options like this: -# -# class UsersController < ApplicationController -# wrap_parameters :person, include: [:username, :password] -# end -# -# On Active Record models with no +:include+ or +:exclude+ option set, -# it will only wrap the parameters returned by the class method -# attribute_names. -# -# If you're going to pass the parameters to an +ActiveModel+ object (such as -# User::User.new(params[:user])), you might consider passing the model class to -# the method instead. The +ParamsWrapper+ will actually try to determine the -# list of attribute names from the model and only wrap those attributes: -# -# class UsersController < ApplicationController -# wrap_parameters Person -# end -# -# You still could pass +:include+ and +:exclude+ to set the list of attributes -# you want to wrap. -# -# By default, if you don't specify the key in which the parameters would be -# wrapped to, +ParamsWrapper+ will actually try to determine if there's -# a model related to it or not. This controller, for example: -# -# class Admin::UsersController < ApplicationController -# end -# -# 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. -# -# To disable this functionality for a controller: -# -# class UsersController < ApplicationController -# wrap_parameters false -# end -# -# source://actionpack//lib/action_controller/metal/params_wrapper.rb#80 -module ActionController::ParamsWrapper - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActionController::ParamsWrapper::ClassMethods - - private - - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#277 - def _extract_parameters(parameters); end - - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#299 - 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 - def _wrap_parameters(parameters); end - - # Checks if we should perform parameters wrapping. - # - # @return [Boolean] - # - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#289 - def _wrapper_enabled?; end - - # Returns the list of enabled formats. - # - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#268 - 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 - 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 - def process_action(*_arg0); end - - module GeneratedClassMethods - def _wrapper_options; end - def _wrapper_options=(value); end - def _wrapper_options?; end - end - - module GeneratedInstanceMethods - def _wrapper_options; end - def _wrapper_options=(value); end - def _wrapper_options?; end - end -end - -# source://actionpack//lib/action_controller/metal/params_wrapper.rb#188 -module ActionController::ParamsWrapper::ClassMethods - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#189 - 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 - def inherited(klass); end - - # Sets the name of the wrapper key, or the model which +ParamsWrapper+ - # would use to determine the attribute names from. - # - # ==== Examples - # wrap_parameters format: :xml - # # enables the parameter wrapper for XML format - # - # wrap_parameters :person - # # wraps parameters into +params[:person]+ hash - # - # wrap_parameters Person - # # wraps parameters by determining the wrapper key from Person class - # # (+person+, in this case) and the list of attribute names - # - # wrap_parameters include: [:username, :title] - # # wraps only +:username+ and +:title+ attributes from parameters. - # - # wrap_parameters false - # # disables parameters wrapping for this controller altogether. - # - # ==== Options - # * :format - The list of formats in which the parameters wrapper - # will be enabled. - # * :include - The list of attribute names which parameters wrapper - # will wrap into a nested hash. - # * :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 - def wrap_parameters(name_or_model_or_options, options = T.unsafe(nil)); end -end - -# source://actionpack//lib/action_controller/metal/params_wrapper.rb#83 -ActionController::ParamsWrapper::EXCLUDE_PARAMETERS = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_controller/metal/params_wrapper.rb#87 -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 - 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 - def include; end - - # source://mutex_m/0.1.1/mutex_m.rb#93 - def lock; end - - # source://mutex_m/0.1.1/mutex_m.rb#83 - def locked?; end - - # Returns the value of attribute model - # - # @return [Object] the current value of model - # - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#104 - 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 - def name; end - - # source://mutex_m/0.1.1/mutex_m.rb#78 - def synchronize(&block); end - - # source://mutex_m/0.1.1/mutex_m.rb#88 - def try_lock; end - - # source://mutex_m/0.1.1/mutex_m.rb#98 - def unlock; end - - private - - # Determine the wrapper model from the controller's name. By convention, - # this could be done by trying to find the defined model that has the - # same singular name as the controller. For example, +UsersController+ - # will try to find if the +User+ model exists. - # - # This method also does namespace lookup. Foo::Bar::UsersController will - # try to find Foo::Bar::User, Foo::User and finally User::User. - # - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#165 - def _default_wrap_model; end - - class << self - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#90 - def from_hash(hash); end - end -end - -# source://actionpack//lib/action_controller/metal/permissions_policy.rb#4 -module ActionController::PermissionsPolicy - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActionController::PermissionsPolicy::ClassMethods -end - -# source://actionpack//lib/action_controller/metal/permissions_policy.rb#7 -module ActionController::PermissionsPolicy::ClassMethods - # Overrides parts of the globally configured Feature-Policy - # header: - # - # class PagesController < ApplicationController - # permissions_policy do |policy| - # policy.geolocation "https://example.com" - # end - # end - # - # Options can be passed similar to +before_action+. For example, pass - # only: :index to override the header on the index action only: - # - # class PagesController < ApplicationController - # permissions_policy(only: :index) do |policy| - # policy.camera :self - # end - # end - # - # source://actionpack//lib/action_controller/metal/permissions_policy.rb#26 - def permissions_policy(**options, &block); end -end - -# source://actionpack//lib/action_controller/railtie.rb#11 -class ActionController::Railtie < ::Rails::Railtie; end - -# source://actionpack//lib/action_controller/railties/helpers.rb#4 -module ActionController::Railties; end - -# source://actionpack//lib/action_controller/railties/helpers.rb#5 -module ActionController::Railties::Helpers - # source://actionpack//lib/action_controller/railties/helpers.rb#6 - def inherited(klass); end -end - -# source://actionpack//lib/action_controller/metal/redirecting.rb#4 -module ActionController::Redirecting - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - include ::ActiveSupport::Benchmarkable - include ::AbstractController::Logger - include ::ActionDispatch::Routing::UrlFor - include ::AbstractController::UrlFor - include ::ActionController::UrlFor - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::AbstractController::UrlFor::ClassMethods - - # source://actionpack//lib/action_controller/metal/redirecting.rb#130 - def _compute_redirect_to_location(request, options); end - - # Soft deprecated alias for #redirect_back_or_to where the +fallback_location+ location is supplied as a keyword argument instead - # of the first positional argument. - # - # source://actionpack//lib/action_controller/metal/redirecting.rb#95 - def redirect_back(fallback_location:, allow_other_host: T.unsafe(nil), **args); end - - # Redirects the browser to the page that issued the request (the referrer) - # if possible, otherwise redirects to the provided default fallback - # location. - # - # The referrer information is pulled from the HTTP +Referer+ (sic) header on - # the request. This is an optional header and its presence on the request is - # subject to browser security settings and user preferences. If the request - # is missing this header, the fallback_location will be used. - # - # redirect_back_or_to({ action: "show", id: 5 }) - # redirect_back_or_to @post - # redirect_back_or_to "http://www.rubyonrails.org" - # redirect_back_or_to "/images/screenshot.jpg" - # redirect_back_or_to posts_url - # redirect_back_or_to proc { edit_post_url(@post) } - # redirect_back_or_to '/', allow_other_host: false - # - # ==== Options - # * :allow_other_host - Allow or disallow redirection to the host that is different to the current host, defaults to true. - # - # All other options that can be passed to #redirect_to are accepted as - # options, and the behavior is identical. - # - # source://actionpack//lib/action_controller/metal/redirecting.rb#121 - def redirect_back_or_to(fallback_location, allow_other_host: T.unsafe(nil), **options); end - - # Redirects the browser to the target specified in +options+. This parameter can be any one of: - # - # * Hash - The URL will be generated by calling url_for with the +options+. - # * Record - The URL will be generated by calling url_for with the +options+, which will reference a named URL for that record. - # * String starting with protocol:// (like http://) or a protocol relative reference (like //) - Is passed straight through as the target for redirection. - # * 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: - # - # redirect_to action: "show", id: 5 - # redirect_to @post - # redirect_to "http://www.rubyonrails.org" - # redirect_to "/images/screenshot.jpg" - # redirect_to posts_url - # redirect_to proc { edit_post_url(@post) } - # - # The redirection happens as a 302 Found header unless otherwise specified using the :status option: - # - # redirect_to post_url(@post), status: :found - # redirect_to action: 'atom', status: :moved_permanently - # redirect_to post_url(@post), status: 301 - # redirect_to action: 'atom', status: 302 - # - # The status code can either be a standard {HTTP Status code}[https://www.iana.org/assignments/http-status-codes] as an - # integer, or a symbol representing the downcased, underscored and symbolized description. - # Note that the status code must be a 3xx HTTP code, or redirection will not occur. - # - # If you are using XHR requests other than GET or POST and redirecting after the - # request then some browsers will follow the redirect using the original request - # method. This may lead to undesirable behavior such as a double DELETE. To work - # around this you can return a 303 See Other status code which will be - # followed using a GET request. - # - # redirect_to posts_url, status: :see_other - # redirect_to action: 'index', status: 303 - # - # It is also possible to assign a flash message as part of the redirection. There are two special accessors for the commonly used flash names - # +alert+ and +notice+ as well as a general purpose +flash+ bucket. - # - # redirect_to post_url(@post), alert: "Watch it, mister!" - # redirect_to post_url(@post), status: :found, notice: "Pay attention to the road" - # redirect_to post_url(@post), status: 301, flash: { updated_post_id: @post.id } - # redirect_to({ action: 'atom' }, alert: "Something serious happened") - # - # Statements after +redirect_to+ in our controller get executed, so +redirect_to+ doesn't stop the execution of the function. - # To terminate the execution of the function immediately after the +redirect_to+, use return. - # - # redirect_to post_url(@post) and return - # - # === 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 - # - # Here #redirect_to automatically validates the potentially-unsafe URL: - # - # redirect_to params[:redirect_url] - # - # Raises UnsafeRedirectError in the case of an unsafe redirect. - # - # To allow any external redirects pass allow_other_host: true, though using a user-provided param in that case is unsafe. - # - # redirect_to "https://rubyonrails.org", allow_other_host: true - # - # See #url_from for more information on what an internal and safe URL is, or how to fall back to an alternate redirect URL in the unsafe case. - # - # @raise [ActionControllerError] - # - # source://actionpack//lib/action_controller/metal/redirecting.rb#82 - def redirect_to(options = T.unsafe(nil), response_options = T.unsafe(nil)); end - - # Verifies the passed +location+ is an internal URL that's safe to redirect to and returns it, or nil if not. - # Useful to wrap a params provided redirect URL and fallback to an alternate URL to redirect to: - # - # redirect_to url_from(params[:redirect_url]) || root_url - # - # The +location+ is considered internal, and safe, if it's on the same host as request.host: - # - # # If request.host is example.com: - # url_from("https://example.com/profile") # => "https://example.com/profile" - # url_from("http://example.com/profile") # => "http://example.com/profile" - # url_from("http://evil.com/profile") # => nil - # - # Subdomains are considered part of the host: - # - # # If request.host is on https://example.com or https://app.example.com, you'd get: - # url_from("https://dev.example.com/profile") # => nil - # - # NOTE: there's a similarity with {url_for}[rdoc-ref:ActionDispatch::Routing::UrlFor#url_for], which generates an internal URL from various options from within the app, e.g. url_for(@post). - # However, #url_from is meant to take an external parameter to verify as in url_from(params[:redirect_url]). - # - # source://actionpack//lib/action_controller/metal/redirecting.rb#169 - def url_from(location); end - - private - - # source://actionpack//lib/action_controller/metal/redirecting.rb#175 - def _allow_other_host; end - - # source://actionpack//lib/action_controller/metal/redirecting.rb#189 - def _enforce_open_redirect_protection(location, allow_other_host:); end - - # source://actionpack//lib/action_controller/metal/redirecting.rb#179 - def _extract_redirect_to_status(options, response_options); end - - # @return [Boolean] - # - # source://actionpack//lib/action_controller/metal/redirecting.rb#197 - def _url_host_allowed?(url); end - - class << self - # source://actionpack//lib/action_controller/metal/redirecting.rb#130 - def _compute_redirect_to_location(request, options); end - end - - module GeneratedClassMethods - def default_url_options; end - def default_url_options=(value); end - def default_url_options?; end - end - - module GeneratedInstanceMethods - def default_url_options; end - def default_url_options=(value); end - def default_url_options?; end - end -end - -# 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 -# -# It allows you to call method #render directly. -# -# ApplicationController.renderer.render template: '...' -# -# You can use this shortcut in a controller, instead of the previous example: -# -# ApplicationController.render template: '...' -# -# #render allows you to use the same options that you can use when rendering in a controller. -# For example: -# -# 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: -# -# * by changing renderer defaults, like -# -# ApplicationController.renderer.defaults # => hash with default Rack environment -# -# * by initializing an instance of renderer by passing it a custom environment. -# -# ApplicationController.renderer.new(method: 'post', https: true) -# -# source://actionpack//lib/action_controller/renderer.rb#36 -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+. - # - # @return [Renderer] a new instance of Renderer - # - # source://actionpack//lib/action_controller/renderer.rb#65 - def initialize(controller, env, defaults); end - - # Returns the value of attribute controller. - # - # source://actionpack//lib/action_controller/renderer.rb#37 - def controller; end - - # Returns the value of attribute defaults. - # - # source://actionpack//lib/action_controller/renderer.rb#37 - def defaults; end - - # Create a new renderer for the same controller but with a new env. - # - # source://actionpack//lib/action_controller/renderer.rb#53 - def new(env = T.unsafe(nil)); end - - # Render templates with any options from ActionController::Base#render_to_string. - # - # The primary options are: - # * :partial - See ActionView::PartialRenderer for details. - # * :file - Renders an explicit template file. Add :locals to pass in, if so desired. - # It shouldn’t be used directly with unsanitized user input due to lack of validation. - # * :inline - Renders an ERB template string. - # * :plain - Renders provided text and sets the content type as text/plain. - # * :html - Renders the provided HTML safe string, otherwise - # performs HTML escape on the string first. Sets the content type as text/html. - # * :json - Renders the provided hash or object in JSON. You don't - # need to call .to_json on the object you want to render. - # * :body - Renders provided text and sets content type of text/plain. - # - # If no options hash is passed or if :update is specified, then: - # - # If an object responding to +render_in+ is passed, +render_in+ is called on the object, - # passing in the current view context. - # - # Otherwise, a partial is rendered using the second parameter as the locals hash. - # - # source://actionpack//lib/action_controller/renderer.rb#91 - def render(*args); end - - # Render templates with any options from ActionController::Base#render_to_string. - # - # The primary options are: - # * :partial - See ActionView::PartialRenderer for details. - # * :file - Renders an explicit template file. Add :locals to pass in, if so desired. - # It shouldn’t be used directly with unsanitized user input due to lack of validation. - # * :inline - Renders an ERB template string. - # * :plain - Renders provided text and sets the content type as text/plain. - # * :html - Renders the provided HTML safe string, otherwise - # performs HTML escape on the string first. Sets the content type as text/html. - # * :json - Renders the provided hash or object in JSON. You don't - # need to call .to_json on the object you want to render. - # * :body - Renders provided text and sets content type of text/plain. - # - # If no options hash is passed or if :update is specified, then: - # - # If an object responding to +render_in+ is passed, +render_in+ is called on the object, - # passing in the current view context. - # - # Otherwise, a partial is rendered using the second parameter as the locals hash. - # - # source://actionpack//lib/action_controller/renderer.rb#91 - def render_to_string(*args); end - - # Create a new renderer for the same controller but with new defaults. - # - # source://actionpack//lib/action_controller/renderer.rb#58 - def with_defaults(defaults); end - - private - - # source://actionpack//lib/action_controller/renderer.rb#105 - def normalize_keys(defaults, env); end - - # source://actionpack//lib/action_controller/renderer.rb#126 - def rack_key_for(key); end - - # source://actionpack//lib/action_controller/renderer.rb#130 - def rack_value_for(key, value); end - - class << self - # Create a new renderer instance for a specific controller class. - # - # source://actionpack//lib/action_controller/renderer.rb#48 - def for(controller, env = T.unsafe(nil), defaults = T.unsafe(nil)); end - end -end - -# source://actionpack//lib/action_controller/renderer.rb#39 -ActionController::Renderer::DEFAULTS = T.let(T.unsafe(nil), Hash) - -# source://actionpack//lib/action_controller/renderer.rb#118 -ActionController::Renderer::RACK_KEY_TRANSLATION = T.let(T.unsafe(nil), Hash) - -# source://actionpack//lib/action_controller/metal/renderers.rb#23 -module ActionController::Renderers - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActionController::Renderers::ClassMethods - - # source://actionpack//lib/action_controller/metal/renderers.rb#144 - def _render_to_body_with_renderer(options); end - - # source://actionpack//lib/action_controller/metal/renderers.rb#170 - def _render_with_renderer_js(js, options); end - - # source://actionpack//lib/action_controller/metal/renderers.rb#155 - def _render_with_renderer_json(json, options); end - - # source://turbo-rails/1.3.3/lib/turbo/engine.rb#56 - def _render_with_renderer_turbo_stream(turbo_streams_html, options); end - - # source://actionpack//lib/action_controller/metal/renderers.rb#175 - def _render_with_renderer_xml(xml, options); end - - # Called by +render+ in AbstractController::Rendering - # which sets the return value as the +response_body+. - # - # If no renderer is found, +super+ returns control to - # ActionView::Rendering.render_to_body, if present. - # - # source://actionpack//lib/action_controller/metal/renderers.rb#140 - def render_to_body(options); end - - class << self - # source://actionpack//lib/action_controller/metal/renderers.rb#90 - def _render_with_renderer_method_name(key); end - - # Adds a new renderer to call within controller actions. - # A renderer is invoked by passing its name as an option to - # AbstractController::Rendering#render. To create a renderer - # pass it a name and a block. The block takes two arguments, the first - # is the value paired with its key and the second is the remaining - # hash of options passed to +render+. - # - # Create a csv renderer: - # - # ActionController::Renderers.add :csv do |obj, options| - # filename = options[:filename] || 'data' - # str = obj.respond_to?(:to_csv) ? obj.to_csv : obj.to_s - # send_data str, type: Mime[:csv], - # disposition: "attachment; filename=#{filename}.csv" - # end - # - # 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. - # - # To use the csv renderer in a controller action: - # - # def show - # @csvable = Csvable.find(params[:id]) - # respond_to do |format| - # format.html - # format.csv { render csv: @csvable, filename: @csvable.name } - # end - # end - # - # source://actionpack//lib/action_controller/metal/renderers.rb#74 - def add(key, &block); end - - # This method is the opposite of add method. - # - # To remove a csv renderer: - # - # ActionController::Renderers.remove(:csv) - # - # source://actionpack//lib/action_controller/metal/renderers.rb#84 - def remove(key); end - end - - module GeneratedClassMethods - def _renderers; end - def _renderers=(value); end - def _renderers?; end - end - - module GeneratedInstanceMethods - def _renderers; end - def _renderers=(value); end - def _renderers?; end - end -end - -# Used in ActionController::Base and ActionController::API to include all -# renderers by default. -# -# source://actionpack//lib/action_controller/metal/renderers.rb#36 -module ActionController::Renderers::All - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - include ::ActionController::Renderers - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActionController::Renderers::ClassMethods - - module GeneratedClassMethods - def _renderers; end - def _renderers=(value); end - def _renderers?; end - end - - module GeneratedInstanceMethods - def _renderers; end - def _renderers=(value); end - def _renderers?; end - end -end - -# source://actionpack//lib/action_controller/metal/renderers.rb#94 -module ActionController::Renderers::ClassMethods - # Adds, by name, a renderer or renderers to the +_renderers+ available - # to call within controller actions. - # - # It is useful when rendering from an ActionController::Metal controller or - # otherwise to add an available renderer proc to a specific controller. - # - # Both ActionController::Base and ActionController::API - # include ActionController::Renderers::All, making all renderers - # available in the controller. See Renderers::RENDERERS and Renderers.add. - # - # Since ActionController::Metal controllers cannot render, the controller - # must include AbstractController::Rendering, ActionController::Rendering, - # and ActionController::Renderers, and have at least one renderer. - # - # Rather than including ActionController::Renderers::All and including all renderers, - # you may specify which renderers to include by passing the renderer name or names to - # +use_renderers+. For example, a controller that includes only the :json renderer - # (+_render_with_renderer_json+) might look like: - # - # class MetalRenderingController < ActionController::Metal - # include AbstractController::Rendering - # include ActionController::Rendering - # include ActionController::Renderers - # - # use_renderers :json - # - # def show - # render json: record - # end - # end - # - # You must specify a +use_renderer+, else the +controller.renderer+ and - # +controller._renderers+ will be nil, and the action will fail. - # - # source://actionpack//lib/action_controller/metal/renderers.rb#128 - def use_renderer(*args); end - - # Adds, by name, a renderer or renderers to the +_renderers+ available - # to call within controller actions. - # - # It is useful when rendering from an ActionController::Metal controller or - # otherwise to add an available renderer proc to a specific controller. - # - # Both ActionController::Base and ActionController::API - # include ActionController::Renderers::All, making all renderers - # available in the controller. See Renderers::RENDERERS and Renderers.add. - # - # Since ActionController::Metal controllers cannot render, the controller - # must include AbstractController::Rendering, ActionController::Rendering, - # and ActionController::Renderers, and have at least one renderer. - # - # Rather than including ActionController::Renderers::All and including all renderers, - # you may specify which renderers to include by passing the renderer name or names to - # +use_renderers+. For example, a controller that includes only the :json renderer - # (+_render_with_renderer_json+) might look like: - # - # class MetalRenderingController < ActionController::Metal - # include AbstractController::Rendering - # include ActionController::Rendering - # include ActionController::Renderers - # - # use_renderers :json - # - # def show - # render json: record - # end - # end - # - # You must specify a +use_renderer+, else the +controller.renderer+ and - # +controller._renderers+ will be nil, and the action will fail. - # - # source://actionpack//lib/action_controller/metal/renderers.rb#128 - def use_renderers(*args); end -end - -# A Set containing renderer names that correspond to available renderer procs. -# Default values are :json, :js, :xml. -# -# source://actionpack//lib/action_controller/metal/renderers.rb#28 -ActionController::Renderers::RENDERERS = T.let(T.unsafe(nil), Set) - -# source://actionpack//lib/action_controller/metal/rendering.rb#4 -module ActionController::Rendering - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActionController::Rendering::ClassMethods - - # Check for double render errors and set the content_type after rendering. - # - # @raise [::AbstractController::DoubleRenderError] - # - # source://actionpack//lib/action_controller/metal/rendering.rb#28 - def render(*args); end - - # source://actionpack//lib/action_controller/metal/rendering.rb#45 - def render_to_body(options = T.unsafe(nil)); end - - # Override render_to_string because body can now be set to a Rack body. - # - # source://actionpack//lib/action_controller/metal/rendering.rb#34 - def render_to_string(*_arg0); end - - private - - # Normalize arguments by catching blocks and setting them on :update. - # - # source://actionpack//lib/action_controller/metal/rendering.rb#87 - 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#94 - def _normalize_options(options); end - - # source://actionpack//lib/action_controller/metal/rendering.rb#108 - def _normalize_text(options); end - - # Process controller specific options, as status, content-type and location. - # - # source://actionpack//lib/action_controller/metal/rendering.rb#117 - def _process_options(options); end - - # source://actionpack//lib/action_controller/metal/rendering.rb#56 - def _process_variant(options); end - - # source://actionpack//lib/action_controller/metal/rendering.rb#62 - def _render_in_priorities(options); end - - # source://actionpack//lib/action_controller/metal/rendering.rb#70 - def _set_html_content_type; end - - # source://actionpack//lib/action_controller/metal/rendering.rb#74 - def _set_rendered_content_type(format); end - - # source://actionpack//lib/action_controller/metal/rendering.rb#80 - def _set_vary_header; end - - # Before processing, set the request formats in current controller formats. - # - # source://actionpack//lib/action_controller/metal/rendering.rb#51 - def process_action(*_arg0); end -end - -# source://actionpack//lib/action_controller/metal/rendering.rb#9 -module ActionController::Rendering::ClassMethods - # source://actionpack//lib/action_controller/metal/rendering.rb#21 - def inherited(klass); end - - # source://actionpack//lib/action_controller/metal/rendering.rb#11 - def render(*_arg0, **_arg1, &_arg2); end - - # Returns a renderer instance (inherited from ActionController::Renderer) - # for the controller. - # - # source://actionpack//lib/action_controller/metal/rendering.rb#15 - def renderer; end - - # source://actionpack//lib/action_controller/metal/rendering.rb#17 - def setup_renderer!; end -end - -# source://actionpack//lib/action_controller/metal/rendering.rb#7 -ActionController::Rendering::RENDER_FORMATS_IN_PRIORITY = T.let(T.unsafe(nil), Array) - -# 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 -# access. When a request reaches your application, \Rails verifies the received -# token with the token in the session. All requests are checked except GET requests -# as these should be idempotent. Keep in mind that all session-oriented requests -# are CSRF protected by default, including JavaScript and HTML requests. -# -# Since HTML and JavaScript requests are typically made from the browser, we -# need to ensure to verify request authenticity for the web browser. We can -# use session-oriented authentication for these types of requests, by using -# the protect_from_forgery method in our controllers. -# -# GET requests are not protected since they don't have side effects like writing -# to the database and don't leak sensitive information. JavaScript requests are -# an exception: a third-party site can use a -# -# 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 -# -# Not all web servers support streaming out-of-the-box. You need to check -# the instructions for each of them. -# -# ==== Unicorn -# -# Unicorn supports streaming but it needs to be configured. For this, you -# need to create a config file as follow: -# -# # unicorn.config.rb -# listen 3000, tcp_nopush: false -# -# And use it on initialization: -# -# 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 -# -# If you are using Unicorn with NGINX, you may need to tweak NGINX. -# Streaming should work out of the box on Rainbows. -# -# ==== Passenger -# -# To be described. -# -# source://actionpack//lib/action_controller/metal/streaming.rb#195 -module ActionController::Streaming - private - - # Set proper cache control and transfer encoding when streaming - # - # source://actionpack//lib/action_controller/metal/streaming.rb#198 - 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 - 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 -# to be used in Active Model mass assignment until they have been explicitly -# enumerated. -# -# In addition, parameters can be marked as required and flow through a -# predefined raise/rescue flow to end up as a 400 Bad Request with no -# effort. -# -# class PeopleController < ActionController::Base -# # Using "Person.create(params[:person])" would raise an -# # ActiveModel::ForbiddenAttributesError exception because it'd -# # be using mass assignment without an explicit permit step. -# # This is the recommended form: -# def create -# Person.create(person_params) -# end -# -# # This will pass with flying colors as long as there's a person key in the -# # parameters, otherwise it'll raise an ActionController::ParameterMissing -# # exception, which will get caught by ActionController::Base and turned -# # into a 400 Bad Request reply. -# def update -# redirect_to current_account.people.find(params[:id]).tap { |person| -# person.update!(person_params) -# } -# end -# -# private -# # Using a private method to encapsulate the permissible parameters is -# # a good pattern since you'll be able to reuse the same permit -# # list between create and update. Also, you can specialize this method -# # with per-user checking of permissible attributes. -# def person_params -# params.require(:person).permit(:name, :age) -# end -# end -# -# In order to use accepts_nested_attributes_for with Strong \Parameters, you -# will need to specify which nested attributes should be permitted. You might want -# to allow +:id+ and +:_destroy+, see ActiveRecord::NestedAttributes for more information. -# -# class Person -# has_many :pets -# accepts_nested_attributes_for :pets -# end -# -# class PeopleController < ActionController::Base -# def create -# Person.create(person_params) -# end -# -# ... -# -# private -# -# def person_params -# # It's mandatory to specify the nested attributes that should be permitted. -# # If you use `permit` with just the key that points to the nested attributes hash, -# # it will return an empty hash. -# params.require(:person).permit(:name, :age, pets_attributes: [ :id, :name, :category ]) -# end -# end -# -# See ActionController::Parameters.require and ActionController::Parameters.permit -# for more information. -# -# source://actionpack//lib/action_controller/metal/strong_parameters.rb#1221 -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#1224 - 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#1239 - def params=(value); end -end - -# source://actionpack//lib/action_controller/template_assertions.rb#4 -module ActionController::TemplateAssertions - # @raise [NoMethodError] - # - # source://actionpack//lib/action_controller/template_assertions.rb#5 - def assert_template(options = T.unsafe(nil), message = T.unsafe(nil)); end -end - -# 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 -# (use ActionDispatch::IntegrationTest). -# -# 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+, -# +parsed_body+ for effective testing of controller actions including even API endpoints. -# -# == Basic example -# -# Functional tests are written as follows: -# 1. First, one uses the +get+, +post+, +patch+, +put+, +delete+, or +head+ method to simulate -# an HTTP request. -# 2. Then, one asserts whether the current state is as expected. "State" can be anything: -# the controller's HTTP response, the database contents, etc. -# -# For example: -# -# class BooksControllerTest < ActionController::TestCase -# def test_create -# # Simulate a POST response with the given HTTP parameters. -# post(:create, params: { book: { title: "Love Hina" }}) -# -# # Asserts that the controller tried to redirect us to -# # the created book's URI. -# assert_response :found -# -# # Asserts that the controller really put the book in the database. -# assert_not_nil Book.find_by(title: "Love Hina") -# end -# end -# -# You can also send a real document in the simulated HTTP request. -# -# def test_create -# json = {book: { title: "Love Hina" }}.to_json -# post :create, body: json -# end -# -# == Special instance variables -# -# ActionController::TestCase will also automatically provide the following instance -# variables for use in the tests: -# -# @controller:: -# The controller instance that will be tested. -# @request:: -# An ActionController::TestRequest, representing the current HTTP -# request. You can modify this object before sending the HTTP request. For example, -# you might want to set some session properties before sending a GET request. -# @response:: -# An ActionDispatch::TestResponse object, representing the response -# of the last HTTP response. In the above example, @response becomes valid -# after calling +post+. If the various assert methods are not sufficient, then you -# may use this object to inspect the HTTP response in detail. -# -# == Controller is automatically inferred -# -# ActionController::TestCase will automatically infer the controller under test -# from the test class name. If the controller cannot be inferred from the test -# class name, you can explicitly set it with +tests+. -# -# class SpecialEdgeCaseWidgetsControllerTest < ActionController::TestCase -# tests WidgetController -# end -# -# == \Testing controller internals -# -# In addition to these specific assertions, you also have easy access to various collections that the regular test/unit assertions -# can be used against. These collections are: -# -# * session: Objects being saved in the session. -# * flash: The flash objects currently in the session. -# * cookies: \Cookies being sent to the user on this request. -# -# These collections can be used just like any other hash: -# -# assert_equal "Dave", cookies[:name] # makes sure that a cookie called :name was set as "Dave" -# assert flash.empty? # makes sure that there's nothing in the flash -# -# On top of the collections, you have the complete URL that a given action redirected to available in redirect_to_url. -# -# For redirects within the same controller, you can even call follow_redirect and the redirect will be followed, triggering another -# action call which can then be asserted against. -# -# == Manipulating session and cookie variables -# -# Sometimes you need to set up the session and cookie variables for a test. -# To do this just assign a value to the session or cookie collection: -# -# session[:key] = "value" -# cookies[:key] = "value" -# -# To clear the cookies for a test just clear the cookie collection: -# -# cookies.clear -# -# == \Testing named routes -# -# If you're using named routes, they can be easily tested using the original named routes' methods straight in the test case. -# -# assert_redirected_to page_url(title: 'foo') -# -# source://actionpack//lib/action_controller/test_case.rb#335 -class ActionController::TestCase < ::ActiveSupport::TestCase - include ::ActiveSupport::Testing::ConstantLookup - 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::TestProcess::FixtureFile - include ::ActionDispatch::TestProcess - include ::ActionController::TestCase::Behavior - include ::ActionController::TemplateAssertions - include ::ActionDispatch::Assertions - extend ::ActiveSupport::Testing::ConstantLookup::ClassMethods - extend ::ActionController::TestCase::Behavior::ClassMethods - - # source://actionpack//lib/action_controller/test_case.rb#561 - def _controller_class; end - - # source://actionpack//lib/action_controller/test_case.rb#561 - def _controller_class=(_arg0); end - - # source://actionpack//lib/action_controller/test_case.rb#561 - def _controller_class?; end - - class << self - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://actionpack//lib/action_controller/test_case.rb#561 - def _controller_class; end - - # source://actionpack//lib/action_controller/test_case.rb#561 - def _controller_class=(value); end - - # source://actionpack//lib/action_controller/test_case.rb#561 - def _controller_class?; end - - # source://actionpack//lib/action_controller/test_case.rb#336 - def executor_around_each_request; end - - # source://actionpack//lib/action_controller/test_case.rb#336 - def executor_around_each_request=(_arg0); end - end -end - -# source://actionpack//lib/action_controller/test_case.rb#338 -module ActionController::TestCase::Behavior - include ::ActionDispatch::TestProcess::FixtureFile - include ::ActionDispatch::TestProcess - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - include ::ActiveSupport::Testing::ConstantLookup - include ::Rails::Dom::Testing::Assertions - include ::ActionController::TemplateAssertions - include ::ActionDispatch::Assertions - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveSupport::Testing::ConstantLookup::ClassMethods - mixes_in_class_methods ::ActionController::TestCase::Behavior::ClassMethods - - # source://actionpack//lib/action_controller/test_case.rb#554 - def build_response(klass); end - - # source://actionpack//lib/action_controller/test_case.rb#514 - 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 - def delete(action, **args); end - - # source://actionpack//lib/action_controller/test_case.rb#518 - def generated_path(generated_extras); end - - # Simulate a GET request with the given parameters. - # - # - +action+: The controller action to call. - # - +params+: The hash with HTTP parameters that you want to pass. This may be +nil+. - # - +body+: The request body with a string that is appropriately encoded - # (application/x-www-form-urlencoded or multipart/form-data). - # - +session+: A hash of parameters to store in the session. This may be +nil+. - # - +flash+: A hash of parameters to store in the flash. This may be +nil+. - # - # You can also simulate POST, PATCH, PUT, DELETE, and HEAD requests with - # +post+, +patch+, +put+, +delete+, and +head+. - # Example sending parameters, session, and setting a flash message: - # - # get :show, - # params: { id: 7 }, - # session: { user_id: 1 }, - # flash: { notice: 'This is flash message' } - # - # 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 - 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 - 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 - 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 - def post(action, **args); end - - # Simulate an HTTP request to +action+ by specifying request method, - # parameters and set/volley the response. - # - # - +action+: The controller action to call. - # - +method+: Request method used to send the HTTP request. Possible values - # are +GET+, +POST+, +PATCH+, +PUT+, +DELETE+, +HEAD+. Defaults to +GET+. Can be a symbol. - # - +params+: The hash with HTTP parameters that you want to pass. This may be +nil+. - # - +body+: The request body with a string that is appropriately encoded - # (application/x-www-form-urlencoded or multipart/form-data). - # - +session+: A hash of parameters to store in the session. This may be +nil+. - # - +flash+: A hash of parameters to store in the flash. This may be +nil+. - # - +format+: Request format. Defaults to +nil+. Can be string or symbol. - # - +as+: Content type. Defaults to +nil+. Must be a symbol that corresponds - # to a mime type. - # - # Example calling +create+ action and sending two params: - # - # process :create, - # method: 'POST', - # params: { - # user: { name: 'Gaurish Sharma', email: 'user@example.com' } - # }, - # session: { user_id: 1 }, - # flash: { notice: 'This is flash message' } - # - # To simulate +GET+, +POST+, +PATCH+, +PUT+, +DELETE+, and +HEAD+ requests - # prefer using #get, #post, #patch, #put, #delete and #head methods - # respectively which will make tests more expressive. - # - # 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 - # 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 - 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 - def put(action, **args); end - - # source://actionpack//lib/action_controller/test_case.rb#522 - def query_parameter_names(generated_extras); end - - # Returns the value of attribute request. - # - # source://actionpack//lib/action_controller/test_case.rb#344 - def request; end - - # Returns the value of attribute response. - # - # source://actionpack//lib/action_controller/test_case.rb#344 - def response; end - - # source://actionpack//lib/action_controller/test_case.rb#526 - def setup_controller_request_and_response; end - - private - - # source://actionpack//lib/action_controller/test_case.rb#646 - def check_required_ivars; end - - # source://actionpack//lib/action_controller/test_case.rb#642 - def document_root_element; end - - # source://actionpack//lib/action_controller/test_case.rb#597 - def process_controller_response(action, cookies, xhr); end - - # source://actionpack//lib/action_controller/test_case.rb#632 - def scrub_env!(env); end - - # source://actionpack//lib/action_controller/test_case.rb#567 - def setup_request(controller_class_name, action, parameters, session, flash, xhr); end - - # source://actionpack//lib/action_controller/test_case.rb#589 - def wrap_execution(&block); end - - module GeneratedClassMethods - def _controller_class; end - def _controller_class=(value); end - def _controller_class?; end - end - - module GeneratedInstanceMethods - def _controller_class; end - def _controller_class=(value); end - def _controller_class?; end - end -end - -# source://actionpack//lib/action_controller/test_case.rb#346 -module ActionController::TestCase::Behavior::ClassMethods - # source://actionpack//lib/action_controller/test_case.rb#368 - def controller_class; end - - # source://actionpack//lib/action_controller/test_case.rb#364 - def controller_class=(new_class); end - - # source://actionpack//lib/action_controller/test_case.rb#376 - def determine_default_controller_class(name); end - - # Sets the controller class name. Useful if the name can't be inferred from test class. - # Normalizes +controller_class+ before using. - # - # tests WidgetController - # tests :widget - # tests 'widget' - # - # source://actionpack//lib/action_controller/test_case.rb#353 - def tests(controller_class); end -end - -# ActionController::TestCase will be deprecated and moved to a gem in the future. -# Please use ActionDispatch::IntegrationTest going forward. -# -# source://actionpack//lib/action_controller/test_case.rb#34 -class ActionController::TestRequest < ::ActionDispatch::TestRequest - # @return [TestRequest] a new instance of TestRequest - # - # source://actionpack//lib/action_controller/test_case.rb#57 - def initialize(env, session, controller_class); end - - # source://actionpack//lib/action_controller/test_case.rb#76 - def assign_parameters(routes, controller_path, action, parameters, generated_path, query_string_keys); end - - # source://actionpack//lib/action_controller/test_case.rb#72 - def content_type=(type); end - - # Returns the value of attribute controller_class. - # - # source://actionpack//lib/action_controller/test_case.rb#42 - def controller_class; end - - # source://actionpack//lib/action_controller/test_case.rb#68 - def query_string=(string); end - - private - - # source://actionpack//lib/action_controller/test_case.rb#164 - def params_parsers; end - - class << self - # Create a new test request with default `env` values. - # - # source://actionpack//lib/action_controller/test_case.rb#45 - def create(controller_class); end - - # source://actionpack//lib/action_controller/test_case.rb#38 - def new_session; end - - private - - # source://actionpack//lib/action_controller/test_case.rb#52 - def default_env; end - end -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 -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 -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#204 - def destroy; end - - # source://actionpack//lib/action_controller/test_case.rb#208 - def dig(*keys); end - - # @return [Boolean] - # - # source://actionpack//lib/action_controller/test_case.rb#217 - def enabled?; end - - # @return [Boolean] - # - # source://actionpack//lib/action_controller/test_case.rb#192 - def exists?; end - - # source://actionpack//lib/action_controller/test_case.rb#213 - 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#200 - def values; end - - private - - # source://actionpack//lib/action_controller/test_case.rb#222 - def load!; end -end - -# source://actionpack//lib/action_controller/test_case.rb#183 -ActionController::TestSession::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) - -# source://actionpack//lib/action_controller/metal/testing.rb#4 -module ActionController::Testing; end - -# Behavior specific to functional tests -# -# source://actionpack//lib/action_controller/metal/testing.rb#6 -module ActionController::Testing::Functional - # source://actionpack//lib/action_controller/metal/testing.rb#7 - def clear_instance_variables_between_requests; end - - # source://actionpack//lib/action_controller/metal/testing.rb#16 - def recycle!; end -end - -# Raised when a Parameters instance is not marked as permitted and -# an operation to transform it to hash is called. -# -# params = ActionController::Parameters.new(a: "123", b: "456") -# params.to_h -# # => ActionController::UnfilteredParameters: unable to convert unpermitted parameters to hash -# -# source://actionpack//lib/action_controller/metal/strong_parameters.rb#61 -class ActionController::UnfilteredParameters < ::ArgumentError - # @return [UnfilteredParameters] a new instance of UnfilteredParameters - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#62 - def initialize; end -end - -# source://actionpack//lib/action_controller/metal/exceptions.rb#73 -class ActionController::UnknownFormat < ::ActionController::ActionControllerError; end - -# source://actionpack//lib/action_controller/metal/exceptions.rb#70 -class ActionController::UnknownHttpMethod < ::ActionController::ActionControllerError; end - -# Raised when a supplied parameter is not expected and -# ActionController::Parameters.action_on_unpermitted_parameters -# is set to :raise. -# -# params = ActionController::Parameters.new(a: "123", b: "456") -# params.permit(:c) -# # => ActionController::UnpermittedParameters: found unpermitted parameters: :a, :b -# -# source://actionpack//lib/action_controller/metal/strong_parameters.rb#46 -class ActionController::UnpermittedParameters < ::IndexError - # @return [UnpermittedParameters] a new instance of UnpermittedParameters - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#49 - def initialize(params); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#47 - def params; end -end - -# 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. -# -# In addition to AbstractController::UrlFor, this module accesses the HTTP layer to define -# URL options like the +host+. In order to do so, this module requires the host class -# to implement +env+ which needs to be Rack-compatible and +request+ -# which is either an instance of ActionDispatch::Request or an object -# that responds to the +host+, +optional_port+, +protocol+, and -# +symbolized_path_parameter+ methods. -# -# class RootUrl -# include ActionController::UrlFor -# include Rails.application.routes.url_helpers -# -# delegate :env, :request, to: :controller -# -# def initialize(controller) -# @controller = controller -# @url = root_path # named route from the application. -# end -# end -# -# source://actionpack//lib/action_controller/metal/url_for.rb#25 -module ActionController::UrlFor - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - include ::ActionDispatch::Routing::UrlFor - include ::AbstractController::UrlFor - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::AbstractController::UrlFor::ClassMethods - - # source://actionpack//lib/action_controller/metal/url_for.rb#30 - def url_options; end - - module GeneratedClassMethods - def default_url_options; end - def default_url_options=(value); end - def default_url_options?; end - end - - module GeneratedInstanceMethods - def default_url_options; end - def default_url_options=(value); end - def default_url_options?; end - end -end - -# source://actionpack//lib/action_controller/metal/exceptions.rb#25 -class ActionController::UrlGenerationError < ::ActionController::ActionControllerError - include ::DidYouMean::Correctable - - # @return [UrlGenerationError] a new instance of UrlGenerationError - # - # source://actionpack//lib/action_controller/metal/exceptions.rb#28 - def initialize(message, routes = T.unsafe(nil), route_name = T.unsafe(nil), method_name = T.unsafe(nil)); end - - # source://actionpack//lib/action_controller/metal/exceptions.rb#39 - def corrections; end - - # Returns the value of attribute method_name. - # - # source://actionpack//lib/action_controller/metal/exceptions.rb#26 - def method_name; end - - # Returns the value of attribute route_name. - # - # source://actionpack//lib/action_controller/metal/exceptions.rb#26 - def route_name; end - - # Returns the value of attribute routes. - # - # source://actionpack//lib/action_controller/metal/exceptions.rb#26 - def routes; end -end - -# source://actionpack//lib/action_dispatch.rb#37 -module ActionDispatch - extend ::ActiveSupport::Autoload - - # source://actionpack//lib/action_dispatch.rb#99 - def test_app; end - - # source://actionpack//lib/action_dispatch.rb#99 - def test_app=(val); end - - class << self - # source://actionpack//lib/action_dispatch.rb#99 - def test_app; end - - # source://actionpack//lib/action_dispatch.rb#99 - def test_app=(val); end - end -end - -# source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#8 -class ActionDispatch::ActionableExceptions - # @return [ActionableExceptions] a new instance of ActionableExceptions - # - # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#11 - def initialize(app); end - - # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#15 - def call(env); end - - # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#9 - def endpoint; end - - # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#9 - def endpoint=(val); end - - private - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#25 - def actionable_request?(request); end - - # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#29 - def redirect_to(location); end - - class << self - # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#9 - def endpoint; end - - # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#9 - def endpoint=(val); end - end -end - -# This is a class that abstracts away an asserted response. It purposely -# does not inherit from Response because it doesn't need it. That means it -# does not have headers or a body. -# -# source://actionpack//lib/action_dispatch/testing/assertion_response.rb#7 -class ActionDispatch::AssertionResponse - # Accepts a specific response status code as an Integer (404) or String - # ('404') or a response status range as a Symbol pseudo-code (:success, - # indicating any 200-299 status code). - # - # @raise [ArgumentError] - # @return [AssertionResponse] a new instance of AssertionResponse - # - # source://actionpack//lib/action_dispatch/testing/assertion_response.rb#20 - def initialize(code_or_name); end - - # Returns the value of attribute code. - # - # source://actionpack//lib/action_dispatch/testing/assertion_response.rb#8 - def code; end - - # source://actionpack//lib/action_dispatch/testing/assertion_response.rb#33 - def code_and_name; end - - # Returns the value of attribute name. - # - # source://actionpack//lib/action_dispatch/testing/assertion_response.rb#8 - def name; end - - private - - # source://actionpack//lib/action_dispatch/testing/assertion_response.rb#38 - def code_from_name(name); end - - # source://actionpack//lib/action_dispatch/testing/assertion_response.rb#42 - def name_from_code(code); end -end - -# source://actionpack//lib/action_dispatch/testing/assertion_response.rb#10 -ActionDispatch::AssertionResponse::GENERIC_RESPONSE_CODES = T.let(T.unsafe(nil), Hash) - -# 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 - - # source://actionpack//lib/action_dispatch/testing/assertions.rb#13 - def html_document; end -end - -# A small suite of assertions that test responses from \Rails applications. -# -# source://actionpack//lib/action_dispatch/testing/assertions/response.rb#6 -module ActionDispatch::Assertions::ResponseAssertions - # Asserts that the response is a redirect to a URL matching the given options. - # - # # Asserts that the redirection was to the "index" action on the WeblogController - # assert_redirected_to controller: "weblog", action: "index" - # - # # Asserts that the redirection was to the named route login_url - # assert_redirected_to login_url - # - # # Asserts that the redirection was to the URL for @customer - # assert_redirected_to @customer - # - # # 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 response is one of the following types: - # - # * :success - Status code was in the 200-299 range - # * :redirect - Status code was in the 300-399 range - # * :missing - Status code was 404 - # * :error - Status code was in the 500-599 range - # - # You can also pass an explicit status number like assert_response(501) - # or its symbolic equivalent assert_response(:not_implemented). - # See Rack::Utils::SYMBOL_TO_STATUS_CODE for a full list. - # - # # Asserts that the response was a redirection - # assert_response :redirect - # - # # Asserts that the response code was status code 401 (unauthorized) - # assert_response 401 - # - # source://actionpack//lib/action_dispatch/testing/assertions/response.rb#30 - def assert_response(type, message = T.unsafe(nil)); end - - private - - # source://actionpack//lib/action_dispatch/testing/assertions/response.rb#95 - def code_with_name(code_or_name); end - - # source://actionpack//lib/action_dispatch/testing/assertions/response.rb#79 - def generate_response_message(expected, actual = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/testing/assertions/response.rb#89 - def location_if_redirected; end - - # source://actionpack//lib/action_dispatch/testing/assertions/response.rb#70 - 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 - def parameterize(value); end - - # source://actionpack//lib/action_dispatch/testing/assertions/response.rb#84 - def response_body_if_short; end -end - -# source://actionpack//lib/action_dispatch/testing/assertions/response.rb#7 -ActionDispatch::Assertions::ResponseAssertions::RESPONSE_PREDICATES = T.let(T.unsafe(nil), Hash) - -# Suite of assertions to test routes generated by \Rails and the handling of requests made to them. -# -# source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#11 -module ActionDispatch::Assertions::RoutingAssertions - # 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. - # - # The +defaults+ parameter is unused. - # - # # Asserts that the default action is generated for a route with no action - # assert_generates "/items", controller: "items", action: "index" - # - # # Tests that the list action is properly routed - # assert_generates "/items/list", controller: "items", action: "list" - # - # # Tests the generation of a route with a parameter - # assert_generates "/items/list/1", { controller: "items", action: "list", id: "1" } - # - # # 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 - 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) - # match +path+. Basically, it asserts that \Rails recognizes the route given by +expected_options+. - # - # Pass a hash in the second argument (+path+) to specify the request method. This is useful for routes - # requiring a specific HTTP method. The hash should contain a +:path+ with the incoming request path - # and a +:method+ containing the required HTTP verb. - # - # # Asserts that POSTing to /items will call the create action on ItemsController - # assert_recognizes({controller: 'items', action: 'create'}, {path: 'items', method: :post}) - # - # You can also pass in +extras+ with a hash containing URL parameters that would normally be in the query string. This can be used - # to assert that values in the query string will end up in the params hash correctly. To test query strings you must use the extras - # argument because appending the query string on the path directly will not work. For example: - # - # # Asserts that a path of '/items/list/1?view=print' returns the correct options - # assert_recognizes({controller: 'items', action: 'list', id: '1', view: 'print'}, 'items/list/1', { view: "print" }) - # - # The +message+ parameter allows you to pass in an error message that is displayed upon failure. - # - # # Check the default route (i.e., the index action) - # assert_recognizes({controller: 'items', action: 'index'}, 'items') - # - # # Test a specific action - # assert_recognizes({controller: 'items', action: 'list'}, 'items/list') - # - # # Test an action with a parameter - # assert_recognizes({controller: 'items', action: 'destroy', id: '1'}, 'items/destroy/1') - # - # # Test a custom route - # assert_recognizes({controller: 'items', action: 'show', id: '1'}, 'view/item1') - # - # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#47 - 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 - # options and then that options generates path. This essentially combines +assert_recognizes+ - # and +assert_generates+ into one step. - # - # The +extras+ hash allows you to specify options that would normally be provided as a query string to the action. The - # +message+ parameter allows you to specify a custom error message to display upon failure. - # - # # Asserts a basic route: a controller with the default action (index) - # assert_routing '/home', controller: 'home', action: 'index' - # - # # Test a route generated with a specific controller, action, and parameter (id) - # assert_routing '/entries/show/23', controller: 'entries', action: 'show', id: 23 - # - # # Asserts a basic route (controller + default action), with an error message if it fails - # assert_routing '/store', { controller: 'store', action: 'index' }, {}, {}, 'Route for store index not generated properly' - # - # # Tests a route, providing a defaults hash - # assert_routing 'controller/action/9', {id: "9", item: "square"}, {controller: "controller", action: "action"}, {}, {item: "square"} - # - # # 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 - 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 - def method_missing(selector, *args, **_arg2, &block); end - - # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#12 - def setup; end - - # A helper to make it easier to test different route configurations. - # This method temporarily replaces @routes with a new RouteSet instance. - # - # 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 - # assert_equal "/users", users_path - # end - # - # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#153 - def with_routing; end - - private - - # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#228 - def fail_on(exception_class, message); end - - # Recognizes the route for a given path. - # - # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#194 - def recognized_request_for(path, extras = T.unsafe(nil), msg); end -end - -# Provides callbacks to be executed before and after dispatching the request. -# -# source://actionpack//lib/action_dispatch/middleware/callbacks.rb#5 -class ActionDispatch::Callbacks - include ::ActiveSupport::Callbacks - extend ::ActiveSupport::Callbacks::ClassMethods - extend ::ActiveSupport::DescendantsTracker - - # @return [Callbacks] a new instance of Callbacks - # - # source://actionpack//lib/action_dispatch/middleware/callbacks.rb#20 - def initialize(app); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#940 - def _call_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#928 - def _run_call_callbacks(&block); end - - # source://actionpack//lib/action_dispatch/middleware/callbacks.rb#24 - def call(env); end - - class << self - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#932 - def _call_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#936 - def _call_callbacks=(value); end - - # source://actionpack//lib/action_dispatch/middleware/callbacks.rb#15 - def after(*args, &block); end - - # source://actionpack//lib/action_dispatch/middleware/callbacks.rb#11 - def before(*args, &block); end - end -end - -# 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. -# -# Example global policy: -# -# Rails.application.config.content_security_policy do |policy| -# policy.default_src :self, :https -# policy.font_src :self, :https, :data -# policy.img_src :self, :https, :data -# policy.object_src :none -# policy.script_src :self, :https -# policy.style_src :self, :https -# -# # Specify URI for violation reports -# policy.report_uri "/csp-violation-report-endpoint" -# end -# -# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#24 -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#169 - def initialize; end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#179 - def base_uri(*sources); end - - # Specify whether to prevent the user agent from loading any assets over - # HTTP when the page uses HTTPS: - # - # policy.block_all_mixed_content - # - # Pass +false+ to allow it again: - # - # policy.block_all_mixed_content false - # - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#197 - def block_all_mixed_content(enabled = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#286 - 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#179 - def child_src(*sources); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#179 - def connect_src(*sources); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#179 - def default_src(*sources); end - - # Returns the value of attribute directives. - # - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#167 - def directives; end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#179 - def font_src(*sources); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#179 - def form_action(*sources); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#179 - def frame_ancestors(*sources); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#179 - def frame_src(*sources); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#179 - def img_src(*sources); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#179 - def manifest_src(*sources); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#179 - def media_src(*sources); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#179 - def object_src(*sources); end - - # Restricts the set of plugins that can be embedded: - # - # policy.plugin_types "application/x-shockwave-flash" - # - # Leave empty to allow all plugins: - # - # policy.plugin_types - # - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#213 - def plugin_types(*types); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#179 - def prefetch_src(*sources); end - - # Enable the {report-uri}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/report-uri] - # directive. Violation reports will be sent to the specified URI: - # - # policy.report_uri "/csp-violation-report-endpoint" - # - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#226 - def report_uri(uri); end - - # Specify asset types for which {Subresource Integrity}[https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity] - # is required: - # - # policy.require_sri_for :script, :style - # - # Leave empty to not require Subresource Integrity: - # - # policy.require_sri_for - # - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#239 - def require_sri_for(*types); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#179 - 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] - # should be enabled for the requested resource: - # - # policy.sandbox - # - # Values can be passed as arguments: - # - # policy.sandbox "allow-scripts", "allow-modals" - # - # Pass +false+ to disable the sandbox: - # - # policy.sandbox false - # - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#260 - def sandbox(*values); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#179 - def script_src(*sources); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#179 - def script_src_attr(*sources); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#179 - def script_src_elem(*sources); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#179 - def style_src(*sources); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#179 - def style_src_attr(*sources); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#179 - def style_src_elem(*sources); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#179 - def trusted_types(*sources); end - - # Specify whether user agents should treat any assets over HTTP as HTTPS: - # - # policy.upgrade_insecure_requests - # - # Pass +false+ to disable it: - # - # policy.upgrade_insecure_requests false - # - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#278 - def upgrade_insecure_requests(enabled = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#179 - def worker_src(*sources); end - - private - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#305 - def apply_mapping(source); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#292 - def apply_mappings(sources); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#327 - def build_directive(sources, context); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#311 - def build_directives(context, nonce, nonce_directives); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#174 - def initialize_copy(other); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#349 - def nonce_directive?(directive, nonce_directives); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#331 - def resolve_source(source, context); end -end - -# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#163 -ActionDispatch::ContentSecurityPolicy::DEFAULT_NONCE_DIRECTIVES = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#138 -ActionDispatch::ContentSecurityPolicy::DIRECTIVES = T.let(T.unsafe(nil), Hash) - -# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#119 -ActionDispatch::ContentSecurityPolicy::MAPPINGS = T.let(T.unsafe(nil), Hash) - -# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#25 -class ActionDispatch::ContentSecurityPolicy::Middleware - # @return [Middleware] a new instance of Middleware - # - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#30 - def initialize(app); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#34 - def call(env); end - - private - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#51 - def header_name(request); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#59 - 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#64 -module ActionDispatch::ContentSecurityPolicy::Request - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#71 - def content_security_policy; end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#75 - def content_security_policy=(policy); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#103 - def content_security_policy_nonce; end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#95 - def content_security_policy_nonce_directives; end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#99 - def content_security_policy_nonce_directives=(generator); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#87 - def content_security_policy_nonce_generator; end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#91 - def content_security_policy_nonce_generator=(generator); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#79 - def content_security_policy_report_only; end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#83 - def content_security_policy_report_only=(value); end - - private - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#114 - def generate_content_security_policy_nonce; end -end - -# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#68 -ActionDispatch::ContentSecurityPolicy::Request::NONCE = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#69 -ActionDispatch::ContentSecurityPolicy::Request::NONCE_DIRECTIVES = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#67 -ActionDispatch::ContentSecurityPolicy::Request::NONCE_GENERATOR = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#65 -ActionDispatch::ContentSecurityPolicy::Request::POLICY = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#66 -ActionDispatch::ContentSecurityPolicy::Request::POLICY_REPORT_ONLY = T.let(T.unsafe(nil), String) - -# Read and write data to cookies through ActionController::Base#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. -# -# Examples of writing: -# -# # Sets a simple session cookie. -# # This cookie will be deleted when the user's browser is closed. -# cookies[:user_name] = "david" -# -# # Cookie values are String-based. Other data types need to be serialized. -# cookies[:lat_lon] = JSON.generate([47.68, -122.37]) -# -# # Sets a cookie that expires in 1 hour. -# cookies[:login] = { value: "XJ-122", expires: 1.hour } -# -# # Sets a cookie that expires at a specific time. -# cookies[:login] = { value: "XJ-122", expires: Time.utc(2020, 10, 15, 5) } -# -# # Sets a signed cookie, which prevents users from tampering with its value. -# # It can be read using the signed method `cookies.signed[:name]` -# cookies.signed[:user_id] = current_user.id -# -# # Sets an encrypted cookie value before sending it to the client which -# # prevent users from reading and tampering with its value. -# # It can be read using the encrypted method `cookies.encrypted[:name]` -# cookies.encrypted[:discount] = 45 -# -# # Sets a "permanent" cookie (which expires in 20 years from now). -# cookies.permanent[:login] = "XJ-122" -# -# # You can also chain these methods: -# cookies.signed.permanent[:login] = "XJ-122" -# -# Examples of reading: -# -# cookies[:user_name] # => "david" -# cookies.size # => 2 -# JSON.parse(cookies[:lat_lon]) # => [47.68, -122.37] -# cookies.signed[:login] # => "XJ-122" -# cookies.encrypted[:discount] # => 45 -# -# Example for deleting: -# -# cookies.delete :user_name -# -# Please note that if you specify a +:domain+ when setting a cookie, you must also specify the domain when deleting the cookie: -# -# cookies[:name] = { -# value: 'a yummy cookie', -# expires: 1.year, -# domain: 'domain.com' -# } -# -# cookies.delete(:name, domain: 'domain.com') -# -# The option symbols for setting cookies are: -# -# * :value - The cookie's value. -# * :path - The path for which this cookie applies. Defaults to the root -# of the application. -# * :domain - The domain for which this cookie applies so you can -# restrict to the domain level. If you use a schema like www.example.com -# and want to share session with user.example.com set :domain -# 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. -# -# 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. -# -# * :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. -# For example, to share cookies between user1.lvh.me and user2.lvh.me, set :tld_length to 2. -# * :expires - The time at which this cookie expires, as a \Time or ActiveSupport::Duration object. -# * :secure - Whether this cookie is only transmitted to HTTPS servers. -# Default is +false+. -# * :httponly - Whether this cookie is accessible via scripting or -# 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+. -# -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#182 -class ActionDispatch::Cookies - # @return [Cookies] a new instance of Cookies - # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#697 - def initialize(app); end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#701 - def call(env); end -end - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#188 -ActionDispatch::Cookies::AUTHENTICATED_ENCRYPTED_COOKIE_SALT = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#485 -class ActionDispatch::Cookies::AbstractCookieJar - include ::ActionDispatch::Cookies::ChainedCookieJars - - # @return [AbstractCookieJar] a new instance of AbstractCookieJar - # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#488 - def initialize(parent_jar); end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#492 - def [](name); end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#504 - def []=(name, options); end - - protected - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#516 - def request; end - - private - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#534 - def commit(name, options); end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#527 - def cookie_metadata(name, options); end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#519 - def expiry_options(options); end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#533 - def parse(name, data, purpose: T.unsafe(nil)); end -end - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#194 -ActionDispatch::Cookies::COOKIES_DIGEST = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#195 -ActionDispatch::Cookies::COOKIES_ROTATIONS = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#196 -ActionDispatch::Cookies::COOKIES_SAME_SITE_PROTECTION = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#193 -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 -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. - # - # If +config.action_dispatch.encrypted_cookie_salt+ and +config.action_dispatch.encrypted_signed_cookie_salt+ - # are both set, legacy cookies encrypted with HMAC AES-256-CBC will be transparently upgraded. - # - # This jar requires that you set a suitable secret for the verification on your app's +secret_key_base+. - # - # Example: - # - # cookies.encrypted[:discount] = 45 - # # => Set-Cookie: discount=DIQ7fw==--K3n//8vvnSbGq9dA--7Xh91HfLpwzbj1czhBiwOg==; path=/ - # - # cookies.encrypted[:discount] # => 45 - # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#252 - def encrypted; end - - # Returns a jar that'll automatically set the assigned cookies to have an expiration date 20 years from now. Example: - # - # cookies.permanent[:prefers_open_id] = true - # # => Set-Cookie: prefers_open_id=true; path=/; expires=Sun, 16-Dec-2029 03:24:16 GMT - # - # This jar is only meant for writing. You'll read permanent cookies through the regular accessor. - # - # This jar allows chaining with the signed jar as well, so you can set permanent, signed cookies. Examples: - # - # 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 - def permanent; end - - # Returns a jar that'll automatically generate a signed representation of cookie value and verify it when reading from - # the cookie again. This is useful for creating cookies with values that the user is not supposed to change. If a signed - # cookie was tampered with by the user (or a 3rd party), +nil+ will be returned. - # - # This jar requires that you set a suitable secret for the verification on your app's +secret_key_base+. - # - # Example: - # - # cookies.signed[:discount] = 45 - # # => Set-Cookie: discount=BAhpMg==--2c1c6906c90a3bc4fd54a51ffb41dffa4bf6b5f7; path=/ - # - # cookies.signed[:discount] # => 45 - # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#234 - 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 - def signed_or_encrypted; end - - private - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#281 - def encrypted_cookie_cipher; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#275 - def prepare_upgrade_legacy_hmac_aes_cbc_cookies?; end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#285 - def signed_cookie_digest; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#268 - def upgrade_legacy_hmac_aes_cbc_cookies?; end -end - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#290 -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 - 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 - 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 - def []=(name, options); end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#410 - def always_write_cookie; end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#410 - 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 - def clear(options = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#311 - def commit!; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#309 - 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 - def delete(name, options = T.unsafe(nil)); end - - # Whether the given cookie is to be deleted by this CookieJar. - # Like []=, you can pass in an options hash to test if a - # deletion applies to a specific :path, :domain etc. - # - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#393 - def deleted?(name, options = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#317 - def each(&block); end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#326 - def fetch(name, *args, &block); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#330 - def has_key?(name); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#330 - def key?(name); end - - # Returns the value of attribute request. - # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#299 - def request; end - - # Returns the cookies as Hash. - def to_hash(*_arg0); end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#350 - def to_header; end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#338 - def update(other_hash); end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#343 - def update_cookies_from_jar; end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#404 - def write(headers); end - - private - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#413 - def escape(string); end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#434 - 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 - def write_cookie?(cookie); end - - class << self - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#410 - def always_write_cookie; end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#410 - def always_write_cookie=(val); end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#293 - 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 -class ActionDispatch::Cookies::CookieOverflow < ::StandardError; end - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#190 -ActionDispatch::Cookies::ENCRYPTED_COOKIE_CIPHER = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#186 -ActionDispatch::Cookies::ENCRYPTED_COOKIE_SALT = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#187 -ActionDispatch::Cookies::ENCRYPTED_SIGNED_COOKIE_SALT = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#645 -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 - def initialize(parent_jar); end - - private - - # @raise [CookieOverflow] - # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#690 - def commit(name, options); end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#682 - def parse(name, encrypted_message, purpose: T.unsafe(nil)); end -end - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#184 -ActionDispatch::Cookies::GENERATOR_KEY = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#183 -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 -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 -class ActionDispatch::Cookies::PermanentCookieJar < ::ActionDispatch::Cookies::AbstractCookieJar - private - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#539 - def commit(name, options); end -end - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#192 -ActionDispatch::Cookies::SECRET_KEY_BASE = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#191 -ActionDispatch::Cookies::SIGNED_COOKIE_DIGEST = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#185 -ActionDispatch::Cookies::SIGNED_COOKIE_SALT = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#566 -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 - def digest; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#571 - def needs_migration?(value); end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#575 - def serialize(value); end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#599 - 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 -ActionDispatch::Cookies::SerializedCookieJars::SERIALIZER = ActiveSupport::MessageEncryptor::NullSerializer - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#616 -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 - def initialize(parent_jar); end - - private - - # @raise [CookieOverflow] - # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#638 - def commit(name, options); end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#632 - def parse(name, signed_message, purpose: T.unsafe(nil)); end -end - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#189 -ActionDispatch::Cookies::USE_AUTHENTICATED_COOKIE_ENCRYPTION = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#197 -ActionDispatch::Cookies::USE_COOKIES_WITH_METADATA = T.let(T.unsafe(nil), String) - -# 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 -class ActionDispatch::DebugExceptions - # @return [DebugExceptions] a new instance of DebugExceptions - # - # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#19 - 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 - def call(env); end - - private - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#176 - 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#152 - def log_array(logger, lines); 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 - def log_rescued_responses?(request); end - - # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#162 - 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#90 - def render_for_api_request(content_type, wrapper); end - - # 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 - def routes_inspector(exception); end - - # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#166 - def stderr_logger; end - - class << self - # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#12 - def interceptors; end - - # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#14 - def register_interceptor(object = T.unsafe(nil), &block); end - end -end - -# 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 -# config/application.rb: -# -# config.middleware.insert_before Rack::Sendfile, ActionDispatch::DebugLocks -# -# After restarting the application and re-triggering the deadlock condition, -# the route /rails/locks will show a summary of all threads currently -# known to the interlock, which lock level they are holding or awaiting, and -# their current backtrace. -# -# Generally a deadlock will be caused by the interlock conflicting with some -# other external lock or blocking I/O call. These cannot be automatically -# identified, but should be visible in the displayed backtraces. -# -# NOTE: The formatting and content of this middleware's output is intended for -# human consumption, and should be expected to change between releases. -# -# 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 -class ActionDispatch::DebugLocks - # @return [DebugLocks] a new instance of DebugLocks - # - # source://actionpack//lib/action_dispatch/middleware/debug_locks.rb#26 - def initialize(app, path = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/middleware/debug_locks.rb#31 - def call(env); end - - private - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/debug_locks.rb#103 - def blocked_by?(victim, blocker, all_threads); end - - # source://actionpack//lib/action_dispatch/middleware/debug_locks.rb#45 - def render_details(req); end -end - -# source://actionpack//lib/action_dispatch/middleware/debug_view.rb#9 -class ActionDispatch::DebugView < ::ActionView::Base - # @return [DebugView] a new instance of DebugView - # - # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#12 - def initialize(assigns); end - - # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#18 - def compiled_method_container; end - - # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#42 - def debug_hash(object); end - - # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#34 - def debug_headers(headers); end - - # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#22 - def debug_params(params); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#60 - def params_valid?; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#56 - def protect_against_forgery?; end - - # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#46 - 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) - -# source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#7 -class ActionDispatch::ExceptionWrapper - # @return [ExceptionWrapper] a new instance of ExceptionWrapper - # - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#46 - def initialize(backtrace_cleaner, exception); end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#77 - def application_trace; end - - # Returns the value of attribute backtrace_cleaner. - # - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#44 - def backtrace_cleaner; end - - # Returns the value of attribute exception. - # - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#44 - def exception; end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#71 - 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#81 - def framework_trace; end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#85 - def full_trace; end - - # Returns the value of attribute line_number. - # - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#44 - def line_number; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#121 - def rescue_response?; end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#8 - def rescue_responses; end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#8 - def rescue_responses=(val); end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#63 - def rescue_template; end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#26 - def rescue_templates; end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#26 - def rescue_templates=(val); end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#39 - def silent_exceptions; end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#39 - def silent_exceptions=(val); end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#125 - def source_extracts; end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#144 - def source_to_show_id; end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#67 - def status_code; end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#136 - def trace_to_show; end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#89 - def traces; end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#55 - def unwrapped_exception; end - - # Returns the value of attribute wrapped_causes. - # - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#44 - def wrapped_causes; end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#35 - def wrapper_exceptions; end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#35 - def wrapper_exceptions=(val); end - - private - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#149 - def backtrace; end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#153 - def causes_for(exception); end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#163 - 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 - def extract_file_and_line_number(trace); end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#171 - def source_fragment(path, line); end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#159 - def wrapped_causes_for(exception, backtrace_cleaner); end - - class << self - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#8 - def rescue_responses; end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#8 - def rescue_responses=(val); end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#26 - def rescue_templates; end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#26 - def rescue_templates=(val); end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#39 - def silent_exceptions; end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#39 - def silent_exceptions=(val); end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#117 - def status_code_for_exception(class_name); end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#35 - def wrapper_exceptions; end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#35 - def wrapper_exceptions=(val); end - end -end - -# source://actionpack//lib/action_dispatch/middleware/executor.rb#6 -class ActionDispatch::Executor - # @return [Executor] a new instance of Executor - # - # source://actionpack//lib/action_dispatch/middleware/executor.rb#7 - def initialize(app, executor); end - - # source://actionpack//lib/action_dispatch/middleware/executor.rb#11 - def call(env); end -end - -# This endpoint serves static files from disk using Rack::File. -# -# 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. -# -# Pass the +root+ directory to search for matching files, an optional -# index: "index" to change the default +path+/index.html, and optional -# additional response headers. -# -# source://actionpack//lib/action_dispatch/middleware/static.rb#41 -class ActionDispatch::FileHandler - # @return [FileHandler] a new instance of FileHandler - # - # source://actionpack//lib/action_dispatch/middleware/static.rb#49 - 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 - def attempt(env); end - - # source://actionpack//lib/action_dispatch/middleware/static.rb#59 - def call(env); end - - private - - # source://actionpack//lib/action_dispatch/middleware/static.rb#179 - def clean_path(path_info); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/static.rb#143 - def compressible?(content_type); end - - # @yield [path, content_type || "text/plain"] - # - # source://actionpack//lib/action_dispatch/middleware/static.rb#156 - def each_candidate_filepath(path_info); end - - # source://actionpack//lib/action_dispatch/middleware/static.rb#147 - def each_precompressed_filepath(filepath); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/static.rb#138 - def file_readable?(path); end - - # Match a URI path to a static file to be served. - # - # Used by the +Static+ class to negotiate a servable file in the - # +public/+ directory (see Static#call). - # - # Checks for +path+, +path+.html, and +path+/index.html files, - # in that order, including .br and .gzip compressed extensions. - # - # 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 - def find_file(path_info, accept_encoding:); end - - # source://actionpack//lib/action_dispatch/middleware/static.rb#74 - def serve(request, filepath, content_headers); end - - # source://actionpack//lib/action_dispatch/middleware/static.rb#106 - def try_files(filepath, content_type, accept_encoding:); end - - # source://actionpack//lib/action_dispatch/middleware/static.rb#116 - def try_precompressed_files(filepath, headers, accept_encoding:); end -end - -# Accept-Encoding value -> file extension -# -# source://actionpack//lib/action_dispatch/middleware/static.rb#43 -ActionDispatch::FileHandler::PRECOMPRESSED = T.let(T.unsafe(nil), Hash) - -# 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 -# then expose the flash to its template. Actually, that exposure is automatically done. -# -# class PostsController < ActionController::Base -# def create -# # save post -# flash[:notice] = "Post successfully created" -# redirect_to @post -# end -# -# def show -# # doesn't need to assign the flash notice to the template, that's done automatically -# end -# end -# -# Then in +show.html.erb+: -# -# <% if flash[:notice] %> -#
<%= flash[:notice] %>
-# <% end %> -# -# Since the +notice+ and +alert+ keys are a common idiom, convenience accessors are available: -# -# flash.alert = "You must be logged in" -# flash.notice = "Post successfully created" -# -# This example places a string in the flash. And of course, you can put as many as you like at a time too. If you want to pass -# non-primitive types, you will have to handle that in your application. Example: To show messages with links, you will have to -# use sanitize helper. -# -# Just remember: They'll be gone by the time the next action has been performed. -# -# See docs on the FlashHash class for more details about the flash. -# -# source://actionpack//lib/action_dispatch/middleware/flash.rb#41 -class ActionDispatch::Flash - class << self - # source://actionpack//lib/action_dispatch/middleware/flash.rb#293 - def new(app); end - end -end - -# source://actionpack//lib/action_dispatch/middleware/flash.rb#110 -class ActionDispatch::Flash::FlashHash - include ::Enumerable - - # @return [FlashHash] a new instance of FlashHash - # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#140 - def initialize(flashes = T.unsafe(nil), discard = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/middleware/flash.rb#160 - def [](k); end - - # source://actionpack//lib/action_dispatch/middleware/flash.rb#154 - def []=(k, v); end - - # Convenience accessor for flash[:alert]. - # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#261 - def alert; end - - # Convenience accessor for flash[:alert]=. - # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#266 - def alert=(message); end - - # source://actionpack//lib/action_dispatch/middleware/flash.rb#193 - def clear; end - - # source://actionpack//lib/action_dispatch/middleware/flash.rb#178 - def delete(key); end - - # Marks the entire flash or a single flash entry to be discarded by the end of the current action: - # - # 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 - def discard(k = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/middleware/flash.rb#198 - def each(&block); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#189 - def empty?; end - - # Keeps either the entire current flash or a specific flash entry available for the next action: - # - # 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 - def keep(k = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#174 - def key?(name); end - - # source://actionpack//lib/action_dispatch/middleware/flash.rb#170 - def keys; end - - # source://actionpack//lib/action_dispatch/middleware/flash.rb#164 - def merge!(h); end - - # Convenience accessor for flash[:notice]. - # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#271 - def notice; end - - # Convenience accessor for flash[:notice]=. - # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#276 - def notice=(message); end - - # Sets a flash that will not be available to the next action, only to the current. - # - # flash.now[:message] = "Hello current action" - # - # This method enables you to use the flash as a central messaging system in your app. - # When you need to pass an object to the next action, you use the standard flash assign ([]=). - # When you need to pass an object to the current action, you use now, and your object will - # vanish when the current action is done. - # - # Entries set via now are accessed the same way as standard entries: flash['my-key']. - # - # Also, brings two convenience accessors: - # - # flash.now.alert = "Beware now!" - # # Equivalent to flash.now[:alert] = "Beware now!" - # - # flash.now.notice = "Good luck now!" - # # Equivalent to flash.now[:notice] = "Good luck now!" - # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#228 - def now; end - - # source://actionpack//lib/action_dispatch/middleware/flash.rb#204 - 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 - def sweep; end - - # source://actionpack//lib/action_dispatch/middleware/flash.rb#185 - 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 - def to_session_value; end - - # source://actionpack//lib/action_dispatch/middleware/flash.rb#164 - def update(h); end - - protected - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#281 - def now_is_loaded?; end - - private - - # source://actionpack//lib/action_dispatch/middleware/flash.rb#146 - def initialize_copy(other); end - - # source://actionpack//lib/action_dispatch/middleware/flash.rb#286 - def stringify_array(array); end - - class << self - # source://actionpack//lib/action_dispatch/middleware/flash.rb#113 - def from_session_value(value); end - end -end - -# source://actionpack//lib/action_dispatch/middleware/flash.rb#81 -class ActionDispatch::Flash::FlashNow - # @return [FlashNow] a new instance of FlashNow - # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#84 - def initialize(flash); end - - # source://actionpack//lib/action_dispatch/middleware/flash.rb#95 - def [](k); end - - # source://actionpack//lib/action_dispatch/middleware/flash.rb#88 - def []=(k, v); end - - # Convenience accessor for flash.now[:alert]=. - # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#100 - def alert=(message); end - - # Returns the value of attribute flash. - # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#82 - 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 - def flash=(_arg0); end - - # Convenience accessor for flash.now[:notice]=. - # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#105 - def notice=(message); end -end - -# source://actionpack//lib/action_dispatch/middleware/flash.rb#42 -ActionDispatch::Flash::KEY = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/middleware/flash.rb#44 -module ActionDispatch::Flash::RequestMethods - # source://actionpack//lib/action_dispatch/middleware/flash.rb#62 - 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 - def flash; end - - # source://actionpack//lib/action_dispatch/middleware/flash.rb#54 - def flash=(flash); end - - # source://actionpack//lib/action_dispatch/middleware/flash.rb#58 - def flash_hash; end - - # source://actionpack//lib/action_dispatch/middleware/flash.rb#75 - def reset_session; end -end - -# 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+. -# -# Requests can opt-out of Host Authorization with +exclude+: -# -# config.host_authorization = { exclude: ->(request) { request.path =~ /healthcheck/ } } -# -# When a request comes to an unauthorized host, the +response_app+ -# application will be executed and rendered. If no +response_app+ is given, a -# default one will run. -# The default response app logs blocked host info with level 'error' and -# 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 -class ActionDispatch::HostAuthorization - # @return [HostAuthorization] a new instance of HostAuthorization - # - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#122 - def initialize(app, hosts, exclude: T.unsafe(nil), response_app: T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#130 - def call(env); end - - private - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#144 - def authorized?(request); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#151 - def excluded?(request); end - - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#155 - def mark_as_authorized(request); end -end - -# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#19 -ActionDispatch::HostAuthorization::ALLOWED_HOSTS_IN_DEVELOPMENT = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#83 -class ActionDispatch::HostAuthorization::DefaultResponseApp - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#86 - def call(env); end - - private - - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#117 - def available_logger(request); end - - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#109 - def log_error(request); end - - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#102 - def response(format, body); end - - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#95 - def response_body(request); end -end - -# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#84 -ActionDispatch::HostAuthorization::DefaultResponseApp::RESPONSE_STATUS = T.let(T.unsafe(nil), Integer) - -# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#21 -ActionDispatch::HostAuthorization::IPV4_HOSTNAME = T.let(T.unsafe(nil), Regexp) - -# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#22 -ActionDispatch::HostAuthorization::IPV6_HOSTNAME = T.let(T.unsafe(nil), Regexp) - -# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#23 -ActionDispatch::HostAuthorization::IPV6_HOSTNAME_WITH_PORT = T.let(T.unsafe(nil), Regexp) - -# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#20 -ActionDispatch::HostAuthorization::PORT_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#30 -class ActionDispatch::HostAuthorization::Permissions - # @return [Permissions] a new instance of Permissions - # - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#31 - def initialize(hosts); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#39 - def allows?(host); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#35 - def empty?; end - - private - - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#78 - def extract_hostname(host); end - - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#56 - def sanitize_hosts(hosts); end - - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#66 - def sanitize_regexp(host); end - - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#70 - def sanitize_string(host); end -end - -# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#24 -ActionDispatch::HostAuthorization::VALID_IP_HOSTNAME = T.let(T.unsafe(nil), Regexp) - -# source://actionpack//lib/action_dispatch.rb#80 -module ActionDispatch::Http - extend ::ActiveSupport::Autoload -end - -# source://actionpack//lib/action_dispatch/http/cache.rb#5 -module ActionDispatch::Http::Cache; end - -# source://actionpack//lib/action_dispatch/http/cache.rb#6 -module ActionDispatch::Http::Cache::Request - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/cache.rb#28 - def etag_matches?(etag); end - - # Check response freshness (Last-Modified and ETag) against request - # If-Modified-Since and If-None-Match conditions. If both headers are - # supplied, both must match, or the request is not considered fresh. - # - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/cache.rb#38 - def fresh?(response); end - - # source://actionpack//lib/action_dispatch/http/cache.rb#10 - def if_modified_since; end - - # source://actionpack//lib/action_dispatch/http/cache.rb#16 - def if_none_match; end - - # source://actionpack//lib/action_dispatch/http/cache.rb#20 - def if_none_match_etags; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/cache.rb#24 - def not_modified?(modified_at); end -end - -# source://actionpack//lib/action_dispatch/http/cache.rb#7 -ActionDispatch::Http::Cache::Request::HTTP_IF_MODIFIED_SINCE = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/http/cache.rb#8 -ActionDispatch::Http::Cache::Request::HTTP_IF_NONE_MATCH = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/http/cache.rb#51 -module ActionDispatch::Http::Cache::Response - # Returns the value of attribute cache_control. - # - # source://actionpack//lib/action_dispatch/http/cache.rb#52 - def cache_control; end - - # source://actionpack//lib/action_dispatch/http/cache.rb#68 - def date; end - - # source://actionpack//lib/action_dispatch/http/cache.rb#78 - def date=(utc_time); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/cache.rb#74 - def date?; end - - # This method sets a weak ETag validator on the response so browsers - # and proxies may cache the response, keyed on the ETag. On subsequent - # requests, the If-None-Match header is set to the cached ETag. If it - # matches the current ETag, we can return a 304 Not Modified response - # with no body, letting the browser or proxy know that their cache is - # current. Big savings in request time and network bandwidth. - # - # Weak ETags are considered to be semantically equivalent but not - # byte-for-byte identical. This is perfect for browser caching of HTML - # pages where we don't care about exact equality, just what the user - # is viewing. - # - # Strong ETags are considered byte-for-byte identical. They allow a - # browser or proxy cache to support Range requests, useful for paging - # through a PDF file or scrubbing through a video. Some CDNs only - # support strong ETags and will ignore weak ETags entirely. - # - # Weak ETags are what we almost always need, so they're the default. - # Check out #strong_etag= to provide a strong ETag validator. - # - # source://actionpack//lib/action_dispatch/http/cache.rb#101 - def etag=(weak_validators); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/cache.rb#113 - def etag?; end - - # source://actionpack//lib/action_dispatch/http/cache.rb#54 - def last_modified; end - - # source://actionpack//lib/action_dispatch/http/cache.rb#64 - def last_modified=(utc_time); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/cache.rb#60 - def last_modified?; end - - # source://actionpack//lib/action_dispatch/http/cache.rb#109 - def strong_etag=(strong_validators); end - - # True if an ETag is set and it isn't a weak validator (not preceded with W/) - # - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/cache.rb#121 - def strong_etag?; end - - # source://actionpack//lib/action_dispatch/http/cache.rb#105 - def weak_etag=(weak_validators); end - - # True if an ETag is set and it's a weak validator (preceded with W/) - # - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/cache.rb#116 - def weak_etag?; end - - private - - # source://actionpack//lib/action_dispatch/http/cache.rb#146 - def cache_control_headers; end - - # source://actionpack//lib/action_dispatch/http/cache.rb#138 - def cache_control_segments; end - - # source://actionpack//lib/action_dispatch/http/cache.rb#134 - def generate_strong_etag(validators); end - - # source://actionpack//lib/action_dispatch/http/cache.rb#130 - def generate_weak_etag(validators); end - - # source://actionpack//lib/action_dispatch/http/cache.rb#175 - def handle_conditional_get!; end - - # source://actionpack//lib/action_dispatch/http/cache.rb#185 - def merge_and_normalize_cache_control!(cache_control); end - - # source://actionpack//lib/action_dispatch/http/cache.rb#164 - 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 -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 -ActionDispatch::Http::Cache::Response::MUST_REVALIDATE = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/http/cache.rb#170 -ActionDispatch::Http::Cache::Response::NO_CACHE = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/http/cache.rb#169 -ActionDispatch::Http::Cache::Response::NO_STORE = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/http/cache.rb#172 -ActionDispatch::Http::Cache::Response::PRIVATE = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/http/cache.rb#171 -ActionDispatch::Http::Cache::Response::PUBLIC = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/http/cache.rb#128 -ActionDispatch::Http::Cache::Response::SPECIAL_KEYS = T.let(T.unsafe(nil), Set) - -# source://actionpack//lib/action_dispatch/http/content_disposition.rb#5 -class ActionDispatch::Http::ContentDisposition - # @return [ContentDisposition] a new instance of ContentDisposition - # - # source://actionpack//lib/action_dispatch/http/content_disposition.rb#12 - def initialize(disposition:, filename:); end - - # source://actionpack//lib/action_dispatch/http/content_disposition.rb#19 - def ascii_filename; end - - # Returns the value of attribute disposition. - # - # source://actionpack//lib/action_dispatch/http/content_disposition.rb#10 - def disposition; end - - # Returns the value of attribute filename. - # - # source://actionpack//lib/action_dispatch/http/content_disposition.rb#10 - def filename; end - - # source://actionpack//lib/action_dispatch/http/content_disposition.rb#29 - def to_s; end - - # source://actionpack//lib/action_dispatch/http/content_disposition.rb#25 - def utf8_filename; end - - private - - # source://actionpack//lib/action_dispatch/http/content_disposition.rb#38 - def percent_escape(string, pattern); end - - class << self - # source://actionpack//lib/action_dispatch/http/content_disposition.rb#6 - def format(disposition:, filename:); end - end -end - -# source://actionpack//lib/action_dispatch/http/content_disposition.rb#23 -ActionDispatch::Http::ContentDisposition::RFC_5987_ESCAPED_CHAR = T.let(T.unsafe(nil), Regexp) - -# source://actionpack//lib/action_dispatch/http/content_disposition.rb#17 -ActionDispatch::Http::ContentDisposition::TRADITIONAL_ESCAPED_CHAR = T.let(T.unsafe(nil), Regexp) - -# Allows you to specify sensitive parameters which will be replaced from -# the request log by looking in the query string of the request and all -# sub-hashes of the params hash to filter. Filtering only certain sub-keys -# from a hash is possible by using the dot notation: 'credit_card.number'. -# If a block is given, each key and value of the params hash and all -# sub-hashes are passed to it, where the value or the key can be replaced using -# String#replace or similar methods. -# -# env["action_dispatch.parameter_filter"] = [:password] -# => replaces the value to all keys matching /password/i with "[FILTERED]" -# -# env["action_dispatch.parameter_filter"] = [:foo, "bar"] -# => replaces the value to all keys matching /foo|bar/i with "[FILTERED]" -# -# env["action_dispatch.parameter_filter"] = [ /\Apin\z/i, /\Apin_/i ] -# => replaces the value for the exact (case-insensitive) key 'pin' and all -# (case-insensitive) keys beginning with 'pin_', with "[FILTERED]" -# Does not match keys with 'pin' as a substring, such as 'shipping_id'. -# -# env["action_dispatch.parameter_filter"] = [ "credit_card.code" ] -# => replaces { credit_card: {code: "xxxx"} } with "[FILTERED]", does not -# change { file: { code: "xxxx"} } -# -# env["action_dispatch.parameter_filter"] = -> (k, v) do -# v.reverse! if k.match?(/secret/i) -# end -# => reverses the value to all keys matching /secret/i -# -# source://actionpack//lib/action_dispatch/http/filter_parameters.rb#34 -module ActionDispatch::Http::FilterParameters - # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#39 - def initialize; end - - # Returns a hash of request.env with all sensitive data replaced. - # - # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#54 - def filtered_env; end - - # Returns a hash of parameters with all sensitive data replaced. - # - # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#47 - def filtered_parameters; end - - # Reconstructs a path with all sensitive GET parameters replaced. - # - # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#59 - def filtered_path; end - - private - - # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#70 - def env_filter; end - - # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#83 - def filtered_query_string; end - - # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#64 - def parameter_filter; end - - # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#77 - def parameter_filter_for(filters); end -end - -# source://actionpack//lib/action_dispatch/http/filter_parameters.rb#35 -ActionDispatch::Http::FilterParameters::ENV_MATCH = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/http/filter_parameters.rb#81 -ActionDispatch::Http::FilterParameters::KV_RE = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/http/filter_parameters.rb#37 -ActionDispatch::Http::FilterParameters::NULL_ENV_FILTER = T.let(T.unsafe(nil), ActiveSupport::ParameterFilter) - -# source://actionpack//lib/action_dispatch/http/filter_parameters.rb#36 -ActionDispatch::Http::FilterParameters::NULL_PARAM_FILTER = T.let(T.unsafe(nil), ActiveSupport::ParameterFilter) - -# source://actionpack//lib/action_dispatch/http/filter_parameters.rb#82 -ActionDispatch::Http::FilterParameters::PAIR_RE = T.let(T.unsafe(nil), Regexp) - -# source://actionpack//lib/action_dispatch/http/filter_redirect.rb#5 -module ActionDispatch::Http::FilterRedirect - # source://actionpack//lib/action_dispatch/http/filter_redirect.rb#8 - def filtered_location; end - - private - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/filter_redirect.rb#25 - def location_filter_match?; end - - # source://actionpack//lib/action_dispatch/http/filter_redirect.rb#17 - def location_filters; end -end - -# source://actionpack//lib/action_dispatch/http/filter_redirect.rb#6 -ActionDispatch::Http::FilterRedirect::FILTERED = T.let(T.unsafe(nil), String) - -# Provides access to the request's HTTP headers from the environment. -# -# env = { "CONTENT_TYPE" => "text/plain", "HTTP_USER_AGENT" => "curl/7.43.0" } -# headers = ActionDispatch::Http::Headers.from_hash(env) -# headers["Content-Type"] # => "text/plain" -# headers["User-Agent"] # => "curl/7.43.0" -# -# Also note that when headers are mapped to CGI-like variables by the Rack -# server, both dashes and underscores are converted to underscores. This -# ambiguity cannot be resolved at this stage anymore. Both underscores and -# dashes have to be interpreted as if they were originally sent as dashes. -# -# # GET / HTTP/1.1 -# # ... -# # User-Agent: curl/7.43.0 -# # X_Custom_Header: token -# -# headers["X_Custom_Header"] # => nil -# headers["X-Custom-Header"] # => "token" -# -# source://actionpack//lib/action_dispatch/http/headers.rb#24 -class ActionDispatch::Http::Headers - include ::Enumerable - - # @return [Headers] a new instance of Headers - # - # source://actionpack//lib/action_dispatch/http/headers.rb#54 - def initialize(request); end - - # Returns the value for the given key mapped to @env. - # - # source://actionpack//lib/action_dispatch/http/headers.rb#59 - def [](key); end - - # Sets the given value for the key mapped to @env. - # - # source://actionpack//lib/action_dispatch/http/headers.rb#64 - 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 - def add(key, value); end - - # source://actionpack//lib/action_dispatch/http/headers.rb#95 - def each(&block); end - - # source://actionpack//lib/action_dispatch/http/headers.rb#116 - def env; end - - # Returns the value for the given key mapped to @env. - # - # If the key is not found and an optional code block is not provided, - # raises a KeyError exception. - # - # If the code block is provided, then it will be run and - # its result returned. - # - # source://actionpack//lib/action_dispatch/http/headers.rb#87 - def fetch(key, default = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/headers.rb#73 - def include?(key); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/headers.rb#73 - 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 - 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 - def merge!(headers_or_env); end - - private - - # 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 - def env_name(key); end - - class << self - # source://actionpack//lib/action_dispatch/http/headers.rb#50 - def from_hash(hash); end - end -end - -# source://actionpack//lib/action_dispatch/http/headers.rb#25 -ActionDispatch::Http::Headers::CGI_VARIABLES = T.let(T.unsafe(nil), Set) - -# source://actionpack//lib/action_dispatch/http/headers.rb#78 -ActionDispatch::Http::Headers::DEFAULT = T.let(T.unsafe(nil), Object) - -# source://actionpack//lib/action_dispatch/http/headers.rb#46 -ActionDispatch::Http::Headers::HTTP_HEADER = T.let(T.unsafe(nil), Regexp) - -# source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#7 -module ActionDispatch::Http::MimeNegotiation - extend ::ActiveSupport::Concern - - # Returns the accepted MIME type for the request. - # - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#54 - def accepts; end - - # 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 - - # Returns the MIME type for the \format used in the request. - # - # GET /posts/5.xml | request.format => Mime[:xml] - # GET /posts/5.xhtml | request.format => Mime[:html] - # 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 - - # Sets the \format by string extension, which can be used to force custom formats - # that are not controlled by the extension. - # - # class ApplicationController < ActionController::Base - # before_action :adjust_format_for_iphone - # - # private - # def adjust_format_for_iphone - # request.format = :iphone if request.env["HTTP_USER_AGENT"][/iPhone/] - # end - # end - # - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#127 - def format=(extension); end - - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#79 - def formats; end - - # Sets the \formats by string extensions. This differs from #format= by allowing you - # to set multiple, ordered formats, which is useful when you want to have a fallback. - # - # In this example, the +:iphone+ format will be used if it's available, otherwise it'll fallback - # to the +:html+ format. - # - # class ApplicationController < ActionController::Base - # before_action :adjust_format_for_iphone_with_html_fallback - # - # private - # def adjust_format_for_iphone_with_html_fallback - # request.formats = [ :iphone, :html ] if request.env["HTTP_USER_AGENT"][/iPhone/] - # end - # end - # - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#146 - def formats=(extensions); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#49 - def has_content_type?; end - - # Returns the first MIME type that matches the provided array of MIME types. - # - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#154 - def negotiate_mime(order); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#166 - def should_apply_vary_header?; end - - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#112 - def variant; end - - # Sets the \variant for template. - # - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#102 - def variant=(variant); end - - private - - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#190 - def format_from_path_extension; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#175 - def params_readable?; end - - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#186 - def use_accept_header; end - - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#181 - def valid_accept_header; end -end - -# We use normal content negotiation unless you include */* in your list, -# in which case we assume you're a browser and send HTML. -# -# source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#173 -ActionDispatch::Http::MimeNegotiation::BROWSER_LIKE_ACCEPTS = T.let(T.unsafe(nil), Regexp) - -# source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#10 -class ActionDispatch::Http::MimeNegotiation::InvalidType < ::Mime::Type::InvalidMimeType; end - -# source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#12 -ActionDispatch::Http::MimeNegotiation::RESCUABLE_MIME_FORMAT_ERRORS = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/http/parameters.rb#5 -module ActionDispatch::Http::Parameters - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActionDispatch::Http::Parameters::ClassMethods - - # Returns both GET and POST \parameters in a single hash. - # - # source://actionpack//lib/action_dispatch/http/parameters.rb#50 - def parameters; end - - # Returns both GET and POST \parameters in a single hash. - # - # source://actionpack//lib/action_dispatch/http/parameters.rb#50 - def params; end - - # Returns a hash with the \parameters used to form the \path of the request. - # Returned hash keys are strings: - # - # { action: "my_action", controller: "my_controller" } - # - # source://actionpack//lib/action_dispatch/http/parameters.rb#82 - def path_parameters; end - - # source://actionpack//lib/action_dispatch/http/parameters.rb#65 - def path_parameters=(parameters); end - - private - - # source://actionpack//lib/action_dispatch/http/parameters.rb#100 - def log_parse_error_once; end - - # source://actionpack//lib/action_dispatch/http/parameters.rb#112 - def params_parsers; end - - # source://actionpack//lib/action_dispatch/http/parameters.rb#87 - def parse_formatted_parameters(parsers); end -end - -# source://actionpack//lib/action_dispatch/http/parameters.rb#34 -module ActionDispatch::Http::Parameters::ClassMethods - # Configure the parameter parser for a given MIME type. - # - # It accepts a hash where the key is the symbol of the MIME type - # and the value is a proc. - # - # original_parsers = ActionDispatch::Request.parameter_parsers - # xml_parser = -> (raw_post) { Hash.from_xml(raw_post) || {} } - # new_parsers = original_parsers.merge(xml: xml_parser) - # ActionDispatch::Request.parameter_parsers = new_parsers - # - # source://actionpack//lib/action_dispatch/http/parameters.rb#44 - def parameter_parsers=(parsers); end -end - -# source://actionpack//lib/action_dispatch/http/parameters.rb#10 -ActionDispatch::Http::Parameters::DEFAULT_PARSERS = T.let(T.unsafe(nil), Hash) - -# source://actionpack//lib/action_dispatch/http/parameters.rb#8 -ActionDispatch::Http::Parameters::PARAMETERS_KEY = T.let(T.unsafe(nil), String) - -# Raised when raw data from the request cannot be parsed by the parser -# defined for request's content MIME type. -# -# source://actionpack//lib/action_dispatch/http/parameters.rb#19 -class ActionDispatch::Http::Parameters::ParseError < ::StandardError - # @return [ParseError] a new instance of ParseError - # - # source://actionpack//lib/action_dispatch/http/parameters.rb#20 - def initialize(message = T.unsafe(nil)); end -end - -# source://actionpack//lib/action_dispatch/http/url.rb#7 -module ActionDispatch::Http::URL - # source://actionpack//lib/action_dispatch/http/url.rb#179 - def initialize; end - - # Returns the \domain part of a \host, such as "rubyonrails.org" in "www.rubyonrails.org". You can specify - # a different tld_length, such as 2 to catch rubyonrails.co.uk in "www.rubyonrails.co.uk". - # - # source://actionpack//lib/action_dispatch/http/url.rb#321 - def domain(tld_length = T.unsafe(nil)); end - - # Returns the host for this request, such as "example.com". - # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' - # req.host # => "example.com" - # - # source://actionpack//lib/action_dispatch/http/url.rb#226 - def host; end - - # Returns a \host:\port string for this request, such as "example.com" or - # "example.com:8080". Port is only included if it is not a default port - # (80 or 443) - # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com' - # req.host_with_port # => "example.com" - # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:80' - # req.host_with_port # => "example.com" - # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' - # req.host_with_port # => "example.com:8080" - # - # source://actionpack//lib/action_dispatch/http/url.rb#242 - def host_with_port; end - - # Returns a number \port suffix like 8080 if the \port number of this request - # is not the default HTTP \port 80 or HTTPS \port 443. - # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:80' - # req.optional_port # => nil - # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' - # req.optional_port # => 8080 - # - # source://actionpack//lib/action_dispatch/http/url.rb#292 - def optional_port; end - - # Returns the port number of this request as an integer. - # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com' - # req.port # => 80 - # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' - # req.port # => 8080 - # - # source://actionpack//lib/action_dispatch/http/url.rb#253 - def port; end - - # Returns a string \port suffix, including colon, like ":8080" if the \port - # number of this request is not the default HTTP \port 80 or HTTPS \port 443. - # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:80' - # req.port_string # => "" - # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' - # req.port_string # => ":8080" - # - # source://actionpack//lib/action_dispatch/http/url.rb#304 - def port_string; end - - # Returns 'https://' if this is an SSL request and 'http://' otherwise. - # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com' - # req.protocol # => "http://" - # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com', 'HTTPS' => 'on' - # req.protocol # => "https://" - # - # source://actionpack//lib/action_dispatch/http/url.rb#200 - def protocol; end - - # Returns the \host and port for this request, such as "example.com:8080". - # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com' - # req.raw_host_with_port # => "example.com" - # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:80' - # req.raw_host_with_port # => "example.com:80" - # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' - # req.raw_host_with_port # => "example.com:8080" - # - # source://actionpack//lib/action_dispatch/http/url.rb#214 - def raw_host_with_port; end - - # source://actionpack//lib/action_dispatch/http/url.rb#12 - def secure_protocol; end - - # source://actionpack//lib/action_dispatch/http/url.rb#12 - def secure_protocol=(val); end - - # Returns the requested port, such as 8080, based on SERVER_PORT - # - # req = ActionDispatch::Request.new 'SERVER_PORT' => '80' - # req.server_port # => 80 - # - # req = ActionDispatch::Request.new 'SERVER_PORT' => '8080' - # req.server_port # => 8080 - # - # source://actionpack//lib/action_dispatch/http/url.rb#315 - def server_port; end - - # Returns the standard \port number for this request's protocol. - # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' - # req.standard_port # => 80 - # - # source://actionpack//lib/action_dispatch/http/url.rb#265 - def standard_port; end - - # Returns whether this request is using the standard port - # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:80' - # req.standard_port? # => true - # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' - # req.standard_port? # => false - # - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/url.rb#280 - def standard_port?; end - - # Returns all the \subdomains as a string, so "dev.www" would be - # returned for "dev.www.rubyonrails.org". You can specify a different tld_length, - # such as 2 to catch "www" instead of "www.rubyonrails" - # in "www.rubyonrails.co.uk". - # - # source://actionpack//lib/action_dispatch/http/url.rb#337 - def subdomain(tld_length = T.unsafe(nil)); end - - # Returns all the \subdomains as an array, so ["dev", "www"] would be - # returned for "dev.www.rubyonrails.org". You can specify a different tld_length, - # such as 2 to catch ["www"] instead of ["www", "rubyonrails"] - # in "www.rubyonrails.co.uk". - # - # source://actionpack//lib/action_dispatch/http/url.rb#329 - def subdomains(tld_length = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/http/url.rb#13 - def tld_length; end - - # source://actionpack//lib/action_dispatch/http/url.rb#13 - def tld_length=(val); end - - # Returns the complete URL used for this request. - # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com' - # req.url # => "http://example.com" - # - # source://actionpack//lib/action_dispatch/http/url.rb#189 - def url; end - - class << self - # Returns the domain part of a host given the domain level. - # - # # Top-level domain example - # extract_domain('www.example.com', 1) # => "example.com" - # # Second-level domain example - # extract_domain('dev.www.example.co.uk', 2) # => "example.co.uk" - # - # source://actionpack//lib/action_dispatch/http/url.rb#22 - def extract_domain(host, tld_length); end - - # Returns the subdomains of a host as a String given the domain level. - # - # # Top-level domain example - # extract_subdomain('www.example.com', 1) # => "www" - # # Second-level domain example - # extract_subdomain('dev.www.example.co.uk', 2) # => "dev.www" - # - # source://actionpack//lib/action_dispatch/http/url.rb#46 - def extract_subdomain(host, tld_length); end - - # Returns the subdomains of a host as an Array given the domain level. - # - # # Top-level domain example - # extract_subdomains('www.example.com', 1) # => ["www"] - # # Second-level domain example - # extract_subdomains('dev.www.example.co.uk', 2) # => ["dev", "www"] - # - # source://actionpack//lib/action_dispatch/http/url.rb#32 - def extract_subdomains(host, tld_length); end - - # source://actionpack//lib/action_dispatch/http/url.rb#58 - def full_url_for(options); end - - # source://actionpack//lib/action_dispatch/http/url.rb#70 - def path_for(options); end - - # source://actionpack//lib/action_dispatch/http/url.rb#12 - def secure_protocol; end - - # source://actionpack//lib/action_dispatch/http/url.rb#12 - def secure_protocol=(val); end - - # source://actionpack//lib/action_dispatch/http/url.rb#13 - def tld_length; end - - # source://actionpack//lib/action_dispatch/http/url.rb#13 - def tld_length=(val); end - - # source://actionpack//lib/action_dispatch/http/url.rb#50 - def url_for(options); end - - private - - # source://actionpack//lib/action_dispatch/http/url.rb#90 - def add_anchor(path, anchor); end - - # source://actionpack//lib/action_dispatch/http/url.rb#83 - def add_params(path, params); end - - # source://actionpack//lib/action_dispatch/http/url.rb#105 - def build_host_url(host, port, protocol, options, path); end - - # source://actionpack//lib/action_dispatch/http/url.rb#96 - def extract_domain_from(host, tld_length); end - - # source://actionpack//lib/action_dispatch/http/url.rb#100 - def extract_subdomains_from(host, tld_length); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/url.rb#129 - def named_host?(host); end - - # source://actionpack//lib/action_dispatch/http/url.rb#146 - def normalize_host(_host, options); end - - # source://actionpack//lib/action_dispatch/http/url.rb#166 - def normalize_port(port, protocol); end - - # source://actionpack//lib/action_dispatch/http/url.rb#133 - def normalize_protocol(protocol); end - end -end - -# source://actionpack//lib/action_dispatch/http/url.rb#9 -ActionDispatch::Http::URL::HOST_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://actionpack//lib/action_dispatch/http/url.rb#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) - -# Models uploaded files. -# -# The actual file is accessible via the +tempfile+ accessor, though some -# of its interface is available directly for convenience. -# -# Uploaded files are temporary files whose lifespan is one request. When -# 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 -class ActionDispatch::Http::UploadedFile - # @raise [ArgumentError] - # @return [UploadedFile] a new instance of UploadedFile - # - # source://actionpack//lib/action_dispatch/http/upload.rb#27 - def initialize(hash); end - - # Shortcut for +tempfile.close+. - # - # source://actionpack//lib/action_dispatch/http/upload.rb#58 - 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 - def content_type; end - - # A string with the MIME type of the file. - # - # source://actionpack//lib/action_dispatch/http/upload.rb#18 - def content_type=(_arg0); end - - # Shortcut for +tempfile.eof?+. - # - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/upload.rb#83 - def eof?; end - - # A string with the headers of the multipart request. - # - # source://actionpack//lib/action_dispatch/http/upload.rb#25 - def headers; end - - # A string with the headers of the multipart request. - # - # source://actionpack//lib/action_dispatch/http/upload.rb#25 - def headers=(_arg0); end - - # Shortcut for +tempfile.open+. - # - # source://actionpack//lib/action_dispatch/http/upload.rb#53 - def open; end - - # The basename of the file in the client. - # - # source://actionpack//lib/action_dispatch/http/upload.rb#15 - def original_filename; end - - # The basename of the file in the client. - # - # source://actionpack//lib/action_dispatch/http/upload.rb#15 - def original_filename=(_arg0); end - - # Shortcut for +tempfile.path+. - # - # source://actionpack//lib/action_dispatch/http/upload.rb#63 - def path; end - - # Shortcut for +tempfile.read+. - # - # source://actionpack//lib/action_dispatch/http/upload.rb#48 - def read(length = T.unsafe(nil), buffer = T.unsafe(nil)); end - - # Shortcut for +tempfile.rewind+. - # - # source://actionpack//lib/action_dispatch/http/upload.rb#73 - def rewind; end - - # Shortcut for +tempfile.size+. - # - # source://actionpack//lib/action_dispatch/http/upload.rb#78 - 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 - 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 - def tempfile=(_arg0); end - - # source://actionpack//lib/action_dispatch/http/upload.rb#87 - def to_io; end - - # Shortcut for +tempfile.to_path+. - # - # source://actionpack//lib/action_dispatch/http/upload.rb#68 - 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 - -# source://actionpack//lib/action_dispatch/testing/integration.rb#12 -module ActionDispatch::Integration::RequestHelpers - # Performs a DELETE request with the given parameters. See ActionDispatch::Integration::Session#process - # for more details. - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#39 - def delete(path, **args); end - - # Follow a single redirect response. If the last response was not a - # redirect, an exception will be raised. Otherwise, the redirect is - # performed on the location header. If the redirection is a 307 or 308 redirect, - # the same HTTP verb will be used when redirecting, otherwise a GET request - # 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 - - # Performs a GET request with the given parameters. See ActionDispatch::Integration::Session#process - # for more details. - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#15 - def get(path, **args); end - - # Performs a HEAD request with the given parameters. See ActionDispatch::Integration::Session#process - # for more details. - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#45 - def head(path, **args); end - - # Performs an OPTIONS request with the given parameters. See ActionDispatch::Integration::Session#process - # for more details. - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#51 - def options(path, **args); end - - # Performs a PATCH request with the given parameters. See ActionDispatch::Integration::Session#process - # for more details. - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#27 - def patch(path, **args); end - - # Performs a POST request with the given parameters. See ActionDispatch::Integration::Session#process - # for more details. - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#21 - def post(path, **args); end - - # Performs a PUT request with the given parameters. See ActionDispatch::Integration::Session#process - # for more details. - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#33 - def put(path, **args); end -end - -# source://actionpack//lib/action_dispatch/testing/integration.rb#316 -module ActionDispatch::Integration::Runner - 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 - - # source://actionpack//lib/action_dispatch/testing/integration.rb#324 - def initialize(*args, &blk); end - - # Returns the value of attribute app. - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#321 - def app; end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#395 - def assertions; end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#399 - def assertions=(assertions); end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#367 - def assigns(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#329 - def before_setup; end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#367 - 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 - def copy_session_variables!; end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#344 - def create_session(app); end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#411 - def default_url_options; end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#415 - def default_url_options=(options); end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#367 - def delete(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#367 - def follow_redirect!(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#367 - def get(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#367 - def head(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#334 - def integration_session; end - - # Open a new session instance. If a block is given, the new session is - # yielded to the block before being returned. - # - # session = open_session do |sess| - # sess.extend(CustomAssertions) - # end - # - # By default, a single session is automatically created for you, but you - # can use this method to open multiple sessions that ought to be tested - # simultaneously. - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#387 - def open_session; end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#367 - def patch(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#367 - def post(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#367 - def put(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#356 - 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 - def reset!; end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#322 - def root_session; end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#322 - def root_session=(_arg0); end - - private - - # Delegate unhandled messages to the current session instance. - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#425 - def method_missing(method, *args, **_arg2, &block); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#420 - def respond_to_missing?(method, _); end -end - -# source://actionpack//lib/action_dispatch/testing/integration.rb#319 -ActionDispatch::Integration::Runner::APP_SESSIONS = T.let(T.unsafe(nil), Hash) - -# An instance of this class represents a set of requests and responses -# performed sequentially by a test process. Because you can instantiate -# 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. -# -# source://actionpack//lib/action_dispatch/testing/integration.rb#84 -class ActionDispatch::Integration::Session - include ::Minitest::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 - include ::ActionDispatch::Assertions - include ::ActionDispatch::Integration::RequestHelpers - include ::ActionDispatch::TestProcess::FixtureFile - include ::ActionDispatch::TestProcess - include ::ActionDispatch::Routing::PolymorphicRoutes - include ::ActionDispatch::Routing::UrlFor - - # Create and initialize a new Session instance. - # - # @return [Session] a new instance of Session - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#126 - def initialize(app); end - - # The Accept header to send. - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#103 - def accept; end - - # The Accept header to send. - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#103 - def accept=(_arg0); end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#90 - 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 - 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 - def cookies; end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options; end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options=(_arg0); end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options?; end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#90 - def headers(*_arg0, **_arg1, &_arg2); end - - # The hostname used in the last request. - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#94 - def host; end - - # Sets the attribute host - # Set the host name to use in the next request. - # - # session.host! "www.example.com" - # - # @param value the value to set the attribute host to. - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#97 - 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 - def host=(_arg0); end - - # Specify whether or not the session should mimic a secure HTTPS request. - # - # session.https! - # session.https!(false) - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#174 - def https!(flag = T.unsafe(nil)); end - - # Returns +true+ if the session is mimicking a secure HTTPS request. - # - # if session.https? - # ... - # end - # - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#183 - def https?; end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#91 - def path(*_arg0, **_arg1, &_arg2); end - - # Performs the actual request. - # - # - +method+: The HTTP method (GET, POST, PATCH, PUT, DELETE, HEAD, OPTIONS) - # as a symbol. - # - +path+: The URI (as a String) on which you want to perform the - # request. - # - +params+: The HTTP parameters that you want to pass. This may - # be +nil+, - # a Hash, or a String that is appropriately encoded - # (application/x-www-form-urlencoded or - # multipart/form-data). - # - +headers+: Additional headers to pass, as a Hash. The headers will be - # merged into the Rack env hash. - # - +env+: Additional env to pass, as a Hash. The headers will be - # merged into the Rack env hash. - # - +xhr+: Set to +true+ if you want to make an Ajax request. - # Adds request headers characteristic of XMLHttpRequest e.g. HTTP_X_REQUESTED_WITH. - # The headers will be merged into the Rack env hash. - # - +as+: Used for encoding the request with different content type. - # 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 returns the response status, after performing the request. - # Furthermore, if this method was called from an ActionDispatch::IntegrationTest object, - # then that object's @response instance variable will point to a Response object - # which one can use to inspect the details of the response. - # - # Example: - # process :get, '/author', params: { since: 201501011400 } - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#220 - 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 - def redirect?(*_arg0, **_arg1, &_arg2); end - - # The remote_addr used in the last request. - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#100 - def remote_addr; end - - # The remote_addr used in the last request. - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#100 - 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 - def request; end - - # A running counter of the number of requests processed. - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#121 - def request_count; end - - # A running counter of the number of requests processed. - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#121 - def request_count=(_arg0); end - - # Resets the instance. This can be used to reset the state information - # in an existing session instance, so it can be used from a clean-slate - # condition. - # - # session.reset! - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#150 - def reset!; end - - # A reference to the response instance used by the last request. - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#118 - def response; end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#90 - def status(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#90 - def status_message(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#133 - def url_options; end - - private - - # source://actionpack//lib/action_dispatch/testing/integration.rb#300 - def _mock_session; end - - # @yield [location] - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#308 - def build_expanded_path(path); end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#304 - def build_full_uri(path, env); end - - class << self - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options; end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options=(value); end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options?; end - end -end - -# source://actionpack//lib/action_dispatch/testing/integration.rb#85 -ActionDispatch::Integration::Session::DEFAULT_HOST = T.let(T.unsafe(nil), String) - -# An integration test spans multiple controllers and actions, -# tying them all together to ensure they work together as expected. It tests -# 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: -# -# require "test_helper" -# -# class ExampleTest < ActionDispatch::IntegrationTest -# fixtures :people -# -# def test_login -# # get the login page -# get "/login" -# assert_equal 200, status -# -# # post the login and follow through to the home page -# post "/login", params: { username: people(:jamis).username, -# password: people(:jamis).password } -# follow_redirect! -# assert_equal 200, status -# assert_equal "/home", path -# end -# end -# -# However, you can also have multiple session instances open per test, and -# even extend those instances with assertions and methods to create a very -# powerful testing DSL that is specific for your application. You can even -# reference any named routes you happen to have defined. -# -# require "test_helper" -# -# class AdvancedTest < ActionDispatch::IntegrationTest -# fixtures :people, :rooms -# -# def test_login_and_speak -# jamis, david = login(:jamis), login(:david) -# room = rooms(:office) -# -# jamis.enter(room) -# jamis.speak(room, "anybody home?") -# -# david.enter(room) -# david.speak(room, "hello!") -# end -# -# private -# -# module CustomAssertions -# def enter(room) -# # reference a named route, for maximum internal consistency! -# get(room_url(id: room.id)) -# assert(...) -# ... -# end -# -# def speak(room, message) -# post "/say/#{room.id}", xhr: true, params: { message: message } -# assert(...) -# ... -# end -# end -# -# def login(who) -# open_session do |sess| -# sess.extend(CustomAssertions) -# who = people(who) -# sess.post "/login", params: { username: who.username, -# password: who.password } -# assert(...) -# end -# end -# end -# -# Another longer example would be: -# -# A simple integration test that exercises multiple controllers: -# -# require "test_helper" -# -# class UserFlowsTest < ActionDispatch::IntegrationTest -# test "login and browse site" do -# # login via https -# https! -# get "/login" -# assert_response :success -# -# post "/login", params: { username: users(:david).username, password: users(:david).password } -# follow_redirect! -# assert_equal '/welcome', path -# assert_equal 'Welcome david!', flash[:notice] -# -# https!(false) -# get "/articles/all" -# assert_response :success -# assert_select 'h1', 'Articles' -# end -# end -# -# As you can see the integration test involves multiple controllers and -# exercises the entire stack from database to dispatcher. In addition you can -# have multiple session instances open simultaneously in a test and extend -# those instances with assertion methods to create a very powerful testing -# DSL (domain-specific language) just for your application. -# -# Here's an example of multiple sessions and custom DSL in an integration test -# -# require "test_helper" -# -# class UserFlowsTest < ActionDispatch::IntegrationTest -# test "login and browse site" do -# # User david logs in -# david = login(:david) -# # User guest logs in -# guest = login(:guest) -# -# # Both are now available in different sessions -# assert_equal 'Welcome david!', david.flash[:notice] -# assert_equal 'Welcome guest!', guest.flash[:notice] -# -# # User david can browse site -# david.browses_site -# # User guest can browse site as well -# guest.browses_site -# -# # Continue with other assertions -# end -# -# private -# -# module CustomDsl -# def browses_site -# get "/products/all" -# assert_response :success -# assert_select 'h1', 'Products' -# end -# end -# -# def login(user) -# open_session do |sess| -# sess.extend(CustomDsl) -# u = users(user) -# sess.https! -# sess.post "/login", params: { username: u.username, password: u.password } -# assert_equal '/welcome', sess.path -# sess.https!(false) -# end -# end -# end -# -# See the {request helpers documentation}[rdoc-ref:ActionDispatch::Integration::RequestHelpers] for help on how to -# use +get+, etc. -# -# === Changing the request encoding -# -# You can also test your JSON API easily by setting what the request should -# be encoded as: -# -# require "test_helper" -# -# class ApiTest < ActionDispatch::IntegrationTest -# test "creates articles" do -# assert_difference -> { Article.count } do -# post articles_path, params: { article: { title: "Ahoy!" } }, as: :json -# end -# -# assert_response :success -# assert_equal({ id: Article.last.id, title: "Ahoy!" }, response.parsed_body) -# end -# end -# -# The +as+ option passes an "application/json" Accept header (thereby setting -# 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 -# last response MIME type. -# -# Out of the box, only :json is supported. But for any custom MIME -# types you've registered, you can add your own encoders with: -# -# ActionDispatch::IntegrationTest.register_encoder :wibble, -# param_encoder: -> params { params.to_wibble }, -# response_parser: -> body { body } -# -# Where +param_encoder+ defines how the params should be encoded and -# +response_parser+ defines how the response body should be parsed through -# +parsed_body+. -# -# Consult the Rails Testing Guide for more. -# -# source://actionpack//lib/action_dispatch/testing/integration.rb#631 -class ActionDispatch::IntegrationTest < ::ActiveSupport::TestCase - include ::ActionDispatch::TestProcess::FixtureFile - 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 ::ActionDispatch::Integration::Runner - include ::ActionController::TemplateAssertions - include ::ActionDispatch::IntegrationTest::Behavior - include ::ActionDispatch::Routing::PolymorphicRoutes - include ::ActionDispatch::Routing::UrlFor - include ::ActionDispatch::IntegrationTest::UrlOptions - extend ::ActionDispatch::IntegrationTest::Behavior::ClassMethods -end - -# source://actionpack//lib/action_dispatch/testing/integration.rb#641 -module ActionDispatch::IntegrationTest::Behavior - 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 ::ActionDispatch::Integration::Runner - include ::ActionController::TemplateAssertions - extend ::ActiveSupport::Concern - include ::ActionDispatch::Routing::UrlFor - include ::ActionDispatch::IntegrationTest::UrlOptions - - mixes_in_class_methods ::ActionDispatch::IntegrationTest::Behavior::ClassMethods - - # source://actionpack//lib/action_dispatch/testing/integration.rb#672 - def app; end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#676 - def document_root_element; end -end - -# source://actionpack//lib/action_dispatch/testing/integration.rb#654 -module ActionDispatch::IntegrationTest::Behavior::ClassMethods - # source://actionpack//lib/action_dispatch/testing/integration.rb#655 - def app; end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#663 - def app=(app); end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#667 - def register_encoder(*args, **options); end -end - -# source://actionpack//lib/action_dispatch/testing/integration.rb#634 -module ActionDispatch::IntegrationTest::UrlOptions - extend ::ActiveSupport::Concern - - # source://actionpack//lib/action_dispatch/testing/integration.rb#636 - def url_options; end -end - -# :stopdoc: -# -# source://actionpack//lib/action_dispatch/journey/router/utils.rb#4 -module ActionDispatch::Journey; end - -# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#7 -class ActionDispatch::Journey::Ast - # @return [Ast] a new instance of Ast - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#11 - def initialize(tree, formatted); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#37 - def glob?; end - - # Returns the value of attribute names. - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#8 - def names; end - - # Returns the value of attribute path_params. - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#8 - def path_params; end - - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#23 - def requirements=(requirements); end - - # Returns the value of attribute tree. - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#8 - def root; end - - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#33 - def route=(route); end - - # Returns the value of attribute terminals. - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#8 - def terminals; end - - # Returns the value of attribute tree. - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#8 - def tree; end - - # Returns the value of attribute wildcard_options. - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#8 - def wildcard_options; end - - private - - # Returns the value of attribute stars. - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#42 - def stars; end - - # Returns the value of attribute symbols. - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#42 - def symbols; end - - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#44 - def visit_tree(formatted); end -end - -# source://actionpack//lib/action_dispatch/journey/visitors.rb#6 -class ActionDispatch::Journey::Format - # @return [Format] a new instance of Format - # - # source://actionpack//lib/action_dispatch/journey/visitors.rb#22 - def initialize(parts); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#37 - def evaluate(hash); end - - class << self - # source://actionpack//lib/action_dispatch/journey/visitors.rb#14 - def required_path(symbol); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#18 - def required_segment(symbol); end - end -end - -# source://actionpack//lib/action_dispatch/journey/visitors.rb#7 -ActionDispatch::Journey::Format::ESCAPE_PATH = T.let(T.unsafe(nil), Proc) - -# source://actionpack//lib/action_dispatch/journey/visitors.rb#8 -ActionDispatch::Journey::Format::ESCAPE_SEGMENT = T.let(T.unsafe(nil), Proc) - -# source://actionpack//lib/action_dispatch/journey/visitors.rb#10 -class ActionDispatch::Journey::Format::Parameter < ::Struct - # source://actionpack//lib/action_dispatch/journey/visitors.rb#11 - def escape(value); end - - # Returns the value of attribute escaper - # - # @return [Object] the current value of escaper - def escaper; end - - # Sets the attribute escaper - # - # @param value [Object] the value to set the attribute escaper to. - # @return [Object] the newly set value - def escaper=(_); end - - # Returns the value of attribute name - # - # @return [Object] the current value of name - def name; end - - # Sets the attribute name - # - # @param value [Object] the value to set the attribute name to. - # @return [Object] the newly set value - def name=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# The Formatter class is used for formatting URLs. For example, parameters -# passed to +url_for+ in Rails will eventually call Formatter#generate. -# -# source://actionpack//lib/action_dispatch/journey/formatter.rb#10 -class ActionDispatch::Journey::Formatter - # @return [Formatter] a new instance of Formatter - # - # source://actionpack//lib/action_dispatch/journey/formatter.rb#13 - def initialize(routes); end - - # source://actionpack//lib/action_dispatch/journey/formatter.rb#97 - def clear; end - - # source://actionpack//lib/action_dispatch/journey/formatter.rb#59 - def generate(name, options, path_parameters); end - - # Returns the value of attribute routes. - # - # source://actionpack//lib/action_dispatch/journey/formatter.rb#11 - def routes; end - - private - - # source://actionpack//lib/action_dispatch/journey/formatter.rb#196 - def build_cache; end - - # source://actionpack//lib/action_dispatch/journey/formatter.rb#207 - def cache; end - - # source://actionpack//lib/action_dispatch/journey/formatter.rb#102 - def extract_parameterized_parts(route, options, recall); end - - # source://actionpack//lib/action_dispatch/journey/formatter.rb#129 - 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 - def missing_keys(route, parts); end - - # source://actionpack//lib/action_dispatch/journey/formatter.rb#125 - def named_routes; end - - # source://actionpack//lib/action_dispatch/journey/formatter.rb#151 - def non_recursive(cache, options); end - - # source://actionpack//lib/action_dispatch/journey/formatter.rb#188 - def possibles(cache, options, depth = T.unsafe(nil)); end -end - -# source://actionpack//lib/action_dispatch/journey/formatter.rb#32 -class ActionDispatch::Journey::Formatter::MissingRoute - # @return [MissingRoute] a new instance of MissingRoute - # - # source://actionpack//lib/action_dispatch/journey/formatter.rb#35 - def initialize(constraints, missing_keys, unmatched_keys, routes, name); end - - # Returns the value of attribute constraints. - # - # source://actionpack//lib/action_dispatch/journey/formatter.rb#33 - def constraints; end - - # source://actionpack//lib/action_dispatch/journey/formatter.rb#51 - def message; end - - # Returns the value of attribute missing_keys. - # - # source://actionpack//lib/action_dispatch/journey/formatter.rb#33 - def missing_keys; end - - # Returns the value of attribute name. - # - # source://actionpack//lib/action_dispatch/journey/formatter.rb#33 - def name; end - - # source://actionpack//lib/action_dispatch/journey/formatter.rb#47 - def params; end - - # @raise [ActionController::UrlGenerationError] - # - # source://actionpack//lib/action_dispatch/journey/formatter.rb#43 - def path(method_name); end - - # Returns the value of attribute routes. - # - # source://actionpack//lib/action_dispatch/journey/formatter.rb#33 - def routes; end - - # Returns the value of attribute unmatched_keys. - # - # source://actionpack//lib/action_dispatch/journey/formatter.rb#33 - def unmatched_keys; end -end - -# source://actionpack//lib/action_dispatch/journey/formatter.rb#18 -class ActionDispatch::Journey::Formatter::RouteWithParams - # @return [RouteWithParams] a new instance of RouteWithParams - # - # source://actionpack//lib/action_dispatch/journey/formatter.rb#21 - def initialize(route, parameterized_parts, params); end - - # Returns the value of attribute params. - # - # source://actionpack//lib/action_dispatch/journey/formatter.rb#19 - def params; end - - # source://actionpack//lib/action_dispatch/journey/formatter.rb#27 - def path(_); end -end - -# source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#7 -module ActionDispatch::Journey::GTG; end - -# source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#8 -class ActionDispatch::Journey::GTG::Builder - # @return [Builder] a new instance of Builder - # - # source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#13 - def initialize(root); end - - # Returns the value of attribute ast. - # - # source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#11 - def ast; end - - # Returns the value of attribute endpoints. - # - # source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#11 - def endpoints; end - - # source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#86 - def firstpos(node); end - - # source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#107 - def lastpos(node); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#64 - def nullable?(node); end - - # Returns the value of attribute root. - # - # source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#11 - def root; end - - # source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#19 - def transition_table; end - - private - - # source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#129 - def build_followpos; end - - # source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#142 - def symbol(edge); end -end - -# source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#9 -ActionDispatch::Journey::GTG::Builder::DUMMY_END_NODE = T.let(T.unsafe(nil), ActionDispatch::Journey::Nodes::Dummy) - -# source://actionpack//lib/action_dispatch/journey/gtg/simulator.rb#8 -class ActionDispatch::Journey::GTG::MatchData - # @return [MatchData] a new instance of MatchData - # - # source://actionpack//lib/action_dispatch/journey/gtg/simulator.rb#11 - def initialize(memos); end - - # Returns the value of attribute memos. - # - # source://actionpack//lib/action_dispatch/journey/gtg/simulator.rb#9 - def memos; end -end - -# source://actionpack//lib/action_dispatch/journey/gtg/simulator.rb#16 -class ActionDispatch::Journey::GTG::Simulator - # @return [Simulator] a new instance of Simulator - # - # source://actionpack//lib/action_dispatch/journey/gtg/simulator.rb#21 - def initialize(transition_table); end - - # source://actionpack//lib/action_dispatch/journey/gtg/simulator.rb#25 - def memos(string); end - - # Returns the value of attribute tt. - # - # source://actionpack//lib/action_dispatch/journey/gtg/simulator.rb#19 - def tt; end -end - -# source://actionpack//lib/action_dispatch/journey/gtg/simulator.rb#17 -ActionDispatch::Journey::GTG::Simulator::INITIAL_STATE = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#8 -class ActionDispatch::Journey::GTG::TransitionTable - include ::ActionDispatch::Journey::NFA::Dot - - # @return [TransitionTable] a new instance of TransitionTable - # - # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#16 - def initialize; end - - # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#163 - def []=(from, to, sym); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#32 - def accepting?(state); end - - # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#28 - def accepting_states; end - - # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#24 - def add_accepting(state); end - - # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#36 - def add_memo(idx, memo); end - - # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#98 - def as_json(options = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#44 - def eclosure(t); end - - # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#40 - def memo(idx); end - - # Returns the value of attribute memos. - # - # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#11 - def memos; end - - # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#48 - def move(t, full_string, start_index, end_index); end - - # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#180 - def states; end - - # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#115 - def to_svg; end - - # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#187 - def transitions; end - - # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#125 - def visualizer(paths, title = T.unsafe(nil)); end - - private - - # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#198 - def states_hash_for(sym); end -end - -# source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#13 -ActionDispatch::Journey::GTG::TransitionTable::DEFAULT_EXP = T.let(T.unsafe(nil), Regexp) - -# source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#14 -ActionDispatch::Journey::GTG::TransitionTable::DEFAULT_EXP_ANCHORED = T.let(T.unsafe(nil), Regexp) - -# source://actionpack//lib/action_dispatch/journey/nfa/dot.rb#5 -module ActionDispatch::Journey::NFA; end - -# source://actionpack//lib/action_dispatch/journey/nfa/dot.rb#6 -module ActionDispatch::Journey::NFA::Dot - # source://actionpack//lib/action_dispatch/journey/nfa/dot.rb#7 - def to_dot; end -end - -# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#67 -module ActionDispatch::Journey::Nodes; end - -# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#180 -class ActionDispatch::Journey::Nodes::Binary < ::ActionDispatch::Journey::Nodes::Node - # @return [Binary] a new instance of Binary - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#183 - def initialize(left, right); end - - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#188 - def children; end - - # Returns the value of attribute right. - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#181 - def right; end - - # Sets the attribute right - # - # @param value the value to set the attribute right to. - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#181 - def right=(_arg0); end -end - -# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#191 -class ActionDispatch::Journey::Nodes::Cat < ::ActionDispatch::Journey::Nodes::Binary - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#192 - def cat?; end - - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#193 - def type; end -end - -# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#132 -class ActionDispatch::Journey::Nodes::Dot < ::ActionDispatch::Journey::Nodes::Terminal - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#133 - def type; end -end - -# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#120 -class ActionDispatch::Journey::Nodes::Dummy < ::ActionDispatch::Journey::Nodes::Literal - # @return [Dummy] a new instance of Dummy - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#121 - def initialize(x = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#125 - def literal?; end -end - -# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#157 -class ActionDispatch::Journey::Nodes::Group < ::ActionDispatch::Journey::Nodes::Unary - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#159 - def group?; end - - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#158 - def type; end -end - -# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#115 -class ActionDispatch::Journey::Nodes::Literal < ::ActionDispatch::Journey::Nodes::Terminal - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#116 - def literal?; end - - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#117 - def type; end -end - -# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#68 -class ActionDispatch::Journey::Nodes::Node - include ::Enumerable - - # @return [Node] a new instance of Node - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#73 - def initialize(left); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#106 - def cat?; end - - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#78 - def each(&block); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#107 - def group?; end - - # Returns the value of attribute left. - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#71 - def left; end - - # Sets the attribute left - # - # @param value the value to set the attribute left to. - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#71 - def left=(_arg0); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#103 - def literal?; end - - # Returns the value of attribute memo. - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#71 - def memo; end - - # Sets the attribute memo - # - # @param value the value to set the attribute memo to. - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#71 - def memo=(_arg0); end - - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#94 - def name; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#105 - def star?; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#102 - def symbol?; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#104 - def terminal?; end - - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#86 - def to_dot; end - - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#82 - def to_s; end - - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#90 - def to_sym; end - - # @raise [NotImplementedError] - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#98 - def type; end -end - -# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#196 -class ActionDispatch::Journey::Nodes::Or < ::ActionDispatch::Journey::Nodes::Node - # @return [Or] a new instance of Or - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#199 - def initialize(children); end - - # Returns the value of attribute children. - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#197 - def children; end - - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#203 - def type; end -end - -# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#128 -class ActionDispatch::Journey::Nodes::Slash < ::ActionDispatch::Journey::Nodes::Terminal - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#129 - def type; end -end - -# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#162 -class ActionDispatch::Journey::Nodes::Star < ::ActionDispatch::Journey::Nodes::Unary - # @return [Star] a new instance of Star - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#165 - def initialize(left); end - - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#175 - def name; end - - # Returns the value of attribute regexp. - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#163 - def regexp; end - - # Sets the attribute regexp - # - # @param value the value to set the attribute regexp to. - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#163 - def regexp=(_arg0); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#172 - def star?; end - - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#173 - def type; end -end - -# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#136 -class ActionDispatch::Journey::Nodes::Symbol < ::ActionDispatch::Journey::Nodes::Terminal - # @return [Symbol] a new instance of Symbol - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#143 - def initialize(left, regexp = T.unsafe(nil)); end - - # Returns the value of attribute name. - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#139 - def name; end - - # Returns the value of attribute regexp. - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#137 - def regexp; end - - # Sets the attribute regexp - # - # @param value the value to set the attribute regexp to. - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#137 - def regexp=(_arg0); end - - # Returns the value of attribute regexp. - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#137 - def symbol; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#150 - def symbol?; end - - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#149 - def type; end -end - -# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#141 -ActionDispatch::Journey::Nodes::Symbol::DEFAULT_EXP = T.let(T.unsafe(nil), Regexp) - -# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#142 -ActionDispatch::Journey::Nodes::Symbol::GREEDY_EXP = T.let(T.unsafe(nil), Regexp) - -# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#110 -class ActionDispatch::Journey::Nodes::Terminal < ::ActionDispatch::Journey::Nodes::Node - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#71 - def symbol; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#112 - def terminal?; end -end - -# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#153 -class ActionDispatch::Journey::Nodes::Unary < ::ActionDispatch::Journey::Nodes::Node - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#154 - def children; end -end - -# source://actionpack//lib/action_dispatch/journey/parser_extras.rb#9 -class ActionDispatch::Journey::Parser < ::Racc::Parser - include ::ActionDispatch::Journey::Nodes - - # @return [Parser] a new instance of Parser - # - # source://actionpack//lib/action_dispatch/journey/parser_extras.rb#16 - def initialize; end - - # reduce 0 omitted - # - # source://actionpack//lib/action_dispatch/journey/parser.rb#137 - def _reduce_1(val, _values); end - - # source://actionpack//lib/action_dispatch/journey/parser.rb#165 - def _reduce_10(val, _values); end - - # reduce 14 omitted - # - # source://actionpack//lib/action_dispatch/journey/parser.rb#177 - def _reduce_15(val, _values); end - - # source://actionpack//lib/action_dispatch/journey/parser.rb#181 - def _reduce_16(val, _values); end - - # source://actionpack//lib/action_dispatch/journey/parser.rb#185 - def _reduce_17(val, _values); end - - # source://actionpack//lib/action_dispatch/journey/parser.rb#189 - def _reduce_18(val, _values); end - - # source://actionpack//lib/action_dispatch/journey/parser.rb#141 - def _reduce_2(val, _values); end - - # reduce 6 omitted - # - # source://actionpack//lib/action_dispatch/journey/parser.rb#153 - def _reduce_7(val, _values); end - - # source://actionpack//lib/action_dispatch/journey/parser.rb#157 - def _reduce_8(val, _values); end - - # source://actionpack//lib/action_dispatch/journey/parser.rb#161 - def _reduce_9(val, _values); end - - # source://actionpack//lib/action_dispatch/journey/parser.rb#193 - def _reduce_none(val, _values); end - - # source://actionpack//lib/action_dispatch/journey/parser_extras.rb#25 - def next_token; end - - # source://actionpack//lib/action_dispatch/journey/parser_extras.rb#20 - def parse(string); end - - class << self - # source://actionpack//lib/action_dispatch/journey/parser_extras.rb#12 - def parse(string); end - end -end - -# source://actionpack//lib/action_dispatch/journey/parser.rb#92 -ActionDispatch::Journey::Parser::Racc_arg = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/journey/parser.rb#131 -ActionDispatch::Journey::Parser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) - -# source://actionpack//lib/action_dispatch/journey/parser.rb#108 -ActionDispatch::Journey::Parser::Racc_token_to_s_table = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/journey/path/pattern.rb#5 -module ActionDispatch::Journey::Path; end - -# source://actionpack//lib/action_dispatch/journey/path/pattern.rb#6 -class ActionDispatch::Journey::Path::Pattern - # @return [Pattern] a new instance of Pattern - # - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#9 - def initialize(ast, requirements, separators, anchored); end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#156 - def =~(other); end - - # Returns the value of attribute anchored. - # - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#7 - def anchored; end - - # Returns the value of attribute ast. - # - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#7 - def ast; end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#23 - def build_formatter; end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#27 - def eager_load!; end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#156 - def match(other); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#162 - def match?(other); end - - # Returns the value of attribute names. - # - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#7 - def names; end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#59 - def optional_names; end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#55 - def required_names; end - - # Returns the value of attribute requirements. - # - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#7 - def requirements; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#34 - def requirements_anchored?; end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#174 - def requirements_for_missing_keys_check; end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#166 - def source; end - - # Returns the value of attribute spec. - # - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#7 - def spec; end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#170 - def to_regexp; end - - private - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#185 - def offsets; end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#181 - def regexp_visitor; end -end - -# source://actionpack//lib/action_dispatch/journey/path/pattern.rb#65 -class ActionDispatch::Journey::Path::Pattern::AnchoredRegexp < ::ActionDispatch::Journey::Visitors::Visitor - # @return [AnchoredRegexp] a new instance of AnchoredRegexp - # - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#66 - def initialize(separator, matchers); end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#73 - def accept(node); end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#77 - def visit_CAT(node); end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#94 - def visit_DOT(node); end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#90 - def visit_GROUP(node); end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#94 - def visit_LITERAL(node); end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#108 - def visit_OR(node); end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#99 - def visit_SLASH(node); end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#103 - def visit_STAR(node); end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#81 - def visit_SYMBOL(node); end -end - -# source://actionpack//lib/action_dispatch/journey/path/pattern.rb#121 -class ActionDispatch::Journey::Path::Pattern::MatchData - # @return [MatchData] a new instance of MatchData - # - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#124 - def initialize(names, offsets, match); end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#138 - def [](x); end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#130 - def captures; end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#143 - def length; end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#134 - def named_captures; end - - # Returns the value of attribute names. - # - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#122 - def names; end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#147 - def post_match; end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#151 - def to_s; end -end - -# source://actionpack//lib/action_dispatch/journey/path/pattern.rb#114 -class ActionDispatch::Journey::Path::Pattern::UnanchoredRegexp < ::ActionDispatch::Journey::Path::Pattern::AnchoredRegexp - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#115 - def accept(node); end -end - -# source://actionpack//lib/action_dispatch/journey/route.rb#6 -class ActionDispatch::Journey::Route - # +path+ is a path constraint. - # +constraints+ is a hash of constraints to be applied to this 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 - - # Returns the value of attribute app. - # - # source://actionpack//lib/action_dispatch/journey/route.rb#7 - def app; end - - # Returns the value of attribute ast. - # - # source://actionpack//lib/action_dispatch/journey/route.rb#7 - def ast; end - - # Returns the value of attribute constraints. - # - # source://actionpack//lib/action_dispatch/journey/route.rb#7 - def conditions; end - - # Returns the value of attribute constraints. - # - # source://actionpack//lib/action_dispatch/journey/route.rb#7 - def constraints; end - - # Returns the value of attribute defaults. - # - # source://actionpack//lib/action_dispatch/journey/route.rb#7 - def defaults; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/route.rb#141 - def dispatcher?; end - - # source://actionpack//lib/action_dispatch/journey/route.rb#77 - def eager_load!; end - - # source://actionpack//lib/action_dispatch/journey/route.rb#119 - def format(path_options); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/route.rb#137 - def glob?; end - - # Returns the value of attribute internal. - # - # source://actionpack//lib/action_dispatch/journey/route.rb#7 - def internal; end - - # source://actionpack//lib/action_dispatch/journey/route.rb#163 - def ip; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/route.rb#145 - def matches?(request); end - - # Returns the value of attribute name. - # - # source://actionpack//lib/action_dispatch/journey/route.rb#7 - def name; end - - # source://actionpack//lib/action_dispatch/journey/route.rb#114 - def parts; end - - # Returns the value of attribute path. - # - # source://actionpack//lib/action_dispatch/journey/route.rb#7 - def path; end - - # Returns the value of attribute precedence. - # - # source://actionpack//lib/action_dispatch/journey/route.rb#7 - def precedence; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/route.rb#127 - def required_default?(key); end - - # source://actionpack//lib/action_dispatch/journey/route.rb#131 - def required_defaults; end - - # source://actionpack//lib/action_dispatch/journey/route.rb#102 - def required_keys; end - - # source://actionpack//lib/action_dispatch/journey/route.rb#123 - def required_parts; end - - # Needed for `bin/rails routes`. Picks up succinctly defined requirements - # for a route, for example route - # - # get 'photo/:id', :controller => 'photos', :action => 'show', - # :id => /[A-Z]\d{5}/ - # - # will have {:controller=>"photos", :action=>"show", :id=>/[A-Z]\d{5}/} - # as requirements. - # - # source://actionpack//lib/action_dispatch/journey/route.rb#92 - def requirements; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/route.rb#167 - def requires_matching_verb?; end - - # Returns the value of attribute scope_options. - # - # source://actionpack//lib/action_dispatch/journey/route.rb#7 - def scope_options; end - - # source://actionpack//lib/action_dispatch/journey/route.rb#106 - def score(supplied_keys); end - - # source://actionpack//lib/action_dispatch/journey/route.rb#114 - def segment_keys; end - - # source://actionpack//lib/action_dispatch/journey/route.rb#98 - def segments; end - - # source://actionpack//lib/action_dispatch/journey/route.rb#171 - def verb; end - - private - - # source://actionpack//lib/action_dispatch/journey/route.rb#180 - def match_verb(request); end - - # source://actionpack//lib/action_dispatch/journey/route.rb#176 - def verbs; end - - class << self - # source://actionpack//lib/action_dispatch/journey/route.rb#47 - def verb_matcher(verb); end - end -end - -# source://actionpack//lib/action_dispatch/journey/route.rb#12 -module ActionDispatch::Journey::Route::VerbMatchers; end - -# source://actionpack//lib/action_dispatch/journey/route.rb#34 -class ActionDispatch::Journey::Route::VerbMatchers::All - class << self - # source://actionpack//lib/action_dispatch/journey/route.rb#35 - def call(_); end - - # source://actionpack//lib/action_dispatch/journey/route.rb#36 - def verb; end - end -end - -# source://actionpack//lib/action_dispatch/journey/route.rb#17 -class ActionDispatch::Journey::Route::VerbMatchers::DELETE - class << self - # source://actionpack//lib/action_dispatch/journey/route.rb#19 - def call(req); end - - # source://actionpack//lib/action_dispatch/journey/route.rb#18 - def verb; end - end -end - -# source://actionpack//lib/action_dispatch/journey/route.rb#17 -class ActionDispatch::Journey::Route::VerbMatchers::GET - class << self - # source://actionpack//lib/action_dispatch/journey/route.rb#19 - def call(req); end - - # source://actionpack//lib/action_dispatch/journey/route.rb#18 - def verb; end - end -end - -# source://actionpack//lib/action_dispatch/journey/route.rb#17 -class ActionDispatch::Journey::Route::VerbMatchers::HEAD - class << self - # source://actionpack//lib/action_dispatch/journey/route.rb#19 - def call(req); end - - # source://actionpack//lib/action_dispatch/journey/route.rb#18 - def verb; end - end -end - -# source://actionpack//lib/action_dispatch/journey/route.rb#17 -class ActionDispatch::Journey::Route::VerbMatchers::LINK - class << self - # source://actionpack//lib/action_dispatch/journey/route.rb#19 - def call(req); end - - # source://actionpack//lib/action_dispatch/journey/route.rb#18 - def verb; end - end -end - -# source://actionpack//lib/action_dispatch/journey/route.rb#17 -class ActionDispatch::Journey::Route::VerbMatchers::OPTIONS - class << self - # source://actionpack//lib/action_dispatch/journey/route.rb#19 - def call(req); end - - # source://actionpack//lib/action_dispatch/journey/route.rb#18 - def verb; end - end -end - -# source://actionpack//lib/action_dispatch/journey/route.rb#17 -class ActionDispatch::Journey::Route::VerbMatchers::PATCH - class << self - # source://actionpack//lib/action_dispatch/journey/route.rb#19 - def call(req); end - - # source://actionpack//lib/action_dispatch/journey/route.rb#18 - def verb; end - end -end - -# source://actionpack//lib/action_dispatch/journey/route.rb#17 -class ActionDispatch::Journey::Route::VerbMatchers::POST - class << self - # source://actionpack//lib/action_dispatch/journey/route.rb#19 - def call(req); end - - # source://actionpack//lib/action_dispatch/journey/route.rb#18 - def verb; end - end -end - -# source://actionpack//lib/action_dispatch/journey/route.rb#17 -class ActionDispatch::Journey::Route::VerbMatchers::PUT - class << self - # source://actionpack//lib/action_dispatch/journey/route.rb#19 - def call(req); end - - # source://actionpack//lib/action_dispatch/journey/route.rb#18 - def verb; end - end -end - -# source://actionpack//lib/action_dispatch/journey/route.rb#17 -class ActionDispatch::Journey::Route::VerbMatchers::TRACE - class << self - # source://actionpack//lib/action_dispatch/journey/route.rb#19 - def call(req); end - - # source://actionpack//lib/action_dispatch/journey/route.rb#18 - def verb; end - end -end - -# source://actionpack//lib/action_dispatch/journey/route.rb#17 -class ActionDispatch::Journey::Route::VerbMatchers::UNLINK - class << self - # source://actionpack//lib/action_dispatch/journey/route.rb#19 - def call(req); end - - # source://actionpack//lib/action_dispatch/journey/route.rb#18 - def verb; end - end -end - -# source://actionpack//lib/action_dispatch/journey/route.rb#24 -class ActionDispatch::Journey::Route::VerbMatchers::Unknown - # @return [Unknown] a new instance of Unknown - # - # source://actionpack//lib/action_dispatch/journey/route.rb#27 - def initialize(verb); end - - # source://actionpack//lib/action_dispatch/journey/route.rb#31 - def call(request); end - - # Returns the value of attribute verb. - # - # source://actionpack//lib/action_dispatch/journey/route.rb#25 - def verb; end -end - -# source://actionpack//lib/action_dispatch/journey/route.rb#13 -ActionDispatch::Journey::Route::VerbMatchers::VERBS = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/journey/route.rb#39 -ActionDispatch::Journey::Route::VerbMatchers::VERB_TO_CLASS = T.let(T.unsafe(nil), Hash) - -# source://actionpack//lib/action_dispatch/journey/router/utils.rb#5 -class ActionDispatch::Journey::Router - # @return [Router] a new instance of Router - # - # source://actionpack//lib/action_dispatch/journey/router.rb#20 - def initialize(routes); end - - # source://actionpack//lib/action_dispatch/journey/router.rb#24 - def eager_load!; end - - # source://actionpack//lib/action_dispatch/journey/router.rb#65 - def recognize(rails_req); end - - # Returns the value of attribute routes. - # - # source://actionpack//lib/action_dispatch/journey/router.rb#18 - def routes; end - - # Sets the attribute routes - # - # @param value the value to set the attribute routes to. - # - # source://actionpack//lib/action_dispatch/journey/router.rb#18 - def routes=(_arg0); end - - # source://actionpack//lib/action_dispatch/journey/router.rb#31 - def serve(req); end - - # source://actionpack//lib/action_dispatch/journey/router.rb#78 - def visualizer; end - - private - - # source://actionpack//lib/action_dispatch/journey/router.rb#92 - def ast; end - - # source://actionpack//lib/action_dispatch/journey/router.rb#100 - def custom_routes; end - - # source://actionpack//lib/action_dispatch/journey/router.rb#104 - def filter_routes(path); end - - # source://actionpack//lib/action_dispatch/journey/router.rb#109 - def find_routes(req); end - - # source://actionpack//lib/action_dispatch/journey/router.rb#134 - def match_head_routes(routes, req); end - - # source://actionpack//lib/action_dispatch/journey/router.rb#86 - def partitioned_routes; end - - # source://actionpack//lib/action_dispatch/journey/router.rb#96 - def simulator; end -end - -# source://actionpack//lib/action_dispatch/journey/router/utils.rb#6 -class ActionDispatch::Journey::Router::Utils - class << self - # source://actionpack//lib/action_dispatch/journey/router/utils.rb#90 - def escape_fragment(fragment); end - - # source://actionpack//lib/action_dispatch/journey/router/utils.rb#82 - def escape_path(path); end - - # source://actionpack//lib/action_dispatch/journey/router/utils.rb#86 - def escape_segment(segment); end - - # Normalizes URI path. - # - # Strips off trailing slash and ensures there is a leading slash. - # Also converts downcase URL encoded string to uppercase. - # - # normalize_path("/foo") # => "/foo" - # normalize_path("/foo/") # => "/foo" - # normalize_path("foo") # => "/foo" - # normalize_path("") # => "/" - # normalize_path("/%ab") # => "/%AB" - # - # source://actionpack//lib/action_dispatch/journey/router/utils.rb#17 - def normalize_path(path); end - - # Replaces any escaped sequences with their unescaped representations. - # - # uri = "/topics?title=Ruby%20on%20Rails" - # unescape_uri(uri) #=> "/topics?title=Ruby on Rails" - # - # source://actionpack//lib/action_dispatch/journey/router/utils.rb#98 - def unescape_uri(uri); end - end -end - -# source://actionpack//lib/action_dispatch/journey/router/utils.rb#80 -ActionDispatch::Journey::Router::Utils::ENCODER = T.let(T.unsafe(nil), ActionDispatch::Journey::Router::Utils::UriEncoder) - -# URI path and fragment escaping -# https://tools.ietf.org/html/rfc3986 -# -# source://actionpack//lib/action_dispatch/journey/router/utils.rb#33 -class ActionDispatch::Journey::Router::Utils::UriEncoder - # source://actionpack//lib/action_dispatch/journey/router/utils.rb#51 - def escape_fragment(fragment); end - - # source://actionpack//lib/action_dispatch/journey/router/utils.rb#55 - def escape_path(path); end - - # source://actionpack//lib/action_dispatch/journey/router/utils.rb#59 - def escape_segment(segment); end - - # source://actionpack//lib/action_dispatch/journey/router/utils.rb#63 - def unescape_uri(uri); end - - private - - # source://actionpack//lib/action_dispatch/journey/router/utils.rb#69 - def escape(component, pattern); end - - # source://actionpack//lib/action_dispatch/journey/router/utils.rb#73 - def percent_encode(unsafe); end -end - -# source://actionpack//lib/action_dispatch/journey/router/utils.rb#40 -ActionDispatch::Journey::Router::Utils::UriEncoder::ALPHA = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/journey/router/utils.rb#38 -ActionDispatch::Journey::Router::Utils::UriEncoder::DEC2HEX = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/journey/router/utils.rb#41 -ActionDispatch::Journey::Router::Utils::UriEncoder::DIGIT = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/journey/router/utils.rb#37 -ActionDispatch::Journey::Router::Utils::UriEncoder::EMPTY = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/journey/router/utils.rb#34 -ActionDispatch::Journey::Router::Utils::UriEncoder::ENCODE = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/journey/router/utils.rb#45 -ActionDispatch::Journey::Router::Utils::UriEncoder::ESCAPED = T.let(T.unsafe(nil), Regexp) - -# source://actionpack//lib/action_dispatch/journey/router/utils.rb#47 -ActionDispatch::Journey::Router::Utils::UriEncoder::FRAGMENT = T.let(T.unsafe(nil), Regexp) - -# source://actionpack//lib/action_dispatch/journey/router/utils.rb#49 -ActionDispatch::Journey::Router::Utils::UriEncoder::PATH = T.let(T.unsafe(nil), Regexp) - -# source://actionpack//lib/action_dispatch/journey/router/utils.rb#48 -ActionDispatch::Journey::Router::Utils::UriEncoder::SEGMENT = T.let(T.unsafe(nil), Regexp) - -# source://actionpack//lib/action_dispatch/journey/router/utils.rb#43 -ActionDispatch::Journey::Router::Utils::UriEncoder::SUB_DELIMS = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/journey/router/utils.rb#42 -ActionDispatch::Journey::Router::Utils::UriEncoder::UNRESERVED = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/journey/router/utils.rb#35 -ActionDispatch::Journey::Router::Utils::UriEncoder::US_ASCII = T.let(T.unsafe(nil), Encoding) - -# source://actionpack//lib/action_dispatch/journey/router/utils.rb#36 -ActionDispatch::Journey::Router::Utils::UriEncoder::UTF_8 = T.let(T.unsafe(nil), Encoding) - -# The Routing table. Contains all routes for a system. Routes can be -# added to the table by calling Routes#add_route. -# -# source://actionpack//lib/action_dispatch/journey/routes.rb#7 -class ActionDispatch::Journey::Routes - include ::Enumerable - - # @return [Routes] a new instance of Routes - # - # source://actionpack//lib/action_dispatch/journey/routes.rb#12 - def initialize; end - - # source://actionpack//lib/action_dispatch/journey/routes.rb#65 - def add_route(name, mapping); end - - # Returns the value of attribute anchored_routes. - # - # source://actionpack//lib/action_dispatch/journey/routes.rb#10 - def anchored_routes; end - - # source://actionpack//lib/action_dispatch/journey/routes.rb#51 - def ast; end - - # source://actionpack//lib/action_dispatch/journey/routes.rb#37 - def clear; end - - # Returns the value of attribute custom_routes. - # - # source://actionpack//lib/action_dispatch/journey/routes.rb#10 - def custom_routes; end - - # source://actionpack//lib/action_dispatch/journey/routes.rb#33 - def each(&block); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/routes.rb#20 - def empty?; end - - # source://actionpack//lib/action_dispatch/journey/routes.rb#29 - def last; end - - # source://actionpack//lib/action_dispatch/journey/routes.rb#24 - def length; end - - # source://actionpack//lib/action_dispatch/journey/routes.rb#43 - def partition_route(route); end - - # Returns the value of attribute routes. - # - # source://actionpack//lib/action_dispatch/journey/routes.rb#10 - def routes; end - - # source://actionpack//lib/action_dispatch/journey/routes.rb#58 - def simulator; end - - # source://actionpack//lib/action_dispatch/journey/routes.rb#24 - def size; end - - private - - # source://actionpack//lib/action_dispatch/journey/routes.rb#74 - def clear_cache!; end -end - -# source://actionpack//lib/action_dispatch/journey/scanner.rb#7 -class ActionDispatch::Journey::Scanner - # @return [Scanner] a new instance of Scanner - # - # source://actionpack//lib/action_dispatch/journey/scanner.rb#8 - def initialize; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/scanner.rb#16 - def eos?; end - - # source://actionpack//lib/action_dispatch/journey/scanner.rb#28 - def next_token; end - - # source://actionpack//lib/action_dispatch/journey/scanner.rb#20 - def pos; end - - # source://actionpack//lib/action_dispatch/journey/scanner.rb#24 - def pre_match; end - - # source://actionpack//lib/action_dispatch/journey/scanner.rb#12 - def scan_setup(str); end - - private - - # takes advantage of String @- deduping capabilities in Ruby 2.5 upwards - # see: https://bugs.ruby-lang.org/issues/13077 - # - # source://actionpack//lib/action_dispatch/journey/scanner.rb#38 - def dedup_scan(regex); end - - # source://actionpack//lib/action_dispatch/journey/scanner.rb#43 - def scan; end -end - -# source://actionpack//lib/action_dispatch/journey/visitors.rb#53 -module ActionDispatch::Journey::Visitors; end - -# source://actionpack//lib/action_dispatch/journey/visitors.rb#194 -class ActionDispatch::Journey::Visitors::Dot < ::ActionDispatch::Journey::Visitors::FunctionalVisitor - # @return [Dot] a new instance of Dot - # - # source://actionpack//lib/action_dispatch/journey/visitors.rb#195 - def initialize; end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#200 - def accept(node, seed = T.unsafe(nil)); end - - private - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#215 - def binary(node, seed); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#222 - def nary(node, seed); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#254 - def terminal(node, seed); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#229 - def unary(node, seed); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#239 - def visit_CAT(node, seed); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#234 - def visit_GROUP(node, seed); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#249 - def visit_OR(node, seed); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#244 - def visit_STAR(node, seed); end -end - -# source://actionpack//lib/action_dispatch/journey/visitors.rb#260 -ActionDispatch::Journey::Visitors::Dot::INSTANCE = T.let(T.unsafe(nil), ActionDispatch::Journey::Visitors::Dot) - -# Loop through the requirements AST. -# -# source://actionpack//lib/action_dispatch/journey/visitors.rb#159 -class ActionDispatch::Journey::Visitors::Each < ::ActionDispatch::Journey::Visitors::FunctionalVisitor - # source://actionpack//lib/action_dispatch/journey/visitors.rb#160 - def visit(node, block); end -end - -# source://actionpack//lib/action_dispatch/journey/visitors.rb#165 -ActionDispatch::Journey::Visitors::Each::INSTANCE = T.let(T.unsafe(nil), ActionDispatch::Journey::Visitors::Each) - -# source://actionpack//lib/action_dispatch/journey/visitors.rb#134 -class ActionDispatch::Journey::Visitors::FormatBuilder < ::ActionDispatch::Journey::Visitors::Visitor - # source://actionpack//lib/action_dispatch/journey/visitors.rb#135 - def accept(node); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#138 - def binary(node); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#136 - def terminal(node); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#142 - def visit_GROUP(n); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#144 - def visit_STAR(n); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#148 - def visit_SYMBOL(n); end -end - -# source://actionpack//lib/action_dispatch/journey/visitors.rb#95 -class ActionDispatch::Journey::Visitors::FunctionalVisitor - # source://actionpack//lib/action_dispatch/journey/visitors.rb#98 - def accept(node, seed); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#106 - def binary(node, seed); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#111 - def nary(node, seed); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#122 - def terminal(node, seed); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#116 - def unary(node, seed); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#102 - def visit(node, seed); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#109 - def visit_CAT(n, seed); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#126 - def visit_DOT(n, seed); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#119 - def visit_GROUP(n, seed); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#123 - def visit_LITERAL(n, seed); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#114 - def visit_OR(n, seed); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#125 - def visit_SLASH(n, seed); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#120 - def visit_STAR(n, seed); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#124 - def visit_SYMBOL(n, seed); end -end - -# source://actionpack//lib/action_dispatch/journey/visitors.rb#96 -ActionDispatch::Journey::Visitors::FunctionalVisitor::DISPATCH_CACHE = T.let(T.unsafe(nil), Hash) - -# source://actionpack//lib/action_dispatch/journey/visitors.rb#168 -class ActionDispatch::Journey::Visitors::String < ::ActionDispatch::Journey::Visitors::FunctionalVisitor - private - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#170 - def binary(node, seed); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#174 - def nary(node, seed); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#183 - def terminal(node, seed); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#187 - def visit_GROUP(node, seed); end -end - -# source://actionpack//lib/action_dispatch/journey/visitors.rb#191 -ActionDispatch::Journey::Visitors::String::INSTANCE = T.let(T.unsafe(nil), ActionDispatch::Journey::Visitors::String) - -# source://actionpack//lib/action_dispatch/journey/visitors.rb#54 -class ActionDispatch::Journey::Visitors::Visitor - # source://actionpack//lib/action_dispatch/journey/visitors.rb#57 - def accept(node); end - - private - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#66 - def binary(node); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#72 - def nary(node); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#83 - def terminal(node); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#77 - def unary(node); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#62 - def visit(node); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#70 - def visit_CAT(n); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#87 - def visit_DOT(n); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#80 - def visit_GROUP(n); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#84 - def visit_LITERAL(n); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#75 - def visit_OR(n); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#86 - def visit_SLASH(n); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#81 - def visit_STAR(n); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#85 - def visit_SYMBOL(n); end -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 -class ActionDispatch::MiddlewareStack - include ::Enumerable - - # @return [MiddlewareStack] a new instance of MiddlewareStack - # @yield [_self] - # @yieldparam _self [ActionDispatch::MiddlewareStack] the object that the method was called on - # - # source://actionpack//lib/action_dispatch/middleware/stack.rb#70 - def initialize(*args); end - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#87 - def [](i); end - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#160 - def build(app = T.unsafe(nil), &block); end - - # Deletes a middleware from the middleware stack. - # - # 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 - def delete(target); end - - # Deletes a middleware from the middleware stack. - # - # 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 - def delete!(target); end - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#75 - def each(&block); end - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#100 - def insert(index, klass, *args, **_arg3, &block); end - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#108 - def insert_after(index, *args, **_arg2, &block); end - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#100 - def insert_before(index, klass, *args, **_arg3, &block); end - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#83 - def last; end - - # Returns the value of attribute middlewares. - # - # source://actionpack//lib/action_dispatch/middleware/stack.rb#68 - 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 - def middlewares=(_arg0); end - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#137 - def move(target, source); end - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#147 - def move_after(target, source); end - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#137 - def move_before(target, source); end - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#79 - def size; end - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#114 - def swap(target, *args, **_arg2, &block); end - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#91 - def unshift(klass, *args, **_arg2, &block); end - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#155 - def use(klass, *args, **_arg2, &block); end - - private - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#172 - def assert_index(index, where); end - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#178 - def build_middleware(klass, args, block); end - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#182 - def index_of(klass); end - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#96 - def initialize_copy(other); end -end - -# This class is used to instrument the execution of a single middleware. -# It proxies the +call+ method transparently and instruments the method -# call. -# -# source://actionpack//lib/action_dispatch/middleware/stack.rb#48 -class ActionDispatch::MiddlewareStack::InstrumentationProxy - # @return [InstrumentationProxy] a new instance of InstrumentationProxy - # - # source://actionpack//lib/action_dispatch/middleware/stack.rb#51 - def initialize(middleware, class_name); end - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#59 - def call(env); end -end - -# source://actionpack//lib/action_dispatch/middleware/stack.rb#49 -ActionDispatch::MiddlewareStack::InstrumentationProxy::EVENT_NAME = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/middleware/stack.rb#8 -class ActionDispatch::MiddlewareStack::Middleware - # @return [Middleware] a new instance of Middleware - # - # source://actionpack//lib/action_dispatch/middleware/stack.rb#11 - def initialize(klass, args, block); end - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#19 - def ==(middleware); end - - # Returns the value of attribute args. - # - # source://actionpack//lib/action_dispatch/middleware/stack.rb#9 - def args; end - - # Returns the value of attribute block. - # - # source://actionpack//lib/action_dispatch/middleware/stack.rb#9 - def block; end - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#36 - def build(app); end - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#40 - def build_instrumented(app); end - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#28 - def inspect; end - - # Returns the value of attribute klass. - # - # source://actionpack//lib/action_dispatch/middleware/stack.rb#9 - def klass; end - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#17 - def name; end -end - -# source://actionpack//lib/action_dispatch.rb#43 -class ActionDispatch::MissingController < ::NameError; end - -# 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 -# its iframes can use. -# -# Example global policy: -# -# Rails.application.config.permissions_policy do |policy| -# policy.camera :none -# policy.gyroscope :none -# policy.microphone :none -# policy.usb :none -# policy.fullscreen :self -# policy.payment :self, "https://secure.example.com" -# end -# -# source://actionpack//lib/action_dispatch/http/permissions_policy.rb#22 -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 - def initialize; end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 - def accelerometer(*sources); end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 - def ambient_light_sensor(*sources); end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 - def autoplay(*sources); end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#132 - def build(context = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 - def camera(*sources); end - - # Returns the value of attribute directives. - # - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#111 - def directives; end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 - def encrypted_media(*sources); end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 - def fullscreen(*sources); end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 - def geolocation(*sources); end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 - def gyroscope(*sources); end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 - def magnetometer(*sources); end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 - def microphone(*sources); end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 - def midi(*sources); end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 - def payment(*sources); end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 - def picture_in_picture(*sources); end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 - def speaker(*sources); end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 - def usb(*sources); end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 - def vibrate(*sources); end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 - def vr(*sources); end - - private - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#150 - def apply_mapping(source); end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#137 - def apply_mappings(sources); end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#168 - def build_directive(sources, context); end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#156 - def build_directives(context); end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#118 - def initialize_copy(other); end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#172 - def resolve_source(source, context); end -end - -# List of available permissions can be found at -# https://github.com/w3c/webappsec-permissions-policy/blob/master/features.md#policy-controlled-features -# -# source://actionpack//lib/action_dispatch/http/permissions_policy.rb#89 -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 -class ActionDispatch::PermissionsPolicy::Middleware - # @return [Middleware] a new instance of Middleware - # - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#32 - def initialize(app); end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#36 - def call(env); end - - private - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#55 - def html_response?(headers); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#65 - def policy_empty?(policy); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#61 - def policy_present?(headers); end -end - -# source://actionpack//lib/action_dispatch/http/permissions_policy.rb#24 -ActionDispatch::PermissionsPolicy::Middleware::CONTENT_TYPE = T.let(T.unsafe(nil), String) - -# The Feature-Policy header has been renamed to Permissions-Policy. -# The Permissions-Policy requires a different implementation and isn't -# yet supported by all browsers. To avoid having to rename this -# middleware in the future we use the new name for the middleware but -# keep the old header name and implementation for now. -# -# source://actionpack//lib/action_dispatch/http/permissions_policy.rb#30 -ActionDispatch::PermissionsPolicy::Middleware::POLICY = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/http/permissions_policy.rb#70 -module ActionDispatch::PermissionsPolicy::Request - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#73 - def permissions_policy; end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#77 - def permissions_policy=(policy); end -end - -# source://actionpack//lib/action_dispatch/http/permissions_policy.rb#71 -ActionDispatch::PermissionsPolicy::Request::POLICY = T.let(T.unsafe(nil), String) - -# 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 -# render the template found in /public/500.html. -# If an internationalized locale is set, this middleware will attempt to render -# the template in /public/500..html. If an internationalized template -# is not found it will fall back on /public/500.html. -# -# 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 -class ActionDispatch::PublicExceptions - # @return [PublicExceptions] a new instance of PublicExceptions - # - # source://actionpack//lib/action_dispatch/middleware/public_exceptions.rb#17 - def initialize(public_path); end - - # source://actionpack//lib/action_dispatch/middleware/public_exceptions.rb#21 - def call(env); end - - # Returns the value of attribute public_path. - # - # source://actionpack//lib/action_dispatch/middleware/public_exceptions.rb#15 - 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 - def public_path=(_arg0); end - - private - - # source://actionpack//lib/action_dispatch/middleware/public_exceptions.rb#35 - def render(status, content_type, body); end - - # source://actionpack//lib/action_dispatch/middleware/public_exceptions.rb#44 - def render_format(status, content_type, body); end - - # source://actionpack//lib/action_dispatch/middleware/public_exceptions.rb#49 - def render_html(status); end -end - -# source://actionpack//lib/action_dispatch/railtie.rb#7 -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. -# -# By default, ActionDispatch::Reloader is included in the middleware stack -# only in the development environment; specifically, when +config.cache_classes+ -# is false. -# -# source://actionpack//lib/action_dispatch/middleware/reloader.rb#10 -class ActionDispatch::Reloader < ::ActionDispatch::Executor; end - -# 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. -# -# 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 -# the value that was {given in the last header}[https://andre.arko.net/2011/12/26/repeated-headers-and-ruby-web-servers]. -# If you are behind multiple proxy servers (like NGINX to HAProxy to Unicorn) -# then you should test your Rack server to make sure your data is good. -# -# IF YOU DON'T USE A PROXY, THIS MAKES YOU VULNERABLE TO IP SPOOFING. -# This middleware assumes that there is at least one proxy sitting around -# and setting headers with the client's remote IP address. If you don't use -# 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. -# -# source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#28 -class ActionDispatch::RemoteIp - # Create a new +RemoteIp+ middleware instance. - # - # The +ip_spoofing_check+ option is on by default. When on, an exception - # is raised if it looks like the client is trying to lie about its own IP - # address. It makes sense to turn off this check on sites aimed at non-IP - # clients (like WAP devices), or behind proxies that set headers in an - # incorrect or confusing way (like AWS ELB). - # - # The +custom_proxies+ argument can take an enumerable which will be used - # instead of +TRUSTED_PROXIES+. Any proxy setup will put the value you - # want in the middle (or at the beginning) of the X-Forwarded-For list, - # with your proxy servers after it. If your proxies aren't removed, pass - # them in via the +custom_proxies+ parameter. That way, the middleware will - # ignore those IP addresses, and return the one that you want. - # - # @return [RemoteIp] a new instance of RemoteIp - # - # source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#60 - 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 - # without calculating the IP to keep from slowing down the majority of - # 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 - def call(env); end - - # Returns the value of attribute check_ip. - # - # source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#44 - def check_ip; end - - # Returns the value of attribute proxies. - # - # source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#44 - def proxies; end -end - -# The GetIp class exists as a way to defer processing of the request data -# 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 -class ActionDispatch::RemoteIp::GetIp - # @return [GetIp] a new instance of GetIp - # - # source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#100 - def initialize(req, check_ip, proxies); end - - # Sort through the various IP address headers, looking for the IP most - # likely to be the address of the actual remote client making this - # request. - # - # REMOTE_ADDR will be correct if the request is made directly against the - # Ruby process, on e.g. Heroku. When the request is proxied by another - # server like HAProxy or NGINX, the IP address that made the original - # request will be put in an X-Forwarded-For header. If there are multiple - # 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/], - # while the first IP in the list is likely to be the "originating" IP, - # it could also have been set by the client maliciously. - # - # In order to find the first address that is (probably) accurate, we - # 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 - def calculate_ip; end - - # Memoizes the value returned by #calculate_ip and returns it for - # ActionDispatch::Request to use. - # - # source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#167 - def to_s; end - - private - - # source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#186 - 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 -class ActionDispatch::RemoteIp::IpSpoofAttackError < ::StandardError; end - -# The default trusted IPs list simply includes IP addresses that are -# guaranteed by the IP specification to be private addresses. Those will -# 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 -ActionDispatch::RemoteIp::TRUSTED_PROXIES = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/http/request.rb#18 -class ActionDispatch::Request - include ::ActionDispatch::Flash::RequestMethods - include ::Rack::Request::Helpers - include ::ActionDispatch::Http::Cache::Request - include ::ActionDispatch::Http::MimeNegotiation - include ::ActionDispatch::Http::Parameters - include ::ActionDispatch::Http::FilterParameters - include ::ActionDispatch::Http::URL - include ::ActionDispatch::ContentSecurityPolicy::Request - include ::ActionDispatch::PermissionsPolicy::Request - include ::Rack::Request::Env - include ::ActionDispatch::RequestCookieMethods - extend ::ActionDispatch::Http::Parameters::ClassMethods - - # @return [Request] a new instance of Request - # - # source://actionpack//lib/action_dispatch/http/request.rb#60 - def initialize(env); end - - # Override Rack's GET method to support indifferent access. - # - # source://actionpack//lib/action_dispatch/http/request.rb#372 - def GET; end - - # Override Rack's POST method to support indifferent access. - # - # source://actionpack//lib/action_dispatch/http/request.rb#388 - def POST; end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def accept; end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def accept_charset; end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def accept_encoding; end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def accept_language; end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def auth_type; end - - # 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#404 - 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#334 - def body; end - - # source://actionpack//lib/action_dispatch/http/request.rb#355 - def body_stream; end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def cache_control; end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def client_ip; end - - # source://actionpack//lib/action_dispatch/http/request.rb#70 - def commit_cookie_jar!; end - - # source://actionpack//lib/action_dispatch/middleware/flash.rb#62 - def commit_flash; end - - # Returns the content length of the request as an integer. - # - # source://actionpack//lib/action_dispatch/http/request.rb#270 - def content_length; end - - # source://actionpack//lib/action_dispatch/http/request.rb#79 - def controller_class; end - - # source://actionpack//lib/action_dispatch/http/request.rb#85 - def controller_class_for(name); end - - # source://actionpack//lib/action_dispatch/http/request.rb#171 - def controller_instance; end - - # source://actionpack//lib/action_dispatch/http/request.rb#175 - def controller_instance=(controller); end - - # source://actionpack//lib/action_dispatch/http/request.rb#157 - def engine_script_name(_routes); end - - # source://actionpack//lib/action_dispatch/http/request.rb#161 - def engine_script_name=(name); end - - # Determine whether the request body contains form-data by checking - # the request Content-Type for one of the media-types: - # "application/x-www-form-urlencoded" or "multipart/form-data". The - # list of form-data media types can be modified through the - # +FORM_DATA_MEDIA_TYPES+ array. - # - # A request body is not assumed to contain form-data when no - # Content-Type header is provided and the request_method is POST. - # - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/request.rb#351 - def form_data?; end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def from; end - - # Returns the +String+ full path including params of the last URL requested. - # - # # get "/articles" - # request.fullpath # => "/articles" - # - # # get "/articles?page=2" - # request.fullpath # => "/articles?page=2" - # - # source://actionpack//lib/action_dispatch/http/request.rb#249 - def fullpath; end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def gateway_interface; end - - # Provides access to the request's HTTP headers, for example: - # - # request.headers["Content-Type"] # => "text/plain" - # - # source://actionpack//lib/action_dispatch/http/request.rb#210 - def headers; end - - # source://actionpack//lib/action_dispatch/http/request.rb#179 - def http_auth_salt; end - - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#18 - def ignore_accept_header; end - - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#18 - def ignore_accept_header=(val); end - - # source://actionpack//lib/action_dispatch/http/request.rb#428 - def inspect; end - - # Returns the IP address of client as a +String+. - # - # source://actionpack//lib/action_dispatch/http/request.rb#283 - def ip; end - - # Returns true if the request has a header matching the given key parameter. - # - # request.key? :ip_spoofing_check # => true - # - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/request.rb#106 - def key?(key); end - - # True if the request came from localhost, 127.0.0.1, or ::1. - # - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/request.rb#412 - def local?; end - - # source://actionpack//lib/action_dispatch/http/request.rb#421 - def logger; end - - # The +String+ MIME type of the request. - # - # # get "/articles" - # request.media_type # => "application/x-www-form-urlencoded" - # - # source://actionpack//lib/action_dispatch/http/request.rb#265 - 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#198 - def method; end - - # Returns a symbol form of the #method. - # - # source://actionpack//lib/action_dispatch/http/request.rb#203 - def method_symbol; end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def negotiate; end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def origin; end - - # Returns a +String+ with the last requested path including their params. - # - # # get '/foo' - # request.original_fullpath # => '/foo' - # - # # get '/foo?bar' - # request.original_fullpath # => '/foo?bar' - # - # source://actionpack//lib/action_dispatch/http/request.rb#238 - def original_fullpath; end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def original_script_name; end - - # Returns the original request URL as a +String+. - # - # # get "/articles?page=2" - # request.original_url # => "http://www.example.com/articles?page=2" - # - # source://actionpack//lib/action_dispatch/http/request.rb#257 - def original_url; end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def path_translated; end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def pragma; end - - # Override Rack's GET method to support indifferent access. - # - # source://actionpack//lib/action_dispatch/http/request.rb#372 - 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#323 - def raw_post; end - - # source://rack/2.2.6.2/lib/rack/request.rb#157 - def raw_request_method; end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def remote_addr; end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def remote_host; end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def remote_ident; end - - # Returns the IP address of client as a +String+, - # usually set by the RemoteIp middleware. - # - # source://actionpack//lib/action_dispatch/http/request.rb#289 - def remote_ip; end - - # source://actionpack//lib/action_dispatch/http/request.rb#293 - def remote_ip=(remote_ip); end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def remote_user; 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). - # - # 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#306 - def request_id; end - - # source://actionpack//lib/action_dispatch/http/request.rb#310 - def request_id=(id); end - - # Returns the HTTP \method that the application should see. - # In the case where the \method was overridden by a middleware - # (for instance, if a HEAD request was converted to a GET, - # or if a _method parameter was used to determine the \method - # the application should use), this \method returns the overridden - # value, not the original. - # - # source://actionpack//lib/action_dispatch/http/request.rb#145 - def request_method; end - - # source://actionpack//lib/action_dispatch/http/request.rb#165 - def request_method=(request_method); end - - # Returns a symbol form of the #request_method. - # - # source://actionpack//lib/action_dispatch/http/request.rb#191 - def request_method_symbol; end - - # Override Rack's POST method to support indifferent access. - # - # source://actionpack//lib/action_dispatch/http/request.rb#388 - def request_parameters; end - - # source://actionpack//lib/action_dispatch/http/request.rb#416 - def request_parameters=(params); end - - # source://actionpack//lib/action_dispatch/middleware/flash.rb#75 - def reset_session; 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 - - # source://actionpack//lib/action_dispatch/http/request.rb#149 - def routes; end - - # source://actionpack//lib/action_dispatch/http/request.rb#153 - def routes=(routes); end - - # Early Hints is an HTTP/2 status code that indicates hints to help a client start - # making preparations for processing the final response. - # - # If the env contains +rack.early_hints+ then the server accepts HTTP2 push for Link headers. - # - # The +send_early_hints+ method accepts a hash of links as follows: - # - # send_early_hints("Link" => "; rel=preload; as=style\n; rel=preload") - # - # 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#225 - def send_early_hints(links); end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def server_name; end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def server_protocol; end - - # Returns the lowercase name of the HTTP server software. - # - # source://actionpack//lib/action_dispatch/http/request.rb#317 - def server_software; end - - # source://actionpack//lib/action_dispatch/http/request.rb#363 - def session=(session); end - - # source://actionpack//lib/action_dispatch/http/request.rb#367 - def session_options=(options); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/request.rb#183 - 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). - # - # 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#306 - def uuid; end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def version; end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def x_csrf_token; end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def x_forwarded_for; end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def x_forwarded_host; end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def x_request_id; end - - # Returns true if the "X-Requested-With" header contains "XMLHttpRequest" - # (case-insensitive), which may need to be manually added depending on the - # choice of JavaScript libraries and frameworks. - # - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/request.rb#277 - def xhr?; end - - # Returns true if the "X-Requested-With" header contains "XMLHttpRequest" - # (case-insensitive), which may need to be manually added depending on the - # choice of JavaScript libraries and frameworks. - # - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/request.rb#277 - def xml_http_request?; end - - private - - # source://actionpack//lib/action_dispatch/http/request.rb#433 - def check_method(name); end - - # source://actionpack//lib/action_dispatch/http/request.rb#438 - def default_session; end - - class << self - # source://actionpack//lib/action_dispatch/http/request.rb#56 - def empty; end - - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#18 - def ignore_accept_header; end - - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#18 - def ignore_accept_header=(val); end - - # 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#298 -ActionDispatch::Request::ACTION_DISPATCH_REQUEST_ID = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/http/request.rb#34 -ActionDispatch::Request::ENV_METHODS = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/http/request.rb#128 -ActionDispatch::Request::HTTP_METHODS = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/http/request.rb#130 -ActionDispatch::Request::HTTP_METHOD_LOOKUP = T.let(T.unsafe(nil), Hash) - -# source://actionpack//lib/action_dispatch/http/request.rb#32 -ActionDispatch::Request::LOCALHOST = T.let(T.unsafe(nil), Regexp) - -# source://actionpack//lib/action_dispatch/http/request.rb#73 -class ActionDispatch::Request::PASS_NOT_FOUND - class << self - # source://actionpack//lib/action_dispatch/http/request.rb#74 - def action(_); end - - # source://actionpack//lib/action_dispatch/http/request.rb#76 - def action_encoding_template(action); end - - # source://actionpack//lib/action_dispatch/http/request.rb#75 - def call(_); end - end -end - -# source://actionpack//lib/action_dispatch/http/request.rb#120 -ActionDispatch::Request::RFC2518 = T.let(T.unsafe(nil), Array) - -# List of HTTP request methods from the following RFCs: -# Hypertext Transfer Protocol -- HTTP/1.1 (https://www.ietf.org/rfc/rfc2616.txt) -# HTTP Extensions for Distributed Authoring -- WEBDAV (https://www.ietf.org/rfc/rfc2518.txt) -# Versioning Extensions to WebDAV (https://www.ietf.org/rfc/rfc3253.txt) -# Ordered Collections Protocol (WebDAV) (https://www.ietf.org/rfc/rfc3648.txt) -# Web Distributed Authoring and Versioning (WebDAV) Access Control Protocol (https://www.ietf.org/rfc/rfc3744.txt) -# Web Distributed Authoring and Versioning (WebDAV) SEARCH (https://www.ietf.org/rfc/rfc5323.txt) -# Calendar Extensions to WebDAV (https://www.ietf.org/rfc/rfc4791.txt) -# PATCH Method for HTTP (https://www.ietf.org/rfc/rfc5789.txt) -# -# source://actionpack//lib/action_dispatch/http/request.rb#119 -ActionDispatch::Request::RFC2616 = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/http/request.rb#121 -ActionDispatch::Request::RFC3253 = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/http/request.rb#122 -ActionDispatch::Request::RFC3648 = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/http/request.rb#123 -ActionDispatch::Request::RFC3744 = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/http/request.rb#125 -ActionDispatch::Request::RFC4791 = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/http/request.rb#124 -ActionDispatch::Request::RFC5323 = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/http/request.rb#126 -ActionDispatch::Request::RFC5789 = T.let(T.unsafe(nil), Array) - -# Session is responsible for lazily loading the session from store. -# -# source://actionpack//lib/action_dispatch/request/session.rb#8 -class ActionDispatch::Request::Session - # @return [Session] a new instance of Session - # - # source://actionpack//lib/action_dispatch/request/session.rb#74 - def initialize(by, req, enabled: T.unsafe(nil)); end - - # 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 - def [](key); end - - # Writes given value to given key of the session. - # - # source://actionpack//lib/action_dispatch/request/session.rb#150 - def []=(key, value); end - - # Clears the session. - # - # source://actionpack//lib/action_dispatch/request/session.rb#156 - def clear; end - - # Deletes given key from the session. - # - # source://actionpack//lib/action_dispatch/request/session.rb#184 - def delete(key); end - - # source://actionpack//lib/action_dispatch/request/session.rb#95 - 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 - def dig(*keys); end - - # source://actionpack//lib/action_dispatch/request/session.rb#240 - def each(&block); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/request/session.rb#230 - def empty?; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/request/session.rb#87 - def enabled?; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/request/session.rb#220 - def exists?; end - - # Returns value of the given key from the session, or raises +KeyError+ - # if can't find the given key and no default value is set. - # Returns default value if specified. - # - # session.fetch(:foo) - # # => KeyError: key not found: "foo" - # - # session.fetch(:foo, :bar) - # # => :bar - # - # session.fetch(:foo) do - # :bar - # end - # # => :bar - # - # source://actionpack//lib/action_dispatch/request/session.rb#203 - 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 - def has_key?(key); end - - # source://actionpack//lib/action_dispatch/request/session.rb#83 - def id; end - - # Returns true if the session has the given key or false. - # - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/request/session.rb#130 - def include?(key); end - - # source://actionpack//lib/action_dispatch/request/session.rb#212 - 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 - def key?(key); end - - # Returns keys of the session as Array. - # - # source://actionpack//lib/action_dispatch/request/session.rb#138 - def keys; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/request/session.rb#226 - def loaded?; end - - # source://actionpack//lib/action_dispatch/request/session.rb#235 - def merge!(other); end - - # source://actionpack//lib/action_dispatch/request/session.rb#91 - def options; end - - # Returns the session as Hash. - # - # source://actionpack//lib/action_dispatch/request/session.rb#162 - def to_h; end - - # Returns the session as Hash. - # - # source://actionpack//lib/action_dispatch/request/session.rb#162 - def to_hash; 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#178 - def update(hash); end - - # Returns values of the session as Array. - # - # source://actionpack//lib/action_dispatch/request/session.rb#144 - def values; end - - private - - # source://actionpack//lib/action_dispatch/request/session.rb#261 - def load!; end - - # source://actionpack//lib/action_dispatch/request/session.rb#257 - def load_for_delete!; end - - # source://actionpack//lib/action_dispatch/request/session.rb#245 - def load_for_read!; end - - # source://actionpack//lib/action_dispatch/request/session.rb#249 - def load_for_write!; end - - class << self - # Creates a session hash, merging the properties of the previous session if any. - # - # source://actionpack//lib/action_dispatch/request/session.rb#17 - def create(store, req, default_options); end - - # source://actionpack//lib/action_dispatch/request/session.rb#41 - def delete(req); end - - # source://actionpack//lib/action_dispatch/request/session.rb#27 - def disabled(req); end - - # source://actionpack//lib/action_dispatch/request/session.rb#33 - def find(req); end - - # source://actionpack//lib/action_dispatch/request/session.rb#37 - def set(req, session); end - end -end - -# source://actionpack//lib/action_dispatch/request/session.rb#9 -class ActionDispatch::Request::Session::DisabledSessionError < ::StandardError; end - -# source://actionpack//lib/action_dispatch/request/session.rb#10 -ActionDispatch::Request::Session::ENV_SESSION_KEY = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/request/session.rb#11 -ActionDispatch::Request::Session::ENV_SESSION_OPTIONS_KEY = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/request/session.rb#45 -class ActionDispatch::Request::Session::Options - # @return [Options] a new instance of Options - # - # source://actionpack//lib/action_dispatch/request/session.rb#54 - def initialize(by, default_options); end - - # source://actionpack//lib/action_dispatch/request/session.rb#59 - def [](key); end - - # source://actionpack//lib/action_dispatch/request/session.rb#69 - def []=(k, v); end - - # source://actionpack//lib/action_dispatch/request/session.rb#63 - def id(req); end - - # source://actionpack//lib/action_dispatch/request/session.rb#70 - def to_hash; end - - # source://actionpack//lib/action_dispatch/request/session.rb#71 - def values_at(*args); end - - class << self - # source://actionpack//lib/action_dispatch/request/session.rb#50 - def find(req); end - - # source://actionpack//lib/action_dispatch/request/session.rb#46 - def set(req, options); end - end -end - -# Singleton object used to determine if an optional param wasn't specified. -# -# source://actionpack//lib/action_dispatch/request/session.rb#14 -ActionDispatch::Request::Session::Unspecified = T.let(T.unsafe(nil), Object) - -# source://actionpack//lib/action_dispatch/request/utils.rb#7 -class ActionDispatch::Request::Utils - # source://actionpack//lib/action_dispatch/request/utils.rb#8 - def perform_deep_munge; end - - # source://actionpack//lib/action_dispatch/request/utils.rb#8 - def perform_deep_munge=(val); end - - class << self - # source://actionpack//lib/action_dispatch/request/utils.rb#29 - def check_param_encoding(params); end - - # source://actionpack//lib/action_dispatch/request/utils.rb#10 - def each_param_value(params, &block); end - - # source://actionpack//lib/action_dispatch/request/utils.rb#21 - def normalize_encode_params(params); end - - # source://actionpack//lib/action_dispatch/request/utils.rb#8 - def perform_deep_munge; end - - # source://actionpack//lib/action_dispatch/request/utils.rb#8 - def perform_deep_munge=(val); end - - # source://actionpack//lib/action_dispatch/request/utils.rb#44 - def set_binary_encoding(request, params, controller, action); end - end -end - -# source://actionpack//lib/action_dispatch/request/utils.rb#81 -class ActionDispatch::Request::Utils::CustomParamEncoder - class << self - # source://actionpack//lib/action_dispatch/request/utils.rb#94 - def action_encoding_template(request, controller, action); end - - # source://actionpack//lib/action_dispatch/request/utils.rb#82 - def encode(request, params, controller, action); end - end -end - -# Remove nils from the params hash. -# -# source://actionpack//lib/action_dispatch/request/utils.rb#73 -class ActionDispatch::Request::Utils::NoNilParamEncoder < ::ActionDispatch::Request::Utils::ParamEncoder - class << self - # source://actionpack//lib/action_dispatch/request/utils.rb#74 - def handle_array(params); end - end -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 - def handle_array(params); end - - # Convert nested Hash to HashWithIndifferentAccess. - # - # source://actionpack//lib/action_dispatch/request/utils.rb#50 - def normalize_encode_params(params); end - end -end - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#10 -module ActionDispatch::RequestCookieMethods - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#48 - def authenticated_encrypted_cookie_salt; end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#11 - def cookie_jar; end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#28 - def cookie_jar=(jar); end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#76 - def cookies_digest; end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#80 - def cookies_rotations; end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#72 - def cookies_same_site_protection; end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#68 - def cookies_serializer; end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#56 - def encrypted_cookie_cipher; end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#40 - def encrypted_cookie_salt; end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#44 - def encrypted_signed_cookie_salt; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#24 - def have_cookie_jar?; end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#32 - def key_generator; end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#64 - def secret_key_base; end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#60 - def signed_cookie_digest; end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#36 - def signed_cookie_salt; end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#52 - def use_authenticated_cookie_encryption; end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#84 - def use_cookies_with_metadata; end -end - -# source://actionpack//lib/action_dispatch/testing/request_encoder.rb#4 -class ActionDispatch::RequestEncoder - # @return [RequestEncoder] a new instance of RequestEncoder - # - # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#16 - def initialize(mime_name, param_encoder, response_parser); end - - # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#32 - def accept_header; end - - # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#28 - def content_type; end - - # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#36 - def encode_params(params); end - - # Returns the value of attribute response_parser. - # - # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#14 - def response_parser; end - - class << self - # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#45 - def encoder(name); end - - # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#40 - def parser(content_type); end - - # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#49 - 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 -class ActionDispatch::RequestEncoder::IdentityEncoder - # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#7 - def accept_header; end - - # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#6 - def content_type; end - - # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#8 - def encode_params(params); end - - # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#9 - def response_parser; end -end - -# source://actionpack//lib/action_dispatch/testing/integration.rb#0 -class ActionDispatch::RequestEncoder::TurboStreamEncoder < ::ActionDispatch::RequestEncoder::IdentityEncoder - # source://turbo-rails/1.3.3/lib/turbo/engine.rb#82 - def accept_header; end -end - -# 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. -# -# The unique request id is either based on the X-Request-Id header in the request, which would typically be generated -# by a firewall, load balancer, or the web server, or, if this header is not available, a random uuid. If the -# header is accepted from the outside world, we sanitize it to a max of 255 chars and alphanumeric and dashes only. -# -# 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 -class ActionDispatch::RequestId - # @return [RequestId] a new instance of RequestId - # - # source://actionpack//lib/action_dispatch/middleware/request_id.rb#18 - def initialize(app, header:); end - - # source://actionpack//lib/action_dispatch/middleware/request_id.rb#23 - def call(env); end - - private - - # source://actionpack//lib/action_dispatch/middleware/request_id.rb#38 - def internal_request_id; end - - # source://actionpack//lib/action_dispatch/middleware/request_id.rb#30 - def make_request_id(request_id); end -end - -# 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. -# -# 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). -# -# For example, the following demo integration test prints the body of the -# controller response to the console: -# -# class DemoControllerTest < ActionDispatch::IntegrationTest -# def test_print_root_path_to_console -# get('/') -# puts response.body -# end -# end -# -# source://actionpack//lib/action_dispatch/http/response.rb#36 -class ActionDispatch::Response - include ::Rack::Response::Helpers - include ::ActionDispatch::Http::FilterRedirect - include ::ActionDispatch::Http::Cache::Response - include ::MonitorMixin - - # @return [Response] a new instance of 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#71 - def [](*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_dispatch/http/response.rb#71 - def []=(*_arg0, **_arg1, &_arg2); end - - # Aliasing these off because AD::Http::Cache::Response defines them. - # - # source://rack/2.2.6.2/lib/rack/response.rb#229 - def _cache_control; end - - # source://rack/2.2.6.2/lib/rack/response.rb#233 - def _cache_control=(v); end - - # source://actionpack//lib/action_dispatch/http/response.rb#370 - def abort; end - - # source://actionpack//lib/action_dispatch/http/response.rb#183 - def await_commit; end - - # source://actionpack//lib/action_dispatch/http/response.rb#189 - 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 - def body; end - - # Allows you to manually set or override the response body. - # - # source://actionpack//lib/action_dispatch/http/response.rb#313 - def body=(body); end - - # source://actionpack//lib/action_dispatch/http/response.rb#357 - 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 - def charset; end - - # Sets the HTTP character set. In case of +nil+ parameter - # it sets the charset to +default_charset+. - # - # response.charset = 'utf-16' # => 'utf-16' - # response.charset = nil # => 'utf-8' - # - # source://actionpack//lib/action_dispatch/http/response.rb#263 - def charset=(charset); end - - # source://actionpack//lib/action_dispatch/http/response.rb#366 - def close; end - - # Returns a string to ensure compatibility with Net::HTTPResponse. - # - # source://actionpack//lib/action_dispatch/http/response.rb#285 - def code; end - - # source://actionpack//lib/action_dispatch/http/response.rb#193 - def commit!; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/response.rb#217 - def committed?; end - - # Content type of response. - # - # source://actionpack//lib/action_dispatch/http/response.rb#243 - def content_type; end - - # Sets the HTTP response's content MIME type. For example, in the controller - # you could write this: - # - # response.content_type = "text/plain" - # - # If a character set has been defined for this response (see charset=) then - # the character set information will also be included in the content type - # information. - # - # source://actionpack//lib/action_dispatch/http/response.rb#233 - 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 - def cookies; end - - # source://actionpack//lib/action_dispatch/http/response.rb#85 - def default_charset; end - - # source://actionpack//lib/action_dispatch/http/response.rb#85 - def default_charset=(val); end - - # source://actionpack//lib/action_dispatch/http/response.rb#86 - def default_headers; end - - # source://actionpack//lib/action_dispatch/http/response.rb#86 - def default_headers=(val); end - - # source://actionpack//lib/action_dispatch/http/response.rb#181 - def delete_header(key); end - - # source://actionpack//lib/action_dispatch/http/response.rb#73 - def each(&block); end - - # source://actionpack//lib/action_dispatch/http/response.rb#179 - def get_header(key); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/response.rb#178 - def has_header?(key); end - - # Get headers for this response. - # - # source://actionpack//lib/action_dispatch/http/response.rb#67 - def header; end - - # Get headers for this response. - # - # source://actionpack//lib/action_dispatch/http/response.rb#67 - def headers; end - - # Media type of response. - # - # source://actionpack//lib/action_dispatch/http/response.rb#248 - def media_type; end - - # Returns the corresponding message for the current HTTP status code: - # - # response.status = 200 - # response.message # => "OK" - # - # response.status = 404 - # response.message # => "Not Found" - # - # source://actionpack//lib/action_dispatch/http/response.rb#297 - def message; end - - # Turns the Response into a Rack-compatible array of the status, headers, - # and body. Allows explicit splatting: - # - # status, headers, body = *response - # - # source://actionpack//lib/action_dispatch/http/response.rb#385 - def prepare!; end - - # The location header we'll be responding with. - # - # source://rack/2.2.6.2/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 - def request; end - - # The request that the response is responding to. - # - # source://actionpack//lib/action_dispatch/http/response.rb#61 - def request=(_arg0); end - - # source://actionpack//lib/action_dispatch/http/response.rb#353 - def reset_body!; end - - # The response code of the request. - # - # source://actionpack//lib/action_dispatch/http/response.rb#280 - def response_code; end - - # Send the file stored at +path+ as the response body. - # - # source://actionpack//lib/action_dispatch/http/response.rb#348 - def send_file(path); end - - # source://actionpack//lib/action_dispatch/http/response.rb#201 - def sending!; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/response.rb#216 - def sending?; end - - # source://actionpack//lib/action_dispatch/http/response.rb#252 - def sending_file=(v); end - - # source://actionpack//lib/action_dispatch/http/response.rb#209 - def sent!; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/response.rb#218 - def sent?; end - - # source://actionpack//lib/action_dispatch/http/response.rb#180 - def set_header(key, v); end - - # The HTTP status code. - # - # source://actionpack//lib/action_dispatch/http/response.rb#64 - def status; end - - # Sets the HTTP status code. - # - # source://actionpack//lib/action_dispatch/http/response.rb#221 - def status=(status); end - - # Returns the corresponding message for the current HTTP status code: - # - # response.status = 200 - # response.message # => "OK" - # - # response.status = 404 - # response.message # => "Not Found" - # - # source://actionpack//lib/action_dispatch/http/response.rb#297 - def status_message; end - - # The underlying body, as a streamable object. - # - # source://actionpack//lib/action_dispatch/http/response.rb#159 - def stream; end - - # Turns the Response into a Rack-compatible array of the status, headers, - # and body. Allows explicit splatting: - # - # status, headers, body = *response - # - # source://actionpack//lib/action_dispatch/http/response.rb#385 - def to_a; end - - # source://actionpack//lib/action_dispatch/http/response.rb#308 - def write(string); end - - private - - # source://actionpack//lib/action_dispatch/http/response.rb#466 - def assign_default_content_type_and_charset!; end - - # source://actionpack//lib/action_dispatch/http/response.rb#438 - def before_committed; end - - # source://actionpack//lib/action_dispatch/http/response.rb#446 - def before_sending; end - - # source://actionpack//lib/action_dispatch/http/response.rb#458 - def build_buffer(response, body); end - - # source://actionpack//lib/action_dispatch/http/response.rb#510 - def handle_no_content!; end - - # source://actionpack//lib/action_dispatch/http/response.rb#462 - def munge_body_object(body); end - - # source://actionpack//lib/action_dispatch/http/response.rb#418 - 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 - def parsed_content_type_header; end - - # source://actionpack//lib/action_dispatch/http/response.rb#517 - def rack_response(status, header); end - - # source://actionpack//lib/action_dispatch/http/response.rb#432 - 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#85 - def default_charset; end - - # source://actionpack//lib/action_dispatch/http/response.rb#85 - def default_charset=(val); end - - # source://actionpack//lib/action_dispatch/http/response.rb#86 - def default_headers; end - - # source://actionpack//lib/action_dispatch/http/response.rb#86 - def default_headers=(val); end - - # source://actionpack//lib/action_dispatch/http/response.rb#154 - def merge_default_headers(original, default); end - end -end - -# source://actionpack//lib/action_dispatch/http/response.rb#97 -class ActionDispatch::Response::Buffer - # @return [Buffer] a new instance of Buffer - # - # source://actionpack//lib/action_dispatch/http/response.rb#98 - def initialize(response, buf); end - - # source://actionpack//lib/action_dispatch/http/response.rb#131 - def abort; end - - # source://actionpack//lib/action_dispatch/http/response.rb#105 - def body; end - - # source://actionpack//lib/action_dispatch/http/response.rb#134 - def close; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/response.rb#139 - def closed?; end - - # source://actionpack//lib/action_dispatch/http/response.rb#121 - def each(&block); end - - # @raise [IOError] - # - # source://actionpack//lib/action_dispatch/http/response.rb#113 - def write(string); end - - private - - # source://actionpack//lib/action_dispatch/http/response.rb#144 - def each_chunk(&block); end -end - -# source://actionpack//lib/action_dispatch/http/response.rb#80 -ActionDispatch::Response::CONTENT_TYPE = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/http/response.rb#412 -ActionDispatch::Response::CONTENT_TYPE_PARSER = T.let(T.unsafe(nil), Regexp) - -# source://actionpack//lib/action_dispatch/http/response.rb#409 -class ActionDispatch::Response::ContentTypeHeader < ::Struct - # Returns the value of attribute charset - # - # @return [Object] the current value of charset - def charset; end - - # Sets the attribute charset - # - # @param value [Object] the value to set the attribute charset to. - # @return [Object] the newly set value - def charset=(_); end - - # Returns the value of attribute mime_type - # - # @return [Object] the current value of mime_type - def mime_type; end - - # Sets the attribute mime_type - # - # @param value [Object] the value to set the attribute mime_type to. - # @return [Object] the newly set value - def mime_type=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# Avoid having to pass an open file handle as the response body. -# 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 -class ActionDispatch::Response::FileBody - # @return [FileBody] a new instance of FileBody - # - # source://actionpack//lib/action_dispatch/http/response.rb#329 - def initialize(path); end - - # source://actionpack//lib/action_dispatch/http/response.rb#333 - def body; end - - # Stream the file's contents if Rack::Sendfile isn't present. - # - # source://actionpack//lib/action_dispatch/http/response.rb#338 - def each; end - - # source://actionpack//lib/action_dispatch/http/response.rb#327 - 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 - -# 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#83 -ActionDispatch::Response::NO_CONTENT_CODES = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/http/response.rb#410 -ActionDispatch::Response::NullContentTypeHeader = T.let(T.unsafe(nil), ActionDispatch::Response::ContentTypeHeader) - -# source://actionpack//lib/action_dispatch/http/response.rb#474 -class ActionDispatch::Response::RackBody - # @return [RackBody] a new instance of RackBody - # - # source://actionpack//lib/action_dispatch/http/response.rb#475 - def initialize(response); end - - # source://actionpack//lib/action_dispatch/http/response.rb#489 - def body; end - - # source://actionpack//lib/action_dispatch/http/response.rb#483 - def close; end - - # source://actionpack//lib/action_dispatch/http/response.rb#479 - def each(*args, &block); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/response.rb#493 - def respond_to?(method, include_private = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/http/response.rb#505 - def to_ary; end - - # source://actionpack//lib/action_dispatch/http/response.rb#501 - def to_path; end -end - -# source://actionpack//lib/action_dispatch/http/response.rb#81 -ActionDispatch::Response::SET_COOKIE = T.let(T.unsafe(nil), String) - -# The routing module provides URL rewriting in native Ruby. It's a way to -# redirect incoming requests to controllers and actions. This replaces -# mod_rewrite rules. Best of all, Rails' \Routing works with any web server. -# Routes are defined in config/routes.rb. -# -# Think of creating routes as drawing a map for your requests. The map tells -# them where to go based on some predefined pattern: -# -# Rails.application.routes.draw do -# Pattern 1 tells some request to go to one place -# Pattern 2 tell them to go to another -# ... -# end -# -# The following symbols are special: -# -# :controller maps to your controller name -# :action maps to an action with your controllers -# -# Other names simply map to a parameter as in the case of :id. -# -# == Resources -# -# Resource routing allows you to quickly declare all of the common routes -# for a given resourceful controller. Instead of declaring separate routes -# for your +index+, +show+, +new+, +edit+, +create+, +update+, and +destroy+ -# actions, a resourceful route declares them in a single line of code: -# -# resources :photos -# -# Sometimes, you have a resource that clients always look up without -# referencing an ID. A common example, /profile always shows the profile of -# the currently logged in user. In this case, you can use a singular resource -# to map /profile (rather than /profile/:id) to the show action. -# -# resource :profile -# -# It's common to have resources that are logically children of other -# resources: -# -# resources :magazines do -# resources :ads -# end -# -# You may wish to organize groups of controllers under a namespace. Most -# commonly, you might group a number of administrative controllers under -# an +admin+ namespace. You would place these controllers under the -# app/controllers/admin directory, and you can group them together -# in your router: -# -# namespace "admin" do -# resources :posts, :comments -# end -# -# Alternatively, you can add prefixes to your path without using a separate -# directory by using +scope+. +scope+ takes additional options which -# apply to all enclosed routes. -# -# scope path: "/cpanel", as: 'admin' do -# resources :posts, :comments -# end -# -# For more, see Routing::Mapper::Resources#resources, -# Routing::Mapper::Scoping#namespace, and Routing::Mapper::Scoping#scope. -# -# == Non-resourceful routes -# -# For routes that don't fit the resources mold, you can use the HTTP helper -# methods get, post, patch, put and delete. -# -# get 'post/:id', to: 'posts#show' -# post 'post/:id', to: 'posts#create_comment' -# -# Now, if you POST to /posts/:id, it will route to the create_comment action. A GET on the same -# URL will route to the show action. -# -# If your route needs to respond to more than one HTTP method (or all methods) then using the -# :via option on match is preferable. -# -# match 'post/:id', to: 'posts#show', via: [:get, :post] -# -# == Named routes -# -# Routes can be named by passing an :as option, -# allowing for easy reference within your source as +name_of_route_url+ -# for the full URL and +name_of_route_path+ for the URI path. -# -# Example: -# -# # In config/routes.rb -# get '/login', to: 'accounts#login', as: 'login' -# -# # With render, redirect_to, tests, etc. -# redirect_to login_url -# -# Arguments can be passed as well. -# -# redirect_to show_item_path(id: 25) -# -# Use root as a shorthand to name a route for the root path "/". -# -# # In config/routes.rb -# root to: 'blogs#index' -# -# # would recognize http://www.example.com/ as -# params = { controller: 'blogs', action: 'index' } -# -# # and provide these named routes -# root_url # => 'http://www.example.com/' -# root_path # => '/' -# -# Note: when using +controller+, the route is simply named after the -# method you call on the block parameter rather than map. -# -# # In config/routes.rb -# controller :blog do -# get 'blog/show', to: :list -# get 'blog/delete', to: :delete -# get 'blog/edit', to: :edit -# end -# -# # provides named routes for show, delete, and edit -# link_to @article.title, blog_show_path(id: @article.id) -# -# == Pretty URLs -# -# Routes can generate pretty URLs. For example: -# -# get '/articles/:year/:month/:day', to: 'articles#find_by_id', constraints: { -# year: /\d{4}/, -# month: /\d{1,2}/, -# day: /\d{1,2}/ -# } -# -# Using the route above, the URL "http://localhost:3000/articles/2005/11/06" -# maps to -# -# params = {year: '2005', month: '11', day: '06'} -# -# == Regular Expressions and parameters -# You can specify a regular expression to define a format for a parameter. -# -# controller 'geocode' do -# get 'geocode/:postalcode', to: :show, constraints: { -# postalcode: /\d{5}(-\d{4})?/ -# } -# end -# -# Constraints can include the 'ignorecase' and 'extended syntax' regular -# expression modifiers: -# -# controller 'geocode' do -# get 'geocode/:postalcode', to: :show, constraints: { -# postalcode: /hx\d\d\s\d[a-z]{2}/i -# } -# end -# -# controller 'geocode' do -# get 'geocode/:postalcode', to: :show, constraints: { -# postalcode: /# Postalcode format -# \d{5} #Prefix -# (-\d{4})? #Suffix -# /x -# } -# end -# -# Using the multiline modifier will raise an +ArgumentError+. -# Encoding regular expression modifiers are silently ignored. The -# match will always use the default encoding or ASCII. -# -# == External redirects -# -# You can redirect any path to another path using the redirect helper in your router: -# -# get "/stories", to: redirect("/posts") -# -# == Unicode character routes -# -# You can specify unicode character routes in your router: -# -# get "こんにちは", to: "welcome#index" -# -# == Routing to Rack Applications -# -# Instead of a String, like posts#index, which corresponds to the -# index action in the PostsController, you can specify any Rack application -# as the endpoint for a matcher: -# -# get "/application.js", to: Sprockets -# -# == Reloading routes -# -# You can reload routes if you feel you must: -# -# Rails.application.reload_routes! -# -# This will clear all named routes and reload config/routes.rb if the file has been modified from -# last load. To absolutely force reloading, use reload!. -# -# == Testing Routes -# -# The two main methods for testing your routes: -# -# === +assert_routing+ -# -# def test_movie_route_properly_splits -# opts = {controller: "plugin", action: "checkout", id: "2"} -# assert_routing "plugin/checkout/2", opts -# end -# -# +assert_routing+ lets you test whether or not the route properly resolves into options. -# -# === +assert_recognizes+ -# -# def test_route_has_options -# opts = {controller: "plugin", action: "show", id: "12"} -# assert_recognizes opts, "/plugins/show/12" -# end -# -# Note the subtle difference between the two: +assert_routing+ tests that -# a URL fits options while +assert_recognizes+ tests that a URL -# breaks into parameters properly. -# -# In tests you can simply pass the URL or named route to +get+ or +post+. -# -# def send_to_jail -# get '/jail' -# assert_response :success -# end -# -# def goes_to_login -# get login_url -# #... -# end -# -# == View a list of all your routes -# -# 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 -module ActionDispatch::Routing - extend ::ActiveSupport::Autoload -end - -# source://actionpack//lib/action_dispatch/routing/inspector.rb#129 -module ActionDispatch::Routing::ConsoleFormatter; end - -# source://actionpack//lib/action_dispatch/routing/inspector.rb#130 -class ActionDispatch::Routing::ConsoleFormatter::Base - # @return [Base] a new instance of Base - # - # source://actionpack//lib/action_dispatch/routing/inspector.rb#131 - def initialize; end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#145 - def header(routes); end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#148 - def no_routes(routes, filter); end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#135 - def result; end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#142 - def section(routes); end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#139 - def section_title(title); end -end - -# source://actionpack//lib/action_dispatch/routing/inspector.rb#202 -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 - def initialize(width: T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#212 - def section(routes); end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#208 - def section_title(title); end - - private - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#217 - def draw_expanded_section(routes); end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#229 - def route_header(index:); end -end - -# source://actionpack//lib/action_dispatch/routing/inspector.rb#166 -class ActionDispatch::Routing::ConsoleFormatter::Sheet < ::ActionDispatch::Routing::ConsoleFormatter::Base - # source://actionpack//lib/action_dispatch/routing/inspector.rb#175 - def header(routes); end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#171 - def section(routes); end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#167 - def section_title(title); end - - private - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#189 - def draw_header(routes); end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#180 - def draw_section(routes); end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#195 - def widths(routes); end -end - -# source://actionpack//lib/action_dispatch/routing/endpoint.rb#5 -class ActionDispatch::Routing::Endpoint - # source://actionpack//lib/action_dispatch/routing/endpoint.rb#9 - def app; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/endpoint.rb#6 - def dispatcher?; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/endpoint.rb#12 - def engine?; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/endpoint.rb#8 - def matches?(req); end - - # source://actionpack//lib/action_dispatch/routing/endpoint.rb#10 - def rack_app; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/endpoint.rb#7 - def redirect?; end -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 -class ActionDispatch::Routing::HtmlTableFormatter - # @return [HtmlTableFormatter] a new instance of HtmlTableFormatter - # - # source://actionpack//lib/action_dispatch/routing/inspector.rb#236 - 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 - def header(routes); end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#253 - def no_routes(*_arg0); end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#266 - def result; end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#245 - def section(routes); end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#241 - def section_title(title); end -end - -# source://actionpack//lib/action_dispatch/routing/mapper.rb#12 -class ActionDispatch::Routing::Mapper - include ::ActionDispatch::Routing::Mapper::Base - include ::ActionDispatch::Routing::Mapper::HttpHelpers - include ::ActionDispatch::Routing::Redirection - include ::ActionDispatch::Routing::Mapper::Scoping - include ::ActionDispatch::Routing::Mapper::Concerns - include ::ActionDispatch::Routing::Mapper::Resources - include ::ActionDispatch::Routing::Mapper::CustomUrls - - # @return [Mapper] a new instance of Mapper - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2279 - def initialize(set); end - - class << self - # source://actionpack//lib/action_dispatch/routing/mapper.rb#381 - 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 - def normalize_path(path); end - end -end - -# source://actionpack//lib/action_dispatch/routing/mapper.rb#385 -module ActionDispatch::Routing::Mapper::Base - # source://actionpack//lib/action_dispatch/routing/mapper.rb#618 - def default_url_options(options); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#618 - 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 - def has_named_route?(name); end - - # Matches a URL pattern to one or more routes. - # - # You should not use the +match+ method in your router - # without specifying an HTTP method. - # - # If you want to expose your action to both GET and POST, use: - # - # # sets :controller, :action, and :id in params - # match ':controller/:action/:id', via: [:get, :post] - # - # Note that +:controller+, +:action+, and +:id+ are interpreted as URL - # query parameters and thus available through +params+ in an action. - # - # If you want to expose your action to GET, use +get+ in the router: - # - # Instead of: - # - # match ":controller/:action/:id" - # - # Do: - # - # get ":controller/:action/:id" - # - # Two of these symbols are special, +:controller+ maps to the controller - # and +:action+ to the controller's action. A pattern can also map - # wildcard segments (globs) to params: - # - # get 'songs/*category/:title', to: 'songs#show' - # - # # 'songs/rock/classic/stairway-to-heaven' sets - # # params[:category] = 'rock/classic' - # # params[:title] = 'stairway-to-heaven' - # - # To match a wildcard parameter, it must have a name assigned to it. - # Without a variable name to attach the glob parameter to, the route - # can't be parsed. - # - # When a pattern points to an internal route, the route's +:action+ and - # +:controller+ should be set in options or hash shorthand. Examples: - # - # match 'photos/:id' => 'photos#show', via: :get - # match 'photos/:id', to: 'photos#show', via: :get - # match 'photos/:id', controller: 'photos', action: 'show', via: :get - # - # A pattern can also point to a +Rack+ endpoint i.e. anything that - # responds to +call+: - # - # match 'photos/:id', to: -> (hash) { [200, {}, ["Coming soon"]] }, via: :get - # match 'photos/:id', to: PhotoRackApp, via: :get - # # Yes, controller actions are just rack endpoints - # match 'photos/:id', to: PhotosController.action(:show), via: :get - # - # Because requesting various HTTP verbs with a single action has security - # implications, you must either specify the actions in - # the via options or use one of the HttpHelpers[rdoc-ref:HttpHelpers] - # instead +match+ - # - # === Options - # - # Any options not seen here are passed on as params with the URL. - # - # [:controller] - # The route's controller. - # - # [:action] - # The route's action. - # - # [:param] - # Overrides the default resource identifier +:id+ (name of the - # dynamic segment used to generate the routes). - # You can access that segment from your controller using - # params[<:param>]. - # In your router: - # - # resources :users, param: :name - # - # The +users+ resource here will have the following routes generated for it: - # - # GET /users(.:format) - # POST /users(.:format) - # GET /users/new(.:format) - # GET /users/:name/edit(.:format) - # GET /users/:name(.:format) - # PATCH/PUT /users/:name(.:format) - # DELETE /users/:name(.:format) - # - # You can override ActiveRecord::Base#to_param of a related - # model to construct a URL: - # - # class User < ActiveRecord::Base - # def to_param - # name - # end - # end - # - # user = User::User.find_by(name: 'Phusion') - # user_path(user) # => "/users/Phusion" - # - # [:path] - # The path prefix for the routes. - # - # [:module] - # The namespace for :controller. - # - # match 'path', to: 'c#a', module: 'sekret', controller: 'posts', via: :get - # # => Sekret::PostsController - # - # See Scoping#namespace for its scope equivalent. - # - # [:as] - # The name used to generate routing helpers. - # - # [:via] - # Allowed HTTP verb(s) for route. - # - # match 'path', to: 'c#a', via: :get - # match 'path', to: 'c#a', via: [:get, :post] - # match 'path', to: 'c#a', via: :all - # - # [:to] - # Points to a +Rack+ endpoint. Can be an object that responds to - # +call+ or a string representing a controller's action. - # - # match 'path', to: 'controller#action', via: :get - # match 'path', to: -> (env) { [200, {}, ["Success!"]] }, via: :get - # match 'path', to: RackApp, via: :get - # - # [:on] - # Shorthand for wrapping routes in a specific RESTful context. Valid - # values are +:member+, +:collection+, and +:new+. Only use within - # resource(s) block. For example: - # - # resource :bar do - # match 'foo', to: 'c#a', on: :member, via: [:get, :post] - # end - # - # Is equivalent to: - # - # resource :bar do - # member do - # match 'foo', to: 'c#a', via: [:get, :post] - # end - # end - # - # [:constraints] - # Constrains parameters with a hash of regular expressions - # or an object that responds to matches?. In addition, constraints - # other than path can also be specified with any object - # that responds to === (e.g. String, Array, Range, etc.). - # - # match 'path/:id', constraints: { id: /[A-Z]\d{5}/ }, via: :get - # - # match 'json_only', constraints: { format: 'json' }, via: :get - # - # class PermitList - # def matches?(request) request.remote_ip == '1.2.3.4' end - # end - # match 'path', to: 'c#a', constraints: PermitList.new, via: :get - # - # See Scoping#constraints for more examples with its scope - # equivalent. - # - # [:defaults] - # Sets defaults for parameters - # - # # Sets params[:format] to 'jpg' by default - # match 'path', to: 'c#a', defaults: { format: 'jpg' }, via: :get - # - # See Scoping#defaults for its scope equivalent. - # - # [:anchor] - # Boolean to anchor a match pattern. Default is true. When set to - # false, the pattern matches any request prefixed with the given path. - # - # # Matches any request starting with 'path' - # match 'path', to: 'c#a', anchor: false, via: :get - # - # [:format] - # 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 - def match(path, options = T.unsafe(nil)); end - - # Mount a Rack-based application to be used within the application. - # - # mount SomeRackApp, at: "some_route" - # - # Alternatively: - # - # mount(SomeRackApp => "some_route") - # - # For options, see +match+, as +mount+ uses it internally. - # - # All mounted applications come with routing helpers to access them. - # These are named after the class specified, so for the above example - # the helper is either +some_rack_app_path+ or +some_rack_app_url+. - # To customize this helper's name, use the +:as+ option: - # - # mount(SomeRackApp => "some_route", as: "exciting") - # - # This will generate the +exciting_path+ and +exciting_url+ helpers - # which can be used to navigate to this mounted app. - # - # @raise [ArgumentError] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#588 - def mount(app, options = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#623 - def with_default_scope(scope, &block); end - - private - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#639 - def app_name(app, rails_app); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#648 - def define_generate_prefix(app, name); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#635 - def rails_app?(app); end -end - -# Routing Concerns allow you to declare common routes that can be reused -# inside others resources and routes. -# -# concern :commentable do -# resources :comments -# end -# -# concern :image_attachable do -# resources :images, only: :index -# end -# -# These concerns are used in Resources routing: -# -# resources :messages, concerns: [:commentable, :image_attachable] -# -# or in a scope or namespace: -# -# namespace :posts do -# concerns :commentable -# end -# -# source://actionpack//lib/action_dispatch/routing/mapper.rb#1991 -module ActionDispatch::Routing::Mapper::Concerns - # Define a routing concern using a name. - # - # Concerns may be defined inline, using a block, or handled by - # another object, by passing that object as the second parameter. - # - # The concern object, if supplied, should respond to call, - # which will receive two parameters: - # - # * The current mapper - # * A hash of options which the concern object may use - # - # Options may also be used by concerns defined in a block by accepting - # a block parameter. So, using a block, you might do something as - # simple as limit the actions available on certain resources, passing - # standard resource options through the concern: - # - # concern :commentable do |options| - # resources :comments, options - # end - # - # resources :posts, concerns: :commentable - # resources :archived_posts do - # # Don't allow comments on archived posts - # concerns :commentable, only: [:index, :show] - # end - # - # Or, using a callable object, you might implement something more - # specific to your application, which would be out of place in your - # routes file. - # - # # purchasable.rb - # class Purchasable - # def initialize(defaults = {}) - # @defaults = defaults - # end - # - # def call(mapper, options = {}) - # options = @defaults.merge(options) - # mapper.resources :purchases - # mapper.resources :receipts - # mapper.resources :returns if options[:returnable] - # end - # end - # - # # routes.rb - # concern :purchasable, Purchasable.new(returnable: true) - # - # resources :toys, concerns: :purchasable - # resources :electronics, concerns: :purchasable - # resources :pets do - # concerns :purchasable, returnable: false - # end - # - # Any routing helpers can be used inside a concern. If using a - # callable, they're accessible from the Mapper that's passed to - # call. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2048 - def concern(name, callable = T.unsafe(nil), &block); end - - # Use the named concerns - # - # resources :posts do - # concerns :commentable - # end - # - # Concerns also work in any routes helper that you want to use: - # - # namespace :posts do - # concerns :commentable - # end - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2064 - def concerns(*args); end -end - -# source://actionpack//lib/action_dispatch/routing/mapper.rb#15 -class ActionDispatch::Routing::Mapper::Constraints < ::ActionDispatch::Routing::Endpoint - # @return [Constraints] a new instance of Constraints - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#21 - def initialize(app, constraints, strategy); end - - # Returns the value of attribute app. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#16 - def app; end - - # Returns the value of attribute constraints. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#16 - def constraints; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#36 - def dispatcher?; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#38 - def matches?(req); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#45 - def serve(req); end - - private - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#52 - def constraint_args(constraint, request); end -end - -# source://actionpack//lib/action_dispatch/routing/mapper.rb#19 -ActionDispatch::Routing::Mapper::Constraints::CALL = T.let(T.unsafe(nil), Proc) - -# source://actionpack//lib/action_dispatch/routing/mapper.rb#18 -ActionDispatch::Routing::Mapper::Constraints::SERVE = T.let(T.unsafe(nil), Proc) - -# source://actionpack//lib/action_dispatch/routing/mapper.rb#2076 -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 - # of routing helpers, e.g: - # - # direct :homepage do - # "https://rubyonrails.org" - # end - # - # direct :commentable do |model| - # [ model, anchor: model.dom_id ] - # end - # - # direct :main do - # { controller: "pages", action: "index", subdomain: "www" } - # end - # - # The return value from the block passed to +direct+ must be a valid set of - # arguments for +url_for+ which will actually build the URL string. This can - # be one of the following: - # - # * A string, which is treated as a generated URL - # * A hash, e.g. { controller: "pages", action: "index" } - # * An array, which is passed to +polymorphic_url+ - # * An Active Model instance - # * An Active Model class - # - # NOTE: Other URL helpers can be called in the block but be careful not to invoke - # your custom URL helper again otherwise it will result in a stack overflow error. - # - # You can also specify default options that will be passed through to - # your URL helper definition, e.g: - # - # direct :browse, page: 1, size: 10 do |options| - # [ :products, options.merge(params.permit(:page, :size).to_h.symbolize_keys) ] - # end - # - # In this instance the +params+ object comes from the context in which the - # block is executed, e.g. generating a URL inside a controller action or a view. - # If the block is executed where there isn't a +params+ object such as this: - # - # Rails.application.routes.url_helpers.browse_path - # - # then it will raise a +NameError+. Because of this you need to be aware of the - # context in which you will use your custom URL helper when defining it. - # - # 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#2124 - def direct(name, options = T.unsafe(nil), &block); end - - # Define custom polymorphic mappings of models to URLs. This alters the - # behavior of +polymorphic_url+ and consequently the behavior of - # +link_to+ and +form_for+ when passed a model instance, e.g: - # - # resource :basket - # - # resolve "Basket" do - # [:basket] - # end - # - # This will now generate "/basket" when a +Basket+ instance is passed to - # +link_to+ or +form_for+ instead of the standard "/baskets/:id". - # - # NOTE: This custom behavior only applies to simple polymorphic URLs where - # a single model instance is passed and not more complicated forms, e.g: - # - # # config/routes.rb - # resource :profile - # namespace :admin do - # resources :users - # end - # - # resolve("User") { [:profile] } - # - # # app/views/application/_menu.html.erb - # link_to "Profile", @current_user - # link_to "Profile", [:admin, @current_user] - # - # The first +link_to+ will generate "/profile" but the second will generate - # the standard polymorphic URL of "/admin/users/1". - # - # You can pass options to a polymorphic mapping - the arity for the block - # needs to be two as the instance is passed as the first argument, e.g: - # - # resolve "Basket", anchor: "items" do |basket, options| - # [:basket, options] - # end - # - # This generates the URL "/basket#items" because when the last item in an - # array passed to +polymorphic_url+ is a hash then it's treated as options - # to the URL helper that gets called. - # - # 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#2176 - def resolve(*args, &block); end -end - -# source://actionpack//lib/action_dispatch/routing/mapper.rb#682 -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 - def delete(*args, &block); end - - # Define a route that only recognizes HTTP GET. - # For supported arguments, see match[rdoc-ref:Base#match] - # - # get 'bacon', to: 'food#bacon' - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#687 - def get(*args, &block); end - - # Define a route that only recognizes HTTP OPTIONS. - # For supported arguments, see match[rdoc-ref:Base#match] - # - # options 'carrots', to: 'food#carrots' - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#727 - def options(*args, &block); end - - # Define a route that only recognizes HTTP PATCH. - # For supported arguments, see match[rdoc-ref:Base#match] - # - # patch 'bacon', to: 'food#bacon' - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#703 - def patch(*args, &block); end - - # Define a route that only recognizes HTTP POST. - # For supported arguments, see match[rdoc-ref:Base#match] - # - # post 'bacon', to: 'food#bacon' - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#695 - def post(*args, &block); end - - # Define a route that only recognizes HTTP PUT. - # For supported arguments, see match[rdoc-ref:Base#match] - # - # put 'bacon', to: 'food#bacon' - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#711 - def put(*args, &block); end - - private - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#732 - def map_method(method, args, &block); end -end - -# source://actionpack//lib/action_dispatch/routing/mapper.rb#69 -class ActionDispatch::Routing::Mapper::Mapping - # @return [Mapping] a new instance of Mapping - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#118 - 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 - def application; end - - # Returns the value of attribute ast. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#73 - def ast; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#180 - def conditions; end - - # Returns the value of attribute default_action. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#73 - def default_action; end - - # Returns the value of attribute default_controller. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#73 - def default_controller; end - - # Returns the value of attribute defaults. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#73 - def defaults; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#169 - def make_route(name, precedence); end - - # Returns the value of attribute path. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#73 - def path; end - - # Returns the value of attribute required_defaults. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#73 - def required_defaults; end - - # Returns the value of attribute requirements. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#73 - def requirements; end - - # Returns the value of attribute scope_options. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#73 - def scope_options; end - - # Returns the value of attribute to. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#73 - def to; end - - private - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#316 - def add_controller_module(controller, modyoule); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#269 - def app(blocks); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#335 - def blocks(callable_constraint); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#184 - def build_conditions(current_conditions, request_class); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#281 - def check_controller_and_action(path_params, controller, action); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#296 - def check_part(name, part, path_params, hash); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#342 - def constraints(options, path_params); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#356 - def dispatcher(raise_on_name_error); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#199 - def intern(object); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#265 - def normalize_defaults(options); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#233 - def normalize_format(formatted); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#203 - def normalize_options!(options, path_params, modyoule); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#193 - def request_method; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#227 - def split_constraints(path_params, constraints); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#308 - def split_to(to); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#328 - def translate_controller(controller); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#249 - def verify_regexp_requirements(requirements, wildcard_options); end - - class << self - # source://actionpack//lib/action_dispatch/routing/mapper.rb#76 - 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 - def check_via(via); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#102 - def normalize_path(path, format); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#114 - def optional_format?(path, format); end - end -end - -# source://actionpack//lib/action_dispatch/routing/mapper.rb#70 -ActionDispatch::Routing::Mapper::Mapping::ANCHOR_CHARACTERS_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://actionpack//lib/action_dispatch/routing/mapper.rb#167 -ActionDispatch::Routing::Mapper::Mapping::JOINED_SEPARATORS = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/routing/mapper.rb#71 -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 -# for a given resourceful controller. Instead of declaring separate routes -# for your +index+, +show+, +new+, +edit+, +create+, +update+, and +destroy+ -# actions, a resourceful route declares them in a single line of code: -# -# resources :photos -# -# Sometimes, you have a resource that clients always look up without -# referencing an ID. A common example, /profile always shows the profile of -# the currently logged in user. In this case, you can use a singular resource -# to map /profile (rather than /profile/:id) to the show action. -# -# resource :profile -# -# It's common to have resources that are logically children of other -# resources: -# -# resources :magazines do -# resources :ads -# end -# -# You may wish to organize groups of controllers under a namespace. Most -# commonly, you might group a number of administrative controllers under -# an +admin+ namespace. You would place these controllers under the -# app/controllers/admin directory, and you can group them together -# in your router: -# -# namespace "admin" do -# resources :posts, :comments -# end -# -# By default the +:id+ parameter doesn't accept dots. If you need to -# use dots as part of the +:id+ parameter add a constraint which -# overrides this restriction, e.g: -# -# resources :articles, id: /[^\/]+/ -# -# This allows any character other than a slash as part of your +:id+. -# -# source://actionpack//lib/action_dispatch/routing/mapper.rb#1122 -module ActionDispatch::Routing::Mapper::Resources - # To add a route to the collection: - # - # resources :photos do - # collection do - # get 'search' - # end - # end - # - # 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 - def collection(&block); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1587 - def draw(name); end - - # Matches a URL pattern to one or more routes. - # For more information, see match[rdoc-ref:Base#match]. - # - # match 'path' => 'controller#action', via: :patch - # match 'path', to: 'controller#action', via: :post - # match 'path', 'otherpath', on: :member, via: :get - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1609 - def match(path, *rest, &block); end - - # To add a member route, add a member block into the resource block: - # - # resources :photos do - # member do - # get 'preview' - # end - # end - # - # This will recognize /photos/1/preview with GET, and route to the - # 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 - def member(&block); end - - # See ActionDispatch::Routing::Mapper::Scoping#namespace. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1568 - def namespace(path, options = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1547 - def nested(&block); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1537 - def new(&block); end - - # Sometimes, you have a resource that clients always look up without - # referencing an ID. A common example, /profile always shows the - # profile of the currently logged in user. In this case, you can use - # a singular resource to map /profile (rather than /profile/:id) to - # the show action: - # - # resource :profile - # - # This creates six different routes in your application, all mapping to - # the +Profiles+ controller (note that the controller is named after - # the plural): - # - # GET /profile/new - # GET /profile - # GET /profile/edit - # PATCH/PUT /profile - # DELETE /profile - # POST /profile - # - # If you want instances of a model to work with this resource via - # record identification (e.g. in +form_with+ or +redirect_to+), you - # will need to call resolve[rdoc-ref:CustomUrls#resolve]: - # - # resource :profile - # resolve('Profile') { [:profile] } - # - # # Enables this to work with singular routes: - # form_with(model: @profile) {} - # - # === Options - # Takes same options as resources[rdoc-ref:#resources] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1292 - def resource(*resources, &block); end - - # 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 - # - # resources :photos - # - # creates seven different routes in your application, all mapping to - # the +Photos+ controller: - # - # GET /photos - # GET /photos/new - # POST /photos - # GET /photos/:id - # GET /photos/:id/edit - # PATCH/PUT /photos/:id - # DELETE /photos/:id - # - # Resources can also be nested infinitely by using this block syntax: - # - # resources :photos do - # resources :comments - # end - # - # This generates the following comments routes: - # - # GET /photos/:photo_id/comments - # GET /photos/:photo_id/comments/new - # POST /photos/:photo_id/comments - # GET /photos/:photo_id/comments/:id - # GET /photos/:photo_id/comments/:id/edit - # PATCH/PUT /photos/:photo_id/comments/:id - # DELETE /photos/:photo_id/comments/:id - # - # === Options - # Takes same options as match[rdoc-ref:Base#match] as well as: - # - # [:path_names] - # Allows you to change the segment component of the +edit+ and +new+ actions. - # Actions not specified are not changed. - # - # resources :posts, path_names: { new: "brand_new" } - # - # The above example will now change /posts/new to /posts/brand_new. - # - # [:path] - # Allows you to change the path prefix for the resource. - # - # resources :posts, path: 'postings' - # - # The resource and all segments will now route to /postings instead of /posts. - # - # [:only] - # Only generate routes for the given actions. - # - # resources :cows, only: :show - # resources :cows, only: [:show, :index] - # - # [:except] - # Generate all routes except for the given actions. - # - # resources :cows, except: :show - # resources :cows, except: [:show, :index] - # - # [:shallow] - # Generates shallow routes for nested resource(s). When placed on a parent resource, - # generates shallow routes for all nested resources. - # - # resources :posts, shallow: true do - # resources :comments - # end - # - # Is the same as: - # - # resources :posts do - # resources :comments, except: [:show, :edit, :update, :destroy] - # end - # resources :comments, only: [:show, :edit, :update, :destroy] - # - # This allows URLs for resources that otherwise would be deeply nested such - # as a comment on a blog post like /posts/a-long-permalink/comments/1234 - # to be shortened to just /comments/1234. - # - # Set shallow: false on a child resource to ignore a parent's shallow parameter. - # - # [:shallow_path] - # Prefixes nested shallow routes with the specified path. - # - # scope shallow_path: "sekret" do - # resources :posts do - # resources :comments, shallow: true - # end - # end - # - # The +comments+ resource here will have the following routes generated for it: - # - # post_comments GET /posts/:post_id/comments(.:format) - # post_comments POST /posts/:post_id/comments(.:format) - # new_post_comment GET /posts/:post_id/comments/new(.:format) - # edit_comment GET /sekret/comments/:id/edit(.:format) - # comment GET /sekret/comments/:id(.:format) - # comment PATCH/PUT /sekret/comments/:id(.:format) - # comment DELETE /sekret/comments/:id(.:format) - # - # [:shallow_prefix] - # Prefixes nested shallow route names with specified prefix. - # - # scope shallow_prefix: "sekret" do - # resources :posts do - # resources :comments, shallow: true - # end - # end - # - # The +comments+ resource here will have the following routes generated for it: - # - # post_comments GET /posts/:post_id/comments(.:format) - # post_comments POST /posts/:post_id/comments(.:format) - # new_post_comment GET /posts/:post_id/comments/new(.:format) - # edit_sekret_comment GET /comments/:id/edit(.:format) - # sekret_comment GET /comments/:id(.:format) - # sekret_comment PATCH/PUT /comments/:id(.:format) - # sekret_comment DELETE /comments/:id(.:format) - # - # [:format] - # Allows you to specify the default value for optional +format+ - # segment or disable it by supplying +false+. - # - # [:param] - # Allows you to override the default param name of +:id+ in the URL. - # - # === Examples - # - # # 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 - def resources(*resources, &block); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1257 - def resources_path_names(options); end - - # You can specify what Rails should route "/" to with the root method: - # - # root to: 'pages#main' - # - # For options, see +match+, as +root+ uses it internally. - # - # You can also pass a string which will expand - # - # root 'pages#main' - # - # 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. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1656 - def root(path, options = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1576 - def shallow; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1583 - def shallow?; end - - private - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1720 - def action_options?(options); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1802 - def action_path(name); end - - # @raise [ArgumentError] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1938 - def add_route(action, controller, options, _path, to, via, formatted, anchor, options_constraints); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1856 - def api_only?; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1715 - def apply_action_options(options); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1681 - def apply_common_behavior_for(method, resources, options, &block); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1778 - def canonical_action?(action); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1923 - def decomposed_match(path, controller, options, _path, to, via, formatted, anchor, options_constraints); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1908 - def get_to_from_path(path, to, action); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1867 - def map_match(paths, options); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1965 - def match_root_route(options); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1818 - def name_for_action(as, action); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1755 - def nested_options; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1736 - def nested_scope?; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1774 - def param_constraint; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1770 - def param_constraint?; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1677 - def parent_resource; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1792 - def path_for_action(action, path); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1860 - def path_scope(path); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1806 - def prefix_name_for_action(as, action); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1732 - def resource_method_scope?; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1747 - def resource_scope(resource, &block); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1728 - def resource_scope?; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1724 - def scope_action_options; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1844 - def set_member_mappings_for_resource; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1764 - def shallow_nesting_depth; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1782 - def shallow_scope; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1919 - def using_match_shorthand?(path); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1740 - def with_scope_level(kind); end -end - -# source://actionpack//lib/action_dispatch/routing/mapper.rb#1127 -ActionDispatch::Routing::Mapper::Resources::CANONICAL_ACTIONS = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/routing/mapper.rb#1126 -ActionDispatch::Routing::Mapper::Resources::RESOURCE_OPTIONS = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/routing/mapper.rb#1129 -class ActionDispatch::Routing::Mapper::Resources::Resource - # @return [Resource] a new instance of Resource - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1132 - def initialize(entities, api_only, shallow, options = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1157 - def actions; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1165 - 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 - def collection_name; end - - # Returns the value of attribute path. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1130 - def collection_scope; end - - # Returns the value of attribute controller. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1130 - def controller; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1149 - def default_actions; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1181 - def member_name; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1199 - def member_scope; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1173 - def name; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1209 - def nested_param; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1213 - def nested_scope; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1205 - def new_scope(new_path); end - - # Returns the value of attribute param. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1130 - def param; end - - # Returns the value of attribute path. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1130 - def path; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1177 - def plural; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1193 - def resource_scope; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1217 - def shallow?; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1199 - def shallow_scope; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1221 - def singleton?; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1181 - def singular; end -end - -# source://actionpack//lib/action_dispatch/routing/mapper.rb#1224 -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 - def initialize(entities, api_only, shallow, options); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1244 - def collection_name; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1232 - def default_actions; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1244 - def member_name; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1130 - def member_scope; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1130 - def nested_scope; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1240 - def plural; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1254 - def singleton?; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1244 - 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 -ActionDispatch::Routing::Mapper::Resources::VALID_ON_OPTIONS = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/routing/mapper.rb#2190 -class ActionDispatch::Routing::Mapper::Scope - include ::Enumerable - - # @return [Scope] a new instance of Scope - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2200 - def initialize(hash, parent = T.unsafe(nil), scope_level = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2259 - def [](key); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2226 - def action_name(name_prefix, prefix, collection_name, member_name); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2266 - def each; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2274 - def frame; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2206 - def nested?; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2251 - def new(hash); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2255 - def new_level(level); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2210 - def null?; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2247 - def options; end - - # Returns the value of attribute parent. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2198 - def parent; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2222 - def resource_method_scope?; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2243 - def resource_scope?; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2218 - def resources?; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2214 - def root?; end - - # Returns the value of attribute scope_level. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2198 - def scope_level; end -end - -# source://actionpack//lib/action_dispatch/routing/mapper.rb#2276 -ActionDispatch::Routing::Mapper::Scope::NULL = T.let(T.unsafe(nil), ActionDispatch::Routing::Mapper::Scope) - -# source://actionpack//lib/action_dispatch/routing/mapper.rb#2191 -ActionDispatch::Routing::Mapper::Scope::OPTIONS = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/routing/mapper.rb#2196 -ActionDispatch::Routing::Mapper::Scope::RESOURCE_METHOD_SCOPES = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/routing/mapper.rb#2195 -ActionDispatch::Routing::Mapper::Scope::RESOURCE_SCOPES = T.let(T.unsafe(nil), Array) - -# You may wish to organize groups of controllers under a namespace. -# Most commonly, you might group a number of administrative controllers -# under an +admin+ namespace. You would place these controllers under -# the app/controllers/admin directory, and you can group them -# together in your router: -# -# namespace "admin" do -# resources :posts, :comments -# end -# -# This will create a number of routes for each of the posts and comments -# controller. For Admin::PostsController, Rails will create: -# -# GET /admin/posts -# GET /admin/posts/new -# POST /admin/posts -# GET /admin/posts/1 -# GET /admin/posts/1/edit -# PATCH/PUT /admin/posts/1 -# DELETE /admin/posts/1 -# -# If you want to route /posts (without the prefix /admin) to -# Admin::PostsController, you could use -# -# scope module: "admin" do -# resources :posts -# end -# -# or, for a single case -# -# resources :posts, module: "admin" -# -# If you want to route /admin/posts to +PostsController+ -# (without the Admin:: module prefix), you could use -# -# scope "/admin" do -# resources :posts -# end -# -# or, for a single case -# -# resources :posts, path: "/admin/posts" -# -# In each of these cases, the named routes remain the same as if you did -# not use scope. In the last case, the following paths map to -# +PostsController+: -# -# GET /admin/posts -# GET /admin/posts/new -# POST /admin/posts -# GET /admin/posts/1 -# GET /admin/posts/1/edit -# PATCH/PUT /admin/posts/1 -# DELETE /admin/posts/1 -# -# source://actionpack//lib/action_dispatch/routing/mapper.rb#794 -module ActionDispatch::Routing::Mapper::Scoping - # === Parameter Restriction - # Allows you to constrain the nested routes based on a set of rules. - # For instance, in order to change the routes to allow for a dot character in the +id+ parameter: - # - # constraints(id: /\d+\.\d+/) do - # resources :posts - # end - # - # Now routes such as +/posts/1+ will no longer be valid, but +/posts/1.1+ will be. - # The +id+ parameter must match the constraint passed in for this example. - # - # You may use this to also restrict other parameters: - # - # resources :posts do - # constraints(post_id: /\d+\.\d+/) do - # resources :comments - # end - # end - # - # === Restricting based on IP - # - # Routes can also be constrained to an IP or a certain range of IP addresses: - # - # constraints(ip: /192\.168\.\d+\.\d+/) do - # resources :posts - # end - # - # Any user connecting from the 192.168.* range will be able to see this resource, - # where as any user connecting outside of this range will be told there is no such route. - # - # === Dynamic request matching - # - # Requests to routes can be constrained based on specific criteria: - # - # constraints(-> (req) { /iPhone/.match?(req.env["HTTP_USER_AGENT"]) }) do - # resources :iphones - # end - # - # You are able to move this logic out into a class if it is too complex for routes. - # This class must have a +matches?+ method defined on it which either returns +true+ - # if the user should be given access to that route, or +false+ if the user should not. - # - # class Iphone - # def self.matches?(request) - # /iPhone/.match?(request.env["HTTP_USER_AGENT"]) - # end - # end - # - # An expected place for this code would be +lib/constraints+. - # - # This class is then used like this: - # - # constraints(Iphone) do - # resources :iphones - # end - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#999 - def constraints(constraints = T.unsafe(nil), &block); end - - # Scopes routes to a specific controller - # - # controller "food" do - # match "bacon", action: :bacon, via: :get - # end - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#884 - def controller(controller); end - - # Allows you to set default parameters for a route, such as this: - # defaults id: 'home' do - # match 'scoped_pages/(:id)', to: 'pages#show' - # end - # Using this, the +:id+ parameter here will default to 'home'. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1008 - def defaults(defaults = T.unsafe(nil)); end - - # Scopes routes to a specific namespace. For example: - # - # namespace :admin do - # resources :posts - # end - # - # This generates the following routes: - # - # admin_posts GET /admin/posts(.:format) admin/posts#index - # admin_posts POST /admin/posts(.:format) admin/posts#create - # new_admin_post GET /admin/posts/new(.:format) admin/posts#new - # edit_admin_post GET /admin/posts/:id/edit(.:format) admin/posts#edit - # admin_post GET /admin/posts/:id(.:format) admin/posts#show - # admin_post PATCH/PUT /admin/posts/:id(.:format) admin/posts#update - # admin_post DELETE /admin/posts/:id(.:format) admin/posts#destroy - # - # === Options - # - # The +:path+, +:as+, +:module+, +:shallow_path+, and +:shallow_prefix+ - # options all default to the name of the namespace. - # - # For options, see Base#match. For +:shallow_path+ option, see - # Resources#resources. - # - # # accessible through /sekret/posts rather than /admin/posts - # namespace :admin, path: "sekret" do - # resources :posts - # end - # - # # maps to Sekret::PostsController rather than Admin::PostsController - # namespace :admin, module: "sekret" do - # resources :posts - # end - # - # # generates +sekret_posts_path+ rather than +admin_posts_path+ - # namespace :admin, as: "sekret" do - # resources :posts - # end - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#929 - def namespace(path, options = T.unsafe(nil), &block); end - - # Scopes a set of routes to the given default options. - # - # Take the following route definition as an example: - # - # scope path: ":account_id", as: "account" do - # resources :projects - # end - # - # This generates helpers such as +account_projects_path+, just like +resources+ does. - # The difference here being that the routes generated are like /:account_id/projects, - # rather than /accounts/:account_id/projects. - # - # === Options - # - # Takes same options as Base#match and Resources#resources. - # - # # route /posts (without the prefix /admin) to Admin::PostsController - # scope module: "admin" do - # resources :posts - # end - # - # # prefix the posts resource's requests with '/admin' - # scope path: "/admin" do - # resources :posts - # end - # - # # prefix the routing helper name: +sekret_posts_path+ instead of +posts_path+ - # scope as: "sekret" do - # resources :posts - # end - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#825 - def scope(*args); end - - private - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1040 - def merge_action_scope(parent, child); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1024 - def merge_as_scope(parent, child); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1064 - def merge_blocks_scope(parent, child); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1056 - def merge_constraints_scope(parent, child); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1036 - def merge_controller_scope(parent, child); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1060 - def merge_defaults_scope(parent, child); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1048 - def merge_format_scope(parent, child); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1032 - def merge_module_scope(parent, child); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1070 - def merge_options_scope(parent, child); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1052 - def merge_path_names_scope(parent, child); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1016 - def merge_path_scope(parent, child); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1020 - def merge_shallow_path_scope(parent, child); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1028 - def merge_shallow_prefix_scope(parent, child); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1074 - def merge_shallow_scope(parent, child); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1078 - def merge_to_scope(parent, child); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1044 - def merge_via_scope(parent, child); end -end - -# source://actionpack//lib/action_dispatch/routing/mapper.rb#877 -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 -class ActionDispatch::Routing::OptionRedirect < ::ActionDispatch::Routing::Redirect - # source://actionpack//lib/action_dispatch/routing/redirection.rb#132 - def inspect; end - - # source://actionpack//lib/action_dispatch/routing/redirection.rb#11 - def options; end - - # source://actionpack//lib/action_dispatch/routing/redirection.rb#106 - def path(params, request); end -end - -# source://actionpack//lib/action_dispatch/routing/redirection.rb#78 -class ActionDispatch::Routing::PathRedirect < ::ActionDispatch::Routing::Redirect - # source://actionpack//lib/action_dispatch/routing/redirection.rb#93 - def inspect; end - - # source://actionpack//lib/action_dispatch/routing/redirection.rb#81 - def path(params, request); end - - private - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/redirection.rb#98 - def interpolation_required?(string, params); end -end - -# source://actionpack//lib/action_dispatch/routing/redirection.rb#79 -ActionDispatch::Routing::PathRedirect::URL_PARTS = T.let(T.unsafe(nil), Regexp) - -# 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. -# -# These methods are useful when you want to generate the correct URL or path to a RESTful -# resource without having to know the exact type of the record in question. -# -# Nested resources and/or namespaces are also supported, as illustrated in the example: -# -# polymorphic_url([:admin, @article, @comment]) -# -# results in: -# -# admin_article_comment_url(@article, @comment) -# -# == Usage within the framework -# -# Polymorphic URL helpers are used in a number of places throughout the \Rails framework: -# -# * url_for, so you can use it with a record as the argument, e.g. -# url_for(@article); -# * ActionView::Helpers::FormHelper uses polymorphic_path, so you can write -# form_for(@article) without having to specify :url parameter for the form -# action; -# * redirect_to (which, in fact, uses url_for) so you can write -# redirect_to(post) in your controllers; -# * ActionView::Helpers::AtomFeedHelper, so you don't have to explicitly specify URLs -# for feed entries. -# -# == Prefixed polymorphic helpers -# -# In addition to polymorphic_url and polymorphic_path methods, a -# number of prefixed helpers are available as a shorthand to action: "..." -# in options. Those are: -# -# * edit_polymorphic_url, edit_polymorphic_path -# * new_polymorphic_url, new_polymorphic_path -# -# Example usage: -# -# edit_polymorphic_path(@post) # => "/posts/1/edit" -# polymorphic_path(@post, format: :pdf) # => "/posts/1.pdf" -# -# == Usage with mounted engines -# -# If you are using a mounted engine and you need to use a polymorphic_url -# pointing at the engine's routes, pass in the engine's route proxy as the first -# argument to the method. For example: -# -# 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 -module ActionDispatch::Routing::PolymorphicRoutes - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#153 - def edit_polymorphic_path(record_or_hash, options = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#149 - def edit_polymorphic_url(record_or_hash, options = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#153 - def new_polymorphic_path(record_or_hash, options = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#149 - 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 - 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 - # resulting URL string. For example: - # - # # calls post_url(post) - # polymorphic_url(post) # => "http://example.com/posts/1" - # polymorphic_url([blog, post]) # => "http://example.com/blogs/1/posts/1" - # polymorphic_url([:admin, blog, post]) # => "http://example.com/admin/blogs/1/posts/1" - # polymorphic_url([user, :blog, post]) # => "http://example.com/users/1/blog/posts/1" - # polymorphic_url(Comment) # => "http://example.com/comments" - # - # ==== Options - # - # * :action - Specifies the action prefix for the named route: - # :new or :edit. Default is no prefix. - # * :routing_type - Allowed values are :path or :url. - # Default is :url. - # - # Also includes all the options from url_for. These include such - # things as :anchor or :trailing_slash. Example usage - # is given below: - # - # polymorphic_url([blog, post], anchor: 'my_anchor') - # # => "http://example.com/blogs/1/posts/1#my_anchor" - # polymorphic_url([blog, post], anchor: 'my_anchor', script_name: "/my_app") - # # => "http://example.com/my_app/blogs/1/posts/1#my_anchor" - # - # For all of these options, see the documentation for {url_for}[rdoc-ref:ActionDispatch::Routing::UrlFor]. - # - # ==== Functionality - # - # # an Article record - # polymorphic_url(record) # same as article_url(record) - # - # # a Comment record - # polymorphic_url(record) # same as comment_url(record) - # - # # it recognizes new records and maps to the collection - # record = Comment.new - # polymorphic_url(record) # same as comments_url() - # - # # 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 - def polymorphic_url(record_or_hash_or_array, options = T.unsafe(nil)); end - - private - - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#168 - def polymorphic_mapping(record); end - - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#164 - def polymorphic_path_for_action(action, record_or_hash, options); end - - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#160 - def polymorphic_url_for_action(action, record_or_hash, options); end -end - -# source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#176 -class ActionDispatch::Routing::PolymorphicRoutes::HelperMethodBuilder - # @return [HelperMethodBuilder] a new instance of HelperMethodBuilder - # - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#239 - def initialize(key_strategy, prefix, suffix); end - - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#253 - def handle_class(klass); end - - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#257 - def handle_class_call(target, klass); end - - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#284 - def handle_list(list); end - - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#261 - def handle_model(record); end - - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#275 - def handle_model_call(target, record); end - - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#245 - def handle_string(record); end - - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#249 - def handle_string_call(target, str); end - - # Returns the value of attribute prefix. - # - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#237 - def prefix; end - - # Returns the value of attribute suffix. - # - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#237 - def suffix; end - - private - - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#338 - def get_method_for_class(klass); end - - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#343 - def get_method_for_string(str); end - - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#330 - def polymorphic_mapping(target, record); end - - class << self - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#187 - def build(action, type); end - - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#179 - def get(action, type); end - - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#185 - def path; end - - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#201 - def plural(prefix, suffix); end - - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#205 - def polymorphic_method(recipient, record_or_hash_or_array, action, type, options); end - - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#197 - def singular(prefix, suffix); end - - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#184 - def url; end - end -end - -# source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#177 -ActionDispatch::Routing::PolymorphicRoutes::HelperMethodBuilder::CACHE = T.let(T.unsafe(nil), Hash) - -# source://actionpack//lib/action_dispatch/routing/redirection.rb#10 -class ActionDispatch::Routing::Redirect < ::ActionDispatch::Routing::Endpoint - # @return [Redirect] a new instance of Redirect - # - # source://actionpack//lib/action_dispatch/routing/redirection.rb#13 - def initialize(status, block); end - - # Returns the value of attribute block. - # - # source://actionpack//lib/action_dispatch/routing/redirection.rb#11 - def block; end - - # source://actionpack//lib/action_dispatch/routing/redirection.rb#20 - def call(env); end - - # source://actionpack//lib/action_dispatch/routing/redirection.rb#56 - def inspect; end - - # source://actionpack//lib/action_dispatch/routing/redirection.rb#52 - def path(params, request); end - - # @return [Boolean] - # - # 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 - def status; end - - private - - # source://actionpack//lib/action_dispatch/routing/redirection.rb#65 - def escape(params); end - - # source://actionpack//lib/action_dispatch/routing/redirection.rb#69 - def escape_fragment(params); end - - # source://actionpack//lib/action_dispatch/routing/redirection.rb#73 - def escape_path(params); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/redirection.rb#61 - def relative_path?(path); end -end - -# source://actionpack//lib/action_dispatch/routing/redirection.rb#137 -module ActionDispatch::Routing::Redirection - # Redirect any path to another path: - # - # get "/stories" => redirect("/posts") - # - # This will redirect the user, while ignoring certain parts of the request, including query string, etc. - # /stories, /stories?foo=bar, etc all redirect to /posts. - # - # The redirect will use a 301 Moved Permanently status code by - # default. This can be overridden with the +:status+ option: - # - # get "/stories" => redirect("/posts", status: 307) - # - # You can also use interpolation in the supplied redirect argument: - # - # get 'docs/:article', to: redirect('/wiki/%{article}') - # - # Note that if you return a path without a leading slash then the URL is prefixed with the - # current SCRIPT_NAME environment variable. This is typically '/' but may be different in - # a mounted engine or where the application is deployed to a subdirectory of a website. - # - # Alternatively you can use one of the other syntaxes: - # - # The block version of redirect allows for the easy encapsulation of any logic associated with - # the redirect in question. Either the params and request are supplied as arguments, or just - # params, depending of how many arguments your block accepts. A string is required as a - # return value. - # - # get 'jokes/:number', to: redirect { |params, request| - # path = (params[:number].to_i.even? ? "wheres-the-beef" : "i-love-lamp") - # "http://#{request.host_with_port}/#{path}" - # } - # - # Note that the do end syntax for the redirect block wouldn't work, as Ruby would pass - # the block to +get+ instead of +redirect+. Use { ... } instead. - # - # The options version of redirect allows you to supply only the parts of the URL which need - # to change, it also supports interpolation of the path similar to the first example. - # - # get 'stores/:name', to: redirect(subdomain: 'stores', path: '/%{name}') - # get 'stores/:name(*all)', to: redirect(subdomain: 'stores', path: '/%{name}%{all}') - # get '/stories', to: redirect(path: '/posts') - # - # This will redirect the user, while changing only the specified parts of the request, - # for example the +path+ option in the last example. - # /stories, /stories?foo=bar, redirect to /posts and /posts?foo=bar respectively. - # - # Finally, an object which responds to call can be supplied to redirect, allowing you to reuse - # common redirect routes. The call method must accept two arguments, params and request, and return - # a string. - # - # get 'accounts/:name' => redirect(SubdomainRedirector.new('api')) - # - # @raise [ArgumentError] - # - # source://actionpack//lib/action_dispatch/routing/redirection.rb#190 - def redirect(*args, &block); end -end - -# :stopdoc: -# -# source://actionpack//lib/action_dispatch/routing/route_set.rb#14 -class ActionDispatch::Routing::RouteSet - # @return [RouteSet] a new instance of 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 - def add_polymorphic_mapping(klass, options, &block); end - - # @raise [ArgumentError] - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#584 - def add_route(mapping, name); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#619 - def add_url_helper(name, options, &block); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#395 - def api_only?; end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#415 - def append(&block); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#849 - def call(env); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#439 - def clear!; end - - # Returns the value of attribute default_scope. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#336 - def default_scope; end - - # Sets the attribute default_scope - # - # @param value the value to set the attribute default_scope to. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#336 - def default_scope=(_arg0); end - - # Returns the value of attribute default_url_options. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#338 - def default_url_options; end - - # Sets the attribute default_url_options - # - # @param value the value to set the attribute default_url_options to. - # - # 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 - def define_mounted_helper(name, script_namer = T.unsafe(nil)); end - - # Returns the value of attribute disable_clear_and_finalize. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#337 - def disable_clear_and_finalize; end - - # Sets the attribute disable_clear_and_finalize - # - # @param value the value to set the attribute disable_clear_and_finalize to. - # - # 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 - def draw(&block); end - - # Returns the value of attribute draw_paths. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#338 - def draw_paths; end - - # Sets the attribute draw_paths - # - # @param value the value to set the attribute draw_paths to. - # - # 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 - def eager_load!; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#580 - def empty?; end - - # Returns the value of attribute env_key. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#339 - def env_key; end - - # 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 - def extra_keys(options, recall = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#433 - 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 - def find_script_name(options); end - - # Returns the value of attribute formatter. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#336 - def formatter; end - - # Sets the attribute formatter - # - # @param value the value to set the attribute formatter to. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#336 - def formatter=(_arg0); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#764 - def generate_extras(options, recall = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#488 - def generate_url_helpers(supports_path); end - - # Since the router holds references to many parts of the system - # like engines, controllers and the application itself, inspecting - # the route set can actually be really slow, therefore we default - # alias inspect to to_s. - def inspect; end - - # Contains all the mounted helpers across different - # engines and the `main_app` helper for the application. - # 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 - def mounted_helpers; end - - # Returns the value of attribute named_routes. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#336 - def named_routes; end - - # Sets the attribute named_routes - # - # @param value the value to set the attribute named_routes to. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#336 - def named_routes=(_arg0); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#784 - def optimize_routes_generation?; end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#796 - def path_for(options, route_name = T.unsafe(nil), reserved = T.unsafe(nil)); end - - # Returns the value of attribute polymorphic_mappings. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#339 - def polymorphic_mappings; end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#419 - def prepend(&block); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#855 - def recognize_path(path, environment = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#870 - 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 - def relative_url_root; end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#399 - def request_class; end - - # Returns the value of attribute resources_path_names. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#337 - def resources_path_names; end - - # Sets the attribute resources_path_names - # - # @param value the value to set the attribute resources_path_names to. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#337 - def resources_path_names=(_arg0); end - - # Returns the value of attribute router. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#336 - def router; end - - # Sets the attribute router - # - # @param value the value to set the attribute router to. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#336 - def router=(_arg0); end - - # Returns the value of attribute set. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#336 - def routes; end - - # Returns the value of attribute set. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#336 - def set; end - - # Sets the attribute set - # - # @param value the value to set the attribute set to. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#336 - def set=(_arg0); end - - # The +options+ argument must be a hash whose keys are *symbols*. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#801 - 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 - def url_helpers(supports_path = T.unsafe(nil)); end - - private - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#423 - def eval_block(block); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#775 - 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 - def make_request(env); end - - class << self - # source://actionpack//lib/action_dispatch/routing/route_set.rb#343 - def default_resources_path_names; end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#347 - def new_with_config(config); end - end -end - -# source://actionpack//lib/action_dispatch/routing/route_set.rb#362 -class ActionDispatch::Routing::RouteSet::Config < ::Struct - # Returns the value of attribute api_only - # - # @return [Object] the current value of api_only - def api_only; end - - # Sets the attribute api_only - # - # @param value [Object] the value to set the attribute api_only to. - # @return [Object] the newly set value - def api_only=(_); end - - # Returns the value of attribute relative_url_root - # - # @return [Object] the current value of relative_url_root - def relative_url_root; end - - # Sets the attribute relative_url_root - # - # @param value [Object] the value to set the attribute relative_url_root to. - # @return [Object] the newly set value - def relative_url_root=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://actionpack//lib/action_dispatch/routing/route_set.rb#623 -class ActionDispatch::Routing::RouteSet::CustomUrlHelper - # @return [CustomUrlHelper] a new instance of CustomUrlHelper - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#626 - def initialize(name, defaults, &block); end - - # Returns the value of attribute block. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#624 - def block; end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#632 - 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 - def defaults; end - - # Returns the value of attribute name. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#624 - def name; end - - private - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#644 - def eval_block(t, args, options); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#648 - def merge_defaults(options); end -end - -# source://actionpack//lib/action_dispatch/routing/route_set.rb#364 -ActionDispatch::Routing::RouteSet::DEFAULT_CONFIG = T.let(T.unsafe(nil), ActionDispatch::Routing::RouteSet::Config) - -# source://actionpack//lib/action_dispatch/routing/route_set.rb#21 -class ActionDispatch::Routing::RouteSet::Dispatcher < ::ActionDispatch::Routing::Endpoint - # @return [Dispatcher] a new instance of Dispatcher - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#22 - def initialize(raise_on_name_error); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#26 - def dispatcher?; end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#28 - def serve(req); end - - private - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#42 - def controller(req); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#48 - def dispatch(controller, action, req, res); end -end - -# source://actionpack//lib/action_dispatch/routing/route_set.rb#653 -class ActionDispatch::Routing::RouteSet::Generator - # @return [Generator] a new instance of Generator - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#656 - def initialize(named_route, options, recall, set); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#668 - def controller; end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#672 - def current_controller; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#743 - 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 - def generate; end - - # Returns the value of attribute named_route. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#654 - def named_route; end - - # Remove leading slashes from controllers - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#727 - def normalize_controller!; end - - # This pulls :controller, :action, and :id out of the recall. - # The recall key is only used if there is no key in the options - # or if the key in the options is identical. If any of - # :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 - def normalize_controller_action_id!; end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#684 - def normalize_options!; end - - # Returns the value of attribute options. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#654 - def options; end - - # Returns the value of attribute recall. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#654 - def recall; end - - # Returns the value of attribute set. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#654 - def set; end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#676 - 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 - def use_relative_controller!; end - - private - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#749 - def named_route_exists?; end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#753 - def segment_keys; end -end - -# source://actionpack//lib/action_dispatch/routing/route_set.rb#448 -module ActionDispatch::Routing::RouteSet::MountedHelpers - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - include ::ActionDispatch::Routing::UrlFor - - mixes_in_class_methods GeneratedClassMethods - - module GeneratedClassMethods - def default_url_options; end - def default_url_options=(value); end - def default_url_options?; end - end - - module GeneratedInstanceMethods - def default_url_options; end - def default_url_options=(value); end - def default_url_options?; end - end -end - -# A NamedRouteCollection instance is a collection of named routes, and also -# maintains an anonymous module that can be used to install helpers for the -# named routes. -# -# source://actionpack//lib/action_dispatch/routing/route_set.rb#66 -class ActionDispatch::Routing::RouteSet::NamedRouteCollection - include ::Enumerable - - # @return [NamedRouteCollection] a new instance of NamedRouteCollection - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#71 - def initialize; end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#121 - def [](name); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#102 - def []=(name, route); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#102 - def add(name, route); end - - # Given a +name+, defines name_path and name_url helpers. - # Used by 'direct', 'resolve', and 'polymorphic' route helpers. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#149 - def add_url_helper(name, defaults, &block); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#88 - def clear; end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#88 - def clear!; end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#134 - def each(&block); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#121 - def get(name); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#84 - def helper_names; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#125 - def key?(name); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#143 - def length; end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#139 - def names; end - - # Returns the value of attribute path_helpers_module. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#68 - def path_helpers_module; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#79 - def route_defined?(name); end - - # Returns the value of attribute url_helpers_module. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#68 - def url_helpers_module; end - - private - - # Create a URL helper allowing ordered parameters to be associated - # with corresponding dynamic segments, so you can do: - # - # foo_url(bar, baz, bang) - # - # Instead of: - # - # foo_url(bar: bar, baz: baz, bang: bang) - # - # Also allow options hash, so you can do: - # - # foo_url(bar, baz, bang, sort_by: 'baz') - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#317 - def define_url_helper(mod, name, helper, url_strategy); end - - # Returns the value of attribute routes. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#68 - def routes; end -end - -# source://actionpack//lib/action_dispatch/routing/route_set.rb#172 -class ActionDispatch::Routing::RouteSet::NamedRouteCollection::UrlHelper - # @return [UrlHelper] a new instance of UrlHelper - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#255 - def initialize(route, options, route_name); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#262 - def call(t, method_name, args, inner_options, url_strategy); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#274 - def handle_positional_args(controller_options, inner_options, args, result, path_params); end - - # Returns the value of attribute route_name. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#185 - def route_name; end - - class << self - # source://actionpack//lib/action_dispatch/routing/route_set.rb#173 - def create(route, options, route_name); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#181 - def optimize_helper?(route); end - end -end - -# source://actionpack//lib/action_dispatch/routing/route_set.rb#187 -class ActionDispatch::Routing::RouteSet::NamedRouteCollection::UrlHelper::OptimizedUrlHelper < ::ActionDispatch::Routing::RouteSet::NamedRouteCollection::UrlHelper - # @return [OptimizedUrlHelper] a new instance of OptimizedUrlHelper - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#190 - def initialize(route, options, route_name); end - - # Returns the value of attribute arg_size. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#188 - def arg_size; end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#196 - def call(t, method_name, args, inner_options, url_strategy); end - - private - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#227 - def optimize_routes_generation?(t); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#219 - def optimized_helper(args); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#231 - def parameterize_args(args); end - - # @raise [ActionController::UrlGenerationError] - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#242 - def raise_generation_error(args); end -end - -# strategy for building URLs to send to the client -# -# 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 -ActionDispatch::Routing::RouteSet::RESERVED_OPTIONS = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/routing/route_set.rb#53 -class ActionDispatch::Routing::RouteSet::StaticDispatcher < ::ActionDispatch::Routing::RouteSet::Dispatcher - # @return [StaticDispatcher] a new instance of StaticDispatcher - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#54 - def initialize(controller_class); end - - private - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#60 - def controller(_); end -end - -# source://actionpack//lib/action_dispatch/routing/route_set.rb#334 -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 - def action; end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#13 - def constraints; end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#37 - def controller; end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#9 - def endpoint; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/inspector.rb#49 - def engine?; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/inspector.rb#45 - def internal?; end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#25 - def name; end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#21 - def path; end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#17 - def rack_app; end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#29 - def reqs; end -end - -# This class is just used for displaying route information when someone -# 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 -class ActionDispatch::Routing::RoutesInspector - # @return [RoutesInspector] a new instance of RoutesInspector - # - # source://actionpack//lib/action_dispatch/routing/inspector.rb#59 - def initialize(routes); end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#64 - def format(formatter, filter = T.unsafe(nil)); end - - private - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#117 - def collect_engine_routes(route); end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#104 - def collect_routes(routes); end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#93 - def filter_routes(filter); end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#84 - def normalize_filter(filter); end -end - -# source://actionpack//lib/action_dispatch/routing/routes_proxy.rb#7 -class ActionDispatch::Routing::RoutesProxy - include ::ActionDispatch::Routing::PolymorphicRoutes - include ::ActionDispatch::Routing::UrlFor - - # @return [RoutesProxy] a new instance of RoutesProxy - # - # source://actionpack//lib/action_dispatch/routing/routes_proxy.rb#13 - def initialize(routes, scope, helpers, script_namer = T.unsafe(nil)); end - - # Returns the value of attribute routes. - # - # source://actionpack//lib/action_dispatch/routing/routes_proxy.rb#10 - def _routes; end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options; end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options=(_arg0); end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options?; end - - # Returns the value of attribute routes. - # - # source://actionpack//lib/action_dispatch/routing/routes_proxy.rb#10 - def routes; end - - # Sets the attribute routes - # - # @param value the value to set the attribute routes to. - # - # source://actionpack//lib/action_dispatch/routing/routes_proxy.rb#10 - def routes=(_arg0); end - - # Returns the value of attribute scope. - # - # source://actionpack//lib/action_dispatch/routing/routes_proxy.rb#10 - def scope; end - - # Sets the attribute scope - # - # @param value the value to set the attribute scope to. - # - # source://actionpack//lib/action_dispatch/routing/routes_proxy.rb#10 - def scope=(_arg0); end - - # source://actionpack//lib/action_dispatch/routing/routes_proxy.rb#19 - def url_options; end - - private - - # Keeps the part of the script name provided by the global - # context via ENV["SCRIPT_NAME"], which `mount` doesn't know - # about since it depends on the specific request, but use our - # script name resolver for the mount point dependent part. - # - # source://actionpack//lib/action_dispatch/routing/routes_proxy.rb#58 - def merge_script_names(previous_script_name, new_script_name); end - - # source://actionpack//lib/action_dispatch/routing/routes_proxy.rb#30 - def method_missing(method, *args); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/routes_proxy.rb#26 - def respond_to_missing?(method, _); end - - class << self - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options; end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options=(value); end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options?; end - end -end - -# source://actionpack//lib/action_dispatch/routing.rb#257 -ActionDispatch::Routing::SEPARATORS = T.let(T.unsafe(nil), Array) - -# 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. -# -# See ActionDispatch::Routing for general information about routing and routes.rb. -# -# Tip: If you need to generate URLs from your models or some other place, -# then ActionController::UrlFor is what you're looking for. Read on for -# an introduction. In general, this module should not be included on its own, -# as it is usually included by url_helpers (as in Rails.application.routes.url_helpers). -# -# == URL generation from parameters -# -# As you may know, some functions, such as ActionController::Base#url_for -# and ActionView::Helpers::UrlHelper#link_to, can generate URLs given a set -# of parameters. For example, you've probably had the chance to write code -# like this in one of your views: -# -# <%= link_to('Click here', controller: 'users', -# action: 'new', message: 'Welcome!') %> -# # => Click here -# -# link_to, and all other functions that require URL generation functionality, -# actually use ActionController::UrlFor under the hood. And in particular, -# they use the ActionController::UrlFor#url_for method. One can generate -# the same path as the above example by using the following code: -# -# include UrlFor -# url_for(controller: 'users', -# action: 'new', -# message: 'Welcome!', -# only_path: true) -# # => "/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 -# want to include the hostname as well, then you must also pass the :host -# argument: -# -# include UrlFor -# url_for(controller: 'users', -# action: 'new', -# message: 'Welcome!', -# host: 'www.example.com') -# # => "http://www.example.com/users/new?message=Welcome%21" -# -# By default, all controllers and views have access to a special version of url_for, -# that already knows what the current hostname is. So if you use url_for in your -# controllers or your views, then you don't need to explicitly pass the :host -# argument. -# -# For convenience reasons, mailers provide a shortcut for ActionController::UrlFor#url_for. -# So within mailers, you only have to type +url_for+ instead of 'ActionController::UrlFor#url_for' -# in full. However, mailers don't have hostname information, and you still have to provide -# the +:host+ argument or set the default host that will be used in all mailers using the -# configuration option +config.action_mailer.default_url_options+. For more information on -# url_for in mailers read the ActionMailer#Base documentation. -# -# -# == URL generation for named routes -# -# UrlFor also allows one to access methods that have been auto-generated from -# named routes. For example, suppose that you have a 'users' resource in your -# config/routes.rb: -# -# resources :users -# -# This generates, among other things, the method users_path. By default, -# this method is accessible from your controllers, views, and mailers. If you need -# to access this auto-generated method from other places (such as a model), then -# you can do that by including Rails.application.routes.url_helpers in your class: -# -# class User < ActiveRecord::Base -# include Rails.application.routes.url_helpers -# -# def base_uri -# user_path(self) -# end -# end -# -# User::User.find(1).base_uri # => "/users/1" -# -# source://actionpack//lib/action_dispatch/routing/url_for.rb#87 -module ActionDispatch::Routing::UrlFor - include ::ActionDispatch::Routing::PolymorphicRoutes - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#106 - def initialize(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#173 - def full_url_for(options = T.unsafe(nil)); end - - # Allows calling direct or regular named route. - # - # resources :buckets - # - # direct :recordable do |recording| - # route_for(:bucket, recording.bucket) - # end - # - # direct :threadable do |threadable| - # route_for(:recordable, threadable.parent) - # end - # - # This maintains the context of the original caller on - # whether to return a path or full URL, e.g: - # - # threadable_path(threadable) # => "/buckets/1" - # threadable_url(threadable) # => "http://example.com/buckets/1" - # - # source://actionpack//lib/action_dispatch/routing/url_for.rb#213 - def route_for(name, *args); end - - # Generate a URL based on the options provided, default_url_options, and the - # routes defined in routes.rb. The following options are supported: - # - # * :only_path - If true, the relative URL is returned. Defaults to +false+. - # * :protocol - The protocol to connect to. Defaults to 'http'. - # * :host - Specifies the host the link should be targeted at. - # If :only_path is false, this option must be - # provided either explicitly, or via +default_url_options+. - # * :subdomain - Specifies the subdomain of the link, using the +tld_length+ - # to split the subdomain from the host. - # If false, removes all subdomains from the host part of the link. - # * :domain - Specifies the domain of the link, using the +tld_length+ - # to split the domain from the host. - # * :tld_length - Number of labels the TLD id composed of, only used if - # :subdomain or :domain are supplied. Defaults to - # ActionDispatch::Http::URL.tld_length, which in turn defaults to 1. - # * :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. - # * :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. - # - # Any other key (:controller, :action, etc.) given to - # +url_for+ is forwarded to the Routes module. - # - # url_for controller: 'tasks', action: 'testing', host: 'somehost.org', port: '8080' - # # => 'http://somehost.org:8080/tasks/testing' - # url_for controller: 'tasks', action: 'testing', host: 'somehost.org', anchor: 'ok', only_path: true - # # => '/tasks/testing#ok' - # url_for controller: 'tasks', action: 'testing', trailing_slash: true - # # => 'http://somehost.org/tasks/testing/' - # url_for controller: 'tasks', action: 'testing', host: 'somehost.org', number: '33' - # # => 'http://somehost.org/tasks/testing?number=33' - # url_for controller: 'tasks', action: 'testing', host: 'somehost.org', script_name: "/myapp" - # # => 'http://somehost.org/myapp/tasks/testing' - # url_for controller: 'tasks', action: 'testing', host: 'somehost.org', script_name: "/myapp", only_path: true - # # => '/myapp/tasks/testing' - # - # Missing routes keys may be filled in from the current request's parameters - # (e.g. +:controller+, +:action+, +:id+, and any other parameters that are - # placed in the path). Given that the current action has been reached - # through GET /users/1: - # - # url_for(only_path: true) # => '/users/1' - # url_for(only_path: true, action: 'edit') # => '/users/1/edit' - # url_for(only_path: true, action: 'edit', id: 2) # => '/users/2/edit' - # - # Notice that no +:id+ parameter was provided to the first +url_for+ call - # and the helper used the one from the route's path. Any path parameter - # 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 - 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 - def url_options; end - - protected - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/url_for.rb#218 - def optimize_routes_generation?; end - - private - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#230 - def _routes_context; end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#223 - def _with_routes(routes); end - - module GeneratedClassMethods - def default_url_options; end - def default_url_options=(value); end - def default_url_options?; end - end - - module GeneratedInstanceMethods - def default_url_options; end - def default_url_options=(value); end - def default_url_options?; end - end -end - -# 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: -# -# 1. TLS redirect: Permanently redirects +http://+ requests to +https://+ -# with the same URL host, path, etc. Enabled by default. Set +config.ssl_options+ -# to modify the destination URL -# (e.g. redirect: { host: "secure.widgets.com", port: 8080 }), or set -# redirect: false to disable this feature. -# -# Requests can opt-out of redirection with +exclude+: -# -# config.ssl_options = { redirect: { exclude: -> request { /healthcheck/.match?(request.path) } } } -# -# Cookies will not be flagged as secure for excluded requests. -# -# 2. Secure cookies: Sets the +secure+ flag on cookies to tell browsers they -# must not be sent along with +http://+ requests. Enabled by default. Set -# +config.ssl_options+ with secure_cookies: false to disable this feature. -# -# 3. HTTP Strict Transport Security (HSTS): Tells the browser to remember -# this site as TLS-only and automatically redirect non-TLS requests. -# Enabled by default. Configure +config.ssl_options+ with hsts: false to disable. -# -# Set +config.ssl_options+ with hsts: { ... } to configure HSTS: -# -# * +expires+: How long, in seconds, these settings will stick. The minimum -# required to qualify for browser preload lists is 1 year. Defaults to -# 2 years (recommended). -# -# * +subdomains+: Set to +true+ to tell the browser to apply these settings -# to all subdomains. This protects your cookies from interception by a -# vulnerable site on a subdomain. Defaults to +true+. -# -# * +preload+: Advertise that this site may be included in browsers' -# preloaded HSTS lists. HSTS protects your site on every visit except the -# first visit since it hasn't seen your HSTS header yet. To close this -# gap, browser vendors include a baked-in list of HSTS-enabled sites. -# Go to https://hstspreload.org to submit your site for inclusion. -# Defaults to +false+. -# -# To turn off HSTS, omitting the header is not enough. Browsers will remember the -# original HSTS directive until it expires. Instead, use the header to tell browsers to -# expire HSTS immediately. Setting hsts: false is a shortcut for -# hsts: { expires: 0 }. -# -# source://actionpack//lib/action_dispatch/middleware/ssl.rb#49 -class ActionDispatch::SSL - # @return [SSL] a new instance of SSL - # - # source://actionpack//lib/action_dispatch/middleware/ssl.rb#61 - 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 - def call(env); end - - private - - # https://tools.ietf.org/html/rfc6797#section-6.1 - # - # source://actionpack//lib/action_dispatch/middleware/ssl.rb#107 - def build_hsts_header(hsts); end - - # source://actionpack//lib/action_dispatch/middleware/ssl.rb#114 - def flag_cookies_as_secure!(headers); end - - # source://actionpack//lib/action_dispatch/middleware/ssl.rb#145 - def https_location_for(request); end - - # source://actionpack//lib/action_dispatch/middleware/ssl.rb#92 - def normalize_hsts_options(options); end - - # source://actionpack//lib/action_dispatch/middleware/ssl.rb#128 - def redirect_to_https(request); end - - # source://actionpack//lib/action_dispatch/middleware/ssl.rb#135 - def redirection_status(request); end - - # source://actionpack//lib/action_dispatch/middleware/ssl.rb#88 - def set_hsts_header!(headers); end - - class << self - # source://actionpack//lib/action_dispatch/middleware/ssl.rb#57 - 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 -ActionDispatch::SSL::HSTS_EXPIRES_IN = T.let(T.unsafe(nil), Integer) - -# source://actionpack//lib/action_dispatch/middleware/ssl.rb#55 -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 - def initialize(app); end - - # source://actionpack//lib/action_dispatch/middleware/server_timing.rb#58 - def call(env); end - - class << self - # source://actionpack//lib/action_dispatch/middleware/server_timing.rb#48 - 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 - def initialize; end - - # source://actionpack//lib/action_dispatch/middleware/server_timing.rb#17 - def call(event); end - - # source://actionpack//lib/action_dispatch/middleware/server_timing.rb#23 - def collect_events; end - - # source://actionpack//lib/action_dispatch/middleware/server_timing.rb#32 - def ensure_subscribed; end - - # source://actionpack//lib/action_dispatch/middleware/server_timing.rb#40 - def unsubscribe; end -end - -# source://actionpack//lib/action_dispatch/middleware/server_timing.rb#11 -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/middleware/session/abstract_store.rb#90 -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 - def generate_sid; end - - private - - # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#100 - def set_cookie(request, response, cookie); end -end - -# source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#79 -class ActionDispatch::Session::AbstractStore < ::Rack::Session::Abstract::Persisted - include ::ActionDispatch::Session::Compatibility - include ::ActionDispatch::Session::StaleSessionCheck - include ::ActionDispatch::Session::SessionObject - - private - - # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#85 - def set_cookie(request, response, cookie); end -end - -# 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. -# -# ==== Options -# * cache - The cache to use. If it is not specified, Rails.cache will be used. -# * 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 -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 - 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 - def delete_session(env, sid, options); end - - # Get a session from the cache. - # - # source://actionpack//lib/action_dispatch/middleware/session/cache_store.rb#23 - def find_session(env, sid); end - - # Set a session in the cache. - # - # source://actionpack//lib/action_dispatch/middleware/session/cache_store.rb#31 - 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 - def cache_key(id); end - - # source://actionpack//lib/action_dispatch/middleware/session/cache_store.rb#54 - def get_session_with_fallback(sid); end -end - -# source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#20 -module ActionDispatch::Session::Compatibility - # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#21 - def initialize(app, options = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#26 - def generate_sid; end - - private - - # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#33 - def initialize_sid; end - - # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#38 - def make_request(env); end -end - -# 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 -# within the 4096 bytes cookie size limit. A +CookieOverflow+ exception is raised if -# you attempt to store more than 4096 bytes of data. -# -# The cookie jar used for storage is automatically configured to be the -# best possible option given your application's configuration. -# -# 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. -# -# 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. -# 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+ -# will be found in the old config/secrets.yml file. -# -# Note that changing your +secret_key_base+ will invalidate all existing session. -# Additionally, you should take care to make sure you are not relying on the -# ability to decode signed cookies generated by your app in external -# applications or JavaScript before changing it. -# -# Because CookieStore extends +Rack::Session::Abstract::Persisted+, many of the -# options described there can be used to customize the session cookie that -# is generated. For example: -# -# Rails.application.config.session_store :cookie_store, expire_after: 14.days -# -# would set the session cookie to expire automatically 14 days after creation. -# Other useful options include :key, :secure, -# :httponly, and :same_site. -# -# source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#49 -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 - def initialize(app, options = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#63 - def delete_session(req, session_id, options); end - - # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#70 - def load_session(req); end - - private - - # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#117 - def cookie_jar(request); end - - # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#79 - def extract_session_id(req); end - - # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#113 - def get_cookie(req); end - - # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#98 - def persistent_session_id!(data, sid = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#109 - def set_cookie(request, session_id, cookie); end - - # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#86 - def unpacked_cookie_data(req); end - - # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#104 - def write_session(req, sid, session_data, options); end -end - -# source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#50 -class ActionDispatch::Session::CookieStore::SessionId - # @return [SessionId] a new instance of SessionId - # - # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#53 - 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 - def cookie_value; end -end - -# source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#69 -module ActionDispatch::Session::SessionObject - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#74 - def loaded_session?(session); end - - # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#70 - def prepare_session(req); end -end - -# source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#11 -class ActionDispatch::Session::SessionRestoreError < ::StandardError - # @return [SessionRestoreError] a new instance of SessionRestoreError - # - # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#12 - def initialize; end -end - -# source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#43 -module ActionDispatch::Session::StaleSessionCheck - # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#48 - def extract_session_id(env); end - - # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#44 - def load_session(env); end - - # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#52 - def stale_session_check!; end -end - -# 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 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. -# -# If the application returns a "X-Cascade" pass response, this middleware -# will send an empty response as 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#18 -class ActionDispatch::ShowExceptions - # @return [ShowExceptions] a new instance of ShowExceptions - # - # source://actionpack//lib/action_dispatch/middleware/show_exceptions.rb#19 - def initialize(app, exceptions_app); end - - # source://actionpack//lib/action_dispatch/middleware/show_exceptions.rb#24 - def call(env); end - - private - - # source://actionpack//lib/action_dispatch/middleware/show_exceptions.rb#58 - def fallback_to_html_format_if_invalid_mime_type(request); end - - # source://actionpack//lib/action_dispatch/middleware/show_exceptions.rb#67 - def pass_response(status); end - - # source://actionpack//lib/action_dispatch/middleware/show_exceptions.rb#36 - def render_exception(request, exception); end -end - -# 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 -# the +public/+ directory. -# -# Only GET and HEAD requests are served. POST and other HTTP methods -# are handed off to the main app. -# -# Only files in the root directory are served; path traversal is denied. -# -# source://actionpack//lib/action_dispatch/middleware/static.rb#16 -class ActionDispatch::Static - # @return [Static] a new instance of Static - # - # source://actionpack//lib/action_dispatch/middleware/static.rb#17 - def initialize(app, path, index: T.unsafe(nil), headers: T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/middleware/static.rb#22 - def call(env); end -end - -# = System Testing -# -# System tests let you test applications in the browser. Because system -# tests use a real browser experience, you can test all of your JavaScript -# easily from your test suite. -# -# To create a system test in your application, extend your test class -# from ApplicationSystemTestCase. System tests use Capybara as a -# base and allow you to configure the settings through your -# application_system_test_case.rb file that is generated with a new -# application or scaffold. -# -# Here is an example system test: -# -# require "application_system_test_case" -# -# class Users::CreateTest < ApplicationSystemTestCase -# test "adding a new user" do -# visit users_path -# click_on 'New User' -# -# fill_in 'Name', with: 'Arya' -# click_on 'Create User' -# -# assert_text 'Arya' -# end -# end -# -# When generating an application or scaffold, an +application_system_test_case.rb+ -# file will also be generated containing the base class for system testing. -# This is where you can change the driver, add Capybara settings, and other -# configuration for your system tests. -# -# require "test_helper" -# -# class ApplicationSystemTestCase < ActionDispatch::SystemTestCase -# driven_by :selenium, using: :chrome, screen_size: [1400, 1400] -# end -# -# 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 -# the Firefox browser instead of Chrome. In your +application_system_test_case.rb+ -# file add the following: -# -# require "test_helper" -# -# class ApplicationSystemTestCase < ActionDispatch::SystemTestCase -# driven_by :selenium, using: :firefox -# end -# -# +driven_by+ has a required argument for the driver name. The keyword -# arguments are +:using+ for the browser and +:screen_size+ to change the -# size of the browser screen. These two options are not applicable for -# headless drivers and will be silently ignored if passed. -# -# Headless browsers such as headless Chrome and headless Firefox are also supported. -# You can use these browsers by setting the +:using+ argument to +:headless_chrome+ or +:headless_firefox+. -# -# To use a headless driver, like Cuprite, update your Gemfile to use -# Cuprite instead of Selenium and then declare the driver name in the -# +application_system_test_case.rb+ file. In this case, you would leave out -# the +:using+ option because the driver is headless, but you can still use -# +:screen_size+ to change the size of the browser screen, also you can use -# +:options+ to pass options supported by the driver. Please refer to your -# driver documentation to learn about supported options. -# -# require "test_helper" -# require "capybara/cuprite" -# -# class ApplicationSystemTestCase < ActionDispatch::SystemTestCase -# driven_by :cuprite, screen_size: [1400, 1400], options: -# { js_errors: true } -# end -# -# Some drivers require browser capabilities to be passed as a block instead -# of through the +options+ hash. -# -# As an example, if you want to add mobile emulation on chrome, you'll have to -# create an instance of selenium's +Chrome::Options+ object and add -# capabilities with a block. -# -# The block will be passed an instance of ::Options where you can -# define the capabilities you want. Please refer to your driver documentation -# to learn about supported options. -# -# class ApplicationSystemTestCase < ActionDispatch::SystemTestCase -# driven_by :selenium, using: :chrome, screen_size: [1024, 768] do |driver_option| -# driver_option.add_emulation(device_name: 'iPhone 6') -# driver_option.add_extension('path/to/chrome_extension.crx') -# end -# end -# -# 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 -class ActionDispatch::SystemTestCase < ::ActiveSupport::TestCase - include ::Capybara::DSL - include ::Capybara::Minitest::Assertions - include ::ActionDispatch::SystemTesting::TestHelpers::SetupAndTeardown - include ::ActionDispatch::SystemTesting::TestHelpers::ScreenshotHelper - include ::ActionText::SystemTestHelper - - # @return [SystemTestCase] a new instance of SystemTestCase - # - # source://actionpack//lib/action_dispatch/system_test_case.rb#120 - def initialize(*_arg0); end - - private - - # source://actionpack//lib/action_dispatch/system_test_case.rb#181 - def method_missing(name, *args, &block); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/system_test_case.rb#189 - def respond_to_missing?(name, include_private = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/system_test_case.rb#163 - def url_helpers; end - - class << self - # System Test configuration options - # - # The default settings are Selenium, using Chrome, with a screen size - # of 1400x1400. - # - # Examples: - # - # driven_by :cuprite - # - # driven_by :selenium, screen_size: [800, 800] - # - # driven_by :selenium, using: :chrome - # - # driven_by :selenium, using: :headless_chrome - # - # driven_by :selenium, using: :firefox - # - # driven_by :selenium, using: :headless_firefox - # - # source://actionpack//lib/action_dispatch/system_test_case.rb#156 - def driven_by(driver, using: T.unsafe(nil), screen_size: T.unsafe(nil), options: T.unsafe(nil), &capabilities); end - - # source://actionpack//lib/action_dispatch/system_test_case.rb#136 - def driver; end - - # source://actionpack//lib/action_dispatch/system_test_case.rb#136 - def driver=(value); end - - # source://actionpack//lib/action_dispatch/system_test_case.rb#136 - def driver?; end - - # source://actionpack//lib/action_dispatch/system_test_case.rb#126 - def start_application; end - end -end - -# source://actionpack//lib/action_dispatch/system_test_case.rb#118 -ActionDispatch::SystemTestCase::DEFAULT_HOST = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/system_testing/driver.rb#4 -module ActionDispatch::SystemTesting; end - -# source://actionpack//lib/action_dispatch/system_testing/browser.rb#5 -class ActionDispatch::SystemTesting::Browser - # @return [Browser] a new instance of Browser - # - # source://actionpack//lib/action_dispatch/system_testing/browser.rb#8 - def initialize(name); end - - # @yield [options] - # - # source://actionpack//lib/action_dispatch/system_testing/browser.rb#24 - def configure; end - - # Returns the value of attribute name. - # - # source://actionpack//lib/action_dispatch/system_testing/browser.rb#6 - def name; end - - # Returns the value of attribute options. - # - # 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. - # - # source://actionpack//lib/action_dispatch/system_testing/browser.rb#33 - def preload; end - - # source://actionpack//lib/action_dispatch/system_testing/browser.rb#13 - def type; end - - private - - # source://actionpack//lib/action_dispatch/system_testing/browser.rb#43 - def initialize_options; end - - # source://actionpack//lib/action_dispatch/system_testing/browser.rb#53 - def set_default_options; end - - # source://actionpack//lib/action_dispatch/system_testing/browser.rb#62 - def set_headless_chrome_browser_options; end - - # source://actionpack//lib/action_dispatch/system_testing/browser.rb#69 - def set_headless_firefox_browser_options; end -end - -# source://actionpack//lib/action_dispatch/system_testing/driver.rb#5 -class ActionDispatch::SystemTesting::Driver - # @return [Driver] a new instance of Driver - # - # source://actionpack//lib/action_dispatch/system_testing/driver.rb#8 - def initialize(driver_type, **options, &capabilities); end - - # Returns the value of attribute name. - # - # source://actionpack//lib/action_dispatch/system_testing/driver.rb#6 - def name; end - - # source://actionpack//lib/action_dispatch/system_testing/driver.rb#33 - def use; end - - private - - # source://actionpack//lib/action_dispatch/system_testing/driver.rb#58 - def browser_options; end - - # source://actionpack//lib/action_dispatch/system_testing/driver.rb#44 - def register; end - - # source://actionpack//lib/action_dispatch/system_testing/driver.rb#78 - 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#82 - def register_rack_test(app); end - - # source://actionpack//lib/action_dispatch/system_testing/driver.rb#62 - 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 - def registerable?; end - - # source://actionpack//lib/action_dispatch/system_testing/driver.rb#86 - def setup; end -end - -# source://actionpack//lib/action_dispatch/system_testing/server.rb#5 -class ActionDispatch::SystemTesting::Server - # source://actionpack//lib/action_dispatch/system_testing/server.rb#12 - def run; end - - private - - # source://actionpack//lib/action_dispatch/system_testing/server.rb#26 - def set_port; end - - # source://actionpack//lib/action_dispatch/system_testing/server.rb#22 - def set_server; end - - # source://actionpack//lib/action_dispatch/system_testing/server.rb#17 - def setup; end - - class << self - # Returns the value of attribute silence_puma. - # - # source://actionpack//lib/action_dispatch/system_testing/server.rb#7 - def silence_puma; end - - # Sets the attribute silence_puma - # - # @param value the value to set the attribute silence_puma to. - # - # source://actionpack//lib/action_dispatch/system_testing/server.rb#7 - def silence_puma=(_arg0); end - end -end - -# source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#5 -module ActionDispatch::SystemTesting::TestHelpers; end - -# Screenshot helper for system testing. -# -# source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#7 -module ActionDispatch::SystemTesting::TestHelpers::ScreenshotHelper - # Takes a screenshot of the current page in the browser if the test - # failed. - # - # +take_failed_screenshot+ is called during system test teardown. - # - # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#44 - def take_failed_screenshot; end - - # Takes a screenshot of the current page in the browser. - # - # +take_screenshot+ can be used at any point in your system tests to take - # a screenshot of the current state. This can be useful for debugging or - # automating visual testing. You can take multiple screenshots per test - # 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 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 - # iTerm image protocol (https://iterm2.com/documentation-images.html). - # * [+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 - - private - - # Returns the value of attribute _screenshot_counter. - # - # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#49 - 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 - def _screenshot_counter=(_arg0); end - - # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#90 - def absolute_html_path; end - - # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#86 - def absolute_image_path; end - - # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#78 - def absolute_path; end - - # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#112 - def display_image; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#132 - def failed?; end - - # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#74 - def html_path; end - - # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#64 - def image_name; end - - # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#70 - def image_path; end - - # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#55 - def increment_unique; end - - # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#128 - def inline_base64(path); end - - # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#102 - def output_type; end - - # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#94 - def save_html; 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#98 - def save_image; end - - # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#82 - def screenshots_dir; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#136 - def supports_screenshot?; end - - # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#60 - def unique; end -end - -# source://actionpack//lib/action_dispatch/system_testing/test_helpers/setup_and_teardown.rb#6 -module ActionDispatch::SystemTesting::TestHelpers::SetupAndTeardown - # source://actionpack//lib/action_dispatch/system_testing/test_helpers/setup_and_teardown.rb#13 - def after_teardown; end - - # source://actionpack//lib/action_dispatch/system_testing/test_helpers/setup_and_teardown.rb#7 - def before_teardown; end -end - -# source://actionpack//lib/action_dispatch/testing/test_process.rb#7 -module ActionDispatch::TestProcess - include ::ActionDispatch::TestProcess::FixtureFile - - # @raise [NoMethodError] - # - # source://actionpack//lib/action_dispatch/testing/test_process.rb#30 - def assigns(key = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/testing/test_process.rb#44 - def cookies; end - - # source://actionpack//lib/action_dispatch/testing/test_process.rb#40 - def flash; end - - # source://actionpack//lib/action_dispatch/testing/test_process.rb#48 - def redirect_to_url; end - - # source://actionpack//lib/action_dispatch/testing/test_process.rb#36 - def session; end -end - -# source://actionpack//lib/action_dispatch/testing/test_process.rb#8 -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') } - # - # 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) } - # - # 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 -end - -# source://actionpack//lib/action_dispatch/testing/test_request.rb#7 -class ActionDispatch::TestRequest < ::ActionDispatch::Request - # source://actionpack//lib/action_dispatch/testing/test_request.rb#66 - def accept=(mime_types); end - - # source://actionpack//lib/action_dispatch/testing/test_request.rb#46 - def action=(action_name); end - - # source://actionpack//lib/action_dispatch/testing/test_request.rb#30 - def host=(host); end - - # source://actionpack//lib/action_dispatch/testing/test_request.rb#50 - def if_modified_since=(last_modified); end - - # source://actionpack//lib/action_dispatch/testing/test_request.rb#54 - def if_none_match=(etag); end - - # source://actionpack//lib/action_dispatch/testing/test_request.rb#42 - def path=(path); end - - # source://actionpack//lib/action_dispatch/testing/test_request.rb#34 - def port=(number); end - - # source://actionpack//lib/action_dispatch/testing/test_request.rb#58 - def remote_addr=(addr); end - - # source://actionpack//lib/action_dispatch/testing/test_request.rb#26 - def request_method=(method); end - - # source://actionpack//lib/action_dispatch/testing/test_request.rb#38 - def request_uri=(uri); end - - # source://actionpack//lib/action_dispatch/testing/test_request.rb#62 - def user_agent=(user_agent); end - - class << self - # Create a new test request with default +env+ values. - # - # source://actionpack//lib/action_dispatch/testing/test_request.rb#15 - def create(env = T.unsafe(nil)); end - - private - - # source://actionpack//lib/action_dispatch/testing/test_request.rb#21 - def default_env; end - end -end - -# source://actionpack//lib/action_dispatch/testing/test_request.rb#8 -ActionDispatch::TestRequest::DEFAULT_ENV = T.let(T.unsafe(nil), Hash) - -# Integration test methods such as Integration::RequestHelpers#get -# and Integration::RequestHelpers#post return objects of class -# TestResponse, which represent the HTTP response results of the requested -# controller actions. -# -# See Response for more information on controller response objects. -# -# source://actionpack//lib/action_dispatch/testing/test_response.rb#12 -class ActionDispatch::TestResponse < ::ActionDispatch::Response - # Returns a parsed body depending on the response MIME type. When a parser - # corresponding to the MIME type is not found, it returns the raw body. - # - # ==== Examples - # get "/posts" - # response.content_type # => "text/html; charset=utf-8" - # response.parsed_body.class # => String - # response.parsed_body # => "\n\n..." - # - # get "/posts.json" - # response.content_type # => "application/json; charset=utf-8" - # response.parsed_body.class # => Array - # response.parsed_body # => [{"id"=>42, "title"=>"Title"},... - # - # get "/posts/42.json" - # response.content_type # => "application/json; charset=utf-8" - # response.parsed_body.class # => Hash - # response.parsed_body # => {"id"=>42, "title"=>"Title"} - # - # source://actionpack//lib/action_dispatch/testing/test_response.rb#35 - def parsed_body; end - - # source://actionpack//lib/action_dispatch/testing/test_response.rb#39 - def response_parser; end - - class << self - # source://actionpack//lib/action_dispatch/testing/test_response.rb#13 - def from_response(response); end - end -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. - # - # 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. - # - # source://actionpack//lib/action_pack/version.rb#7 - def version; end - end -end - -# source://actionpack//lib/action_pack/gem_version.rb#9 -module ActionPack::VERSION; end - -# source://actionpack//lib/action_pack/gem_version.rb#10 -ActionPack::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) - -# source://actionpack//lib/action_pack/gem_version.rb#11 -ActionPack::VERSION::MINOR = T.let(T.unsafe(nil), Integer) - -# source://actionpack//lib/action_pack/gem_version.rb#13 -ActionPack::VERSION::PRE = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_pack/gem_version.rb#15 -ActionPack::VERSION::STRING = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_pack/gem_version.rb#12 -ActionPack::VERSION::TINY = T.let(T.unsafe(nil), Integer) - -module ActionView::RoutingUrlFor - include ::ActionDispatch::Routing::PolymorphicRoutes - include ::ActionDispatch::Routing::UrlFor -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 - def [](type); end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#45 - def fetch(type, &block); end - end -end - -# ALL isn't a real MIME type, so we don't register it for lookup with the -# 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 -Mime::ALL = T.let(T.unsafe(nil), Mime::AllType) - -# source://actionpack//lib/action_dispatch/http/mime_type.rb#319 -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 - def initialize; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#326 - def all?; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#327 - def html?; end -end - -# source://actionpack//lib/action_dispatch/http/mime_type.rb#36 -Mime::EXTENSION_LOOKUP = T.let(T.unsafe(nil), Hash) - -# source://actionpack//lib/action_dispatch/http/mime_type.rb#37 -Mime::LOOKUP = T.let(T.unsafe(nil), Hash) - -# source://actionpack//lib/action_dispatch/http/mime_type.rb#6 -class Mime::Mimes - include ::Enumerable - - # @return [Mimes] a new instance of Mimes - # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#11 - def initialize; end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#20 - def <<(type); end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#25 - def delete_if; end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#16 - def each(&block); end - - # Returns the value of attribute symbols. - # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#7 - def symbols; end -end - -# source://actionpack//lib/action_dispatch/http/mime_type.rb#335 -class Mime::NullType - include ::Singleton - extend ::Singleton::SingletonClassMethods - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#338 - def nil?; end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#346 - def ref; end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#342 - def to_s; end - - private - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#353 - def method_missing(method, *args); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#349 - def respond_to_missing?(method, _); end -end - -# source://actionpack//lib/action_dispatch/http/mime_type.rb#35 -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: -# -# class PostsController < ActionController::Base -# def show -# @post = Post.find(params[:id]) -# -# respond_to do |format| -# format.html -# format.ics { render body: @post.to_ics, mime_type: Mime::Type.lookup("text/calendar") } -# format.xml { render xml: @post } -# end -# end -# end -# -# source://actionpack//lib/action_dispatch/http/mime_type.rb#64 -class Mime::Type - # @return [Type] a new instance of Type - # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#234 - def initialize(string, symbol = T.unsafe(nil), synonyms = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#267 - def ==(mime_type); end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#259 - def ===(list); end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#281 - def =~(mime_type); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#297 - def all?; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#274 - def eql?(other); end - - # Returns the value of attribute hash. - # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#225 - def hash; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#293 - def html?; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#287 - def match?(mime_type); end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#255 - def ref; end - - # Returns the value of attribute symbol. - # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#65 - def symbol; end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#243 - def to_s; end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#247 - def to_str; end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#251 - def to_sym; end - - protected - - # Returns the value of attribute string. - # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#300 - def string; end - - # Returns the value of attribute synonyms. - # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#300 - def synonyms; end - - private - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#306 - def method_missing(method, *args); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#314 - def respond_to_missing?(method, include_private = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#304 - def to_a; end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#303 - def to_ary; end - - class << self - # source://actionpack//lib/action_dispatch/http/mime_type.rb#144 - def lookup(string); end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#148 - def lookup_by_extension(extension); end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#172 - 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]. - # - # For an input of 'application', returns [Mime[:html], Mime[:js], - # Mime[:xml], Mime[:yaml], Mime[:atom], Mime[:json], Mime[:rss], Mime[:url_encoded_form]. - # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#206 - def parse_data_with_trailing_star(type); end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#197 - def parse_trailing_star(accept_header); end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#158 - 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 - def register_alias(string, symbol, extension_synonyms = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#140 - def register_callback(&block); end - - # This method is opposite of register method. - # - # To unregister a MIME type: - # - # Mime::Type.unregister(:mobile) - # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#215 - 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 -class Mime::Type::AcceptItem - # @return [AcceptItem] a new instance of AcceptItem - # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#74 - def initialize(index, name, q = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#81 - def <=>(item); end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#71 - def index; end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#71 - def index=(_arg0); end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#71 - def name; end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#71 - def name=(_arg0); end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#71 - def q; end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#71 - def q=(_arg0); end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#71 - def to_s; end -end - -# source://actionpack//lib/action_dispatch/http/mime_type.rb#88 -class Mime::Type::AcceptList - class << self - # source://actionpack//lib/action_dispatch/http/mime_type.rb#131 - def find_item_by_name(array, name); end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#89 - def sort!(list); end - end -end - -# source://actionpack//lib/action_dispatch/http/mime_type.rb#232 -class Mime::Type::InvalidMimeType < ::StandardError; end - -# source://actionpack//lib/action_dispatch/http/mime_type.rb#227 -Mime::Type::MIME_NAME = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/http/mime_type.rb#229 -Mime::Type::MIME_PARAMETER = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/http/mime_type.rb#228 -Mime::Type::MIME_PARAMETER_VALUE = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/http/mime_type.rb#230 -Mime::Type::MIME_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://actionpack//lib/action_dispatch.rb#33 -module Rack - class << self - # source://rack/2.2.6.2/lib/rack/version.rb#26 - def release; end - - # source://rack/2.2.6.2/lib/rack/version.rb#19 - def version; end - end -end diff --git a/sorbet/rbi/gems/actiontext@7.0.4.2.rbi b/sorbet/rbi/gems/actiontext@7.0.4.2.rbi deleted file mode 100644 index fac4a7d..0000000 --- a/sorbet/rbi/gems/actiontext@7.0.4.2.rbi +++ /dev/null @@ -1,1606 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# 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 -module ActionText - extend ::ActiveSupport::Autoload - - class << self - # source://railties/7.0.4.2/lib/rails/engine.rb#405 - def railtie_helpers_paths; end - - # source://railties/7.0.4.2/lib/rails/engine.rb#394 - def railtie_namespace; end - - # source://railties/7.0.4.2/lib/rails/engine.rb#409 - def railtie_routes_url_helpers(include_path_helpers = T.unsafe(nil)); end - - # source://railties/7.0.4.2/lib/rails/engine.rb#397 - def table_name_prefix; end - - # source://railties/7.0.4.2/lib/rails/engine.rb#401 - def use_relative_model_naming?; end - end -end - -# source://actiontext//lib/action_text/attachable.rb#4 -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 - def attachable_content_type; end - - # source://actiontext//lib/action_text/attachable.rb#50 - def attachable_filename; end - - # source://actiontext//lib/action_text/attachable.rb#54 - def attachable_filesize; end - - # source://actiontext//lib/action_text/attachable.rb#58 - def attachable_metadata; end - - # source://actiontext//lib/action_text/attachable.rb#42 - def attachable_sgid; end - - # @return [Boolean] - # - # source://actiontext//lib/action_text/attachable.rb#62 - def previewable_attachable?; end - - # source://actiontext//lib/action_text/attachable.rb#74 - def to_attachable_partial_path; end - - # source://actiontext//lib/action_text/attachable.rb#78 - def to_rich_text_attributes(attributes = T.unsafe(nil)); end - - # source://actiontext//lib/action_text/attachable.rb#70 - def to_trix_content_attachment_partial_path; end - - class << self - # source://actiontext//lib/action_text/attachable.rb#22 - def from_attachable_sgid(sgid, options = T.unsafe(nil)); end - - # source://actiontext//lib/action_text/attachable.rb#10 - def from_node(node); end - - private - - # source://actiontext//lib/action_text/attachable.rb#29 - 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 - def from_attachable_sgid(sgid); end -end - -# source://actiontext//lib/action_text/attachable.rb#7 -ActionText::Attachable::LOCATOR_NAME = T.let(T.unsafe(nil), String) - -# source://actiontext//lib/action_text.rb#25 -module ActionText::Attachables - extend ::ActiveSupport::Autoload -end - -# source://actiontext//lib/action_text/attachables/content_attachment.rb#5 -class ActionText::Attachables::ContentAttachment - include ::ActiveModel::Validations - include ::ActiveSupport::Callbacks - include ::ActiveModel::Validations::HelperMethods - include ::ActiveModel::Conversion - include ::ActiveModel::ForbiddenAttributesProtection - include ::ActiveModel::AttributeAssignment - include ::ActiveModel::API - include ::ActiveModel::Model - extend ::ActiveModel::Validations::ClassMethods - extend ::ActiveModel::Naming - extend ::ActiveModel::Callbacks - extend ::ActiveSupport::Callbacks::ClassMethods - extend ::ActiveSupport::DescendantsTracker - extend ::ActiveModel::Translation - extend ::ActiveModel::Validations::HelperMethods - extend ::ActiveModel::Conversion::ClassMethods - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#928 - def _run_validate_callbacks(&block); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#940 - def _validate_callbacks; end - - # source://activemodel/7.0.4.2/lib/active_model/validations.rb#52 - def _validators; end - - # source://activemodel/7.0.4.2/lib/active_model/validations.rb#52 - def _validators?; end - - # source://actiontext//lib/action_text/attachables/content_attachment.rb#20 - def attachable_plain_text_representation(caption); end - - # source://activemodel/7.0.4.2/lib/active_model/naming.rb#244 - def model_name(*_arg0, **_arg1, &_arg2); end - - # Returns the value of attribute name. - # - # source://actiontext//lib/action_text/attachables/content_attachment.rb#17 - def name; end - - # Sets the attribute name - # - # @param value the value to set the attribute name to. - # - # source://actiontext//lib/action_text/attachables/content_attachment.rb#17 - def name=(_arg0); end - - # source://actiontext//lib/action_text/attachables/content_attachment.rb#29 - def to_partial_path; end - - # source://actiontext//lib/action_text/attachables/content_attachment.rb#33 - def to_trix_content_attachment_partial_path; end - - # source://activemodel/7.0.4.2/lib/active_model/validations.rb#48 - def validation_context; end - - private - - # source://activemodel/7.0.4.2/lib/active_model/validations.rb#48 - def validation_context=(_arg0); end - - class << self - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#932 - def _validate_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#936 - def _validate_callbacks=(value); end - - # source://activemodel/7.0.4.2/lib/active_model/validations.rb#52 - def _validators; end - - # source://activemodel/7.0.4.2/lib/active_model/validations.rb#52 - def _validators=(value); end - - # source://activemodel/7.0.4.2/lib/active_model/validations.rb#52 - def _validators?; end - - # source://actiontext//lib/action_text/attachables/content_attachment.rb#8 - def from_node(node); end - end -end - -# source://actiontext//lib/action_text/attachables/missing_attachable.rb#5 -module ActionText::Attachables::MissingAttachable - extend ::ActiveModel::Naming - - # source://activemodel/7.0.4.2/lib/active_model/naming.rb#244 - def model_name(*_arg0, **_arg1, &_arg2); end - - class << self - # source://actiontext//lib/action_text/attachables/missing_attachable.rb#8 - def to_partial_path; end - end -end - -# source://actiontext//lib/action_text/attachables/remote_image.rb#5 -class ActionText::Attachables::RemoteImage - extend ::ActiveModel::Naming - - # @return [RemoteImage] a new instance of RemoteImage - # - # source://actiontext//lib/action_text/attachables/remote_image.rb#30 - def initialize(attributes = T.unsafe(nil)); end - - # source://actiontext//lib/action_text/attachables/remote_image.rb#37 - def attachable_plain_text_representation(caption); end - - # Returns the value of attribute content_type. - # - # source://actiontext//lib/action_text/attachables/remote_image.rb#28 - def content_type; end - - # Returns the value of attribute height. - # - # source://actiontext//lib/action_text/attachables/remote_image.rb#28 - def height; end - - # source://activemodel/7.0.4.2/lib/active_model/naming.rb#244 - def model_name(*_arg0, **_arg1, &_arg2); end - - # source://actiontext//lib/action_text/attachables/remote_image.rb#41 - def to_partial_path; end - - # Returns the value of attribute url. - # - # source://actiontext//lib/action_text/attachables/remote_image.rb#28 - def url; end - - # Returns the value of attribute width. - # - # source://actiontext//lib/action_text/attachables/remote_image.rb#28 - def width; end - - class << self - # source://actiontext//lib/action_text/attachables/remote_image.rb#9 - def from_node(node); end - - private - - # source://actiontext//lib/action_text/attachables/remote_image.rb#20 - def attributes_from_node(node); end - - # @return [Boolean] - # - # source://actiontext//lib/action_text/attachables/remote_image.rb#16 - def content_type_is_image?(content_type); end - end -end - -# source://actiontext//lib/action_text/attachment.rb#6 -class ActionText::Attachment - include ::ActionText::Attachments::Caching - include ::ActionText::Attachments::Minification - include ::ActionText::Attachments::TrixConversion - extend ::ActionText::Attachments::Minification::ClassMethods - extend ::ActionText::Attachments::TrixConversion::ClassMethods - - # @return [Attachment] a new instance of Attachment - # - # source://actiontext//lib/action_text/attachment.rb#55 - def initialize(node, attachable); end - - # Returns the value of attribute attachable. - # - # source://actiontext//lib/action_text/attachment.rb#50 - def attachable; end - - # source://actiontext//lib/action_text/attachment.rb#60 - def caption; end - - # source://actiontext//lib/action_text/attachment.rb#64 - def full_attributes; end - - # source://actiontext//lib/action_text/attachment.rb#88 - def inspect; end - - # source://activesupport/7.0.4.2/lib/active_support/core_ext/module/delegation.rb#302 - def method_missing(method, *args, **_arg2, &block); end - - # Returns the value of attribute node. - # - # source://actiontext//lib/action_text/attachment.rb#50 - def node; end - - # source://actiontext//lib/action_text/attachment.rb#9 - def tag_name; end - - # source://actiontext//lib/action_text/attachment.rb#9 - def tag_name=(val); end - - # source://actiontext//lib/action_text/attachment.rb#80 - def to_html; end - - # source://actiontext//lib/action_text/attachment.rb#52 - def to_param(*_arg0, **_arg1, &_arg2); end - - # source://actiontext//lib/action_text/attachment.rb#72 - def to_plain_text; end - - # source://actiontext//lib/action_text/attachment.rb#84 - def to_s; end - - # source://actiontext//lib/action_text/attachment.rb#68 - def with_full_attributes; end - - private - - # source://actiontext//lib/action_text/attachment.rb#97 - def attachable_attributes; end - - # source://actiontext//lib/action_text/attachment.rb#93 - def node_attributes; end - - # source://activesupport/7.0.4.2/lib/active_support/core_ext/module/delegation.rb#294 - def respond_to_missing?(name, include_private = T.unsafe(nil)); end - - # source://actiontext//lib/action_text/attachment.rb#101 - def sgid_attributes; end - - class << self - # source://actiontext//lib/action_text/attachment.rb#14 - def fragment_by_canonicalizing_attachments(content); end - - # source://actiontext//lib/action_text/attachment.rb#26 - def from_attachable(attachable, attributes = T.unsafe(nil)); end - - # source://actiontext//lib/action_text/attachment.rb#22 - def from_attachables(attachables); end - - # source://actiontext//lib/action_text/attachment.rb#32 - def from_attributes(attributes, attachable = T.unsafe(nil)); end - - # source://actiontext//lib/action_text/attachment.rb#18 - def from_node(node, attachable = T.unsafe(nil)); end - - # source://actiontext//lib/action_text/attachment.rb#9 - def tag_name; end - - # source://actiontext//lib/action_text/attachment.rb#9 - def tag_name=(val); end - - private - - # source://actiontext//lib/action_text/attachment.rb#39 - def node_from_attributes(attributes); end - - # source://actiontext//lib/action_text/attachment.rb#45 - def process_attributes(attributes); end - end -end - -# source://actiontext//lib/action_text/attachment.rb#11 -ActionText::Attachment::ATTRIBUTES = T.let(T.unsafe(nil), Array) - -# source://actiontext//lib/action_text/attachment_gallery.rb#4 -class ActionText::AttachmentGallery - include ::ActiveModel::Validations - include ::ActiveSupport::Callbacks - include ::ActiveModel::Validations::HelperMethods - include ::ActiveModel::Conversion - include ::ActiveModel::ForbiddenAttributesProtection - include ::ActiveModel::AttributeAssignment - include ::ActiveModel::API - include ::ActiveModel::Model - extend ::ActiveModel::Validations::ClassMethods - extend ::ActiveModel::Naming - extend ::ActiveModel::Callbacks - extend ::ActiveSupport::Callbacks::ClassMethods - extend ::ActiveSupport::DescendantsTracker - extend ::ActiveModel::Translation - extend ::ActiveModel::Validations::HelperMethods - extend ::ActiveModel::Conversion::ClassMethods - - # @return [AttachmentGallery] a new instance of AttachmentGallery - # - # source://actiontext//lib/action_text/attachment_gallery.rb#52 - def initialize(node); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#928 - def _run_validate_callbacks(&block); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#940 - def _validate_callbacks; end - - # source://activemodel/7.0.4.2/lib/active_model/validations.rb#52 - def _validators; end - - # source://activemodel/7.0.4.2/lib/active_model/validations.rb#52 - def _validators?; end - - # source://actiontext//lib/action_text/attachment_gallery.rb#56 - def attachments; end - - # source://actiontext//lib/action_text/attachment_gallery.rb#66 - def inspect; end - - # source://activemodel/7.0.4.2/lib/active_model/naming.rb#244 - def model_name(*_arg0, **_arg1, &_arg2); end - - # Returns the value of attribute node. - # - # source://actiontext//lib/action_text/attachment_gallery.rb#50 - def node; end - - # source://actiontext//lib/action_text/attachment_gallery.rb#62 - def size; end - - # source://activemodel/7.0.4.2/lib/active_model/validations.rb#48 - def validation_context; end - - private - - # source://activemodel/7.0.4.2/lib/active_model/validations.rb#48 - def validation_context=(_arg0); end - - class << self - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#932 - def _validate_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#936 - def _validate_callbacks=(value); end - - # source://activemodel/7.0.4.2/lib/active_model/validations.rb#52 - def _validators; end - - # source://activemodel/7.0.4.2/lib/active_model/validations.rb#52 - def _validators=(value); end - - # source://activemodel/7.0.4.2/lib/active_model/validations.rb#52 - def _validators?; end - - # source://actiontext//lib/action_text/attachment_gallery.rb#41 - def attachment_selector; end - - # source://actiontext//lib/action_text/attachment_gallery.rb#25 - def find_attachment_gallery_nodes(content); end - - # source://actiontext//lib/action_text/attachment_gallery.rb#11 - def fragment_by_canonicalizing_attachment_galleries(content); end - - # source://actiontext//lib/action_text/attachment_gallery.rb#17 - def fragment_by_replacing_attachment_gallery_nodes(content); end - - # source://actiontext//lib/action_text/attachment_gallery.rb#37 - def from_node(node); end - - # source://actiontext//lib/action_text/attachment_gallery.rb#45 - def selector; end - end -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 -module ActionText::Attachments - extend ::ActiveSupport::Autoload -end - -# source://actiontext//lib/action_text/attachments/caching.rb#5 -module ActionText::Attachments::Caching - # source://actiontext//lib/action_text/attachments/caching.rb#6 - def cache_key(*args); end - - private - - # source://actiontext//lib/action_text/attachments/caching.rb#11 - def cache_digest; end -end - -# source://actiontext//lib/action_text/attachments/minification.rb#5 -module ActionText::Attachments::Minification - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActionText::Attachments::Minification::ClassMethods -end - -# source://actiontext//lib/action_text/attachments/minification.rb#0 -module ActionText::Attachments::Minification::ClassMethods - # source://actiontext//lib/action_text/attachments/minification.rb#9 - def fragment_by_minifying_attachments(content); end -end - -# source://actiontext//lib/action_text/attachments/trix_conversion.rb#7 -module ActionText::Attachments::TrixConversion - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActionText::Attachments::TrixConversion::ClassMethods - - # source://actiontext//lib/action_text/attachments/trix_conversion.rb#22 - def to_trix_attachment(content = T.unsafe(nil)); end - - private - - # source://actiontext//lib/action_text/attachments/trix_conversion.rb#29 - def trix_attachment_content; end -end - -# source://actiontext//lib/action_text/attachments/trix_conversion.rb#0 -module ActionText::Attachments::TrixConversion::ClassMethods - # source://actiontext//lib/action_text/attachments/trix_conversion.rb#11 - def fragment_by_converting_trix_attachments(content); end - - # source://actiontext//lib/action_text/attachments/trix_conversion.rb#17 - def from_trix_attachment(trix_attachment); end -end - -# source://actiontext//lib/action_text/attribute.rb#4 -module ActionText::Attribute - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActionText::Attribute::ClassMethods -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#61 - def rich_text_association_names; end - - # source://actiontext//lib/action_text/attribute.rb#57 - def with_all_rich_text; end -end - -# source://actiontext//lib/action_text/content.rb#4 -class ActionText::Content - include ::ActionText::Serialization - include ::ActionText::Rendering - extend ::ActionText::Serialization::ClassMethods - extend ::ActionText::Rendering::ClassMethods - - # @return [Content] a new instance of Content - # - # source://actiontext//lib/action_text/content.rb#19 - def initialize(content = T.unsafe(nil), options = T.unsafe(nil)); end - - # source://actiontext//lib/action_text/content.rb#106 - def ==(other); end - - # source://actiontext//lib/action_text/content.rb#55 - def append_attachables(attachables); end - - # source://actiontext//lib/action_text/content.rb#98 - def as_json(*_arg0); end - - # source://actiontext//lib/action_text/content.rb#49 - def attachables; end - - # source://actiontext//lib/action_text/content.rb#39 - def attachment_galleries; end - - # source://actiontext//lib/action_text/content.rb#33 - def attachments; end - - # source://actiontext//lib/action_text/content.rb#9 - def blank?(*_arg0, **_arg1, &_arg2); end - - # source://actiontext//lib/action_text/content.rb#9 - def empty?(*_arg0, **_arg1, &_arg2); end - - # Returns the value of attribute fragment. - # - # source://actiontext//lib/action_text/content.rb#7 - def fragment; end - - # source://actiontext//lib/action_text/content.rb#45 - def gallery_attachments; end - - # source://actiontext//lib/action_text/content.rb#9 - def html_safe(*_arg0, **_arg1, &_arg2); end - - # source://actiontext//lib/action_text/content.rb#102 - def inspect; end - - # source://actiontext//lib/action_text/content.rb#29 - def links; end - - # source://actiontext//lib/action_text/content.rb#9 - def present?(*_arg0, **_arg1, &_arg2); end - - # source://actiontext//lib/action_text/rendering.rb#13 - def render(*_arg0, **_arg1, &_arg2); end - - # source://actiontext//lib/action_text/content.rb#67 - def render_attachment_galleries(&block); end - - # source://actiontext//lib/action_text/content.rb#60 - def render_attachments(**options, &block); end - - # source://actiontext//lib/action_text/content.rb#82 - def to_html; end - - # source://actiontext//lib/action_text/content.rb#90 - def to_partial_path; end - - # source://actiontext//lib/action_text/content.rb#74 - def to_plain_text; end - - # source://actiontext//lib/action_text/content.rb#86 - def to_rendered_html_with_layout; end - - # source://actiontext//lib/action_text/content.rb#94 - def to_s; end - - # source://actiontext//lib/action_text/content.rb#78 - def to_trix_html; end - - private - - # source://actiontext//lib/action_text/content.rb#121 - def attachment_for_node(node, with_full_attributes: T.unsafe(nil)); end - - # source://actiontext//lib/action_text/content.rb#126 - def attachment_gallery_for_node(node); end - - # source://actiontext//lib/action_text/content.rb#117 - def attachment_gallery_nodes; end - - # source://actiontext//lib/action_text/content.rb#113 - 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 - def fragment_by_canonicalizing_content(content); end - - # source://activesupport/7.0.4.2/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#48 - def renderer; end - - # source://activesupport/7.0.4.2/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#92 - def renderer=(obj); end - end -end - -module ActionText::ContentHelper - def allowed_attributes; end - def allowed_attributes=(val); end - def allowed_tags; end - def allowed_tags=(val); end - def render_action_text_attachment(attachment, locals: T.unsafe(nil)); end - def render_action_text_attachments(content); end - def render_action_text_content(content); end - def sanitize_action_text_content(content); end - def sanitizer; end - def sanitizer=(val); end - def scrubber; end - def scrubber=(val); end - - class << self - def allowed_attributes; end - def allowed_attributes=(val); end - def allowed_tags; end - def allowed_tags=(val); end - def sanitizer; end - def sanitizer=(val); end - def scrubber; end - def scrubber=(val); end - end -end - -class ActionText::EncryptedRichText < ::ActionText::RichText - include ::ActionText::EncryptedRichText::GeneratedAttributeMethods - include ::ActionText::EncryptedRichText::GeneratedAssociationMethods - - class << self - # source://activemodel/7.0.4.2/lib/active_model/validations.rb#52 - def _validators; end - - # source://activerecord/7.0.4.2/lib/active_record/attributes.rb#11 - def attributes_to_define_after_schema_loads; end - - # source://activerecord/7.0.4.2/lib/active_record/enum.rb#116 - def defined_enums; end - - # source://activerecord/7.0.4.2/lib/active_record/encryption/encryptable_record.rb#11 - def encrypted_attributes; end - end -end - -module ActionText::EncryptedRichText::GeneratedAssociationMethods; end -module ActionText::EncryptedRichText::GeneratedAttributeMethods; end - -# source://actiontext//lib/action_text/encryption.rb#4 -module ActionText::Encryption - # source://actiontext//lib/action_text/encryption.rb#12 - def decrypt; end - - # source://actiontext//lib/action_text/encryption.rb#5 - def encrypt; end - - private - - # source://actiontext//lib/action_text/encryption.rb#24 - def decrypt_rich_texts; end - - # source://actiontext//lib/action_text/encryption.rb#20 - def encrypt_rich_texts; end - - # source://actiontext//lib/action_text/encryption.rb#32 - def encryptable_rich_texts; end - - # @return [Boolean] - # - # source://actiontext//lib/action_text/encryption.rb#28 - def has_encrypted_rich_texts?; end -end - -# source://actiontext//lib/action_text/engine.rb#11 -class ActionText::Engine < ::Rails::Engine - class << self - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; 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}[rdoc-ref:ActiveRecord::FixtureSet] documentation. -# -# === YAML -# -# Like other Active Record-backed models, ActionText::RichText records inherit -# from ActiveRecord::Base instances and can therefore be populated by -# fixtures. -# -# Consider an Article class: -# -# class Article < ApplicationRecord -# has_rich_text :content -# end -# -# To declare fixture data for the related content, first declare fixture -# data for Article instances in test/fixtures/articles.yml: -# -# first: -# title: An Article -# -# Then declare the ActionText::RichText fixture data in -# test/fixtures/action_text/rich_texts.yml, making sure to declare -# each entry's record: key as a polymorphic relationship: -# -# first: -# record: first (Article) -# name: content -# body:
Hello, world.
-# -# 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#39 -class ActionText::FixtureSet - class << self - # Fixtures support Action Text attachments as part of their body - # HTML. - # - # === Examples - # - # For example, consider a second Article fixture declared in - # test/fixtures/articles.yml: - # - # second: - # title: Another Article - # - # You can attach a mention of articles(:first) to second's - # content by embedding a call to ActionText::FixtureSet.attachment - # in the body: value in test/fixtures/action_text/rich_texts.yml: - # - # second: - # record: second (Article) - # name: content - # body:
Hello, <%= ActionText::FixtureSet.attachment("articles", :first) %>
- # - # source://actiontext//lib/action_text/fixture_set.rb#60 - def attachment(fixture_set_name, label, column_type: T.unsafe(nil)); end - end -end - -# source://actiontext//lib/action_text/fragment.rb#4 -class ActionText::Fragment - # @return [Fragment] a new instance of Fragment - # - # source://actiontext//lib/action_text/fragment.rb#24 - def initialize(source); end - - # source://actiontext//lib/action_text/fragment.rb#28 - def find_all(selector); end - - # source://actiontext//lib/action_text/fragment.rb#37 - def replace(selector); end - - # Returns the value of attribute source. - # - # source://actiontext//lib/action_text/fragment.rb#22 - def source; end - - # source://actiontext//lib/action_text/fragment.rb#49 - def to_html; end - - # source://actiontext//lib/action_text/fragment.rb#45 - def to_plain_text; end - - # source://actiontext//lib/action_text/fragment.rb#53 - def to_s; end - - # @yield [source = self.source.clone] - # - # source://actiontext//lib/action_text/fragment.rb#32 - def update; end - - class << self - # source://actiontext//lib/action_text/fragment.rb#17 - def from_html(html); end - - # source://actiontext//lib/action_text/fragment.rb#6 - def wrap(fragment_or_html); end - end -end - -# source://actiontext//lib/action_text/html_conversion.rb#4 -module ActionText::HtmlConversion - extend ::ActionText::HtmlConversion - - # source://actiontext//lib/action_text/html_conversion.rb#15 - def create_element(tag_name, attributes = T.unsafe(nil)); end - - # source://actiontext//lib/action_text/html_conversion.rb#11 - def fragment_for_html(html); end - - # source://actiontext//lib/action_text/html_conversion.rb#7 - def node_to_html(node); end - - private - - # source://actiontext//lib/action_text/html_conversion.rb#20 - def document; end -end - -# source://actiontext//lib/action_text/plain_text_conversion.rb#4 -module ActionText::PlainTextConversion - extend ::ActionText::PlainTextConversion - - # source://actiontext//lib/action_text/plain_text_conversion.rb#7 - def node_to_plain_text(node); end - - private - - # source://actiontext//lib/action_text/plain_text_conversion.rb#104 - def break_if_nested_list(node, text); end - - # source://actiontext//lib/action_text/plain_text_conversion.rb#81 - def bullet_for_li_node(node, index); end - - # source://actiontext//lib/action_text/plain_text_conversion.rb#93 - def indentation_for_li_node(node); end - - # source://actiontext//lib/action_text/plain_text_conversion.rb#100 - def list_node_depth_for_node(node); end - - # source://actiontext//lib/action_text/plain_text_conversion.rb#89 - def list_node_name_for_li_node(node); end - - # source://actiontext//lib/action_text/plain_text_conversion.rb#32 - def plain_text_for_block(node, index = T.unsafe(nil)); end - - # source://actiontext//lib/action_text/plain_text_conversion.rb#64 - def plain_text_for_blockquote_node(node, index); end - - # source://actiontext//lib/action_text/plain_text_conversion.rb#48 - def plain_text_for_br_node(node, index); end - - # source://actiontext//lib/action_text/plain_text_conversion.rb#56 - def plain_text_for_div_node(node, index); end - - # source://actiontext//lib/action_text/plain_text_conversion.rb#60 - def plain_text_for_figcaption_node(node, index); end - - # source://actiontext//lib/action_text/plain_text_conversion.rb#32 - def plain_text_for_h1_node(node, index = T.unsafe(nil)); end - - # source://actiontext//lib/action_text/plain_text_conversion.rb#69 - def plain_text_for_li_node(node, index); end - - # source://actiontext//lib/action_text/plain_text_conversion.rb#40 - def plain_text_for_list(node, index); end - - # source://actiontext//lib/action_text/plain_text_conversion.rb#12 - def plain_text_for_node(node, index = T.unsafe(nil)); end - - # source://actiontext//lib/action_text/plain_text_conversion.rb#20 - def plain_text_for_node_children(node); end - - # source://actiontext//lib/action_text/plain_text_conversion.rb#40 - def plain_text_for_ol_node(node, index); end - - # source://actiontext//lib/action_text/plain_text_conversion.rb#32 - def plain_text_for_p_node(node, index = T.unsafe(nil)); end - - # source://actiontext//lib/action_text/plain_text_conversion.rb#52 - def plain_text_for_text_node(node, index); end - - # source://actiontext//lib/action_text/plain_text_conversion.rb#40 - def plain_text_for_ul_node(node, index); end - - # source://actiontext//lib/action_text/plain_text_conversion.rb#28 - def plain_text_method_for_node(node); end - - # source://actiontext//lib/action_text/plain_text_conversion.rb#77 - def remove_trailing_newlines(text); end -end - -class ActionText::Record < ::ActiveRecord::Base - include ::ActionText::Record::GeneratedAttributeMethods - include ::ActionText::Record::GeneratedAssociationMethods - - class << self - # source://activemodel/7.0.4.2/lib/active_model/validations.rb#52 - def _validators; end - - # source://activerecord/7.0.4.2/lib/active_record/enum.rb#116 - def defined_enums; end - end -end - -module ActionText::Record::GeneratedAssociationMethods; end -module ActionText::Record::GeneratedAttributeMethods; end - -# source://actiontext//lib/action_text/rendering.rb#7 -module ActionText::Rendering - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActionText::Rendering::ClassMethods -end - -# source://actiontext//lib/action_text/rendering.rb#0 -module ActionText::Rendering::ClassMethods - # source://actiontext//lib/action_text/rendering.rb#25 - def render(*args, &block); end - - # source://actiontext//lib/action_text/rendering.rb#17 - def with_renderer(renderer); end -end - -class ActionText::RichText < ::ActionText::Record - include ::ActionText::RichText::GeneratedAttributeMethods - include ::ActionText::RichText::GeneratedAssociationMethods - - # source://activerecord/7.0.4.2/lib/active_record/autosave_association.rb#160 - def autosave_associated_records_for_embeds_attachments(*args); end - - # source://activerecord/7.0.4.2/lib/active_record/autosave_association.rb#160 - def autosave_associated_records_for_embeds_blobs(*args); end - - # source://activerecord/7.0.4.2/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.0.4.2/lib/active_record/autosave_association.rb#160 - def validate_associated_records_for_embeds_attachments(*args); end - - # source://activerecord/7.0.4.2/lib/active_record/autosave_association.rb#160 - def validate_associated_records_for_embeds_blobs(*args); end - - class << self - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activerecord/7.0.4.2/lib/active_record/reflection.rb#11 - def _reflections; end - - # source://activemodel/7.0.4.2/lib/active_model/validations.rb#52 - def _validators; end - - # source://activestorage/7.0.4.2/lib/active_storage/reflection.rb#53 - def attachment_reflections; end - - # source://activerecord/7.0.4.2/lib/active_record/attributes.rb#11 - def attributes_to_define_after_schema_loads; end - - # source://activerecord/7.0.4.2/lib/active_record/enum.rb#116 - def defined_enums; end - - # source://activerecord/7.0.4.2/lib/active_record/scoping/named.rb#174 - def with_attached_embeds(*args, **_arg1); end - end -end - -module ActionText::RichText::EmbedsAttachmentsAssociationExtension - # source://activestorage/7.0.4.2/lib/active_storage/attached/model.rb#165 - def purge; end - - # source://activestorage/7.0.4.2/lib/active_storage/attached/model.rb#171 - def purge_later; end - - private - - # source://activestorage/7.0.4.2/lib/active_storage/attached/model.rb#178 - def deprecate(action); end -end - -module ActionText::RichText::GeneratedAssociationMethods - # source://activestorage/7.0.4.2/lib/active_storage/attached/model.rb#134 - def embeds; end - - # source://activestorage/7.0.4.2/lib/active_storage/attached/model.rb#139 - def embeds=(attachables); end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/collection_association.rb#62 - def embeds_attachment_ids; end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/collection_association.rb#72 - def embeds_attachment_ids=(ids); end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/association.rb#103 - def embeds_attachments; end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/association.rb#111 - def embeds_attachments=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/collection_association.rb#62 - def embeds_blob_ids; end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/collection_association.rb#72 - def embeds_blob_ids=(ids); end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/association.rb#103 - def embeds_blobs; end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/association.rb#111 - def embeds_blobs=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/association.rb#103 - def record; end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/association.rb#111 - def record=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/belongs_to.rb#132 - def record_changed?; end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/belongs_to.rb#136 - def record_previously_changed?; end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/singular_association.rb#19 - def reload_record; end -end - -module ActionText::RichText::GeneratedAttributeMethods; end - -# source://actiontext//lib/action_text/serialization.rb#4 -module ActionText::Serialization - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActionText::Serialization::ClassMethods - - # source://actiontext//lib/action_text/serialization.rb#32 - def _dump(*_arg0); end -end - -# source://actiontext//lib/action_text/serialization.rb#0 -module ActionText::Serialization::ClassMethods - # source://actiontext//lib/action_text/serialization.rb#8 - def _load(content); end - - # source://actiontext//lib/action_text/serialization.rb#12 - def dump(content); end - - # source://actiontext//lib/action_text/serialization.rb#8 - def load(content); end -end - -# source://actiontext//lib/action_text/system_test_helper.rb#4 -module ActionText::SystemTestHelper - # Locates a Trix editor and fills it in with the given HTML. - # - # The editor can be found by: - # * its +id+ - # * its +placeholder+ - # * the text from its +label+ element - # * its +aria-label+ - # * the +name+ of its input - # - # Examples: - # - # # - # fill_in_rich_text_area "message_content", with: "Hello world!" - # - # # - # fill_in_rich_text_area "Your message here", with: "Hello world!" - # - # # - # # - # fill_in_rich_text_area "Message content", with: "Hello world!" - # - # # - # fill_in_rich_text_area "Message content", with: "Hello world!" - # - # # - # # - # fill_in_rich_text_area "message[content]", with: "Hello world!" - # - # source://actiontext//lib/action_text/system_test_helper.rb#32 - def fill_in_rich_text_area(locator = T.unsafe(nil), with:); end -end - -module ActionText::TagHelper - def rich_text_area_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end - - class << self - def id; end - def id=(val); end - end -end - -# source://actiontext//lib/action_text/trix_attachment.rb#4 -class ActionText::TrixAttachment - # @return [TrixAttachment] a new instance of TrixAttachment - # - # source://actiontext//lib/action_text/trix_attachment.rb#51 - def initialize(node); end - - # source://actiontext//lib/action_text/trix_attachment.rb#55 - def attributes; end - - # Returns the value of attribute node. - # - # source://actiontext//lib/action_text/trix_attachment.rb#49 - def node; end - - # source://actiontext//lib/action_text/trix_attachment.rb#59 - def to_html; end - - # source://actiontext//lib/action_text/trix_attachment.rb#63 - def to_s; end - - private - - # source://actiontext//lib/action_text/trix_attachment.rb#68 - def attachment_attributes; end - - # source://actiontext//lib/action_text/trix_attachment.rb#72 - def composed_attributes; end - - # source://actiontext//lib/action_text/trix_attachment.rb#80 - def read_json_attribute(name); end - - # source://actiontext//lib/action_text/trix_attachment.rb#76 - def read_json_object_attribute(name); end - - class << self - # source://actiontext//lib/action_text/trix_attachment.rb#19 - def from_attributes(attributes); end - - private - - # source://actiontext//lib/action_text/trix_attachment.rb#33 - def process_attributes(attributes); end - - # source://actiontext//lib/action_text/trix_attachment.rb#37 - def transform_attribute_keys(attributes); end - - # source://actiontext//lib/action_text/trix_attachment.rb#41 - def typecast_attribute_values(attributes); end - end -end - -# source://actiontext//lib/action_text/trix_attachment.rb#9 -ActionText::TrixAttachment::ATTRIBUTES = T.let(T.unsafe(nil), Array) - -# source://actiontext//lib/action_text/trix_attachment.rb#10 -ActionText::TrixAttachment::ATTRIBUTE_TYPES = T.let(T.unsafe(nil), Hash) - -# source://actiontext//lib/action_text/trix_attachment.rb#8 -ActionText::TrixAttachment::COMPOSED_ATTRIBUTES = T.let(T.unsafe(nil), Array) - -# source://actiontext//lib/action_text/trix_attachment.rb#6 -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) - -module ActionView::Helpers - include ::ActionView::Helpers::SanitizeHelper - include ::ActionView::Helpers::TextHelper - include ::ActionView::Helpers::UrlHelper - include ::ActionView::Helpers::SanitizeHelper - include ::ActionView::Helpers::TextHelper - include ::ActionView::Helpers::FormTagHelper - include ::ActionView::Helpers::FormHelper - include ::ActionView::Helpers::TranslationHelper - - mixes_in_class_methods ::ActionView::Helpers::UrlHelper::ClassMethods - mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods - - class << self - # source://actionview/7.0.4.2/lib/action_view/helpers.rb#34 - def eager_load!; end - end -end - -class ActionView::Helpers::FormBuilder - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1700 - def initialize(object_name, object, template, options); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#2614 - def button(value = T.unsafe(nil), options = T.unsafe(nil), &block); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#2438 - def check_box(method, options = T.unsafe(nil), checked_value = T.unsafe(nil), unchecked_value = T.unsafe(nil)); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_options_helper.rb#905 - 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.4.2/lib/action_view/helpers/form_options_helper.rb#917 - 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.4.2/lib/action_view/helpers/form_options_helper.rb#857 - def collection_select(method, collection, value_method, text_method, options = T.unsafe(nil), html_options = T.unsafe(nil)); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#2006 - def color_field(method, options = T.unsafe(nil)); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#2006 - def date_field(method, options = T.unsafe(nil)); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/date_helper.rb#1229 - def date_select(method, options = T.unsafe(nil), html_options = T.unsafe(nil)); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#2006 - def datetime_field(method, options = T.unsafe(nil)); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#2006 - def datetime_local_field(method, options = T.unsafe(nil)); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/date_helper.rb#1253 - def datetime_select(method, options = T.unsafe(nil), html_options = T.unsafe(nil)); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#2006 - def email_field(method, options = T.unsafe(nil)); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#2635 - def emitted_hidden_id?; end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1665 - def field_helpers; end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1665 - def field_helpers=(_arg0); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1665 - def field_helpers?; end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1757 - def field_id(method, *suffixes, namespace: T.unsafe(nil), index: T.unsafe(nil)); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1777 - def field_name(method, *methods, multiple: T.unsafe(nil), index: T.unsafe(nil)); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#2294 - def fields(scope = T.unsafe(nil), model: T.unsafe(nil), **options, &block); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#2257 - def fields_for(record_name, record_object = T.unsafe(nil), fields_options = T.unsafe(nil), &block); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#2521 - def file_field(method, options = T.unsafe(nil)); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_options_helper.rb#869 - 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.4.2/lib/action_view/helpers/form_helper.rb#2482 - def hidden_field(method, options = T.unsafe(nil)); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1737 - def id; end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1677 - def index; end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#2369 - def label(method, text = T.unsafe(nil), options = T.unsafe(nil), &block); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#2006 - def month_field(method, options = T.unsafe(nil)); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1677 - def multipart; end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1680 - def multipart=(multipart); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1677 - def multipart?; end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#2006 - def number_field(method, options = T.unsafe(nil)); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1675 - def object; end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1675 - def object=(_arg0); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1675 - def object_name; end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1675 - def object_name=(_arg0); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1675 - def options; end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1675 - def options=(_arg0); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#2006 - def password_field(method, options = T.unsafe(nil)); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#2006 - def phone_field(method, options = T.unsafe(nil)); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#2460 - def radio_button(method, tag_value, options = T.unsafe(nil)); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#2006 - def range_field(method, options = T.unsafe(nil)); end - - def rich_text_area(method, options = T.unsafe(nil)); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#2006 - def search_field(method, options = T.unsafe(nil)); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_options_helper.rb#845 - def select(method, choices = T.unsafe(nil), options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#2553 - def submit(value = T.unsafe(nil), options = T.unsafe(nil)); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#2006 - def telephone_field(method, options = T.unsafe(nil)); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#2006 - def text_area(method, options = T.unsafe(nil)); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#2006 - def text_field(method, options = T.unsafe(nil)); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#2006 - def time_field(method, options = T.unsafe(nil)); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/date_helper.rb#1241 - def time_select(method, options = T.unsafe(nil), html_options = T.unsafe(nil)); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_options_helper.rb#881 - def time_zone_select(method, priority_zones = T.unsafe(nil), options = T.unsafe(nil), html_options = T.unsafe(nil)); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1696 - def to_model; end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1692 - def to_partial_path; end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#2006 - def url_field(method, options = T.unsafe(nil)); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#2006 - def week_field(method, options = T.unsafe(nil)); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_options_helper.rb#893 - def weekday_select(method, options = T.unsafe(nil), html_options = T.unsafe(nil)); end - - private - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#2720 - def convert_to_legacy_options(options); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#2702 - def fields_for_nested_model(name, object, fields_options, block); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#2673 - def fields_for_with_nested_attributes(association_name, association, options, block); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#2669 - def nested_attributes_association?(association_name); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#2715 - def nested_child_index(name); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#2640 - def objectify_options(options); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#2646 - def submit_default_value; end - - class << self - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1688 - def _to_partial_path; end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1665 - def field_helpers; end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1665 - def field_helpers=(value); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1665 - def field_helpers?; end - end -end - -module ActionView::Helpers::FormHelper - include ::ActionView::Helpers::UrlHelper - include ::ActionView::Helpers::SanitizeHelper - include ::ActionView::Helpers::TextHelper - include ::ActionView::Helpers::FormTagHelper - - mixes_in_class_methods ::ActionView::Helpers::UrlHelper::ClassMethods - mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1573 - def _object_for_form_builder(object); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1336 - 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.4.2/lib/action_view/helpers/form_helper.rb#1366 - def color_field(object_name, method, options = T.unsafe(nil)); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1430 - def date_field(object_name, method, options = T.unsafe(nil)); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1497 - def datetime_field(object_name, method, options = T.unsafe(nil)); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1497 - 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.4.2/lib/action_view/helpers/form_helper.rb#1551 - def email_field(object_name, method, options = T.unsafe(nil)); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1072 - def fields(scope = T.unsafe(nil), model: T.unsafe(nil), **options, &block); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1021 - def fields_for(record_name, record_object = T.unsafe(nil), options = T.unsafe(nil), &block); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1238 - def file_field(object_name, method, options = T.unsafe(nil)); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#433 - def form_for(record, options = T.unsafe(nil), &block); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#754 - 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.4.2/lib/action_view/helpers/form_helper.rb#479 - def form_with_generates_ids; end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#479 - def form_with_generates_ids=(val); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#477 - def form_with_generates_remote_forms; end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#477 - def form_with_generates_remote_forms=(val); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1205 - def hidden_field(object_name, method, options = T.unsafe(nil)); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1142 - def label(object_name, method, content_or_options = T.unsafe(nil), options = T.unsafe(nil), &block); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1516 - def month_field(object_name, method, options = T.unsafe(nil)); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#481 - def multiple_file_field_include_hidden; end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#481 - def multiple_file_field_include_hidden=(val); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1560 - def number_field(object_name, method, options = T.unsafe(nil)); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1187 - def password_field(object_name, method, options = T.unsafe(nil)); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1398 - def phone_field(object_name, method, options = T.unsafe(nil)); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1358 - def radio_button(object_name, method, tag_value, options = T.unsafe(nil)); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1569 - 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.4.2/lib/action_view/helpers/form_helper.rb#1389 - def search_field(object_name, method, options = T.unsafe(nil)); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1398 - def telephone_field(object_name, method, options = T.unsafe(nil)); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1268 - def text_area(object_name, method, options = T.unsafe(nil)); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1166 - def text_field(object_name, method, options = T.unsafe(nil)); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1468 - def time_field(object_name, method, options = T.unsafe(nil)); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1542 - def url_field(object_name, method, options = T.unsafe(nil)); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1533 - def week_field(object_name, method, options = T.unsafe(nil)); end - - private - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#463 - def apply_form_for_options!(object, options); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1607 - def default_form_builder_class; end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#1578 - 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.4.2/lib/action_view/helpers/form_helper.rb#1593 - def instantiate_builder(record_name, record_object, options); end - - class << self - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#479 - def form_with_generates_ids; end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#479 - def form_with_generates_ids=(val); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#477 - def form_with_generates_remote_forms; end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#477 - def form_with_generates_remote_forms=(val); end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#481 - def multiple_file_field_include_hidden; end - - # source://actionview/7.0.4.2/lib/action_view/helpers/form_helper.rb#481 - def multiple_file_field_include_hidden=(val); end - end -end - -module ActionView::Helpers::Tags; end - -class ActionView::Helpers::Tags::ActionText < ::ActionView::Helpers::Tags::Base - include ::ActionView::Helpers::Tags::Placeholderable - - def dom_id(*_arg0, **_arg1, &_arg2); end - def render; end -end diff --git a/sorbet/rbi/gems/actionview@7.0.4.2.rbi b/sorbet/rbi/gems/actionview@7.0.4.2.rbi deleted file mode 100644 index d09d932..0000000 --- a/sorbet/rbi/gems/actionview@7.0.4.2.rbi +++ /dev/null @@ -1,15480 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `actionview` gem. -# Please instead update this file by running `bin/tapioca gem actionview`. - -class ActionController::Base < ::ActionController::Metal - include ::ActionDispatch::Routing::PolymorphicRoutes - include ::ActionController::Head - include ::AbstractController::Caching::ConfigMethods - include ::ActionController::BasicImplicitRender - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://actionpack/7.0.4.2/lib/abstract_controller/helpers.rb#11 - def _helper_methods; end - - # source://actionpack/7.0.4.2/lib/abstract_controller/helpers.rb#11 - def _helper_methods=(_arg0); end - - # source://actionpack/7.0.4.2/lib/abstract_controller/helpers.rb#11 - def _helper_methods?; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#940 - def _process_action_callbacks; end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/renderers.rb#31 - def _renderers; end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/renderers.rb#31 - def _renderers=(_arg0); end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/renderers.rb#31 - def _renderers?; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#928 - def _run_process_action_callbacks(&block); end - - # source://actionpack/7.0.4.2/lib/abstract_controller/caching.rb#42 - def _view_cache_dependencies; end - - # source://actionpack/7.0.4.2/lib/abstract_controller/caching.rb#42 - def _view_cache_dependencies=(_arg0); end - - # source://actionpack/7.0.4.2/lib/abstract_controller/caching.rb#42 - def _view_cache_dependencies?; end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/params_wrapper.rb#185 - def _wrapper_options; end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/params_wrapper.rb#185 - def _wrapper_options=(_arg0); end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/params_wrapper.rb#185 - def _wrapper_options?; end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/flash.rb#36 - def alert; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def allow_forgery_protection; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def allow_forgery_protection=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def asset_host; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def asset_host=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def assets_dir; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def assets_dir=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def default_asset_host_protocol; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def default_asset_host_protocol=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def default_protect_from_forgery; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def default_protect_from_forgery=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def default_static_extension; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def default_static_extension=(value); end - - # source://actionpack/7.0.4.2/lib/action_dispatch/routing/url_for.rb#95 - def default_url_options; end - - # source://actionpack/7.0.4.2/lib/action_dispatch/routing/url_for.rb#95 - def default_url_options=(_arg0); end - - # source://actionpack/7.0.4.2/lib/action_dispatch/routing/url_for.rb#95 - def default_url_options?; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def enable_fragment_cache_logging; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def enable_fragment_cache_logging=(value); end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/etag_with_template_digest.rb#27 - def etag_with_template_digest; end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/etag_with_template_digest.rb#27 - def etag_with_template_digest=(_arg0); end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/etag_with_template_digest.rb#27 - def etag_with_template_digest?; end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/conditional_get.rb#13 - def etaggers; end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/conditional_get.rb#13 - def etaggers=(_arg0); end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/conditional_get.rb#13 - def etaggers?; end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/flash.rb#10 - def flash(*_arg0, **_arg1, &_arg2); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def forgery_protection_origin_check; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def forgery_protection_origin_check=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def forgery_protection_strategy; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def forgery_protection_strategy=(value); end - - # source://actionpack/7.0.4.2/lib/abstract_controller/caching/fragments.rb#23 - def fragment_cache_keys; end - - # source://actionpack/7.0.4.2/lib/abstract_controller/caching/fragments.rb#23 - def fragment_cache_keys=(_arg0); end - - # source://actionpack/7.0.4.2/lib/abstract_controller/caching/fragments.rb#23 - def fragment_cache_keys?; end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/helpers.rb#63 - def helpers_path; end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/helpers.rb#63 - def helpers_path=(_arg0); end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/helpers.rb#63 - def helpers_path?; end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/helpers.rb#64 - def include_all_helpers; end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/helpers.rb#64 - def include_all_helpers=(_arg0); end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/helpers.rb#64 - def include_all_helpers?; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def javascripts_dir; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def javascripts_dir=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def log_warning_on_csrf_failure; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def log_warning_on_csrf_failure=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def logger; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def logger=(value); end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/flash.rb#36 - def notice; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def per_form_csrf_tokens; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def per_form_csrf_tokens=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def perform_caching; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def perform_caching=(value); end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/redirecting.rb#13 - def raise_on_open_redirects; end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/redirecting.rb#13 - def raise_on_open_redirects=(val); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def relative_url_root; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def relative_url_root=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def request_forgery_protection_token; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def request_forgery_protection_token=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers; end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers=(_arg0); end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers?; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def stylesheets_dir; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def stylesheets_dir=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def urlsafe_csrf_tokens; end - - private - - # source://actionview//lib/action_view/layouts.rb#328 - def _layout(lookup_context, formats); end - - def _layout_from_proc; end - - # source://actionpack/7.0.4.2/lib/action_controller/base.rb#266 - def _protected_ivars; end - - class << self - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://actionpack/7.0.4.2/lib/action_controller/form_builder.rb#31 - def _default_form_builder; end - - # source://actionpack/7.0.4.2/lib/action_controller/form_builder.rb#31 - def _default_form_builder=(value); end - - # source://actionpack/7.0.4.2/lib/action_controller/form_builder.rb#31 - def _default_form_builder?; end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/flash.rb#8 - def _flash_types; end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/flash.rb#8 - def _flash_types=(value); end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/flash.rb#8 - def _flash_types?; end - - # source://actionpack/7.0.4.2/lib/abstract_controller/helpers.rb#11 - def _helper_methods; end - - # source://actionpack/7.0.4.2/lib/abstract_controller/helpers.rb#11 - def _helper_methods=(value); end - - # source://actionpack/7.0.4.2/lib/abstract_controller/helpers.rb#11 - def _helper_methods?; end - - # source://actionpack/7.0.4.2/lib/abstract_controller/helpers.rb#15 - def _helpers; end - - # source://actionview//lib/action_view/layouts.rb#209 - def _layout; end - - # source://actionview//lib/action_view/layouts.rb#209 - def _layout=(value); end - - # source://actionview//lib/action_view/layouts.rb#209 - def _layout?; end - - # source://actionview//lib/action_view/layouts.rb#210 - def _layout_conditions; end - - # source://actionview//lib/action_view/layouts.rb#210 - def _layout_conditions=(value); end - - # source://actionview//lib/action_view/layouts.rb#210 - def _layout_conditions?; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#932 - def _process_action_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#936 - def _process_action_callbacks=(value); end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/renderers.rb#31 - def _renderers; end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/renderers.rb#31 - def _renderers=(value); end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/renderers.rb#31 - def _renderers?; end - - # source://actionpack/7.0.4.2/lib/abstract_controller/caching.rb#42 - def _view_cache_dependencies; end - - # source://actionpack/7.0.4.2/lib/abstract_controller/caching.rb#42 - def _view_cache_dependencies=(value); end - - # source://actionpack/7.0.4.2/lib/abstract_controller/caching.rb#42 - def _view_cache_dependencies?; end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/params_wrapper.rb#185 - def _wrapper_options; end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/params_wrapper.rb#185 - def _wrapper_options=(value); end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/params_wrapper.rb#185 - def _wrapper_options?; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def allow_forgery_protection; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def allow_forgery_protection=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def asset_host; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def asset_host=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def assets_dir; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def assets_dir=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def default_asset_host_protocol; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def default_asset_host_protocol=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def default_protect_from_forgery; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def default_protect_from_forgery=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def default_static_extension; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def default_static_extension=(value); end - - # source://actionpack/7.0.4.2/lib/action_dispatch/routing/url_for.rb#95 - def default_url_options; end - - # source://actionpack/7.0.4.2/lib/action_dispatch/routing/url_for.rb#95 - def default_url_options=(value); end - - # source://actionpack/7.0.4.2/lib/action_dispatch/routing/url_for.rb#95 - def default_url_options?; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def enable_fragment_cache_logging; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def enable_fragment_cache_logging=(value); end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/etag_with_template_digest.rb#27 - def etag_with_template_digest; end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/etag_with_template_digest.rb#27 - def etag_with_template_digest=(value); end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/etag_with_template_digest.rb#27 - def etag_with_template_digest?; end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/conditional_get.rb#13 - def etaggers; end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/conditional_get.rb#13 - def etaggers=(value); end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/conditional_get.rb#13 - def etaggers?; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def forgery_protection_origin_check; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def forgery_protection_origin_check=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def forgery_protection_strategy; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def forgery_protection_strategy=(value); end - - # source://actionpack/7.0.4.2/lib/abstract_controller/caching/fragments.rb#23 - def fragment_cache_keys; end - - # source://actionpack/7.0.4.2/lib/abstract_controller/caching/fragments.rb#23 - def fragment_cache_keys=(value); end - - # source://actionpack/7.0.4.2/lib/abstract_controller/caching/fragments.rb#23 - def fragment_cache_keys?; end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/helpers.rb#63 - def helpers_path; end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/helpers.rb#63 - def helpers_path=(value); end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/helpers.rb#63 - def helpers_path?; end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/helpers.rb#64 - def include_all_helpers; end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/helpers.rb#64 - def include_all_helpers=(value); end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/helpers.rb#64 - def include_all_helpers?; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def javascripts_dir; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def javascripts_dir=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def log_warning_on_csrf_failure; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def log_warning_on_csrf_failure=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def logger; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def logger=(value); end - - # source://actionpack/7.0.4.2/lib/action_controller/metal.rb#210 - def middleware_stack; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def per_form_csrf_tokens; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def per_form_csrf_tokens=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def perform_caching; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def perform_caching=(value); end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/redirecting.rb#13 - def raise_on_open_redirects; end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/redirecting.rb#13 - def raise_on_open_redirects=(val); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def relative_url_root; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def relative_url_root=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def request_forgery_protection_token; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def request_forgery_protection_token=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers; end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers?; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def stylesheets_dir; end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#114 - def stylesheets_dir=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/configurable.rb#113 - def urlsafe_csrf_tokens; end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/request_forgery_protection.rb#97 - def urlsafe_csrf_tokens=(urlsafe_csrf_tokens); end - - # source://actionpack/7.0.4.2/lib/action_controller/base.rb#198 - def without_modules(*modules); end - end -end - -# source://actionview//lib/action_view/gem_version.rb#3 -module ActionView - extend ::ActiveSupport::Autoload - - class << self - # source://actionview//lib/action_view.rb#90 - def eager_load!; end - - # 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. - # - # source://actionview//lib/action_view/version.rb#7 - def version; end - end -end - -# This class defines the interface for a renderer. Each class that -# subclasses +AbstractRenderer+ is used by the base +Renderer+ class to -# render a specific type of object. -# -# The base +Renderer+ class uses its +render+ method to delegate to the -# renderers. These currently consist of -# -# PartialRenderer - Used for rendering partials -# TemplateRenderer - Used for rendering other types of templates -# StreamingTemplateRenderer - Used for streaming -# -# Whenever the +render+ method is called on the base +Renderer+ class, a new -# renderer object of the correct type is created, and the +render+ method on -# that new object is called in turn. This abstracts the set up and rendering -# into a separate classes for partials and templates. -# -# source://actionview//lib/action_view/renderer/abstract_renderer.rb#21 -class ActionView::AbstractRenderer - # @return [AbstractRenderer] a new instance of AbstractRenderer - # - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#24 - def initialize(lookup_context); end - - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#22 - def any_templates?(*_arg0, **_arg1, &_arg2); end - - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#22 - def formats(*_arg0, **_arg1, &_arg2); end - - # @raise [NotImplementedError] - # - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#28 - def render; end - - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#22 - def template_exists?(*_arg0, **_arg1, &_arg2); end - - private - - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#182 - def build_rendered_collection(templates, spacer); end - - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#178 - def build_rendered_template(content, template); end - - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#159 - def extract_details(options); end - - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#171 - def prepend_formats(formats); end -end - -# source://actionview//lib/action_view/renderer/abstract_renderer.rb#157 -ActionView::AbstractRenderer::NO_DETAILS = T.let(T.unsafe(nil), Hash) - -# source://actionview//lib/action_view/renderer/abstract_renderer.rb#32 -module ActionView::AbstractRenderer::ObjectRendering - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#37 - def initialize(lookup_context, options); end - - private - - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#43 - def local_variable(path); end - - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#92 - def merge_prefix_into_object_path(prefix, object_path); end - - # Obtains the path to where the object's partial is located. If the object - # responds to +to_partial_path+, then +to_partial_path+ will be called and - # will provide the path. If the object does not respond to +to_partial_path+, - # then an +ArgumentError+ is raised. - # - # If +prefix_partial_path_with_controller_namespace+ is true, then this - # method will prefix the partial paths with a namespace. - # - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#76 - def partial_path(object, view); end - - # @raise [ArgumentError] - # - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#61 - def raise_invalid_identifier(path); end - - # @raise [ArgumentError] - # - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#65 - def raise_invalid_option_as(as); end -end - -# source://actionview//lib/action_view/renderer/abstract_renderer.rb#54 -ActionView::AbstractRenderer::ObjectRendering::IDENTIFIER_ERROR_MESSAGE = T.let(T.unsafe(nil), String) - -# source://actionview//lib/action_view/renderer/abstract_renderer.rb#57 -ActionView::AbstractRenderer::ObjectRendering::OPTION_AS_ERROR_MESSAGE = T.let(T.unsafe(nil), String) - -# source://actionview//lib/action_view/renderer/abstract_renderer.rb#33 -ActionView::AbstractRenderer::ObjectRendering::PREFIXED_PARTIAL_NAMES = T.let(T.unsafe(nil), Concurrent::Map) - -# source://actionview//lib/action_view/renderer/abstract_renderer.rb#110 -class ActionView::AbstractRenderer::RenderedCollection - # @return [RenderedCollection] a new instance of RenderedCollection - # - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#117 - def initialize(rendered_templates, spacer); end - - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#122 - def body; end - - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#126 - def format; end - - # Returns the value of attribute rendered_templates. - # - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#115 - def rendered_templates; end - - class << self - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#111 - def empty(format); end - end -end - -# source://actionview//lib/action_view/renderer/abstract_renderer.rb#130 -class ActionView::AbstractRenderer::RenderedCollection::EmptyCollection - # @return [EmptyCollection] a new instance of EmptyCollection - # - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#133 - def initialize(format); end - - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#137 - def body; end - - # Returns the value of attribute format. - # - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#131 - def format; end -end - -# source://actionview//lib/action_view/renderer/abstract_renderer.rb#141 -class ActionView::AbstractRenderer::RenderedTemplate - # @return [RenderedTemplate] a new instance of RenderedTemplate - # - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#144 - def initialize(body, template); end - - # Returns the value of attribute body. - # - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#142 - def body; end - - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#149 - def format; end - - # Returns the value of attribute template. - # - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#142 - def template; end -end - -# source://actionview//lib/action_view/renderer/abstract_renderer.rb#153 -ActionView::AbstractRenderer::RenderedTemplate::EMPTY_SPACER = T.let(T.unsafe(nil), T.untyped) - -# = Action View Errors -# -# source://actionview//lib/action_view/template/error.rb#7 -class ActionView::ActionViewError < ::StandardError; end - -# = 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] -# template system which can embed Ruby into an HTML document. -# If the template file has a .builder extension, then Jim Weirich's Builder::XmlMarkup library is used. -# -# == ERB -# -# You trigger ERB by using embeddings such as <% %>, <% -%>, and <%= %>. The <%= %> tag set is used when you want output. Consider the -# following loop for names: -# -# Names of all the people -# <% @people.each do |person| %> -# Name: <%= person.name %>
-# <% end %> -# -# The loop is set up in regular embedding tags <% %>, and the name is written using the output embedding tag <%= %>. Note that this -# is not just a usage suggestion. Regular output functions like print or puts won't work with ERB templates. So this would be wrong: -# -# <%# WRONG %> -# Hi, Mr. <% puts "Frodo" %> -# -# If you absolutely must write from within a function use +concat+. -# -# When on a line that only contains whitespaces except for the tag, <% %> suppresses leading and trailing whitespace, -# including the trailing newline. <% %> and <%- -%> are the same. -# Note however that <%= %> and <%= -%> are different: only the latter removes trailing whitespaces. -# -# === Using sub templates -# -# 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" %> -# Something really specific and terrific -# <%= render "shared/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. -# -# But you don't have to restrict yourself to static includes. Templates can share variables amongst themselves by using instance -# variables defined using the regular embedding tags. Like this: -# -# <% @page_title = "A Wonderful Hello" %> -# <%= render "shared/header" %> -# -# Now the header can pick up on the @page_title variable and use it for outputting a title tag: -# -# <%= @page_title %> -# -# === Passing local variables to sub templates -# -# 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 } %> -# -# These can now be accessed in shared/header with: -# -# Headline: <%= headline %> -# First name: <%= person.first_name %> -# -# The local variables passed to sub templates can be accessed as a hash using the local_assigns hash. This lets you access the -# variables as: -# -# Headline: <%= local_assigns[:headline] %> -# -# This is useful in cases where you aren't sure if the local variable has been assigned. Alternatively, you could also use -# defined? headline to first check if the variable has been assigned before using it. -# -# === 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. -# -# == Builder -# -# Builder templates are a more programmatic alternative to ERB. They are especially useful for generating XML content. An XmlMarkup object -# named +xml+ is automatically made available to templates with a .builder extension. -# -# Here are some basic examples: -# -# xml.em("emphasized") # => emphasized -# xml.em { xml.b("emph & bold") } # => emph & bold -# xml.a("A Link", "href" => "http://onestepback.org") # => A Link -# xml.target("name" => "compile", "option" => "fast") # => -# # NOTE: order of attributes is not specified. -# -# Any method with a block will be treated as an XML markup tag with nested markup in the block. For example, the following: -# -# xml.div do -# xml.h1(@person.name) -# xml.p(@person.bio) -# end -# -# would produce something like: -# -#
-#

David Heinemeier Hansson

-#

A product of Danish Design during the Winter of '79...

-#
-# -# Here is a full-length RSS example actually used on Basecamp: -# -# xml.rss("version" => "2.0", "xmlns:dc" => "http://purl.org/dc/elements/1.1/") do -# xml.channel do -# xml.title(@feed_title) -# xml.link(@url) -# xml.description "Basecamp: Recent items" -# xml.language "en-us" -# xml.ttl "40" -# -# @recent_items.each do |item| -# xml.item do -# xml.title(item_title(item)) -# xml.description(item_description(item)) if item_description(item) -# xml.pubDate(item_pubDate(item)) -# xml.guid(@person.firm.account.url + @recent_items.url(item)) -# xml.link(@person.firm.account.url + @recent_items.url(item)) -# -# xml.tag!("dc:creator", item.author_name) if item_has_creator?(item) -# end -# end -# end -# end -# -# For more information on Builder please consult the {source -# code}[https://github.com/jimweirich/builder]. -# -# source://actionview//lib/action_view/base.rb#141 -class ActionView::Base - include ::ActionView::Context - include ::ERB::Util - 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::ControllerHelper - include ::ActionView::Helpers::CspHelper - include ::ActionView::Helpers::CsrfHelper - include ::ActionView::Helpers::DateHelper - include ::ActionView::Helpers::DebugHelper - include ::ActionView::Helpers::TextHelper - include ::ActionView::Helpers::FormTagHelper - include ::ActionView::ModelNaming - include ::ActionView::RecordIdentifier - include ::ActionView::Helpers::FormHelper - include ::ActionView::Helpers::TranslationHelper - include ::ActionView::Helpers::FormOptionsHelper - include ::ActionView::Helpers::JavaScriptHelper - include ::ActionView::Helpers::NumberHelper - include ::ActionView::Helpers::RenderingHelper - include ::ActionView::Helpers - include ::ActionCable::Helpers::ActionCableHelper - extend ::ActionView::Helpers::UrlHelper::ClassMethods - extend ::ActionView::Helpers::SanitizeHelper::ClassMethods - - # :startdoc: - # - # @return [Base] a new instance of Base - # - # source://actionview//lib/action_view/base.rb#227 - def initialize(lookup_context, assigns, controller); end - - # source://actionview//lib/action_view/base.rb#165 - def _routes; end - - # source://actionview//lib/action_view/base.rb#165 - def _routes=(_arg0); end - - # 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#163 - def annotate_rendered_view_with_filenames; end - - # source://actionview//lib/action_view/base.rb#163 - def annotate_rendered_view_with_filenames=(val); end - - # source://actionview//lib/action_view/base.rb#207 - def assign(new_assigns); end - - # source://activesupport/7.0.4.2/lib/active_support/core_ext/module/attr_internal.rb#33 - def assigns; end - - # source://activesupport/7.0.4.2/lib/active_support/core_ext/module/attr_internal.rb#33 - def assigns=(_arg0); end - - # source://actionview//lib/action_view/base.rb#160 - def automatically_disable_submit_tag; end - - # source://actionview//lib/action_view/base.rb#160 - def automatically_disable_submit_tag=(val); end - - # @raise [NotImplementedError] - # - # source://actionview//lib/action_view/base.rb#249 - def compiled_method_container; end - - # source://activesupport/7.0.4.2/lib/active_support/core_ext/module/attr_internal.rb#33 - def config; end - - # source://activesupport/7.0.4.2/lib/active_support/core_ext/module/attr_internal.rb#33 - def config=(_arg0); end - - # source://actionview//lib/action_view/helpers/translation_helper.rb#18 - def debug_missing_translation; end - - # source://actionview//lib/action_view/helpers/translation_helper.rb#18 - def debug_missing_translation=(val); end - - # source://actionview//lib/action_view/base.rb#157 - def default_formats; end - - # source://actionview//lib/action_view/base.rb#157 - def default_formats=(val); end - - # source://actionview//lib/action_view/base.rb#145 - def field_error_proc; end - - # source://actionview//lib/action_view/base.rb#145 - def field_error_proc=(val); end - - # source://actionview//lib/action_view/base.rb#205 - def formats(*_arg0, **_arg1, &_arg2); end - - # source://actionview//lib/action_view/base.rb#205 - def formats=(arg); end - - # source://actionview//lib/action_view/base.rb#257 - def in_rendering_context(options); end - - # source://actionview//lib/action_view/base.rb#205 - def locale(*_arg0, **_arg1, &_arg2); end - - # source://actionview//lib/action_view/base.rb#205 - def locale=(arg); end - - # source://actionview//lib/action_view/base.rb#166 - def logger; end - - # source://actionview//lib/action_view/base.rb#166 - def logger=(_arg0); end - - # source://actionview//lib/action_view/base.rb#166 - def logger?; end - - # Returns the value of attribute lookup_context. - # - # source://actionview//lib/action_view/base.rb#202 - def lookup_context; end - - # source://actionview//lib/action_view/base.rb#154 - def prefix_partial_path_with_controller_namespace; end - - # source://actionview//lib/action_view/base.rb#154 - def prefix_partial_path_with_controller_namespace=(_arg0); end - - # source://actionview//lib/action_view/base.rb#154 - def prefix_partial_path_with_controller_namespace?; end - - # source://actionview//lib/action_view/base.rb#149 - def streaming_completion_on_exception; end - - # source://actionview//lib/action_view/base.rb#149 - def streaming_completion_on_exception=(val); end - - # source://actionview//lib/action_view/base.rb#205 - def view_paths(*_arg0, **_arg1, &_arg2); end - - # source://actionview//lib/action_view/base.rb#205 - def view_paths=(arg); end - - # Returns the value of attribute view_renderer. - # - # source://actionview//lib/action_view/base.rb#202 - def view_renderer; end - - class << self - # source://actionview//lib/action_view/base.rb#165 - def _routes; end - - # source://actionview//lib/action_view/base.rb#165 - def _routes=(value); end - - # source://actionview//lib/action_view/base.rb#165 - def _routes?; end - - # source://actionview//lib/action_view/base.rb#163 - def annotate_rendered_view_with_filenames; end - - # source://actionview//lib/action_view/base.rb#163 - def annotate_rendered_view_with_filenames=(val); end - - # source://actionview//lib/action_view/base.rb#160 - def automatically_disable_submit_tag; end - - # source://actionview//lib/action_view/base.rb#160 - def automatically_disable_submit_tag=(val); end - - # source://actionview//lib/action_view/base.rb#171 - def cache_template_loading; end - - # source://actionview//lib/action_view/base.rb#175 - def cache_template_loading=(value); end - - # @return [Boolean] - # - # source://actionview//lib/action_view/base.rb#197 - def changed?(other); end - - # source://actionview//lib/action_view/helpers/translation_helper.rb#18 - def debug_missing_translation; end - - # 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 - def default_form_builder; end - - # source://actionview//lib/action_view/helpers/form_helper.rb#2729 - def default_form_builder=(val); end - - # source://actionview//lib/action_view/base.rb#157 - def default_formats; end - - # source://actionview//lib/action_view/base.rb#157 - def default_formats=(val); end - - # :stopdoc: - # - # source://actionview//lib/action_view/base.rb#213 - def empty; end - - # source://actionview//lib/action_view/base.rb#169 - def erb_trim_mode=(arg); end - - # source://actionview//lib/action_view/base.rb#145 - def field_error_proc; end - - # source://actionview//lib/action_view/base.rb#145 - def field_error_proc=(val); end - - # source://actionview//lib/action_view/base.rb#166 - def logger; end - - # source://actionview//lib/action_view/base.rb#166 - def logger=(value); end - - # source://actionview//lib/action_view/base.rb#166 - def logger?; end - - # source://actionview//lib/action_view/base.rb#154 - def prefix_partial_path_with_controller_namespace; end - - # source://actionview//lib/action_view/base.rb#154 - def prefix_partial_path_with_controller_namespace=(value); end - - # source://actionview//lib/action_view/base.rb#154 - def prefix_partial_path_with_controller_namespace?; end - - # source://actionview//lib/action_view/base.rb#149 - def streaming_completion_on_exception; end - - # source://actionview//lib/action_view/base.rb#149 - def streaming_completion_on_exception=(val); end - - # source://actionview//lib/action_view/base.rb#221 - 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 - def with_view_paths(view_paths, assigns = T.unsafe(nil), controller = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://actionview//lib/action_view/base.rb#179 - def xss_safe?; end - end -end - -# source://actionview//lib/action_view/cache_expiry.rb#4 -class ActionView::CacheExpiry; end - -# source://actionview//lib/action_view/cache_expiry.rb#5 -class ActionView::CacheExpiry::Executor - # @return [Executor] a new instance of Executor - # - # 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 - - # source://actionview//lib/action_view/cache_expiry.rb#25 - def clear_cache; end -end - -# source://actionview//lib/action_view/cache_expiry.rb#32 -class ActionView::CacheExpiry::ViewModificationWatcher - # @return [ViewModificationWatcher] a new instance of ViewModificationWatcher - # - # 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 - - private - - # source://actionview//lib/action_view/cache_expiry.rb#61 - def all_view_paths; end - - # source://actionview//lib/action_view/cache_expiry.rb#57 - def dirs_to_watch; end -end - -# source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#6 -module ActionView::CollectionCaching - extend ::ActiveSupport::Concern - - private - - # source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#20 - def cache_collection_render(instrumentation_payload, view, template, collection); end - - # @return [Boolean] - # - # source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#54 - def callable_cache_key?; end - - # 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 - def expanded_cache_key(key, view, template, digest_path); end - - # `order_by` is an enumerable object containing keys of the cache, - # all keys are passed in whether found already or not. - # - # `cached_partials` is a hash. If the value exists - # it represents the rendered partial from the cache - # otherwise `Hash#fetch` will take the value of its block. - # - # This method expects a block that will return the rendered - # partial. An example is to render all results - # for each element that was not found in the cache and store it as an array. - # Order it so that the first empty cache element in `cached_partials` - # corresponds to the first element in `rendered_partials`. - # - # 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 - def fetch_or_cache_partial(cached_partials, template, order_by:); end - - # @return [Boolean] - # - # source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#16 - def will_cache?(options, view); end -end - -# source://actionview//lib/action_view/renderer/collection_renderer.rb#33 -class ActionView::CollectionRenderer < ::ActionView::PartialRenderer - include ::ActionView::AbstractRenderer::ObjectRendering - - # source://actionview//lib/action_view/renderer/collection_renderer.rb#122 - def render_collection_derive_partial(collection, context, block); end - - # source://actionview//lib/action_view/renderer/collection_renderer.rb#104 - def render_collection_with_partial(collection, partial, context, block); end - - private - - # source://actionview//lib/action_view/renderer/collection_renderer.rb#174 - def collection_with_template(view, template, layout, collection); end - - # source://actionview//lib/action_view/renderer/collection_renderer.rb#145 - def render_collection(collection, view, path, template, layout, block); end - - # source://actionview//lib/action_view/renderer/collection_renderer.rb#140 - def retrieve_variable(path); end -end - -# source://actionview//lib/action_view/renderer/collection_renderer.rb#36 -class ActionView::CollectionRenderer::CollectionIterator - include ::Enumerable - - # @return [CollectionIterator] a new instance of CollectionIterator - # - # source://actionview//lib/action_view/renderer/collection_renderer.rb#39 - def initialize(collection); end - - # source://actionview//lib/action_view/renderer/collection_renderer.rb#43 - def each(&blk); end - - # source://actionview//lib/action_view/renderer/collection_renderer.rb#51 - def length; 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 -class ActionView::CollectionRenderer::MixedCollectionIterator < ::ActionView::CollectionRenderer::CollectionIterator - # @return [MixedCollectionIterator] a new instance of MixedCollectionIterator - # - # source://actionview//lib/action_view/renderer/collection_renderer.rb#93 - def initialize(collection, paths); end - - # source://actionview//lib/action_view/renderer/collection_renderer.rb#98 - def each_with_info; end -end - -# source://actionview//lib/action_view/renderer/collection_renderer.rb#74 -class ActionView::CollectionRenderer::PreloadCollectionIterator < ::ActionView::CollectionRenderer::SameCollectionIterator - # @return [PreloadCollectionIterator] a new instance of PreloadCollectionIterator - # - # source://actionview//lib/action_view/renderer/collection_renderer.rb#75 - def initialize(collection, path, variables, relation); end - - # source://actionview//lib/action_view/renderer/collection_renderer.rb#85 - def each_with_info; end - - # source://actionview//lib/action_view/renderer/collection_renderer.rb#81 - def from_collection(collection); end -end - -# source://actionview//lib/action_view/renderer/collection_renderer.rb#56 -class ActionView::CollectionRenderer::SameCollectionIterator < ::ActionView::CollectionRenderer::CollectionIterator - # @return [SameCollectionIterator] a new instance of SameCollectionIterator - # - # source://actionview//lib/action_view/renderer/collection_renderer.rb#57 - def initialize(collection, path, variables); end - - # source://actionview//lib/action_view/renderer/collection_renderer.rb#67 - def each_with_info; end - - # source://actionview//lib/action_view/renderer/collection_renderer.rb#63 - def from_collection(collection); end -end - -# = Action View Context -# -# Action View contexts are supplied to Action Controller to render a template. -# The default Action View context is ActionView::Base. -# -# In order to work with Action Controller, a Context must just include this -# module. The initialization of the variables used by the context -# (@output_buffer, @view_flow, and @virtual_path) is responsibility of the -# object that includes this module (although you can call _prepare_context -# defined below). -# -# source://actionview//lib/action_view/context.rb#14 -module ActionView::Context - # Encapsulates the interaction with the view flow so it - # returns the correct buffer on +yield+. This is usually - # overwritten by helpers to add more behavior. - # - # source://actionview//lib/action_view/context.rb#27 - def _layout_for(name = T.unsafe(nil)); end - - # Prepares the context by setting the appropriate instance variables. - # - # source://actionview//lib/action_view/context.rb#18 - def _prepare_context; end - - # Returns the value of attribute output_buffer. - # - # source://actionview//lib/action_view/context.rb#15 - 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/context.rb#15 - def output_buffer=(_arg0); end - - # Returns the value of attribute view_flow. - # - # source://actionview//lib/action_view/context.rb#15 - def view_flow; end - - # Sets the attribute view_flow - # - # @param value the value to set the attribute view_flow to. - # - # source://actionview//lib/action_view/context.rb#15 - def view_flow=(_arg0); end -end - -# source://actionview//lib/action_view/dependency_tracker.rb#8 -class ActionView::DependencyTracker - extend ::ActiveSupport::Autoload - - class << self - # source://actionview//lib/action_view/dependency_tracker.rb#16 - def find_dependencies(name, template, view_paths = T.unsafe(nil)); end - - # source://actionview//lib/action_view/dependency_tracker.rb#23 - def register_tracker(extension, tracker); end - - # source://actionview//lib/action_view/dependency_tracker.rb#34 - def remove_tracker(handler); end - end -end - -# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#5 -class ActionView::DependencyTracker::ERBTracker - # @return [ERBTracker] a new instance of ERBTracker - # - # source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#72 - def initialize(name, template, view_paths = T.unsafe(nil)); end - - # source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#76 - def dependencies; end - - private - - # source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#104 - def add_dependencies(render_dependencies, arguments, pattern); end - - # source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#112 - def add_dynamic_dependency(dependencies, dependency); end - - # source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#118 - def add_static_dependency(dependencies, dependency, quote_type); end - - # source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#88 - def directory; end - - # source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#145 - def explicit_dependencies; end - - # Returns the value of attribute name. - # - # source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#80 - def name; end - - # source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#92 - def render_dependencies; end - - # source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#133 - def resolve_directories(wildcard_dependencies); end - - # source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#84 - def source; end - - # Returns the value of attribute template. - # - # source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#80 - def template; end - - class << self - # source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#68 - def call(name, template, view_paths = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#64 - def supports_view_paths?; end - end -end - -# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#6 -ActionView::DependencyTracker::ERBTracker::EXPLICIT_DEPENDENCY = T.let(T.unsafe(nil), Regexp) - -# A valid ruby identifier - suitable for class, method and specially variable names -# -# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#9 -ActionView::DependencyTracker::ERBTracker::IDENTIFIER = T.let(T.unsafe(nil), Regexp) - -# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#58 -ActionView::DependencyTracker::ERBTracker::LAYOUT_DEPENDENCY = T.let(T.unsafe(nil), Regexp) - -# Part of any hash containing the :layout key -# -# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#36 -ActionView::DependencyTracker::ERBTracker::LAYOUT_HASH_KEY = T.let(T.unsafe(nil), Regexp) - -# Part of any hash containing the :partial key -# -# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#30 -ActionView::DependencyTracker::ERBTracker::PARTIAL_HASH_KEY = T.let(T.unsafe(nil), Regexp) - -# Matches: -# partial: "comments/comment", collection: @all_comments => "comments/comment" -# (object: @single_comment, partial: "comments/comment") => "comments/comment" -# -# "comments/comments" -# 'comments/comments' -# ('comments/comments') -# -# (@topic) => "topics/topic" -# topics => "topics/topic" -# (message.topics) => "topics/topic" -# -# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#52 -ActionView::DependencyTracker::ERBTracker::RENDER_ARGUMENTS = T.let(T.unsafe(nil), Regexp) - -# A simple string literal. e.g. "School's out!" -# -# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#23 -ActionView::DependencyTracker::ERBTracker::STRING = T.let(T.unsafe(nil), Regexp) - -# Any kind of variable name. e.g. @instance, @@class, $global or local. -# Possibly following a method call chain -# -# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#16 -ActionView::DependencyTracker::ERBTracker::VARIABLE_OR_METHOD_CHAIN = T.let(T.unsafe(nil), Regexp) - -# source://actionview//lib/action_view/dependency_tracker/ripper_tracker.rb#5 -class ActionView::DependencyTracker::RipperTracker - # @return [RipperTracker] a new instance of RipperTracker - # - # source://actionview//lib/action_view/dependency_tracker/ripper_tracker.rb#20 - def initialize(name, template, view_paths = T.unsafe(nil)); end - - # source://actionview//lib/action_view/dependency_tracker/ripper_tracker.rb#12 - def dependencies; end - - private - - # source://actionview//lib/action_view/dependency_tracker/ripper_tracker.rb#38 - def explicit_dependencies; end - - # Returns the value of attribute name. - # - # source://actionview//lib/action_view/dependency_tracker/ripper_tracker.rb#25 - def name; end - - # source://actionview//lib/action_view/dependency_tracker/ripper_tracker.rb#27 - def render_dependencies; end - - # source://actionview//lib/action_view/dependency_tracker/ripper_tracker.rb#46 - def resolve_directories(wildcard_dependencies); end - - # Returns the value of attribute template. - # - # source://actionview//lib/action_view/dependency_tracker/ripper_tracker.rb#25 - def template; end - - # Returns the value of attribute view_paths. - # - # source://actionview//lib/action_view/dependency_tracker/ripper_tracker.rb#25 - def view_paths; end - - class << self - # source://actionview//lib/action_view/dependency_tracker/ripper_tracker.rb#8 - def call(name, template, view_paths = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://actionview//lib/action_view/dependency_tracker/ripper_tracker.rb#16 - def supports_view_paths?; end - end -end - -# source://actionview//lib/action_view/dependency_tracker/ripper_tracker.rb#6 -ActionView::DependencyTracker::RipperTracker::EXPLICIT_DEPENDENCY = T.let(T.unsafe(nil), Regexp) - -# source://actionview//lib/action_view/digestor.rb#6 -class ActionView::Digestor - class << self - # Supported options: - # - # * name - Template name - # * format - Template format - # * finder - An instance of ActionView::LookupContext - # * dependencies - An array of dependent views - # - # source://actionview//lib/action_view/digestor.rb#16 - def digest(name:, finder:, format: T.unsafe(nil), dependencies: T.unsafe(nil)); end - - # source://actionview//lib/action_view/digestor.rb#38 - def logger; end - - # Create a dependency tree for template named +name+. - # - # source://actionview//lib/action_view/digestor.rb#43 - def tree(name, finder, partial = T.unsafe(nil), seen = T.unsafe(nil)); end - - private - - # source://actionview//lib/action_view/digestor.rb#71 - def find_template(finder, name, prefixes, partial, keys); end - end -end - -# source://actionview//lib/action_view/digestor.rb#121 -class ActionView::Digestor::Injected < ::ActionView::Digestor::Node - # source://actionview//lib/action_view/digestor.rb#122 - def digest(finder, _ = T.unsafe(nil)); end -end - -# source://actionview//lib/action_view/digestor.rb#117 -class ActionView::Digestor::Missing < ::ActionView::Digestor::Node - # source://actionview//lib/action_view/digestor.rb#118 - def digest(finder, _ = T.unsafe(nil)); end -end - -# source://actionview//lib/action_view/digestor.rb#78 -class ActionView::Digestor::Node - # @return [Node] a new instance of Node - # - # source://actionview//lib/action_view/digestor.rb#86 - def initialize(name, logical_name, template, children = T.unsafe(nil)); end - - # Returns the value of attribute children. - # - # source://actionview//lib/action_view/digestor.rb#79 - def children; end - - # source://actionview//lib/action_view/digestor.rb#97 - def dependency_digest(finder, stack); end - - # source://actionview//lib/action_view/digestor.rb#93 - def digest(finder, stack = T.unsafe(nil)); end - - # Returns the value of attribute logical_name. - # - # source://actionview//lib/action_view/digestor.rb#79 - def logical_name; end - - # Returns the value of attribute name. - # - # source://actionview//lib/action_view/digestor.rb#79 - def name; end - - # Returns the value of attribute template. - # - # source://actionview//lib/action_view/digestor.rb#79 - def template; end - - # source://actionview//lib/action_view/digestor.rb#110 - def to_dep_map; end - - class << self - # source://actionview//lib/action_view/digestor.rb#81 - def create(name, logical_name, template, partial); end - end -end - -# source://actionview//lib/action_view/digestor.rb#125 -class ActionView::Digestor::NullLogger - class << self - # source://actionview//lib/action_view/digestor.rb#126 - def debug(_); end - - # source://actionview//lib/action_view/digestor.rb#127 - def error(_); end - end -end - -# source://actionview//lib/action_view/digestor.rb#115 -class ActionView::Digestor::Partial < ::ActionView::Digestor::Node; end - -# source://actionview//lib/action_view.rb#33 -ActionView::ENCODING_FLAG = T.let(T.unsafe(nil), String) - -# source://actionview//lib/action_view/template/error.rb#10 -class ActionView::EncodingError < ::StandardError; end - -# A resolver that loads files from the filesystem. -# -# source://actionview//lib/action_view/template/resolver.rb#87 -class ActionView::FileSystemResolver < ::ActionView::Resolver - # @raise [ArgumentError] - # @return [FileSystemResolver] a new instance of FileSystemResolver - # - # source://actionview//lib/action_view/template/resolver.rb#90 - def initialize(path); end - - # @return [Boolean] - # - # source://actionview//lib/action_view/template/resolver.rb#109 - def ==(resolver); end - - # source://actionview//lib/action_view/template/resolver.rb#114 - def all_template_paths; end - - # source://actionview//lib/action_view/template/resolver.rb#98 - def clear_cache; end - - # @return [Boolean] - # - # source://actionview//lib/action_view/template/resolver.rb#109 - def eql?(resolver); end - - # Returns the value of attribute path. - # - # source://actionview//lib/action_view/template/resolver.rb#88 - def path; end - - # source://actionview//lib/action_view/template/resolver.rb#104 - def to_path; end - - # source://actionview//lib/action_view/template/resolver.rb#104 - def to_s; end - - private - - # source://actionview//lib/action_view/template/resolver.rb#124 - def _find_all(name, prefix, partial, details, key, locals); end - - # source://actionview//lib/action_view/template/resolver.rb#143 - def build_unbound_template(template); end - - # source://actionview//lib/action_view/template/resolver.rb#201 - def escape_entry(entry); end - - # source://actionview//lib/action_view/template/resolver.rb#173 - def filter_and_sort_by_details(templates, requested_details); end - - # source://actionview//lib/action_view/template/resolver.rb#139 - def source_for_template(template); end - - # Safe glob within @path - # - # source://actionview//lib/action_view/template/resolver.rb#188 - def template_glob(glob); end - - # source://actionview//lib/action_view/template/resolver.rb#156 - def unbound_templates_from_path(path); end -end - -# source://actionview//lib/action_view/helpers/capture_helper.rb#7 -module ActionView::Helpers - include ::ActiveSupport::Benchmarkable - include ::ActionView::Helpers::ActiveModelHelper - include ::ActionView::Helpers::AssetUrlHelper - include ::ActionView::Helpers::SanitizeHelper - include ::ActionView::Helpers::CaptureHelper - include ::ActionView::Helpers::OutputSafetyHelper - include ::ActionView::Helpers::TagHelper - include ::ActionView::Helpers::AssetTagHelper - include ::ActionView::Helpers::AtomFeedHelper - include ::ActionView::Helpers::CacheHelper - include ::ActionView::Helpers::ControllerHelper - include ::ActionView::Helpers::CspHelper - include ::ActionView::Helpers::CsrfHelper - include ::ActionView::Helpers::DateHelper - include ::ActionView::Helpers::DebugHelper - include ::ActionView::Helpers::TextHelper - include ::ActionView::Helpers::FormOptionsHelper - include ::ActionView::Helpers::JavaScriptHelper - include ::ActionView::Helpers::NumberHelper - include ::ActionView::Helpers::RenderingHelper - extend ::ActiveSupport::Autoload - extend ::ActiveSupport::Concern - include ::ActionView::Helpers::UrlHelper - include ::ActionView::Helpers::SanitizeHelper - include ::ActionView::Helpers::TextHelper - include ::ActionView::Helpers::FormTagHelper - include ::ActionView::Helpers::FormHelper - include ::ActionView::Helpers::TranslationHelper - - mixes_in_class_methods ::ActionView::Helpers::UrlHelper::ClassMethods - mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods - - class << self - # source://actionview//lib/action_view/helpers.rb#34 - def eager_load!; end - end -end - -# source://actionview//lib/action_view/helpers/active_model_helper.rb#9 -module ActionView::Helpers::ActiveModelHelper; end - -# 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 - def content_tag(type, options, *_arg2); end - - # source://actionview//lib/action_view/helpers/active_model_helper.rb#36 - def error_message; end - - # source://actionview//lib/action_view/helpers/active_model_helper.rb#28 - def error_wrapping(html_tag); end - - # source://actionview//lib/action_view/helpers/active_model_helper.rb#13 - def object; end - - # source://actionview//lib/action_view/helpers/active_model_helper.rb#24 - def tag(type, options, *_arg2); end - - private - - # @return [Boolean] - # - # source://actionview//lib/action_view/helpers/active_model_helper.rb#41 - def object_has_errors?; end - - # @return [Boolean] - # - # source://actionview//lib/action_view/helpers/active_model_helper.rb#45 - def select_markup_helper?(type); end - - # @return [Boolean] - # - # source://actionview//lib/action_view/helpers/active_model_helper.rb#49 - def tag_generate_errors?(options); end -end - -# 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: -# -# image_tag("rails.png") -# # => -# stylesheet_link_tag("application") -# # => -# -# source://actionview//lib/action_view/helpers/asset_tag_helper.rb#20 -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 - def apply_stylesheet_media_default; end - - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#27 - 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. - # - # When the last parameter is a hash you can add HTML attributes using that - # parameter. - # - # audio_tag("sound") - # # => - # audio_tag("sound.wav") - # # => - # audio_tag("sound.wav", autoplay: true, controls: true) - # # => - # audio_tag("sound.wav", "sound.mid") - # # => - # - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#486 - def audio_tag(*sources); end - - # Returns a link tag that browsers and feed readers can use to auto-detect - # an RSS, Atom, or JSON feed. The +type+ can be :rss (default), - # :atom, or :json. Control the link options in url_for format - # using the +url_options+. You can modify the LINK tag itself in +tag_options+. - # - # ==== Options - # - # * :rel - Specify the relation of this link, defaults to "alternate" - # * :type - Override the auto-generated mime type - # * :title - Specify the title of the link, defaults to the +type+ - # - # ==== Examples - # - # auto_discovery_link_tag - # # => - # auto_discovery_link_tag(:atom) - # # => - # auto_discovery_link_tag(:json) - # # => - # auto_discovery_link_tag(:rss, {action: "feed"}) - # # => - # auto_discovery_link_tag(:rss, {action: "feed"}, {title: "My RSS"}) - # # => - # auto_discovery_link_tag(:rss, {controller: "news", action: "feed"}) - # # => - # 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 - 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. - # - # If a page has no link like the one generated by this helper, browsers - # ask for /favicon.ico automatically, and cache the file if the - # request succeeds. If the favicon changes it is hard to get it updated. - # - # To have better control applications may let the asset pipeline manage - # their favicon storing the file under app/assets/images, and - # using this helper to generate its corresponding link tag. - # - # The helper gets the name of the favicon file as first argument, which - # defaults to "favicon.ico", and also supports +:rel+ and +:type+ options - # to override their defaults, "icon" and "image/x-icon" - # respectively: - # - # favicon_link_tag - # # => - # - # favicon_link_tag 'myicon.ico' - # # => - # - # Mobile Safari looks for a different link tag, pointing to an image that - # will be used if you add the page to the home screen of an iOS device. - # The following call would generate such a tag: - # - # favicon_link_tag 'mb-icon.png', rel: 'apple-touch-icon', type: 'image/png' - # # => - # - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#276 - def favicon_link_tag(source = T.unsafe(nil), options = T.unsafe(nil)); end - - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#25 - def image_decoding; end - - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#25 - def image_decoding=(val); end - - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#24 - def image_loading; end - - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#24 - def image_loading=(val); end - - # Returns an HTML image tag for the +source+. The +source+ can be a full - # path, a file, or an Active Storage attachment. - # - # ==== Options - # - # You can add HTML attributes using the +options+. The +options+ supports - # additional keys for convenience and conformance: - # - # * :size - Supplied as "{Width}x{Height}" or "{Number}", so "30x45" becomes - # width="30" and height="45", and "50" becomes width="50" and height="50". - # :size will be ignored if the value is not in the correct format. - # * :srcset - If supplied as a hash or array of [source, descriptor] - # pairs, each image path will be expanded before the list is formatted as a string. - # - # ==== Examples - # - # Assets (images that are part of your app): - # - # image_tag("icon") - # # => - # image_tag("icon.png") - # # => - # image_tag("icon.png", size: "16x10", alt: "Edit Entry") - # # => Edit Entry - # image_tag("/icons/icon.gif", size: "16") - # # => - # image_tag("/icons/icon.gif", height: '32', width: '32') - # # => - # image_tag("/icons/icon.gif", class: "menu_icon") - # # => - # image_tag("/icons/icon.gif", data: { title: 'Rails Application' }) - # # => - # image_tag("icon.png", srcset: { "icon_2x.png" => "2x", "icon_4x.png" => "4x" }) - # # => - # image_tag("pic.jpg", srcset: [["pic_1024.jpg", "1024w"], ["pic_1980.jpg", "1980w"]], sizes: "100vw") - # # => - # - # Active Storage blobs (images that are uploaded by the users of your app): - # - # image_tag(user.avatar) - # # => - # image_tag(user.avatar.variant(resize_to_limit: [100, 100])) - # # => - # image_tag(user.avatar.variant(resize_to_limit: [100, 100]), size: '100') - # # => - # - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#394 - def image_tag(source, options = T.unsafe(nil)); end - - # Returns an HTML script tag for each of the +sources+ provided. - # - # Sources may be paths to JavaScript files. Relative paths are assumed to be relative - # to assets/javascripts, full paths are assumed to be relative to the document - # root. Relative paths are idiomatic, use absolute paths only when needed. - # - # When passing paths, the ".js" extension is optional. If you do not want ".js" - # appended to the path extname: false can be set on the options. - # - # You can modify the HTML attributes of the script tag by passing a hash as the - # last argument. - # - # 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. - # - # ==== Options - # - # When the last parameter is a hash you can add HTML attributes using that - # parameter. The following options are supported: - # - # * :extname - Append an extension to the generated URL unless the extension - # already exists. This only applies for relative URLs. - # * :protocol - Sets the protocol of the generated URL. This option only - # applies when a relative URL and +host+ options are provided. - # * :host - When a relative URL is provided the host is added to the - # that path. - # * :skip_pipeline - This option is used to bypass the asset pipeline - # when it is set to true. - # * :nonce - When set to true, adds an automatic nonce value if - # you have Content Security Policy enabled. - # - # ==== Examples - # - # javascript_include_tag "xmlhr" - # # => - # - # javascript_include_tag "xmlhr", host: "localhost", protocol: "https" - # # => - # - # javascript_include_tag "template.jst", extname: false - # # => - # - # javascript_include_tag "xmlhr.js" - # # => - # - # javascript_include_tag "common.javascript", "/elsewhere/cools" - # # => - # # - # - # javascript_include_tag "http://www.example.com/xmlhr" - # # => - # - # javascript_include_tag "http://www.example.com/xmlhr.js" - # # => - # - # javascript_include_tag "http://www.example.com/xmlhr.js", nonce: true - # # => - # - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#89 - def javascript_include_tag(*sources); 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. - # - # ==== Options - # - # * :type - Override the auto-generated mime type, defaults to the mime type for +source+ extension. - # * :as - Override the auto-generated value for as attribute, calculated using +source+ extension and mime type. - # * :crossorigin - Specify the crossorigin attribute, required to load cross-origin resources. - # * :nopush - Specify if the use of server push is not desired for the resource. Defaults to +false+. - # * :integrity - Specify the integrity attribute. - # - # ==== Examples - # - # preload_link_tag("custom_theme.css") - # # => - # - # preload_link_tag("/videos/video.webm") - # # => - # - # preload_link_tag(post_path(format: :json), as: "fetch") - # # => - # - # preload_link_tag("worker.js", as: "worker") - # # => - # - # preload_link_tag("//example.com/font.woff2") - # # => - # - # preload_link_tag("//example.com/font.woff2", crossorigin: "use-credentials") - # # => - # - # preload_link_tag("/media/audio.ogg", nopush: true) - # # => - # - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#319 - def preload_link_tag(source, options = T.unsafe(nil)); end - - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#26 - def preload_links_header; end - - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#26 - def preload_links_header=(val); end - - # Returns a stylesheet link tag for the sources specified as arguments. - # - # When passing paths, the .css extension is optional. - # If you don't specify an extension, .css will be appended automatically. - # If you do not want .css appended to the path, - # 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. - # - # ==== Options - # - # * :extname - Append an extension to the generated URL unless the extension - # already exists. This only applies for relative URLs. - # * :protocol - Sets the protocol of the generated URL. This option only - # applies when a relative URL and +host+ options are provided. - # * :host - When a relative URL is provided the host is added to the - # that path. - # * :skip_pipeline - This option is used to bypass the asset pipeline - # when it is set to true. - # - # ==== Examples - # - # stylesheet_link_tag "style" - # # => - # - # stylesheet_link_tag "style.css" - # # => - # - # stylesheet_link_tag "http://www.example.com/style.css" - # # => - # - # stylesheet_link_tag "style.less", extname: false, skip_pipeline: true, rel: "stylesheet/less" - # # => - # - # stylesheet_link_tag "style", media: "all" - # # => - # - # stylesheet_link_tag "style", media: "print" - # # => - # - # stylesheet_link_tag "random.styles", "/css/stylish" - # # => - # # - # - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#170 - 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. - # - # ==== Options - # - # When the last parameter is a hash you can add HTML attributes using that - # parameter. The following options are supported: - # - # * :poster - Set an image (like a screenshot) to be shown - # before the video loads. The path is calculated like the +src+ of +image_tag+. - # * :size - Supplied as "{Width}x{Height}" or "{Number}", so "30x45" becomes - # width="30" and height="45", and "50" becomes width="50" and height="50". - # :size will be ignored if the value is not in the correct format. - # * :poster_skip_pipeline will bypass the asset pipeline when using - # the :poster option instead using an asset in the public folder. - # - # ==== Examples - # - # video_tag("trailer") - # # => - # video_tag("trailer.ogg") - # # => - # video_tag("trailer.ogg", controls: true, preload: 'none') - # # => - # video_tag("trailer.m4v", size: "16x10", poster: "screenshot.png") - # # => - # video_tag("trailer.m4v", size: "16x10", poster: "screenshot.png", poster_skip_pipeline: true) - # # => - # video_tag("/trailers/hd.avi", size: "16x16") - # # => - # video_tag("/trailers/hd.avi", size: "16") - # # => - # video_tag("/trailers/hd.avi", height: '32', width: '32') - # # => - # video_tag("trailer.ogg", "trailer.flv") - # # => - # video_tag(["trailer.ogg", "trailer.flv"]) - # # => - # video_tag(["trailer.ogg", "trailer.flv"], size: "160x120") - # # => - # - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#459 - def video_tag(*sources); end - - private - - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#527 - def check_for_image_tag_errors(options); end - - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#518 - def extract_dimensions(size); end - - # @yield [options] - # - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#491 - 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#533 - def resolve_link_as(extname, mime_type); end - - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#544 - 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 - def apply_stylesheet_media_default; end - - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#27 - def apply_stylesheet_media_default=(val); end - - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#25 - def image_decoding; end - - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#25 - def image_decoding=(val); end - - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#24 - def image_loading; end - - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#24 - def image_loading=(val); end - - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#26 - def preload_links_header; end - - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#26 - def preload_links_header=(val); end - end -end - -# Some HTTP client and proxies have a 8kiB header limit -# -# source://actionview//lib/action_view/helpers/asset_tag_helper.rb#543 -ActionView::Helpers::AssetTagHelper::MAX_HEADER_SIZE = T.let(T.unsafe(nil), Integer) - -# This module provides methods for generating asset paths and -# URLs. -# -# image_path("rails.png") -# # => "/assets/rails.png" -# -# image_url("rails.png") -# # => "http://www.example.com/assets/rails.png" -# -# === 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 -# 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 -# host this way, inside the configure block of your environment-specific -# configuration files or config/application.rb: -# -# config.action_controller.asset_host = "assets.example.com" -# -# Helpers take that into account: -# -# image_tag("rails.png") -# # => -# stylesheet_link_tag("application") -# # => -# -# Browsers open a limited number of simultaneous connections to a single -# host. The exact number varies by browser and version. This limit may cause -# some asset downloads to wait for previous assets to finish before they can -# begin. You can use the %d wildcard in the +asset_host+ to -# distribute the requests over four hosts. For example, -# assets%d.example.com will spread the asset requests over -# "assets0.example.com", ..., "assets3.example.com". -# -# image_tag("rails.png") -# # => -# stylesheet_link_tag("application") -# # => -# -# This may improve the asset loading performance of your application. -# It is also possible the combination of additional connection overhead -# (DNS, SSL) and the overall browser connection limits may result in this -# solution being slower. You should be sure to measure your actual -# performance across targeted browsers both before and after this change. -# -# To implement the corresponding hosts you can either set up four actual -# hosts or use wildcard DNS to CNAME the wildcard to a single asset host. -# You can read more about setting up your DNS CNAME records from your ISP. -# -# Note: This is purely a browser performance optimization and is not meant -# for server load balancing. See https://www.die.net/musings/page_load_time/ -# for background and https://www.browserscope.org/?category=network for -# connection limit data. -# -# Alternatively, you can exert more control over the asset host by setting -# +asset_host+ to a proc like this: -# -# ActionController::Base.asset_host = Proc.new { |source| -# "http://assets#{OpenSSL::Digest::SHA256.hexdigest(source).to_i(16) % 2 + 1}.example.com" -# } -# image_tag("rails.png") -# # => -# stylesheet_link_tag("application") -# # => -# -# The example above generates "http://assets1.example.com" and -# "http://assets2.example.com". This option is useful for example if -# you need fewer/more than four hosts, custom host names, etc. -# -# As you see the proc takes a +source+ parameter. That's a string with the -# absolute path of the asset, for example "/assets/rails.png". -# -# ActionController::Base.asset_host = Proc.new { |source| -# if source.end_with?('.css') -# "http://stylesheets.example.com" -# else -# "http://assets.example.com" -# end -# } -# image_tag("rails.png") -# # => -# stylesheet_link_tag("application") -# # => -# -# Alternatively you may ask for a second parameter +request+. That one is -# particularly useful for serving assets from an SSL-protected page. The -# example proc below disables asset hosting for HTTPS connections, while -# still sending assets for plain HTTP requests from asset hosts. If you don't -# have SSL certificates for each of the asset hosts this technique allows you -# to avoid warnings in the client about mixed media. -# Note that the +request+ parameter might not be supplied, e.g. when the assets -# are precompiled with the command bin/rails assets:precompile. Make sure to use a -# +Proc+ instead of a lambda, since a +Proc+ allows missing parameters and sets them -# to +nil+. -# -# config.action_controller.asset_host = Proc.new { |source, request| -# if request && request.ssl? -# "#{request.protocol}#{request.host_with_port}" -# else -# "#{request.protocol}assets.example.com" -# end -# } -# -# You can also implement a custom asset host object that responds to +call+ -# and takes either one or two parameters just like the proc. -# -# config.action_controller.asset_host = AssetHostingWithMinimumSsl.new( -# "http://asset%d.example.com", "https://asset1.example.com" -# ) -# -# source://actionview//lib/action_view/helpers/asset_url_helper.rb#120 -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 - # behavior is "enhanced". You can bypass the asset pipeline by passing in - # skip_pipeline: true to the options. - # - # All other asset *_path helpers delegate through this method. - # - # === With the asset pipeline - # - # All options passed to +asset_path+ will be passed to +compute_asset_path+ - # which is implemented by asset pipeline gems. - # - # asset_path("application.js") # => "/assets/application-60aa4fdc5cea14baf5400fba1abf4f2a46a5166bad4772b1effe341570f07de9.js" - # asset_path('application.js', host: 'example.com') # => "//example.com/assets/application.js" - # asset_path("application.js", host: 'example.com', protocol: 'https') # => "https://example.com/assets/application.js" - # - # === Without the asset pipeline (skip_pipeline: true) - # - # Accepts a type option that can specify the asset's extension. No error - # checking is done to verify the source passed into +asset_path+ is valid - # and that the file exists on disk. - # - # asset_path("application.js", skip_pipeline: true) # => "application.js" - # asset_path("filedoesnotexist.png", skip_pipeline: true) # => "filedoesnotexist.png" - # asset_path("application", type: :javascript, skip_pipeline: true) # => "/javascripts/application.js" - # asset_path("application", type: :stylesheet, skip_pipeline: true) # => "/stylesheets/application.css" - # - # === Options applying to all assets - # - # Below lists scenarios that apply to +asset_path+ whether or not you're - # using the asset pipeline. - # - # - All fully qualified URLs are returned immediately. This bypasses the - # asset pipeline and all other behavior described. - # - # asset_path("http://www.example.com/js/xmlhr.js") # => "http://www.example.com/js/xmlhr.js" - # - # - All assets that begin with a forward slash are assumed to be full - # URLs and will not be expanded. This will bypass the asset pipeline. - # - # asset_path("/foo.png") # => "/foo.png" - # - # - All blank strings will be returned immediately. This bypasses the - # asset pipeline and all other behavior described. - # - # asset_path("") # => "" - # - # - If config.relative_url_root is specified, all assets will have that - # root prepended. - # - # Rails.application.config.relative_url_root = "bar" - # asset_path("foo.js", skip_pipeline: true) # => "bar/foo.js" - # - # - A different asset host can be specified via config.action_controller.asset_host - # this is commonly used in conjunction with a CDN. - # - # Rails.application.config.action_controller.asset_host = "assets.example.com" - # asset_path("foo.js", skip_pipeline: true) # => "http://assets.example.com/foo.js" - # - # - An extension name can be specified manually with extname. - # - # asset_path("foo", skip_pipeline: true, extname: ".js") # => "/foo.js" - # asset_path("foo.css", skip_pipeline: true, extname: ".js") # => "/foo.css.js" - # - # @raise [ArgumentError] - # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#186 - def asset_path(source, options = T.unsafe(nil)); end - - # Computes the full URL to an asset in the public directory. This - # will use +asset_path+ internally, so most of their behaviors - # will be the same. If +:host+ options is set, it overwrites global - # +config.action_controller.asset_host+ setting. - # - # All other options provided are forwarded to +asset_path+ call. - # - # 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 - def asset_url(source, options = T.unsafe(nil)); end - - # Computes the path to an audio asset in the public audios directory. - # Full paths from the document root will be passed through. - # Used internally by +audio_tag+ to build the audio path. - # - # audio_path("horse") # => /audios/horse - # audio_path("horse.wav") # => /audios/horse.wav - # audio_path("sounds/horse.wav") # => /audios/sounds/horse.wav - # 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 - def audio_path(source, options = T.unsafe(nil)); end - - # Computes the full URL to an audio asset in the public audios directory. - # This will use +audio_path+ internally, so most of their behaviors will be the same. - # Since +audio_url+ is based on +asset_url+ method you can set +:host+ options. If +:host+ - # options is set, it overwrites global +config.action_controller.asset_host+ setting. - # - # 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 - 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 - def compute_asset_extname(source, options = T.unsafe(nil)); end - - # Pick an asset host for this source. Returns +nil+ if no host is set, - # the host if no wildcard is set, the host interpolated with the - # numbers 0-3 if it contains %d (the number is the source hash mod 4), - # 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 - 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 - def compute_asset_path(source, options = T.unsafe(nil)); end - - # Computes the path to a font asset. - # Full paths from the document root will be passed through. - # - # font_path("font") # => /fonts/font - # font_path("font.ttf") # => /fonts/font.ttf - # font_path("dir/font.ttf") # => /fonts/dir/font.ttf - # 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 - def font_path(source, options = T.unsafe(nil)); end - - # Computes the full URL to a font asset. - # This will use +font_path+ internally, so most of their behaviors will be the same. - # Since +font_url+ is based on +asset_url+ method you can set +:host+ options. If +:host+ - # options is set, it overwrites global +config.action_controller.asset_host+ setting. - # - # 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 - def font_url(source, options = T.unsafe(nil)); end - - # Computes the path to an image asset. - # Full paths from the document root will be passed through. - # Used internally by +image_tag+ to build the image path: - # - # image_path("edit") # => "/assets/edit" - # image_path("edit.png") # => "/assets/edit.png" - # image_path("icons/edit.png") # => "/assets/icons/edit.png" - # image_path("/icons/edit.png") # => "/icons/edit.png" - # 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 - # plugin authors are encouraged to do so. - # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#377 - def image_path(source, options = T.unsafe(nil)); end - - # Computes the full URL to an image asset. - # This will use +image_path+ internally, so most of their behaviors will be the same. - # Since +image_url+ is based on +asset_url+ method you can set +:host+ options. If +:host+ - # options is set, it overwrites global +config.action_controller.asset_host+ setting. - # - # 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 - def image_url(source, options = T.unsafe(nil)); end - - # Computes the path to a JavaScript asset in the public javascripts directory. - # If the +source+ filename has no extension, .js will be appended (except for explicit URIs) - # Full paths from the document root will be passed through. - # Used internally by +javascript_include_tag+ to build the script path. - # - # javascript_path "xmlhr" # => /assets/xmlhr.js - # javascript_path "dir/xmlhr.js" # => /assets/dir/xmlhr.js - # javascript_path "/dir/xmlhr" # => /dir/xmlhr.js - # 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 - def javascript_path(source, options = T.unsafe(nil)); end - - # Computes the full URL to a JavaScript asset in the public javascripts directory. - # This will use +javascript_path+ internally, so most of their behaviors will be the same. - # Since +javascript_url+ is based on +asset_url+ method you can set +:host+ options. If +:host+ - # options is set, it overwrites global +config.action_controller.asset_host+ setting. - # - # 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 - def javascript_url(source, options = T.unsafe(nil)); end - - # This is the entry point for all assets. - # When using an asset pipeline gem (e.g. propshaft or sprockets-rails), the - # behavior is "enhanced". You can bypass the asset pipeline by passing in - # skip_pipeline: true to the options. - # - # All other asset *_path helpers delegate through this method. - # - # === With the asset pipeline - # - # All options passed to +asset_path+ will be passed to +compute_asset_path+ - # which is implemented by asset pipeline gems. - # - # asset_path("application.js") # => "/assets/application-60aa4fdc5cea14baf5400fba1abf4f2a46a5166bad4772b1effe341570f07de9.js" - # asset_path('application.js', host: 'example.com') # => "//example.com/assets/application.js" - # asset_path("application.js", host: 'example.com', protocol: 'https') # => "https://example.com/assets/application.js" - # - # === Without the asset pipeline (skip_pipeline: true) - # - # Accepts a type option that can specify the asset's extension. No error - # checking is done to verify the source passed into +asset_path+ is valid - # and that the file exists on disk. - # - # asset_path("application.js", skip_pipeline: true) # => "application.js" - # asset_path("filedoesnotexist.png", skip_pipeline: true) # => "filedoesnotexist.png" - # asset_path("application", type: :javascript, skip_pipeline: true) # => "/javascripts/application.js" - # asset_path("application", type: :stylesheet, skip_pipeline: true) # => "/stylesheets/application.css" - # - # === Options applying to all assets - # - # Below lists scenarios that apply to +asset_path+ whether or not you're - # using the asset pipeline. - # - # - All fully qualified URLs are returned immediately. This bypasses the - # asset pipeline and all other behavior described. - # - # asset_path("http://www.example.com/js/xmlhr.js") # => "http://www.example.com/js/xmlhr.js" - # - # - All assets that begin with a forward slash are assumed to be full - # URLs and will not be expanded. This will bypass the asset pipeline. - # - # asset_path("/foo.png") # => "/foo.png" - # - # - All blank strings will be returned immediately. This bypasses the - # asset pipeline and all other behavior described. - # - # asset_path("") # => "" - # - # - If config.relative_url_root is specified, all assets will have that - # root prepended. - # - # Rails.application.config.relative_url_root = "bar" - # asset_path("foo.js", skip_pipeline: true) # => "bar/foo.js" - # - # - A different asset host can be specified via config.action_controller.asset_host - # this is commonly used in conjunction with a CDN. - # - # Rails.application.config.action_controller.asset_host = "assets.example.com" - # asset_path("foo.js", skip_pipeline: true) # => "http://assets.example.com/foo.js" - # - # - An extension name can be specified manually with extname. - # - # asset_path("foo", skip_pipeline: true, extname: ".js") # => "/foo.js" - # asset_path("foo.css", skip_pipeline: true, extname: ".js") # => "/foo.css.js" - # aliased to avoid conflicts with an asset_path named route - # - # @raise [ArgumentError] - # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#186 - def path_to_asset(source, options = T.unsafe(nil)); end - - # Computes the path to an audio asset in the public audios directory. - # Full paths from the document root will be passed through. - # Used internally by +audio_tag+ to build the audio path. - # - # audio_path("horse") # => /audios/horse - # audio_path("horse.wav") # => /audios/horse.wav - # audio_path("sounds/horse.wav") # => /audios/sounds/horse.wav - # audio_path("/sounds/horse.wav") # => /sounds/horse.wav - # 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 - def path_to_audio(source, options = T.unsafe(nil)); end - - # Computes the path to a font asset. - # Full paths from the document root will be passed through. - # - # font_path("font") # => /fonts/font - # font_path("font.ttf") # => /fonts/font.ttf - # font_path("dir/font.ttf") # => /fonts/dir/font.ttf - # font_path("/dir/font.ttf") # => /dir/font.ttf - # 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 - def path_to_font(source, options = T.unsafe(nil)); end - - # Computes the path to an image asset. - # Full paths from the document root will be passed through. - # Used internally by +image_tag+ to build the image path: - # - # image_path("edit") # => "/assets/edit" - # image_path("edit.png") # => "/assets/edit.png" - # image_path("icons/edit.png") # => "/assets/icons/edit.png" - # image_path("/icons/edit.png") # => "/icons/edit.png" - # 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 - # 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 - def path_to_image(source, options = T.unsafe(nil)); end - - # Computes the path to a JavaScript asset in the public javascripts directory. - # If the +source+ filename has no extension, .js will be appended (except for explicit URIs) - # Full paths from the document root will be passed through. - # Used internally by +javascript_include_tag+ to build the script path. - # - # javascript_path "xmlhr" # => /assets/xmlhr.js - # javascript_path "dir/xmlhr.js" # => /assets/dir/xmlhr.js - # javascript_path "/dir/xmlhr" # => /dir/xmlhr.js - # 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 - # aliased to avoid conflicts with a javascript_path named route - # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#320 - def path_to_javascript(source, options = T.unsafe(nil)); end - - # Computes the path to a stylesheet asset in the public stylesheets directory. - # If the +source+ filename has no extension, .css will be appended (except for explicit URIs). - # Full paths from the document root will be passed through. - # Used internally by +stylesheet_link_tag+ to build the stylesheet path. - # - # stylesheet_path "style" # => /assets/style.css - # stylesheet_path "dir/style.css" # => /assets/dir/style.css - # stylesheet_path "/dir/style.css" # => /dir/style.css - # 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 - # aliased to avoid conflicts with a stylesheet_path named route - # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#347 - def path_to_stylesheet(source, options = T.unsafe(nil)); end - - # Computes the path to a video asset in the public videos directory. - # Full paths from the document root will be passed through. - # Used internally by +video_tag+ to build the video path. - # - # video_path("hd") # => /videos/hd - # video_path("hd.avi") # => /videos/hd.avi - # video_path("trailers/hd.avi") # => /videos/trailers/hd.avi - # video_path("/trailers/hd.avi") # => /trailers/hd.avi - # 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 - 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 - def public_compute_asset_path(source, options = T.unsafe(nil)); end - - # Computes the path to a stylesheet asset in the public stylesheets directory. - # If the +source+ filename has no extension, .css will be appended (except for explicit URIs). - # Full paths from the document root will be passed through. - # Used internally by +stylesheet_link_tag+ to build the stylesheet path. - # - # stylesheet_path "style" # => /assets/style.css - # stylesheet_path "dir/style.css" # => /assets/dir/style.css - # stylesheet_path "/dir/style.css" # => /dir/style.css - # 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 - def stylesheet_path(source, options = T.unsafe(nil)); end - - # Computes the full URL to a stylesheet asset in the public stylesheets directory. - # This will use +stylesheet_path+ internally, so most of their behaviors will be the same. - # Since +stylesheet_url+ is based on +asset_url+ method you can set +:host+ options. If +:host+ - # options is set, it overwrites global +config.action_controller.asset_host+ setting. - # - # 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 - def stylesheet_url(source, options = T.unsafe(nil)); end - - # Computes the full URL to an asset in the public directory. This - # will use +asset_path+ internally, so most of their behaviors - # will be the same. If +:host+ options is set, it overwrites global - # +config.action_controller.asset_host+ setting. - # - # All other options provided are forwarded to +asset_path+ call. - # - # 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 - # aliased to avoid conflicts with an asset_url named route - # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#230 - def url_to_asset(source, options = T.unsafe(nil)); end - - # Computes the full URL to an audio asset in the public audios directory. - # This will use +audio_path+ internally, so most of their behaviors will be the same. - # Since +audio_url+ is based on +asset_url+ method you can set +:host+ options. If +:host+ - # options is set, it overwrites global +config.action_controller.asset_host+ setting. - # - # 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 - def url_to_audio(source, options = T.unsafe(nil)); end - - # Computes the full URL to a font asset. - # This will use +font_path+ internally, so most of their behaviors will be the same. - # Since +font_url+ is based on +asset_url+ method you can set +:host+ options. If +:host+ - # options is set, it overwrites global +config.action_controller.asset_host+ setting. - # - # 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 - def url_to_font(source, options = T.unsafe(nil)); end - - # Computes the full URL to an image asset. - # This will use +image_path+ internally, so most of their behaviors will be the same. - # Since +image_url+ is based on +asset_url+ method you can set +:host+ options. If +:host+ - # options is set, it overwrites global +config.action_controller.asset_host+ setting. - # - # 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 - def url_to_image(source, options = T.unsafe(nil)); end - - # Computes the full URL to a JavaScript asset in the public javascripts directory. - # This will use +javascript_path+ internally, so most of their behaviors will be the same. - # Since +javascript_url+ is based on +asset_url+ method you can set +:host+ options. If +:host+ - # options is set, it overwrites global +config.action_controller.asset_host+ setting. - # - # 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 - def url_to_javascript(source, options = T.unsafe(nil)); end - - # Computes the full URL to a stylesheet asset in the public stylesheets directory. - # This will use +stylesheet_path+ internally, so most of their behaviors will be the same. - # Since +stylesheet_url+ is based on +asset_url+ method you can set +:host+ options. If +:host+ - # options is set, it overwrites global +config.action_controller.asset_host+ setting. - # - # 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 - def url_to_stylesheet(source, options = T.unsafe(nil)); end - - # Computes the full URL to a video asset in the public videos directory. - # This will use +video_path+ internally, so most of their behaviors will be the same. - # Since +video_url+ is based on +asset_url+ method you can set +:host+ options. If +:host+ - # options is set, it overwrites global +config.action_controller.asset_host+ setting. - # - # 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 - def url_to_video(source, options = T.unsafe(nil)); end - - # Computes the path to a video asset in the public videos directory. - # Full paths from the document root will be passed through. - # Used internally by +video_tag+ to build the video path. - # - # video_path("hd") # => /videos/hd - # video_path("hd.avi") # => /videos/hd.avi - # video_path("trailers/hd.avi") # => /videos/trailers/hd.avi - # 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 - def video_path(source, options = T.unsafe(nil)); end - - # Computes the full URL to a video asset in the public videos directory. - # This will use +video_path+ internally, so most of their behaviors will be the same. - # Since +video_url+ is based on +asset_url+ method you can set +:host+ options. If +:host+ - # options is set, it overwrites global +config.action_controller.asset_host+ setting. - # - # 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 - def video_url(source, options = T.unsafe(nil)); end -end - -# source://actionview//lib/action_view/helpers/asset_url_helper.rb#235 -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 -ActionView::Helpers::AssetUrlHelper::ASSET_PUBLIC_DIRECTORIES = T.let(T.unsafe(nil), Hash) - -# source://actionview//lib/action_view/helpers/asset_url_helper.rb#121 -ActionView::Helpers::AssetUrlHelper::URI_REGEXP = T.let(T.unsafe(nil), Regexp) - -# 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 - # template languages). - # - # Full usage example: - # - # config/routes.rb: - # Rails.application.routes.draw do - # resources :posts - # root to: "posts#index" - # end - # - # app/controllers/posts_controller.rb: - # class PostsController < ApplicationController - # # GET /posts.html - # # GET /posts.atom - # def index - # @posts = Post.all - # - # respond_to do |format| - # format.html - # format.atom - # end - # end - # end - # - # app/views/posts/index.atom.builder: - # atom_feed do |feed| - # feed.title("My great blog!") - # feed.updated(@posts[0].created_at) if @posts.length > 0 - # - # @posts.each do |post| - # feed.entry(post) do |entry| - # entry.title(post.title) - # entry.content(post.body, type: 'html') - # - # entry.author do |author| - # author.name("DHH") - # end - # end - # end - # end - # - # The options for atom_feed are: - # - # * :language: Defaults to "en-US". - # * :root_url: The HTML alternative that this feed is doubling for. Defaults to / on the current host. - # * :url: The URL for this feed. Defaults to the current URL. - # * :id: The id for this feed. Defaults to "tag:localhost,2005:/posts", in this case. - # * :schema_date: The date at which the tag scheme for the feed was first used. A good default is the year you - # created the feed. See http://feedvalidator.org/docs/error/InvalidTAG.html for more information. If not specified, - # 2005 is used (as an "I don't care" value). - # * :instruct: Hash of XML processing instructions in the form {target => {attribute => value, }} or {target => [{attribute => value, }, ]} - # - # Other namespaces can be added to the root element: - # - # app/views/posts/index.atom.builder: - # atom_feed({'xmlns:app' => 'http://www.w3.org/2007/app', - # 'xmlns:openSearch' => 'http://a9.com/-/spec/opensearch/1.1/'}) do |feed| - # feed.title("My great blog!") - # feed.updated((@posts.first.created_at)) - # feed.tag!('openSearch:totalResults', 10) - # - # @posts.each do |post| - # feed.entry(post) do |entry| - # entry.title(post.title) - # entry.content(post.body, type: 'html') - # entry.tag!('app:edited', Time.now) - # - # entry.author do |author| - # author.name("DHH") - # end - # end - # end - # end - # - # The Atom spec defines five elements (content rights title subtitle - # 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: - # - # entry.summary type: 'xhtml' do |xhtml| - # xhtml.p pluralize(order.line_items.count, "line item") - # xhtml.p "Shipped to #{order.address}" - # xhtml.p "Paid by #{order.pay_type}" - # end - # - # - # atom_feed yields an +AtomFeedBuilder+ instance. Nested elements yield - # an +AtomBuilder+ instance. - # - # source://actionview//lib/action_view/helpers/atom_feed_helper.rb#98 - def atom_feed(options = T.unsafe(nil), &block); end -end - -# source://actionview//lib/action_view/helpers/atom_feed_helper.rb#129 -class ActionView::Helpers::AtomFeedHelper::AtomBuilder - # @return [AtomBuilder] a new instance of AtomBuilder - # - # source://actionview//lib/action_view/helpers/atom_feed_helper.rb#132 - def initialize(xml); end - - private - - # 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. - # - # source://actionview//lib/action_view/helpers/atom_feed_helper.rb#140 - def method_missing(method, *arguments, &block); end - - # True if the method name matches one of the five elements defined - # in the Atom spec as potentially containing XHTML content and - # if type: 'xhtml' is, in fact, specified. - # - # @return [Boolean] - # - # source://actionview//lib/action_view/helpers/atom_feed_helper.rb#155 - def xhtml_block?(method, arguments); end -end - -# source://actionview//lib/action_view/helpers/atom_feed_helper.rb#130 -ActionView::Helpers::AtomFeedHelper::AtomBuilder::XHTML_TAG_NAMES = T.let(T.unsafe(nil), Set) - -# source://actionview//lib/action_view/helpers/atom_feed_helper.rb#163 -class ActionView::Helpers::AtomFeedHelper::AtomFeedBuilder < ::ActionView::Helpers::AtomFeedHelper::AtomBuilder - # @return [AtomFeedBuilder] a new instance of AtomFeedBuilder - # - # source://actionview//lib/action_view/helpers/atom_feed_helper.rb#164 - def initialize(xml, view, feed_options = T.unsafe(nil)); end - - # Creates an entry tag for a specific record and prefills the id using class and id. - # - # Options: - # - # * :published: Time first published. Defaults to the created_at attribute on the record if one such exists. - # * :updated: Time of update. Defaults to the updated_at attribute on the record if one such exists. - # * :url: The URL for this entry or +false+ or +nil+ for not having a link tag. Defaults to the +polymorphic_url+ for the record. - # * :id: The ID for this entry. Defaults to "tag:#{@view.request.host},#{@feed_options[:schema_date]}:#{record.class}/#{record.id}" - # * :type: The TYPE for this entry. Defaults to "text/html". - # - # source://actionview//lib/action_view/helpers/atom_feed_helper.rb#182 - def entry(record, options = T.unsafe(nil)); end - - # Accepts a Date or Time object and inserts it in the proper format. If +nil+ is passed, current time in UTC is used. - # - # source://actionview//lib/action_view/helpers/atom_feed_helper.rb#169 - def updated(date_or_time = T.unsafe(nil)); end -end - -# 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 - # rather than an entire action or page. This technique is useful - # caching pieces like menus, lists of new topics, static HTML - # fragments, and so on. This method takes a block that contains - # the content you wish to cache. - # - # The best way to use this is by doing recyclable key-based cache expiration - # on top of a cache store like Memcached or Redis that'll automatically - # kick out old entries. - # - # When using this method, you list the cache dependency as the name of the cache, like so: - # - # <% cache project do %> - # All the topics on this project - # <%= render project.topics %> - # <% end %> - # - # This approach will assume that when a new topic is added, you'll touch - # the project. The cache key generated from this call will be something like: - # - # views/template/action:7a1156131a6928cb0026877f8b749ac9/projects/123 - # ^template path ^template tree digest ^class ^id - # - # This cache key is stable, but it's combined with a cache version derived from the project - # record. When the project updated_at is touched, the #cache_version changes, even - # if the key stays stable. This means that unlike a traditional key-based cache expiration - # approach, you won't be generating cache trash, unused keys, simply because the dependent - # record is updated. - # - # If your template cache depends on multiple sources (try to avoid this to keep things simple), - # you can name all these dependencies as part of an array: - # - # <% cache [ project, current_user ] do %> - # All the topics on this project - # <%= render project.topics %> - # <% end %> - # - # This will include both records as part of the cache key and updating either of them will - # expire the cache. - # - # ==== \Template digest - # - # The template digest that's added to the cache key is computed by taking an MD5 of the - # contents of the entire template file. This ensures that your caches will automatically - # expire when you change the template file. - # - # Note that the MD5 is taken of the entire template file, not just what's within the - # cache do/end call. So it's possible that changing something outside of that call will - # still expire the cache. - # - # Additionally, the digestor will automatically look through your template file for - # explicit and implicit dependencies, and include those as part of the digest. - # - # The digestor can be bypassed by passing skip_digest: true as an option to the cache call: - # - # <% cache project, skip_digest: true do %> - # All the topics on this project - # <%= render project.topics %> - # <% end %> - # - # ==== Implicit dependencies - # - # Most template dependencies can be derived from calls to render in the template itself. - # Here are some examples of render calls that Cache Digests knows how to decode: - # - # render partial: "comments/comment", collection: commentable.comments - # render "comments/comments" - # render 'comments/comments' - # render('comments/comments') - # - # render "header" translates to render("comments/header") - # - # render(@topic) translates to render("topics/topic") - # render(topics) translates to render("topics/topic") - # render(message.topics) translates to render("topics/topic") - # - # It's not possible to derive all render calls like that, though. - # Here are a few examples of things that can't be derived: - # - # render group_of_attachments - # render @project.documents.where(published: true).order('created_at') - # - # You will have to rewrite those to the explicit form: - # - # render partial: 'attachments/attachment', collection: group_of_attachments - # render partial: 'documents/document', collection: @project.documents.where(published: true).order('created_at') - # - # === Explicit dependencies - # - # Sometimes you'll have template dependencies that can't be derived at all. This is typically - # the case when you have template rendering that happens in helpers. Here's an example: - # - # <%= render_sortable_todolists @project.todolists %> - # - # You'll need to use a special comment format to call those out: - # - # <%# Template Dependency: todolists/todolist %> - # <%= render_sortable_todolists @project.todolists %> - # - # In some cases, like a single table inheritance setup, you might have - # a bunch of explicit dependencies. Instead of writing every template out, - # you can use a wildcard to match any template in a directory: - # - # <%# Template Dependency: events/* %> - # <%= render_categorizable_events @person.events %> - # - # This marks every template in the directory as a dependency. To find those - # templates, the wildcard path must be absolutely defined from app/views or paths - # otherwise added with +prepend_view_path+ or +append_view_path+. - # This way the wildcard for app/views/recordings/events would be recordings/events/* etc. - # - # The pattern used to match explicit dependencies is /# Template Dependency: (\S+)/, - # so it's important that you type it out just so. - # You can only declare one template dependency per line. - # - # === External dependencies - # - # If you use a helper method, for example, inside a cached block and - # you then update that helper, you'll have to bump the cache as well. - # It doesn't really matter how you do it, but the MD5 of the template file - # must change. One recommendation is to simply be explicit in a comment, like: - # - # <%# Helper Dependency Updated: May 6, 2012 at 6pm %> - # <%= some_helper_method(person) %> - # - # Now all you have to do is change that timestamp when the helper method changes. - # - # === Collection Caching - # - # When rendering a collection of objects that each use the same partial, a :cached - # option can be passed. - # - # For collections rendered such: - # - # <%= render partial: 'projects/project', collection: @projects, cached: true %> - # - # The cached: true will make Action View's rendering read several templates - # from cache at once instead of one call per template. - # - # Templates in the collection not already cached are written to cache. - # - # Works great alongside individual template fragment caching. - # For instance if the template the collection renders is cached like: - # - # # projects/_project.html.erb - # <% cache project do %> - # <%# ... %> - # <% end %> - # - # Any collection renders will find those cached templates when attempting - # to read multiple templates at once. - # - # If your collection cache depends on multiple sources (try to avoid this to keep things simple), - # you can name all these dependencies as part of a block that returns an array: - # - # <%= render partial: 'projects/project', collection: @projects, cached: -> project { [ project, current_user ] } %> - # - # This will include both records as part of the cache key and updating either of them will - # expire the cache. - # - # source://actionview//lib/action_view/helpers/cache_helper.rb#168 - def cache(name = T.unsafe(nil), options = T.unsafe(nil), &block); end - - # This helper returns the name of a cache key for a given fragment cache - # call. By supplying skip_digest: true to cache, the digestion of cache - # fragments can be manually bypassed. This is useful when cache fragments - # cannot be manually expired unless you know the exact key which is the - # case when using memcached. - # - # source://actionview//lib/action_view/helpers/cache_helper.rb#240 - def cache_fragment_name(name = T.unsafe(nil), skip_digest: T.unsafe(nil), digest_path: T.unsafe(nil)); end - - # Cache fragments of a view if +condition+ is true - # - # <% cache_if admin?, project do %> - # All the topics on this project - # <%= render project.topics %> - # <% end %> - # - # source://actionview//lib/action_view/helpers/cache_helper.rb#215 - def cache_if(condition, name = T.unsafe(nil), options = T.unsafe(nil), &block); end - - # Cache fragments of a view unless +condition+ is true - # - # <% cache_unless admin?, project do %> - # All the topics on this project - # <%= render project.topics %> - # <% end %> - # - # source://actionview//lib/action_view/helpers/cache_helper.rb#231 - def cache_unless(condition, name = T.unsafe(nil), options = T.unsafe(nil), &block); end - - # Returns whether the current view fragment is within a +cache+ block. - # - # Useful when certain fragments aren't cacheable: - # - # <% cache project do %> - # <% raise StandardError, "Caching private data!" if caching? %> - # <% end %> - # - # @return [Boolean] - # - # source://actionview//lib/action_view/helpers/cache_helper.rb#188 - def caching?; end - - # source://actionview//lib/action_view/helpers/cache_helper.rb#248 - def digest_path_from_template(template); end - - # Raises +UncacheableFragmentError+ when called from within a +cache+ block. - # - # Useful to denote helper methods that can't participate in fragment caching: - # - # def project_name_with_time(project) - # uncacheable! - # "#{project.name} - #{Time.now}" - # end - # - # # Which will then raise if used within a +cache+ block: - # <% cache project do %> - # <%= project_name_with_time(project) %> - # <% end %> - # - # @raise [UncacheableFragmentError] - # - # source://actionview//lib/action_view/helpers/cache_helper.rb#205 - def uncacheable!; end - - private - - # source://actionview//lib/action_view/helpers/cache_helper.rb#270 - def fragment_for(name = T.unsafe(nil), options = T.unsafe(nil), &block); end - - # source://actionview//lib/action_view/helpers/cache_helper.rb#259 - def fragment_name_with_digest(name, digest_path); end - - # source://actionview//lib/action_view/helpers/cache_helper.rb#280 - def read_fragment_for(name, options); end - - # source://actionview//lib/action_view/helpers/cache_helper.rb#284 - def write_fragment_for(name, options); end -end - -# source://actionview//lib/action_view/helpers/cache_helper.rb#295 -module ActionView::Helpers::CacheHelper::CachingRegistry - extend ::ActionView::Helpers::CacheHelper::CachingRegistry - - # @return [Boolean] - # - # source://actionview//lib/action_view/helpers/cache_helper.rb#298 - def caching?; end - - # source://actionview//lib/action_view/helpers/cache_helper.rb#302 - 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 -# 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]. -# -# source://actionview//lib/action_view/helpers/capture_helper.rb#13 -module ActionView::Helpers::CaptureHelper - # 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... - # - # <% @greeting = capture do %> - # Welcome to my shiny new web page! The date and time is - # <%= Time.now %> - # <% end %> - # - # ...and Builder (RXML) templates. - # - # @timestamp = capture do - # "The current timestamp is #{Time.now}." - # end - # - # You can then use that variable anywhere else. For example: - # - # - # <%= @greeting %> - # - # <%= @greeting %> - # - # - # - # The return of capture is the string generated by the block. For Example: - # - # @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 - - # 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 - # or the layout, you would pass the identifier as an argument to content_for. - # - # Note: yield can still be used to retrieve the stored content, but calling - # yield doesn't work in helper modules, while content_for does. - # - # <% content_for :not_authorized do %> - # alert('You are not authorized to do that!') - # <% end %> - # - # You can then use content_for :not_authorized anywhere in your templates. - # - # <%= content_for :not_authorized if current_user.nil? %> - # - # This is equivalent to: - # - # <%= yield :not_authorized if current_user.nil? %> - # - # content_for, however, can also be used in helper modules. - # - # module StorageHelper - # def stored_content - # content_for(:storage) || "Your storage is empty" - # end - # end - # - # This helper works just like normal helpers. - # - # <%= stored_content %> - # - # You can also use the yield syntax alongside an existing call to - # yield in a layout. For example: - # - # <%# This is the layout %> - # - # - # My Website - # <%= yield :script %> - # - # - # <%= yield %> - # - # - # - # And now, we'll create a view that has a content_for call that - # creates the script identifier. - # - # <%# This is our view %> - # Please login! - # - # <% content_for :script do %> - # - # <% end %> - # - # Then, in another view, you could to do something like this: - # - # <%= link_to 'Logout', action: 'logout', remote: true %> - # - # <% content_for :script do %> - # <%= javascript_include_tag :defaults %> - # <% end %> - # - # That will place +script+ tags for your default set of JavaScript files on the page; - # this technique is useful if you'll only be using these scripts in a few views. - # - # Note that content_for concatenates (default) the blocks it is given for a particular - # identifier in order. For example: - # - # <% content_for :navigation do %> - #
  • <%= link_to 'Home', action: 'index' %>
  • - # <% end %> - # - # And in another place: - # - # <% content_for :navigation do %> - #
  • <%= link_to 'Login', action: 'login' %>
  • - # <% end %> - # - # Then, in another template or layout, this code would render both links in order: - # - #
      <%= content_for :navigation %>
    - # - # If the flush parameter is +true+ content_for replaces the blocks it is given. For example: - # - # <% content_for :navigation do %> - #
  • <%= link_to 'Home', action: 'index' %>
  • - # <% end %> - # - # <%# Add some other content, or use a different template: %> - # - # <% content_for :navigation, flush: true do %> - #
  • <%= link_to 'Login', action: 'login' %>
  • - # <% end %> - # - # Then, in another template or layout, this code would render only the last link: - # - #
      <%= content_for :navigation %>
    - # - # Lastly, simple content can be passed as a parameter: - # - # <% content_for :script, javascript_include_tag(:defaults) %> - # - # 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 - 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 %> - # - # - # My Website - # <%= yield :script %> - # - # - # <%= yield %> - # <%= yield :right_col %> - # - # - # - # @return [Boolean] - # - # source://actionview//lib/action_view/helpers/capture_helper.rb#195 - def content_for?(name); end - - # The same as +content_for+ but when used with streaming flushes - # straight back to the layout. In other words, if you want to - # concatenate several times to the same buffer when rendering a given - # 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 - 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 - def with_output_buffer(buf = T.unsafe(nil)); end -end - -# This module keeps all methods and behavior in ActionView -# that simply delegates to the controller. -# -# source://actionview//lib/action_view/helpers/controller_helper.rb#9 -module ActionView::Helpers::ControllerHelper - # source://actionview//lib/action_view/helpers/controller_helper.rb#16 - def action_name(*_arg0, **_arg1, &_arg2); end - - # source://actionview//lib/action_view/helpers/controller_helper.rb#18 - def assign_controller(controller); end - - def controller; end - def controller=(_arg0); end - - # source://actionview//lib/action_view/helpers/controller_helper.rb#16 - def controller_name(*_arg0, **_arg1, &_arg2); end - - # source://actionview//lib/action_view/helpers/controller_helper.rb#16 - def controller_path(*_arg0, **_arg1, &_arg2); end - - # source://actionview//lib/action_view/helpers/controller_helper.rb#16 - def cookies(*_arg0, **_arg1, &_arg2); end - - # source://actionview//lib/action_view/helpers/controller_helper.rb#16 - def flash(*_arg0, **_arg1, &_arg2); end - - # source://actionview//lib/action_view/helpers/controller_helper.rb#16 - def headers(*_arg0, **_arg1, &_arg2); end - - # source://actionview//lib/action_view/helpers/controller_helper.rb#26 - def logger; end - - # source://actionview//lib/action_view/helpers/controller_helper.rb#16 - def params(*_arg0, **_arg1, &_arg2); end - - def request; end - def request=(_arg0); end - - # source://actionview//lib/action_view/helpers/controller_helper.rb#16 - def request_forgery_protection_token(*_arg0, **_arg1, &_arg2); end - - # @return [Boolean] - # - # source://actionview//lib/action_view/helpers/controller_helper.rb#30 - def respond_to?(method_name, include_private = T.unsafe(nil)); end - - # source://actionview//lib/action_view/helpers/controller_helper.rb#16 - def response(*_arg0, **_arg1, &_arg2); end - - # source://actionview//lib/action_view/helpers/controller_helper.rb#16 - def session(*_arg0, **_arg1, &_arg2); end -end - -# source://actionview//lib/action_view/helpers/controller_helper.rb#12 -ActionView::Helpers::ControllerHelper::CONTROLLER_DELEGATES = T.let(T.unsafe(nil), Array) - -# source://actionview//lib/action_view/helpers/csp_helper.rb#6 -module ActionView::Helpers::CspHelper - # Returns a meta tag "csp-nonce" with the per-session nonce value - # for allowing inline - # - # +html_options+ may be a hash of attributes for the \ - # - # Instead of passing the content as an argument, you can also use a block - # in which case, you pass your +html_options+ as the first parameter. - # - # <%= javascript_tag type: 'application/javascript' do -%> - # alert('All is good') - # <% end -%> - # - # If you have a content security policy enabled then you can add an automatic - # nonce value by passing nonce: true as part of +html_options+. Example: - # - # <%= javascript_tag nonce: true do -%> - # alert('All is good') - # <% end -%> - # - # source://actionview//lib/action_view/helpers/javascript_helper.rb#74 - 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 -ActionView::Helpers::JavaScriptHelper::JS_ESCAPE_MAP = T.let(T.unsafe(nil), Hash) - -# Provides methods for converting numbers into formatted strings. -# Methods are provided for phone numbers, currency, percentage, -# precision, positional notation, file size, and pretty printing. -# -# 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 -module ActionView::Helpers::NumberHelper - # Formats a +number+ into a currency string (e.g., $13.65). You - # can customize the format in the +options+ hash. - # - # The currency unit and number formatting of the current locale will be used - # unless otherwise specified in the provided options. No currency conversion - # is performed. If the user is given a way to change their locale, they will - # also be able to change the relative value of the currency displayed with - # this helper. If your application will ever support multiple locales, you - # may want to specify a constant :locale option or consider - # using a library capable of currency conversion. - # - # ==== Options - # - # * :locale - Sets the locale to be used for formatting - # (defaults to current locale). - # * :precision - Sets the level of precision (defaults - # to 2). - # * :unit - Sets the denomination of the currency - # (defaults to "$"). - # * :separator - Sets the separator between the units - # (defaults to "."). - # * :delimiter - Sets the thousands delimiter (defaults - # to ","). - # * :format - Sets the format for non-negative numbers - # (defaults to "%u%n"). Fields are %u for the - # currency, and %n for the number. - # * :negative_format - Sets the format for negative - # numbers (defaults to prepending a hyphen to the formatted - # number given by :format). Accepts the same fields - # than :format, except %n is here the - # absolute value of the number. - # * :raise - If true, raises +InvalidNumberError+ when - # the argument is invalid. - # * :strip_insignificant_zeros - If +true+ removes - # insignificant zeros after the decimal separator (defaults to - # +false+). - # - # ==== Examples - # - # number_to_currency(1234567890.50) # => $1,234,567,890.50 - # number_to_currency(1234567890.506) # => $1,234,567,890.51 - # number_to_currency(1234567890.506, precision: 3) # => $1,234,567,890.506 - # number_to_currency(1234567890.506, locale: :fr) # => 1 234 567 890,51 € - # number_to_currency("123a456") # => $123a456 - # - # number_to_currency("123a456", raise: true) # => InvalidNumberError - # - # number_to_currency(-0.456789, precision: 0) - # # => "$0" - # number_to_currency(-1234567890.50, negative_format: "(%u%n)") - # # => ($1,234,567,890.50) - # number_to_currency(1234567890.50, unit: "R$", separator: ",", delimiter: "") - # # => R$1234567890,50 - # number_to_currency(1234567890.50, unit: "R$", separator: ",", delimiter: "", format: "%n %u") - # # => 1234567890,50 R$ - # number_to_currency(1234567890.50, strip_insignificant_zeros: true) - # # => "$1,234,567,890.5" - # - # source://actionview//lib/action_view/helpers/number_helper.rb#127 - def number_to_currency(number, options = T.unsafe(nil)); end - - # Pretty prints (formats and approximates) a number in a way it - # is more readable by humans (e.g.: 1200000000 becomes "1.2 - # Billion"). This is useful for numbers that can get very large - # (and too hard to read). - # - # See number_to_human_size if you want to print a file - # size. - # - # You can also define your own unit-quantifier names if you want - # to use other decimal units (e.g.: 1500 becomes "1.5 - # kilometers", 0.150 becomes "150 milliliters", etc). You may - # define a wide range of unit quantifiers, even fractional ones - # (centi, deci, mili, etc). - # - # ==== Options - # - # * :locale - Sets the locale to be used for formatting - # (defaults to current locale). - # * :precision - Sets the precision of the number - # (defaults to 3). - # * :significant - If +true+, precision will be the number - # of significant_digits. If +false+, the number of fractional - # digits (defaults to +true+) - # * :separator - Sets the separator between the - # fractional and integer digits (defaults to "."). - # * :delimiter - Sets the thousands delimiter (defaults - # to ""). - # * :strip_insignificant_zeros - If +true+ removes - # insignificant zeros after the decimal separator (defaults to - # +true+) - # * :units - A Hash of unit quantifier names. Or a - # string containing an i18n scope where to find this hash. It - # might have the following keys: - # * *integers*: :unit, :ten, - # :hundred, :thousand, :million, - # :billion, :trillion, - # :quadrillion - # * *fractionals*: :deci, :centi, - # :mili, :micro, :nano, - # :pico, :femto - # * :format - Sets the format of the output string - # (defaults to "%n %u"). The field types are: - # * %u - The quantifier (ex.: 'thousand') - # * %n - The number - # * :raise - If true, raises +InvalidNumberError+ when - # the argument is invalid. - # - # ==== Examples - # - # number_to_human(123) # => "123" - # number_to_human(1234) # => "1.23 Thousand" - # number_to_human(12345) # => "12.3 Thousand" - # number_to_human(1234567) # => "1.23 Million" - # number_to_human(1234567890) # => "1.23 Billion" - # number_to_human(1234567890123) # => "1.23 Trillion" - # number_to_human(1234567890123456) # => "1.23 Quadrillion" - # number_to_human(1234567890123456789) # => "1230 Quadrillion" - # number_to_human(489939, precision: 2) # => "490 Thousand" - # number_to_human(489939, precision: 4) # => "489.9 Thousand" - # number_to_human(1234567, precision: 4, - # significant: false) # => "1.2346 Million" - # number_to_human(1234567, precision: 1, - # separator: ',', - # significant: false) # => "1,2 Million" - # - # number_to_human(500000000, precision: 5) # => "500 Million" - # number_to_human(12345012345, significant: false) # => "12.345 Billion" - # - # Non-significant zeros after the decimal separator are stripped - # out by default (set :strip_insignificant_zeros to - # +false+ to change that): - # - # number_to_human(12.00001) # => "12" - # number_to_human(12.00001, strip_insignificant_zeros: false) # => "12.0" - # - # ==== Custom Unit Quantifiers - # - # You can also use your own custom unit quantifiers: - # number_to_human(500000, units: {unit: "ml", thousand: "lt"}) # => "500 lt" - # - # If in your I18n locale you have: - # distance: - # centi: - # one: "centimeter" - # other: "centimeters" - # unit: - # one: "meter" - # other: "meters" - # thousand: - # one: "kilometer" - # other: "kilometers" - # billion: "gazillion-distance" - # - # Then you could do: - # - # number_to_human(543934, units: :distance) # => "544 kilometers" - # number_to_human(54393498, units: :distance) # => "54400 kilometers" - # number_to_human(54393498000, units: :distance) # => "54.4 gazillion-distance" - # number_to_human(343, units: :distance, precision: 1) # => "300 meters" - # number_to_human(1, units: :distance) # => "1 meter" - # number_to_human(0.34, units: :distance) # => "34 centimeters" - # - # source://actionview//lib/action_view/helpers/number_helper.rb#403 - def number_to_human(number, options = T.unsafe(nil)); end - - # Formats the bytes in +number+ into a more understandable - # representation (e.g., giving it 1500 yields 1.46 KB). This - # method is useful for reporting file sizes to users. You can - # customize the format in the +options+ hash. - # - # See number_to_human if you want to pretty-print a - # generic number. - # - # ==== Options - # - # * :locale - Sets the locale to be used for formatting - # (defaults to current locale). - # * :precision - Sets the precision of the number - # (defaults to 3). - # * :significant - If +true+, precision will be the number - # of significant_digits. If +false+, the number of fractional - # digits (defaults to +true+) - # * :separator - Sets the separator between the - # fractional and integer digits (defaults to "."). - # * :delimiter - Sets the thousands delimiter (defaults - # to ""). - # * :strip_insignificant_zeros - If +true+ removes - # insignificant zeros after the decimal separator (defaults to - # +true+) - # * :raise - If true, raises +InvalidNumberError+ when - # the argument is invalid. - # - # ==== Examples - # - # number_to_human_size(123) # => 123 Bytes - # number_to_human_size(1234) # => 1.21 KB - # number_to_human_size(12345) # => 12.1 KB - # number_to_human_size(1234567) # => 1.18 MB - # number_to_human_size(1234567890) # => 1.15 GB - # number_to_human_size(1234567890123) # => 1.12 TB - # number_to_human_size(1234567890123456) # => 1.1 PB - # number_to_human_size(1234567890123456789) # => 1.07 EB - # number_to_human_size(1234567, precision: 2) # => 1.2 MB - # number_to_human_size(483989, precision: 2) # => 470 KB - # number_to_human_size(1234567, precision: 2, separator: ',') # => 1,2 MB - # number_to_human_size(1234567890123, precision: 5) # => "1.1228 TB" - # number_to_human_size(524288000, precision: 5) # => "500 MB" - # - # source://actionview//lib/action_view/helpers/number_helper.rb#297 - def number_to_human_size(number, options = T.unsafe(nil)); end - - # Formats a +number+ as a percentage string (e.g., 65%). You can - # customize the format in the +options+ hash. - # - # ==== Options - # - # * :locale - Sets the locale to be used for formatting - # (defaults to current locale). - # * :precision - Sets the precision of the number - # (defaults to 3). - # * :significant - If +true+, precision will be the number - # of significant_digits. If +false+, the number of fractional - # digits (defaults to +false+). - # * :separator - Sets the separator between the - # fractional and integer digits (defaults to "."). - # * :delimiter - Sets the thousands delimiter (defaults - # to ""). - # * :strip_insignificant_zeros - If +true+ removes - # insignificant zeros after the decimal separator (defaults to - # +false+). - # * :format - Specifies the format of the percentage - # string The number field is %n (defaults to "%n%"). - # * :raise - If true, raises +InvalidNumberError+ when - # the argument is invalid. - # - # ==== Examples - # - # number_to_percentage(100) # => 100.000% - # number_to_percentage("98") # => 98.000% - # number_to_percentage(100, precision: 0) # => 100% - # number_to_percentage(1000, delimiter: '.', separator: ',') # => 1.000,000% - # number_to_percentage(302.24398923423, precision: 5) # => 302.24399% - # number_to_percentage(1000, locale: :fr) # => 1 000,000% - # number_to_percentage("98a") # => 98a% - # number_to_percentage(100, format: "%n %") # => 100.000 % - # - # number_to_percentage("98a", raise: true) # => InvalidNumberError - # - # source://actionview//lib/action_view/helpers/number_helper.rb#167 - def number_to_percentage(number, options = T.unsafe(nil)); end - - # Formats a +number+ into a phone number (US by default e.g., (555) - # 123-9876). You can customize the format in the +options+ hash. - # - # ==== Options - # - # * :area_code - Adds parentheses around the area code. - # * :delimiter - Specifies the delimiter to use - # (defaults to "-"). - # * :extension - Specifies an extension to add to the - # end of the generated number. - # * :country_code - Sets the country code for the phone - # number. - # * :pattern - Specifies how the number is divided into three - # groups with the custom regexp to override the default format. - # * :raise - If true, raises +InvalidNumberError+ when - # the argument is invalid. - # - # ==== Examples - # - # number_to_phone(5551234) # => 555-1234 - # number_to_phone("5551234") # => 555-1234 - # number_to_phone(1235551234) # => 123-555-1234 - # number_to_phone(1235551234, area_code: true) # => (123) 555-1234 - # number_to_phone(1235551234, delimiter: " ") # => 123 555 1234 - # number_to_phone(1235551234, area_code: true, extension: 555) # => (123) 555-1234 x 555 - # number_to_phone(1235551234, country_code: 1) # => +1-123-555-1234 - # number_to_phone("123a456") # => 123a456 - # number_to_phone("1234a567", raise: true) # => InvalidNumberError - # - # number_to_phone(1235551234, country_code: 1, extension: 1343, delimiter: ".") - # # => +1.123.555.1234 x 1343 - # - # number_to_phone(75561234567, pattern: /(\d{1,4})(\d{4})(\d{4})$/, area_code: true) - # # => "(755) 6123-4567" - # number_to_phone(13312345678, pattern: /(\d{3})(\d{4})(\d{4})$/) - # # => "133-1234-5678" - # - # source://actionview//lib/action_view/helpers/number_helper.rb#62 - def number_to_phone(number, options = T.unsafe(nil)); end - - # Formats a +number+ with grouped thousands using +delimiter+ - # (e.g., 12,324). You can customize the format in the +options+ - # hash. - # - # ==== Options - # - # * :locale - Sets the locale to be used for formatting - # (defaults to current locale). - # * :delimiter - Sets the thousands delimiter (defaults - # to ","). - # * :separator - Sets the separator between the - # fractional and integer digits (defaults to "."). - # * :delimiter_pattern - Sets a custom regular expression used for - # deriving the placement of delimiter. Helpful when using currency formats - # like INR. - # * :raise - If true, raises +InvalidNumberError+ when - # the argument is invalid. - # - # ==== Examples - # - # number_with_delimiter(12345678) # => 12,345,678 - # number_with_delimiter("123456") # => 123,456 - # number_with_delimiter(12345678.05) # => 12,345,678.05 - # number_with_delimiter(12345678, delimiter: ".") # => 12.345.678 - # number_with_delimiter(12345678, delimiter: ",") # => 12,345,678 - # number_with_delimiter(12345678.05, separator: " ") # => 12,345,678 05 - # number_with_delimiter(12345678.05, locale: :fr) # => 12 345 678,05 - # number_with_delimiter("112a") # => 112a - # number_with_delimiter(98765432.98, delimiter: " ", separator: ",") - # # => 98 765 432,98 - # - # number_with_delimiter("123456.78", - # delimiter_pattern: /(\d+?)(?=(\d\d)+(\d)(?!\d))/) # => "1,23,456.78" - # - # number_with_delimiter("112a", raise: true) # => raise InvalidNumberError - # - # source://actionview//lib/action_view/helpers/number_helper.rb#206 - def number_with_delimiter(number, options = T.unsafe(nil)); end - - # Formats a +number+ with the specified level of - # :precision (e.g., 112.32 has a precision of 2 if - # +:significant+ is +false+, and 5 if +:significant+ is +true+). - # You can customize the format in the +options+ hash. - # - # ==== Options - # - # * :locale - Sets the locale to be used for formatting - # (defaults to current locale). - # * :precision - Sets the precision of the number - # (defaults to 3). - # * :significant - If +true+, precision will be the number - # of significant_digits. If +false+, the number of fractional - # digits (defaults to +false+). - # * :separator - Sets the separator between the - # fractional and integer digits (defaults to "."). - # * :delimiter - Sets the thousands delimiter (defaults - # to ""). - # * :strip_insignificant_zeros - If +true+ removes - # insignificant zeros after the decimal separator (defaults to - # +false+). - # * :raise - If true, raises +InvalidNumberError+ when - # the argument is invalid. - # - # ==== Examples - # - # number_with_precision(111.2345) # => 111.235 - # number_with_precision(111.2345, precision: 2) # => 111.23 - # number_with_precision(13, precision: 5) # => 13.00000 - # number_with_precision(389.32314, precision: 0) # => 389 - # number_with_precision(111.2345, significant: true) # => 111 - # number_with_precision(111.2345, precision: 1, significant: true) # => 100 - # number_with_precision(13, precision: 5, significant: true) # => 13.000 - # number_with_precision(111.234, locale: :fr) # => 111,234 - # - # number_with_precision(13, precision: 5, significant: true, strip_insignificant_zeros: true) - # # => 13 - # - # number_with_precision(389.32314, precision: 4, significant: true) # => 389.3 - # number_with_precision(1111.2345, precision: 2, separator: ',', delimiter: '.') - # # => 1.111,23 - # - # source://actionview//lib/action_view/helpers/number_helper.rb#251 - def number_with_precision(number, options = T.unsafe(nil)); end - - private - - # source://actionview//lib/action_view/helpers/number_helper.rb#408 - def delegate_number_helper_method(method, number, options); end - - # source://actionview//lib/action_view/helpers/number_helper.rb#427 - def escape_units(units); end - - # source://actionview//lib/action_view/helpers/number_helper.rb#417 - def escape_unsafe_options(options); end - - # @raise [InvalidNumberError] - # - # source://actionview//lib/action_view/helpers/number_helper.rb#450 - def parse_float(number, raise_error); end - - # @return [Boolean] - # - # source://actionview//lib/action_view/helpers/number_helper.rb#446 - def valid_float?(number); end - - # @raise [InvalidNumberError] - # - # source://actionview//lib/action_view/helpers/number_helper.rb#433 - 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 -class ActionView::Helpers::NumberHelper::InvalidNumberError < ::StandardError - # @return [InvalidNumberError] a new instance of InvalidNumberError - # - # source://actionview//lib/action_view/helpers/number_helper.rb#21 - def initialize(number); end - - # Returns the value of attribute number. - # - # source://actionview//lib/action_view/helpers/number_helper.rb#20 - 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 - def number=(_arg0); end -end - -# 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 - # escape tags. This is not recommended if the data is coming from the user's - # input. - # - # For example: - # - # raw @user.name - # # => 'Jimmy Tables' - # - # source://actionview//lib/action_view/helpers/output_safety_helper.rb#18 - def raw(stringish); end - - # This method returns an HTML safe string similar to what Array#join - # would return. The array is flattened, and all items, including - # the supplied separator, are HTML escaped unless they are HTML - # safe, and the returned string is marked as HTML safe. - # - # safe_join([raw("

    foo

    "), "

    bar

    "], "
    ") - # # => "

    foo

    <br /><p>bar</p>" - # - # safe_join([raw("

    foo

    "), raw("

    bar

    ")], raw("
    ")) - # # => "

    foo


    bar

    " - # - # source://actionview//lib/action_view/helpers/output_safety_helper.rb#33 - def safe_join(array, sep = T.unsafe(nil)); end - - # Converts the array to a comma-separated sentence where the last element is - # joined by the connector word. This is the html_safe-aware version of - # ActiveSupport's {Array#to_sentence}[https://api.rubyonrails.org/classes/Array.html#method-i-to_sentence]. - # - # source://actionview//lib/action_view/helpers/output_safety_helper.rb#43 - def to_sentence(array, options = T.unsafe(nil)); end -end - -# = Action View Rendering -# -# Implements methods that allow rendering from a view context. -# In order to use this module, all you need is to implement -# view_renderer that returns an ActionView::Renderer object. -# -# source://actionview//lib/action_view/helpers/rendering_helper.rb#10 -module ActionView::Helpers::RenderingHelper - # Overrides _layout_for in the context object so it supports the case a block is - # passed to a partial. Returns the contents that are yielded to a layout, given a - # name or a block. - # - # You can think of a layout as a method that is called with a block. If the user calls - # yield :some_name, the block, by default, returns content_for(:some_name). - # If the user calls simply +yield+, the default block returns content_for(:layout). - # - # The user can override this default by passing a block to the layout: - # - # # The template - # <%= render layout: "my_layout" do %> - # Content - # <% end %> - # - # # The layout - # - # <%= yield %> - # - # - # In this case, instead of the default block, which would return content_for(:layout), - # this method returns the block that was passed in to render :layout, and the response - # would be - # - # - # Content - # - # - # Finally, the block can take block arguments, which can be passed in by +yield+: - # - # # The template - # <%= render layout: "my_layout" do |customer| %> - # Hello <%= customer.name %> - # <% end %> - # - # # The layout - # - # <%= yield Struct.new(:name).new("David") %> - # - # - # In this case, the layout would receive the block passed into render :layout, - # and the struct specified would be passed into the block as an argument. The result - # would be - # - # - # Hello David - # - # - # source://actionview//lib/action_view/helpers/rendering_helper.rb#97 - def _layout_for(*args, &block); end - - # Returns the result of a render that's dictated by the options hash. The primary options are: - # - # * :partial - See ActionView::PartialRenderer. - # * :file - Renders an explicit template file (this used to be the old default), add +:locals+ to pass in those. - # * :inline - Renders an inline template similar to how it's done in the controller. - # * :plain - Renders the text passed in out. Setting the content - # type as text/plain. - # * :html - Renders the HTML safe string passed in out, otherwise - # performs HTML escape on the string first. Setting the content type as - # text/html. - # * :body - Renders the text passed in, and inherits the content - # type of text/plain from ActionDispatch::Response object. - # - # If no options hash is passed or if :update is specified, then: - # - # If an object responding to +render_in+ is passed, +render_in+ is called on the object, - # passing in the current view context. - # - # Otherwise, a partial is rendered using the second parameter as the locals hash. - # - # source://actionview//lib/action_view/helpers/rendering_helper.rb#30 - def render(options = T.unsafe(nil), locals = T.unsafe(nil), &block); end -end - -# 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 -module ActionView::Helpers::SanitizeHelper - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods - - # 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. - # - # The default sanitizer is Rails::Html::SafeListSanitizer. See {Rails HTML - # Sanitizers}[https://github.com/rails/rails-html-sanitizer] for more information. - # - # Custom sanitization rules can also be provided. - # - # Please note that sanitizing user-provided text does not guarantee that the - # resulting markup is valid or even well-formed. - # - # ==== Options - # - # * :tags - An array of allowed tags. - # * :attributes - An array of allowed attributes. - # * :scrubber - A {Rails::Html scrubber}[https://github.com/rails/rails-html-sanitizer] - # or {Loofah::Scrubber}[https://github.com/flavorjones/loofah] object that - # defines custom sanitization rules. A custom scrubber takes precedence over - # custom tags and attributes. - # - # ==== Examples - # - # Normal use: - # - # <%= sanitize @comment.body %> - # - # Providing custom lists of permitted tags and attributes: - # - # <%= sanitize @comment.body, tags: %w(strong em a), attributes: %w(href) %> - # - # Providing a custom Rails::Html scrubber: - # - # class CommentScrubber < Rails::Html::PermitScrubber - # def initialize - # super - # self.tags = %w( form script comment blockquote ) - # self.attributes = %w( style ) - # end - # - # def skip_node?(node) - # node.text? - # end - # end - # - # <%= sanitize @comment.body, scrubber: CommentScrubber.new %> - # - # See {Rails HTML Sanitizer}[https://github.com/rails/rails-html-sanitizer] for - # documentation about Rails::Html scrubbers. - # - # Providing a custom Loofah::Scrubber: - # - # scrubber = Loofah::Scrubber.new do |node| - # node.remove if node.name == 'script' - # end - # - # <%= sanitize @comment.body, scrubber: scrubber %> - # - # See {Loofah's documentation}[https://github.com/flavorjones/loofah] for more - # information about defining custom Loofah::Scrubber objects. - # - # To set the default allowed tags or attributes across your application: - # - # # In config/application.rb - # 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 - 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 - def sanitize_css(style); end - - # Strips all link tags from +html+ leaving just the link text. - # - # strip_links('Ruby on Rails') - # # => Ruby on Rails - # - # strip_links('Please e-mail me at me@email.com.') - # # => Please e-mail me at me@email.com. - # - # strip_links('Blog: Visit.') - # # => Blog: Visit. - # - # strip_links('<malformed & link') - # # => <malformed & link - # - # source://actionview//lib/action_view/helpers/sanitize_helper.rb#120 - def strip_links(html); end - - # Strips all HTML tags from +html+, including comments and special characters. - # - # strip_tags("Strip these tags!") - # # => Strip these tags! - # - # strip_tags("Bold no more! See more here...") - # # => Bold no more! See more here... - # - # strip_tags("
    Welcome to my website!
    ") - # # => Welcome to my website! - # - # strip_tags("> A quote from Smith & Wesson") - # # => > A quote from Smith & Wesson - # - # source://actionview//lib/action_view/helpers/sanitize_helper.rb#103 - def strip_tags(html); end -end - -# source://actionview//lib/action_view/helpers/sanitize_helper.rb#124 -module ActionView::Helpers::SanitizeHelper::ClassMethods - # Gets the Rails::Html::FullSanitizer instance used by +strip_tags+. Replace with - # 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 - 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 - def full_sanitizer=(_arg0); end - - # 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 - 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 - def link_sanitizer=(_arg0); end - - # 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 - 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 - def safe_list_sanitizer=(_arg0); end - - # source://actionview//lib/action_view/helpers/sanitize_helper.rb#135 - def sanitized_allowed_attributes; end - - # source://rails-html-sanitizer/1.5.0/lib/rails-html-sanitizer.rb#50 - def sanitized_allowed_attributes=(attributes); end - - # source://rails-html-sanitizer/1.5.0/lib/rails-html-sanitizer.rb#63 - def sanitized_allowed_css_keywords; end - - # source://rails-html-sanitizer/1.5.0/lib/rails-html-sanitizer.rb#64 - def sanitized_allowed_css_keywords=(_); end - - # source://rails-html-sanitizer/1.5.0/lib/rails-html-sanitizer.rb#63 - def sanitized_allowed_css_properties; end - - # source://rails-html-sanitizer/1.5.0/lib/rails-html-sanitizer.rb#64 - def sanitized_allowed_css_properties=(_); end - - # source://rails-html-sanitizer/1.5.0/lib/rails-html-sanitizer.rb#63 - def sanitized_allowed_protocols; end - - # source://rails-html-sanitizer/1.5.0/lib/rails-html-sanitizer.rb#64 - def sanitized_allowed_protocols=(_); end - - # source://actionview//lib/action_view/helpers/sanitize_helper.rb#131 - def sanitized_allowed_tags; end - - # source://rails-html-sanitizer/1.5.0/lib/rails-html-sanitizer.rb#40 - def sanitized_allowed_tags=(tags); end - - # source://rails-html-sanitizer/1.5.0/lib/rails-html-sanitizer.rb#63 - def sanitized_bad_tags; end - - # source://rails-html-sanitizer/1.5.0/lib/rails-html-sanitizer.rb#64 - def sanitized_bad_tags=(_); end - - # source://rails-html-sanitizer/1.5.0/lib/rails-html-sanitizer.rb#63 - def sanitized_protocol_separator; end - - # source://rails-html-sanitizer/1.5.0/lib/rails-html-sanitizer.rb#64 - def sanitized_protocol_separator=(_); end - - # source://rails-html-sanitizer/1.5.0/lib/rails-html-sanitizer.rb#63 - def sanitized_shorthand_css_properties; end - - # source://rails-html-sanitizer/1.5.0/lib/rails-html-sanitizer.rb#64 - def sanitized_shorthand_css_properties=(_); end - - # source://rails-html-sanitizer/1.5.0/lib/rails-html-sanitizer.rb#63 - def sanitized_uri_attributes; end - - # source://rails-html-sanitizer/1.5.0/lib/rails-html-sanitizer.rb#64 - def sanitized_uri_attributes=(_); end - - # source://actionview//lib/action_view/helpers/sanitize_helper.rb#127 - def sanitizer_vendor; end - - private - - # source://rails-html-sanitizer/1.5.0/lib/rails-html-sanitizer.rb#68 - def deprecate_option(name); end -end - -# 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 -module ActionView::Helpers::TagHelper - include ::ActionView::Helpers::CaptureHelper - include ::ActionView::Helpers::OutputSafetyHelper - - # Returns a CDATA section with the given +content+. CDATA sections - # are used to escape blocks of text containing characters which would - # otherwise be recognized as markup. CDATA sections begin with the string - # and end with (and may not contain) the string ]]>. - # - # cdata_section("") - # # => ]]> - # - # cdata_section(File.read("hello_world.txt")) - # # => - # - # cdata_section("hello]]>world") - # # => world]]> - # - # source://actionview//lib/action_view/helpers/tag_helper.rb#408 - def cdata_section(content); end - - # Returns a string of tokens built from +args+. - # - # ==== Examples - # token_list("foo", "bar") - # # => "foo bar" - # token_list("foo", "foo bar") - # # => "foo bar" - # token_list({ foo: true, bar: false }) - # # => "foo" - # token_list(nil, false, 123, "", "foo", { bar: true }) - # # => "123 foo bar" - # - # source://actionview//lib/action_view/helpers/tag_helper.rb#388 - def class_names(*args); end - - # Returns an HTML block tag of type +name+ surrounding the +content+. Add - # HTML attributes by passing an attributes hash to +options+. - # Instead of passing the content as an argument, you can also use a block - # in which case, you pass your +options+ as the second parameter. - # Set escape to false to disable escaping. - # Note: this is legacy syntax, see +tag+ method description for details. - # - # ==== Options - # The +options+ hash can be used with attributes with no value like (disabled and - # readonly), which you can give a value of true in the +options+ hash. You can use - # symbols or strings for the attribute names. - # - # ==== Examples - # content_tag(:p, "Hello world!") - # # =>

    Hello world!

    - # content_tag(:div, content_tag(:p, "Hello world!"), class: "strong") - # # =>

    Hello world!

    - # content_tag(:div, "Hello world!", class: ["strong", "highlight"]) - # # =>
    Hello world!
    - # content_tag(:div, "Hello world!", class: ["strong", { highlight: current_user.admin? }]) - # # =>
    Hello world!
    - # content_tag("select", options, multiple: true) - # # => - # - # <%= content_tag :div, class: "strong" do -%> - # Hello world! - # <% end -%> - # # =>
    Hello world!
    - # - # source://actionview//lib/action_view/helpers/tag_helper.rb#368 - 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. - # - # escape_once("1 < 2 & 3") - # # => "1 < 2 & 3" - # - # escape_once("<< Accept & Checkout") - # # => "<< Accept & Checkout" - # - # source://actionview//lib/action_view/helpers/tag_helper.rb#420 - def escape_once(html); end - - # Returns an HTML tag. - # - # === Building HTML tags - # - # Builds HTML5 compliant tags with a tag proxy. Every tag can be built with: - # - # tag.(optional content, options) - # - # where tag name can be e.g. br, div, section, article, or any tag really. - # - # ==== Passing content - # - # Tags can pass content to embed within it: - # - # tag.h1 'All titles fit to print' # =>

    All titles fit to print

    - # - # tag.div tag.p('Hello world!') # =>

    Hello world!

    - # - # Content can also be captured with a block, which is useful in templates: - # - # <%= tag.p do %> - # The next great American novel starts here. - # <% end %> - # # =>

    The next great American novel starts here.

    - # - # ==== Options - # - # Use symbol keyed options to add attributes to the generated tag. - # - # tag.section class: %w( kitties puppies ) - # # =>
    - # - # tag.section id: dom_id(@post) - # # =>
    - # - # Pass +true+ for any attributes that can render with no values, like +disabled+ and +readonly+. - # - # tag.input type: 'text', disabled: true - # # => - # - # HTML5 data-* and aria-* attributes can be set with a - # single +data+ or +aria+ key pointing to a hash of sub-attributes. - # - # To play nicely with JavaScript conventions, sub-attributes are dasherized. - # - # tag.article data: { user_id: 123 } - # # =>
    - # - # Thus data-user-id can be accessed as dataset.userId. - # - # Data attribute values are encoded to JSON, with the exception of strings, symbols, and - # BigDecimals. - # This may come in handy when using jQuery's HTML5-aware .data() - # from 1.4.3. - # - # tag.div data: { city_state: %w( Chicago IL ) } - # # =>
    - # - # The generated tag names and attributes are escaped by default. This can be disabled using - # +escape+. - # - # tag.img src: 'open & shut.png' - # # => - # - # tag.img src: 'open & shut.png', escape: false - # # => - # - # The tag builder respects - # {HTML5 void elements}[https://www.w3.org/TR/html5/syntax.html#void-elements] - # if no content is passed, and omits closing tags for those elements. - # - # # A standard element: - # tag.div # =>
    - # - # # A void element: - # tag.br # =>
    - # - # === Building HTML attributes - # - # Transforms a Hash into HTML attributes, ready to be interpolated into - # ERB. Includes or omits boolean attributes based on their truthiness. - # Transforms keys nested within - # aria: or data: objects into aria- and data- - # prefixed attributes: - # - # > - # # => - # - # - # # => - # - # === Legacy syntax - # - # 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) - # - # It returns an empty HTML tag of type +name+ which by default is XHTML - # compliant. Set +open+ to true to create an open tag compatible - # with HTML 4.0 and below. Add HTML attributes by passing an attributes - # hash to +options+. Set +escape+ to false to disable attribute value - # escaping. - # - # ==== Options - # - # You can use symbols or strings for the attribute names. - # - # Use +true+ with boolean attributes that can render with no value, like - # +disabled+ and +readonly+. - # - # HTML5 data-* attributes can be set with a single +data+ key - # pointing to a hash of sub-attributes. - # - # ==== Examples - # - # tag("br") - # # =>
    - # - # tag("br", nil, true) - # # =>
    - # - # tag("input", type: 'text', disabled: true) - # # => - # - # tag("input", type: 'text', class: ["strong", "highlight"]) - # # => - # - # tag("img", src: "open & shut.png") - # # => - # - # tag("img", { src: "open & shut.png" }, false, false) - # # => - # - # tag("div", data: { name: 'Stephen', city_state: %w(Chicago IL) }) - # # =>
    - # - # tag("div", class: { highlight: current_user.admin? }) - # # =>
    - # - # source://actionview//lib/action_view/helpers/tag_helper.rb#331 - 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+. - # - # ==== Examples - # token_list("foo", "bar") - # # => "foo bar" - # token_list("foo", "foo bar") - # # => "foo bar" - # token_list({ foo: true, bar: false }) - # # => "foo" - # token_list(nil, false, 123, "", "foo", { bar: true }) - # # => "123 foo bar" - # - # source://actionview//lib/action_view/helpers/tag_helper.rb#388 - def token_list(*args); end - - private - - # source://actionview//lib/action_view/helpers/tag_helper.rb#425 - def build_tag_values(*args); end - - # source://actionview//lib/action_view/helpers/tag_helper.rb#445 - def tag_builder; end - - class << self - # source://actionview//lib/action_view/helpers/tag_helper.rb#425 - def build_tag_values(*args); end - end -end - -# source://actionview//lib/action_view/helpers/tag_helper.rb#31 -ActionView::Helpers::TagHelper::ARIA_PREFIXES = T.let(T.unsafe(nil), Set) - -# source://actionview//lib/action_view/helpers/tag_helper.rb#18 -ActionView::Helpers::TagHelper::BOOLEAN_ATTRIBUTES = T.let(T.unsafe(nil), Set) - -# source://actionview//lib/action_view/helpers/tag_helper.rb#32 -ActionView::Helpers::TagHelper::DATA_PREFIXES = T.let(T.unsafe(nil), Set) - -# source://actionview//lib/action_view/helpers/tag_helper.rb#40 -ActionView::Helpers::TagHelper::PRE_CONTENT_STRINGS = T.let(T.unsafe(nil), Hash) - -# source://actionview//lib/action_view/helpers/tag_helper.rb#34 -ActionView::Helpers::TagHelper::TAG_TYPES = T.let(T.unsafe(nil), Hash) - -# source://actionview//lib/action_view/helpers/tag_helper.rb#44 -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 - def initialize(view_context); end - - # Transforms a Hash into HTML Attributes, ready to be interpolated into - # ERB. - # - # > - # # => - # - # source://actionview//lib/action_view/helpers/tag_helper.rb#60 - def attributes(attributes); end - - # source://actionview//lib/action_view/helpers/tag_helper.rb#133 - def boolean_tag_option(key); end - - # source://actionview//lib/action_view/helpers/tag_helper.rb#80 - def content_tag_string(name, content, options, escape = T.unsafe(nil)); end - - # source://actionview//lib/action_view/helpers/tag_helper.rb#64 - def p(*arguments, **options, &block); end - - # source://actionview//lib/action_view/helpers/tag_helper.rb#137 - def tag_option(key, value, escape); end - - # source://actionview//lib/action_view/helpers/tag_helper.rb#91 - 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 - - 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 - def method_missing(called, *args, **options, &block); end - - # source://actionview//lib/action_view/helpers/tag_helper.rb#155 - def prefix_tag_option(prefix, key, value, escape); end - - # @return [Boolean] - # - # source://actionview//lib/action_view/helpers/tag_helper.rb#163 - def respond_to_missing?(*args); end -end - -# source://actionview//lib/action_view/helpers/tag_helper.rb#48 -ActionView::Helpers::TagHelper::TagBuilder::HTML_VOID_ELEMENTS = T.let(T.unsafe(nil), Set) - -# source://actionview//lib/action_view/helpers/tag_helper.rb#49 -ActionView::Helpers::TagHelper::TagBuilder::SVG_SELF_CLOSING_ELEMENTS = T.let(T.unsafe(nil), Set) - -# source://actionview//lib/action_view/helpers/tags.rb#5 -module ActionView::Helpers::Tags - extend ::ActiveSupport::Autoload -end - -# source://actionview//lib/action_view/helpers/tags/base.rb#6 -class ActionView::Helpers::Tags::Base - include ::ActionView::Helpers::CaptureHelper - include ::ActionView::Helpers::OutputSafetyHelper - include ::ActionView::Helpers::TagHelper - 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 - 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 - def object; end - - # This is what child classes implement. - # - # @raise [NotImplementedError] - # - # source://actionview//lib/action_view/helpers/tags/base.rb#32 - def render; end - - private - - # source://actionview//lib/action_view/helpers/tags/base.rb#95 - def add_default_name_and_id(options); end - - # source://actionview//lib/action_view/helpers/tags/base.rb#82 - 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 - def generate_ids?; end - - # source://actionview//lib/action_view/helpers/tags/base.rb#165 - 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 - def retrieve_autoindex(pre_match); end - - # source://actionview//lib/action_view/helpers/tags/base.rb#62 - def retrieve_object(object); end - - # source://actionview//lib/action_view/helpers/tags/base.rb#115 - def sanitized_method_name; end - - # source://actionview//lib/action_view/helpers/tags/base.rb#119 - 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 - def tag_id(index = T.unsafe(nil), namespace = T.unsafe(nil)); end - - # source://actionview//lib/action_view/helpers/tags/base.rb#107 - def tag_name(multiple = T.unsafe(nil), index = T.unsafe(nil)); end - - # source://actionview//lib/action_view/helpers/tags/base.rb#37 - def value; end - - # source://actionview//lib/action_view/helpers/tags/base.rb#45 - def value_before_type_cast; end - - # @return [Boolean] - # - # source://actionview//lib/action_view/helpers/tags/base.rb#57 - def value_came_from_user?; end -end - -# source://actionview//lib/action_view/helpers/tags/check_box.rb#8 -class ActionView::Helpers::Tags::CheckBox < ::ActionView::Helpers::Tags::Base - include ::ActionView::Helpers::Tags::Checkable - - # @return [CheckBox] a new instance of CheckBox - # - # source://actionview//lib/action_view/helpers/tags/check_box.rb#11 - def initialize(object_name, method_name, template_object, checked_value, unchecked_value, options); end - - # source://actionview//lib/action_view/helpers/tags/check_box.rb#17 - def render; end - - private - - # @return [Boolean] - # - # source://actionview//lib/action_view/helpers/tags/check_box.rb#42 - def checked?(value); end - - # source://actionview//lib/action_view/helpers/tags/check_box.rb#59 - def hidden_field_for_checkbox(options); end -end - -# source://actionview//lib/action_view/helpers/tags/checkable.rb#6 -module ActionView::Helpers::Tags::Checkable - # @return [Boolean] - # - # source://actionview//lib/action_view/helpers/tags/checkable.rb#7 - def input_checked?(options); end -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 - - # source://actionview//lib/action_view/helpers/tags/collection_check_boxes.rb#20 - def render(&block); end - - private - - # source://actionview//lib/action_view/helpers/tags/collection_check_boxes.rb#29 - def hidden_field_name; end - - # source://actionview//lib/action_view/helpers/tags/collection_check_boxes.rb#25 - def render_component(builder); end -end - -# source://actionview//lib/action_view/helpers/tags/collection_check_boxes.rb#11 -class ActionView::Helpers::Tags::CollectionCheckBoxes::CheckBoxBuilder < ::ActionView::Helpers::Tags::CollectionHelpers::Builder - # source://actionview//lib/action_view/helpers/tags/collection_check_boxes.rb#12 - def check_box(extra_html_options = T.unsafe(nil)); end -end - -# source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#6 -module ActionView::Helpers::Tags::CollectionHelpers - # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#30 - def initialize(object_name, method_name, template_object, collection, value_method, text_method, options, html_options); end - - private - - # Generate default options for collection helpers, such as :checked and - # :disabled. - # - # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#47 - def default_html_options_for_collection(item, value); end - - # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#107 - def hidden_field; end - - # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#112 - def hidden_field_name; end - - # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#40 - def instantiate_builder(builder_class, item, value, text, html_options); end - - # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#75 - def render_collection; end - - # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#86 - def render_collection_for(builder_class, &block); end - - # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#71 - def sanitize_attribute_name(value); end -end - -# source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#7 -class ActionView::Helpers::Tags::CollectionHelpers::Builder - # @return [Builder] a new instance of Builder - # - # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#10 - def initialize(template_object, object_name, method_name, object, sanitized_attribute_name, text, value, input_html_options); end - - # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#22 - def label(label_html_options = T.unsafe(nil), &block); end - - # Returns the value of attribute object. - # - # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#8 - def object; end - - # Returns the value of attribute text. - # - # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#8 - def text; end - - # Returns the value of attribute value. - # - # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#8 - def value; end -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 - - # source://actionview//lib/action_view/helpers/tags/collection_radio_buttons.rb#19 - def render(&block); end - - private - - # source://actionview//lib/action_view/helpers/tags/collection_radio_buttons.rb#24 - def render_component(builder); end -end - -# source://actionview//lib/action_view/helpers/tags/collection_radio_buttons.rb#11 -class ActionView::Helpers::Tags::CollectionRadioButtons::RadioButtonBuilder < ::ActionView::Helpers::Tags::CollectionHelpers::Builder - # source://actionview//lib/action_view/helpers/tags/collection_radio_buttons.rb#12 - 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 - # @return [CollectionSelect] a new instance of CollectionSelect - # - # source://actionview//lib/action_view/helpers/tags/collection_select.rb#7 - 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 - def render; end -end - -# source://actionview//lib/action_view/helpers/tags/color_field.rb#6 -class ActionView::Helpers::Tags::ColorField < ::ActionView::Helpers::Tags::TextField - # source://actionview//lib/action_view/helpers/tags/color_field.rb#7 - def render; end - - private - - # source://actionview//lib/action_view/helpers/tags/color_field.rb#15 - def validate_color_string(string); end -end - -# source://actionview//lib/action_view/helpers/tags/date_field.rb#6 -class ActionView::Helpers::Tags::DateField < ::ActionView::Helpers::Tags::DatetimeField - private - - # source://actionview//lib/action_view/helpers/tags/date_field.rb#8 - def format_date(value); end -end - -# source://actionview//lib/action_view/helpers/tags/date_select.rb#8 -class ActionView::Helpers::Tags::DateSelect < ::ActionView::Helpers::Tags::Base - # @return [DateSelect] a new instance of DateSelect - # - # source://actionview//lib/action_view/helpers/tags/date_select.rb#9 - def initialize(object_name, method_name, template_object, options, html_options); end - - # source://actionview//lib/action_view/helpers/tags/date_select.rb#15 - def render; end - - private - - # source://actionview//lib/action_view/helpers/tags/date_select.rb#30 - def datetime_selector(options, html_options); end - - # source://actionview//lib/action_view/helpers/tags/date_select.rb#43 - def default_datetime(options); end - - # source://actionview//lib/action_view/helpers/tags/date_select.rb#26 - def select_type; end - - class << self - # source://actionview//lib/action_view/helpers/tags/date_select.rb#20 - def select_type; end - end -end - -# source://actionview//lib/action_view/helpers/tags/datetime_field.rb#6 -class ActionView::Helpers::Tags::DatetimeField < ::ActionView::Helpers::Tags::TextField - # source://actionview//lib/action_view/helpers/tags/datetime_field.rb#7 - def render; end - - private - - # source://actionview//lib/action_view/helpers/tags/datetime_field.rb#21 - def datetime_value(value); end - - # @raise [NotImplementedError] - # - # source://actionview//lib/action_view/helpers/tags/datetime_field.rb#17 - def format_date(value); end -end - -# source://actionview//lib/action_view/helpers/tags/datetime_local_field.rb#6 -class ActionView::Helpers::Tags::DatetimeLocalField < ::ActionView::Helpers::Tags::DatetimeField - private - - # source://actionview//lib/action_view/helpers/tags/datetime_local_field.rb#14 - def format_date(value); end - - class << self - # source://actionview//lib/action_view/helpers/tags/datetime_local_field.rb#8 - def field_type; end - end -end - -# source://actionview//lib/action_view/helpers/tags/datetime_select.rb#6 -class ActionView::Helpers::Tags::DatetimeSelect < ::ActionView::Helpers::Tags::DateSelect; end - -# source://actionview//lib/action_view/helpers/tags/email_field.rb#6 -class ActionView::Helpers::Tags::EmailField < ::ActionView::Helpers::Tags::TextField; end - -# source://actionview//lib/action_view/helpers/tags/file_field.rb#6 -class ActionView::Helpers::Tags::FileField < ::ActionView::Helpers::Tags::TextField - # source://actionview//lib/action_view/helpers/tags/file_field.rb#7 - def render; end - - private - - # source://actionview//lib/action_view/helpers/tags/file_field.rb#20 - def hidden_field_for_multiple_file(options); end -end - -# source://actionview//lib/action_view/helpers/tags/grouped_collection_select.rb#6 -class ActionView::Helpers::Tags::GroupedCollectionSelect < ::ActionView::Helpers::Tags::Base - # @return [GroupedCollectionSelect] a new instance of GroupedCollectionSelect - # - # source://actionview//lib/action_view/helpers/tags/grouped_collection_select.rb#7 - 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 - def render; end -end - -# source://actionview//lib/action_view/helpers/tags/hidden_field.rb#6 -class ActionView::Helpers::Tags::HiddenField < ::ActionView::Helpers::Tags::TextField - # source://actionview//lib/action_view/helpers/tags/hidden_field.rb#7 - def render; end -end - -# source://actionview//lib/action_view/helpers/tags/label.rb#6 -class ActionView::Helpers::Tags::Label < ::ActionView::Helpers::Tags::Base - # @return [Label] a new instance of Label - # - # source://actionview//lib/action_view/helpers/tags/label.rb#34 - def initialize(object_name, method_name, template_object, content_or_options = T.unsafe(nil), options = T.unsafe(nil)); end - - # source://actionview//lib/action_view/helpers/tags/label.rb#48 - def render(&block); end - - private - - # source://actionview//lib/action_view/helpers/tags/label.rb#78 - def render_component(builder); end -end - -# source://actionview//lib/action_view/helpers/tags/label.rb#7 -class ActionView::Helpers::Tags::Label::LabelBuilder - # @return [LabelBuilder] a new instance of LabelBuilder - # - # source://actionview//lib/action_view/helpers/tags/label.rb#10 - def initialize(template_object, object_name, method_name, object, tag_value); end - - # Returns the value of attribute object. - # - # source://actionview//lib/action_view/helpers/tags/label.rb#8 - def object; end - - # source://actionview//lib/action_view/helpers/tags/label.rb#29 - def to_s; end - - # source://actionview//lib/action_view/helpers/tags/label.rb#18 - def translation; end -end - -# source://actionview//lib/action_view/helpers/tags/month_field.rb#6 -class ActionView::Helpers::Tags::MonthField < ::ActionView::Helpers::Tags::DatetimeField - private - - # source://actionview//lib/action_view/helpers/tags/month_field.rb#8 - def format_date(value); end -end - -# source://actionview//lib/action_view/helpers/tags/number_field.rb#6 -class ActionView::Helpers::Tags::NumberField < ::ActionView::Helpers::Tags::TextField - # source://actionview//lib/action_view/helpers/tags/number_field.rb#7 - def render; end -end - -# source://actionview//lib/action_view/helpers/tags/password_field.rb#6 -class ActionView::Helpers::Tags::PasswordField < ::ActionView::Helpers::Tags::TextField - # source://actionview//lib/action_view/helpers/tags/password_field.rb#7 - def render; end -end - -# source://actionview//lib/action_view/helpers/tags/placeholderable.rb#6 -module ActionView::Helpers::Tags::Placeholderable - # source://actionview//lib/action_view/helpers/tags/placeholderable.rb#7 - def initialize(*_arg0); end -end - -# source://actionview//lib/action_view/helpers/tags/radio_button.rb#8 -class ActionView::Helpers::Tags::RadioButton < ::ActionView::Helpers::Tags::Base - include ::ActionView::Helpers::Tags::Checkable - - # @return [RadioButton] a new instance of RadioButton - # - # source://actionview//lib/action_view/helpers/tags/radio_button.rb#11 - def initialize(object_name, method_name, template_object, tag_value, options); end - - # source://actionview//lib/action_view/helpers/tags/radio_button.rb#16 - def render; end - - private - - # @return [Boolean] - # - # source://actionview//lib/action_view/helpers/tags/radio_button.rb#26 - def checked?(value); end -end - -# source://actionview//lib/action_view/helpers/tags/range_field.rb#6 -class ActionView::Helpers::Tags::RangeField < ::ActionView::Helpers::Tags::NumberField; end - -# source://actionview//lib/action_view/helpers/tags/search_field.rb#6 -class ActionView::Helpers::Tags::SearchField < ::ActionView::Helpers::Tags::TextField - # source://actionview//lib/action_view/helpers/tags/search_field.rb#7 - def render; end -end - -# source://actionview//lib/action_view/helpers/tags/select.rb#6 -class ActionView::Helpers::Tags::Select < ::ActionView::Helpers::Tags::Base - # @return [Select] a new instance of Select - # - # source://actionview//lib/action_view/helpers/tags/select.rb#7 - def initialize(object_name, method_name, template_object, choices, options, html_options); end - - # source://actionview//lib/action_view/helpers/tags/select.rb#16 - def render; end - - private - - # Grouped choices look like this: - # - # [nil, []] - # { nil => [] } - # - # @return [Boolean] - # - # source://actionview//lib/action_view/helpers/tags/select.rb#36 - def grouped_choices?; end -end - -# source://actionview//lib/action_view/helpers/tags/tel_field.rb#6 -class ActionView::Helpers::Tags::TelField < ::ActionView::Helpers::Tags::TextField; end - -# source://actionview//lib/action_view/helpers/tags/text_area.rb#8 -class ActionView::Helpers::Tags::TextArea < ::ActionView::Helpers::Tags::Base - include ::ActionView::Helpers::Tags::Placeholderable - - # source://actionview//lib/action_view/helpers/tags/text_area.rb#11 - def render; end -end - -# source://actionview//lib/action_view/helpers/tags/text_field.rb#8 -class ActionView::Helpers::Tags::TextField < ::ActionView::Helpers::Tags::Base - include ::ActionView::Helpers::Tags::Placeholderable - - # source://actionview//lib/action_view/helpers/tags/text_field.rb#11 - def render; end - - private - - # source://actionview//lib/action_view/helpers/tags/text_field.rb#27 - def field_type; end - - class << self - # source://actionview//lib/action_view/helpers/tags/text_field.rb#21 - def field_type; end - end -end - -# source://actionview//lib/action_view/helpers/tags/time_field.rb#6 -class ActionView::Helpers::Tags::TimeField < ::ActionView::Helpers::Tags::DatetimeField - # @return [TimeField] a new instance of TimeField - # - # source://actionview//lib/action_view/helpers/tags/time_field.rb#7 - def initialize(object_name, method_name, template_object, options = T.unsafe(nil)); end - - private - - # source://actionview//lib/action_view/helpers/tags/time_field.rb#13 - def format_date(value); end -end - -# source://actionview//lib/action_view/helpers/tags/time_select.rb#6 -class ActionView::Helpers::Tags::TimeSelect < ::ActionView::Helpers::Tags::DateSelect; end - -# source://actionview//lib/action_view/helpers/tags/time_zone_select.rb#6 -class ActionView::Helpers::Tags::TimeZoneSelect < ::ActionView::Helpers::Tags::Base - # @return [TimeZoneSelect] a new instance of TimeZoneSelect - # - # source://actionview//lib/action_view/helpers/tags/time_zone_select.rb#7 - 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 - def render; end -end - -# source://actionview//lib/action_view/helpers/tags/translator.rb#6 -class ActionView::Helpers::Tags::Translator - # @return [Translator] a new instance of Translator - # - # source://actionview//lib/action_view/helpers/tags/translator.rb#7 - def initialize(object, object_name, method_and_value, scope:); end - - # source://actionview//lib/action_view/helpers/tags/translator.rb#14 - def translate; end - - private - - # source://actionview//lib/action_view/helpers/tags/translator.rb#31 - def human_attribute_name; end - - # source://actionview//lib/action_view/helpers/tags/translator.rb#22 - def i18n_default; end - - # Returns the value of attribute method_and_value. - # - # source://actionview//lib/action_view/helpers/tags/translator.rb#20 - def method_and_value; end - - # Returns the value of attribute model. - # - # source://actionview//lib/action_view/helpers/tags/translator.rb#20 - def model; end - - # Returns the value of attribute object_name. - # - # source://actionview//lib/action_view/helpers/tags/translator.rb#20 - def object_name; end - - # Returns the value of attribute scope. - # - # source://actionview//lib/action_view/helpers/tags/translator.rb#20 - def scope; end -end - -# source://actionview//lib/action_view/helpers/tags/url_field.rb#6 -class ActionView::Helpers::Tags::UrlField < ::ActionView::Helpers::Tags::TextField; end - -# source://actionview//lib/action_view/helpers/tags/week_field.rb#6 -class ActionView::Helpers::Tags::WeekField < ::ActionView::Helpers::Tags::DatetimeField - private - - # source://actionview//lib/action_view/helpers/tags/week_field.rb#8 - def format_date(value); end -end - -# source://actionview//lib/action_view/helpers/tags/weekday_select.rb#6 -class ActionView::Helpers::Tags::WeekdaySelect < ::ActionView::Helpers::Tags::Base - # @return [WeekdaySelect] a new instance of WeekdaySelect - # - # source://actionview//lib/action_view/helpers/tags/weekday_select.rb#7 - def initialize(object_name, method_name, template_object, options, html_options); end - - # source://actionview//lib/action_view/helpers/tags/weekday_select.rb#13 - def render; end -end - -# 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 -# within your template files. -# -# ==== Sanitization -# -# Most text helpers that generate HTML output sanitize the given input by default, -# but do not escape it. This means HTML tags will appear in the page but all malicious -# code will be removed. Let's look at some examples using the +simple_format+ method: -# -# simple_format('Example') -# # => "

    Example

    " -# -# simple_format('Example') -# # => "

    Example

    " -# -# If you want to escape all content, you should invoke the +h+ method before -# calling the text helper. -# -# simple_format h('Example') -# # => "

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

    " -# -# source://actionview//lib/action_view/helpers/text_helper.rb#35 -module ActionView::Helpers::TextHelper - include ::ActionView::Helpers::CaptureHelper - include ::ActionView::Helpers::OutputSafetyHelper - include ::ActionView::Helpers::TagHelper - extend ::ActiveSupport::Concern - include ::ActionView::Helpers::SanitizeHelper - - mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods - - # The preferred method of outputting text in your views is to use the - # <%= "text" %> eRuby syntax. The regular _puts_ and _print_ methods - # do not operate as expected in an eRuby code block. If you absolutely must - # output text within a non-output code block (i.e., <% %>), you can use the concat method. - # - # <% - # concat "hello" - # # is the equivalent of <%= "hello" %> - # - # if logged_in - # concat "Logged in!" - # else - # concat link_to('login', action: :login) - # end - # # will either display "Logged in!" or a login link - # %> - # - # source://actionview//lib/action_view/helpers/text_helper.rb#58 - def concat(string); end - - # Returns the current cycle string after a cycle has been started. Useful - # for complex table highlighting or any other design need which requires - # the current cycle string in more than one place. - # - # # Alternate background colors - # @items = [1,2,3,4] - # <% @items.each do |item| %> - #
    "> - # <%= item %> - #
    - # <% end %> - # - # source://actionview//lib/action_view/helpers/text_helper.rb#382 - def current_cycle(name = T.unsafe(nil)); end - - # Creates a Cycle object whose _to_s_ method cycles through elements of an - # array every time it is called. This can be used for example, to alternate - # classes for table rows. You can use named cycles to allow nesting in loops. - # Passing a Hash as the last parameter with a :name key will create a - # named cycle. The default name for a cycle without a +:name+ key is - # "default". You can manually reset a cycle by calling reset_cycle - # and passing the name of the cycle. The current cycle string can be obtained - # anytime using the current_cycle method. - # - # # Alternate CSS classes for even and odd numbers... - # @items = [1,2,3,4] - # - # <% @items.each do |item| %> - # "> - # - # - # <% end %> - #
    <%= item %>
    - # - # - # # Cycle CSS classes for rows, and text colors for values within each row - # @items = x = [{first: 'Robert', middle: 'Daniel', last: 'James'}, - # {first: 'Emily', middle: 'Shannon', maiden: 'Pike', last: 'Hicks'}, - # {first: 'June', middle: 'Dae', last: 'Jones'}] - # <% @items.each do |item| %> - # "> - # - # <% item.values.each do |value| %> - # <%# Create a named cycle "colors" %> - # "> - # <%= value %> - # - # <% end %> - # <% reset_cycle("colors") %> - # - # - # <% end %> - # - # source://actionview//lib/action_view/helpers/text_helper.rb#358 - def cycle(first_value, *values); end - - # Extracts an excerpt from +text+ that matches the first instance of +phrase+. - # The :radius option expands the excerpt on each side of the first occurrence of +phrase+ by the number of characters - # defined in :radius (which defaults to 100). If the excerpt radius overflows the beginning or end of the +text+, - # then the :omission option (which defaults to "...") will be prepended/appended accordingly. Use the - # :separator option to choose the delimitation. The resulting string will be stripped in any case. If the +phrase+ - # isn't found, +nil+ is returned. - # - # excerpt('This is an example', 'an', radius: 5) - # # => ...s is an exam... - # - # excerpt('This is an example', 'is', radius: 5) - # # => This is a... - # - # excerpt('This is an example', 'is') - # # => This is an example - # - # excerpt('This next thing is an example', 'ex', radius: 2) - # # => ...next... - # - # excerpt('This is also an example', 'an', radius: 8, omission: ' ') - # # => is also an example - # - # excerpt('This is a very beautiful morning', 'very', separator: ' ', radius: 1) - # # => ...a very beautiful... - # - # source://actionview//lib/action_view/helpers/text_helper.rb#179 - def excerpt(text, phrase, options = T.unsafe(nil)); end - - # Highlights one or more +phrases+ everywhere in +text+ by inserting it into - # a :highlighter string. The highlighter can be specialized by passing :highlighter - # as a single-quoted string with \1 where the phrase is to be inserted (defaults to - # \1) or passing a block that receives each matched term. By default +text+ - # is sanitized to prevent possible XSS attacks. If the input is trustworthy, passing false - # for :sanitize will turn sanitizing off. - # - # highlight('You searched for: rails', 'rails') - # # => You searched for: rails - # - # highlight('You searched for: rails', /for|rails/) - # # => You searched for: rails - # - # highlight('You searched for: ruby, rails, dhh', 'actionpack') - # # => You searched for: ruby, rails, dhh - # - # highlight('You searched for: rails', ['for', 'rails'], highlighter: '\1') - # # => You searched for: rails - # - # highlight('You searched for: rails', 'rails', highlighter: '\1') - # # => You searched for: rails - # - # highlight('You searched for: rails', 'rails') { |match| link_to(search_path(q: match, match)) } - # # => You searched for: rails - # - # highlight('ruby on rails', 'rails', sanitize: false) - # # => ruby on rails - # - # source://actionview//lib/action_view/helpers/text_helper.rb#136 - def highlight(text, phrases, options = T.unsafe(nil), &block); end - - # Attempts to pluralize the +singular+ word unless +count+ is 1. If - # +plural+ is supplied, it will use that when count is > 1, otherwise - # it will use the Inflector to determine the plural form for the given locale, - # which defaults to I18n.locale - # - # The word will be pluralized using rules defined for the locale - # (you must define your own inflection rules for languages other than English). - # See ActiveSupport::Inflector.pluralize - # - # pluralize(1, 'person') - # # => 1 person - # - # pluralize(2, 'person') - # # => 2 people - # - # pluralize(3, 'person', plural: 'users') - # # => 3 users - # - # pluralize(0, 'person') - # # => 0 people - # - # pluralize(2, 'Person', locale: :de) - # # => 2 Personen - # - # source://actionview//lib/action_view/helpers/text_helper.rb#234 - def pluralize(count, singular, plural_arg = T.unsafe(nil), plural: T.unsafe(nil), locale: T.unsafe(nil)); end - - # Resets a cycle so that it starts from the first element the next time - # it is called. Pass in +name+ to reset a named cycle. - # - # # Alternate CSS classes for even and odd numbers... - # @items = [[1,2,3,4], [5,6,3], [3,4,5,6,7,4]] - # - # <% @items.each do |item| %> - # "> - # <% item.each do |value| %> - # "> - # <%= value %> - # - # <% end %> - # - # <% reset_cycle("colors") %> - # - # <% end %> - #
    - # - # source://actionview//lib/action_view/helpers/text_helper.rb#405 - def reset_cycle(name = T.unsafe(nil)); end - - # source://actionview//lib/action_view/helpers/text_helper.rb#62 - def safe_concat(string); end - - # Returns +text+ transformed into HTML using simple formatting rules. - # Two or more consecutive newlines (\n\n or \r\n\r\n) are - # considered a paragraph and wrapped in

    tags. One newline - # (\n or \r\n) is considered a linebreak and a - #
    tag is appended. This method does not remove the - # newlines from the +text+. - # - # You can pass any HTML attributes into html_options. These - # will be added to all created paragraphs. - # - # ==== Options - # * :sanitize - If +false+, does not sanitize +text+. - # * :wrapper_tag - String representing the wrapper tag, defaults to "p" - # - # ==== Examples - # my_text = "Here is some basic text...\n...with a line break." - # - # simple_format(my_text) - # # => "

    Here is some basic text...\n
    ...with a line break.

    " - # - # simple_format(my_text, {}, wrapper_tag: "div") - # # => "
    Here is some basic text...\n
    ...with a line break.
    " - # - # more_text = "We want to put a paragraph...\n\n...right there." - # - # simple_format(more_text) - # # => "

    We want to put a paragraph...

    \n\n

    ...right there.

    " - # - # simple_format("Look ma! A class!", class: 'description') - # # => "

    Look ma! A class!

    " - # - # simple_format("Unblinkable.") - # # => "

    Unblinkable.

    " - # - # simple_format("Blinkable! It's true.", {}, sanitize: false) - # # => "

    Blinkable! It's true.

    " - # - # source://actionview//lib/action_view/helpers/text_helper.rb#306 - def simple_format(text, html_options = T.unsafe(nil), options = T.unsafe(nil)); end - - # Truncates a given +text+ after a given :length if +text+ is longer than :length - # (defaults to 30). The last characters will be replaced with the :omission (defaults to "...") - # for a total length not exceeding :length. - # - # Pass a :separator to truncate +text+ at a natural break. - # - # Pass a block if you want to show extra content when the text is truncated. - # - # The result is marked as HTML-safe, but it is escaped by default, unless :escape is - # +false+. Care should be taken if +text+ contains HTML tags or entities, because truncation - # may produce invalid HTML (such as unbalanced or incomplete tags). - # - # truncate("Once upon a time in a world far far away") - # # => "Once upon a time in a world..." - # - # truncate("Once upon a time in a world far far away", length: 17) - # # => "Once upon a ti..." - # - # truncate("Once upon a time in a world far far away", length: 17, separator: ' ') - # # => "Once upon a..." - # - # truncate("And they found that many people were sleeping better.", length: 25, omission: '... (continued)') - # # => "And they f... (continued)" - # - # truncate("

    Once upon a time in a world far far away

    ") - # # => "<p>Once upon a time in a wo..." - # - # truncate("

    Once upon a time in a world far far away

    ", escape: false) - # # => "

    Once upon a time in a wo..." - # - # truncate("Once upon a time in a world far far away") { link_to "Continue", "#" } - # # => "Once upon a time in a wo...Continue" - # - # source://actionview//lib/action_view/helpers/text_helper.rb#98 - def truncate(text, options = T.unsafe(nil), &block); end - - # Wraps the +text+ into lines no longer than +line_width+ width. This method - # breaks on the first whitespace character that does not exceed +line_width+ - # (which is 80 by default). - # - # word_wrap('Once upon a time') - # # => Once upon a time - # - # word_wrap('Once upon a time, in a kingdom called Far Far Away, a king fell ill, and finding a successor to the throne turned out to be more trouble than anyone could have imagined...') - # # => Once upon a time, in a kingdom called Far Far Away, a king fell ill, and finding\na successor to the throne turned out to be more trouble than anyone could have\nimagined... - # - # word_wrap('Once upon a time', line_width: 8) - # # => Once\nupon a\ntime - # - # word_wrap('Once upon a time', line_width: 1) - # # => Once\nupon\na\ntime - # - # You can also specify a custom +break_sequence+ ("\n" by default) - # - # word_wrap('Once upon a time', line_width: 1, break_sequence: "\r\n") - # # => Once\r\nupon\r\na\r\ntime - # - # source://actionview//lib/action_view/helpers/text_helper.rb#264 - 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 - 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 - def get_cycle(name); end - - # source://actionview//lib/action_view/helpers/text_helper.rb#455 - def set_cycle(name, cycle_object); end - - # source://actionview//lib/action_view/helpers/text_helper.rb#460 - def split_paragraphs(text); end -end - -# source://actionview//lib/action_view/helpers/text_helper.rb#410 -class ActionView::Helpers::TextHelper::Cycle - # @return [Cycle] a new instance of Cycle - # - # source://actionview//lib/action_view/helpers/text_helper.rb#413 - def initialize(first_value, *values); end - - # source://actionview//lib/action_view/helpers/text_helper.rb#422 - def current_value; end - - # source://actionview//lib/action_view/helpers/text_helper.rb#418 - def reset; end - - # source://actionview//lib/action_view/helpers/text_helper.rb#426 - def to_s; end - - # Returns the value of attribute values. - # - # source://actionview//lib/action_view/helpers/text_helper.rb#411 - def values; end - - private - - # source://actionview//lib/action_view/helpers/text_helper.rb#433 - def next_index; end - - # source://actionview//lib/action_view/helpers/text_helper.rb#437 - def previous_index; end - - # source://actionview//lib/action_view/helpers/text_helper.rb#441 - def step_index(n); end -end - -# source://actionview//lib/action_view/helpers/translation_helper.rb#9 -module ActionView::Helpers::TranslationHelper - include ::ActionView::Helpers::CaptureHelper - include ::ActionView::Helpers::OutputSafetyHelper - include ::ActionView::Helpers::TagHelper - extend ::ActiveSupport::Concern - - # Delegates to I18n.localize with no additional functionality. - # - # See https://www.rubydoc.info/gems/i18n/I18n/Backend/Base:localize - # for more information. - # - # source://actionview//lib/action_view/helpers/translation_helper.rb#116 - def l(object, **options); end - - # Delegates to I18n.localize with no additional functionality. - # - # See https://www.rubydoc.info/gems/i18n/I18n/Backend/Base:localize - # for more information. - # - # source://actionview//lib/action_view/helpers/translation_helper.rb#116 - def localize(object, **options); end - - # Delegates to I18n#translate but also performs three additional - # functions. - # - # First, it will ensure that any thrown +MissingTranslation+ messages will - # be rendered as inline spans that: - # - # * Have a translation-missing class applied - # * Contain the missing key as the value of the +title+ attribute - # * Have a titleized version of the last key segment as text - # - # For example, the value returned for the missing translation key - # "blog.post.title" will be: - # - # Title - # - # This allows for views to display rather reasonable strings while still - # giving developers a way to find missing translations. - # - # If you would prefer missing translations to raise an error, you can - # opt out of span-wrapping behavior globally by setting - # config.i18n.raise_on_missing_translations = true or - # individually by passing raise: true as an option to - # translate. - # - # Second, if the key starts with a period translate will scope - # the key by the current partial. Calling translate(".foo") from - # the people/index.html.erb template is equivalent to calling - # translate("people.index.foo"). This makes it less - # repetitive to translate many keys within the same partial and provides - # a convention to scope keys consistently. - # - # Third, the translation will be marked as html_safe if the key - # has the suffix "_html" or the last element of the key is "html". Calling - # translate("footer_html") or translate("footer.html") - # will return an HTML safe string that won't be escaped by other HTML - # helper methods. This naming convention helps to identify translations - # that include HTML tags so that you know what kind of output to expect - # when you call translate in a template and translators know which keys - # they can provide HTML values for. - # - # To access the translated text along with the fully resolved - # translation key, translate accepts a block: - # - # <%= translate(".relative_key") do |translation, resolved_key| %> - # <%= translation %> - # <% end %> - # - # This enables annotate translated text to be aware of the scope it was - # resolved against. - # - # source://actionview//lib/action_view/helpers/translation_helper.rb#73 - def t(key, **options); end - - # Delegates to I18n#translate but also performs three additional - # functions. - # - # First, it will ensure that any thrown +MissingTranslation+ messages will - # be rendered as inline spans that: - # - # * Have a translation-missing class applied - # * Contain the missing key as the value of the +title+ attribute - # * Have a titleized version of the last key segment as text - # - # For example, the value returned for the missing translation key - # "blog.post.title" will be: - # - # Title - # - # This allows for views to display rather reasonable strings while still - # giving developers a way to find missing translations. - # - # If you would prefer missing translations to raise an error, you can - # opt out of span-wrapping behavior globally by setting - # config.i18n.raise_on_missing_translations = true or - # individually by passing raise: true as an option to - # translate. - # - # Second, if the key starts with a period translate will scope - # the key by the current partial. Calling translate(".foo") from - # the people/index.html.erb template is equivalent to calling - # translate("people.index.foo"). This makes it less - # repetitive to translate many keys within the same partial and provides - # a convention to scope keys consistently. - # - # Third, the translation will be marked as html_safe if the key - # has the suffix "_html" or the last element of the key is "html". Calling - # translate("footer_html") or translate("footer.html") - # will return an HTML safe string that won't be escaped by other HTML - # helper methods. This naming convention helps to identify translations - # that include HTML tags so that you know what kind of output to expect - # when you call translate in a template and translators know which keys - # they can provide HTML values for. - # - # To access the translated text along with the fully resolved - # translation key, translate accepts a block: - # - # <%= translate(".relative_key") do |translation, resolved_key| %> - # <%= translation %> - # <% end %> - # - # This enables annotate translated text to be aware of the scope it was - # resolved against. - # - # source://actionview//lib/action_view/helpers/translation_helper.rb#73 - def translate(key, **options); end - - private - - # source://actionview//lib/action_view/helpers/translation_helper.rb#142 - def missing_translation(key, options); end - - # source://actionview//lib/action_view/helpers/translation_helper.rb#128 - def scope_key_by_partial(key); end - - class << self - # source://actionview//lib/action_view/helpers/translation_helper.rb#15 - def raise_on_missing_translations; end - - # source://actionview//lib/action_view/helpers/translation_helper.rb#15 - def raise_on_missing_translations=(_arg0); end - end -end - -# source://actionview//lib/action_view/helpers/translation_helper.rb#122 -ActionView::Helpers::TranslationHelper::MISSING_TRANSLATION = T.let(T.unsafe(nil), Integer) - -# source://actionview//lib/action_view/helpers/translation_helper.rb#125 -ActionView::Helpers::TranslationHelper::NO_DEFAULT = T.let(T.unsafe(nil), Array) - -# 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 -module ActionView::Helpers::UrlHelper - include ::ActionView::Helpers::CaptureHelper - include ::ActionView::Helpers::OutputSafetyHelper - include ::ActionView::Helpers::TagHelper - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActionView::Helpers::UrlHelper::ClassMethods - - # 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 - # example, passing a +:class+ option within +html_options+ will set the - # class attribute of the button element. - # - # The class attribute of the form element can be set by passing a - # +:form_class+ option within +html_options+. It defaults to - # "button_to" to allow styling of the form and its children. - # - # The form submits a POST request by default. You can specify a different - # HTTP verb via the +:method+ option within +html_options+. - # - # ==== Options - # The +options+ hash accepts the same options as +url_for+. To generate a - #

    element without an [action] attribute, pass - # false: - # - # <%= button_to "New", false %> - # # => " - # # - # # - # #
    " - # - # Most values in +html_options+ are passed through to the button element, - # but there are a few special options: - # - # * :method - \Symbol of HTTP verb. Supported verbs are :post, :get, - # :delete, :patch, and :put. By default it will be :post. - # * :disabled - If set to true, it will generate a disabled button. - # * :data - This option can be used to add custom data attributes. - # * :form - This hash will be form attributes - # * :form_class - This controls the class of the form within which the submit button will - # be placed - # * :params - \Hash of parameters to be rendered as hidden fields within the form. - # - # ==== Examples - # <%= button_to "New", action: "new" %> - # # => "
    - # # - # # - # #
    " - # - # <%= button_to "New", new_article_path %> - # # => "
    - # # - # # - # #
    " - # - # <%= button_to "New", new_article_path, params: { time: Time.now } %> - # # => "
    - # # - # # - # # - # #
    " - # - # <%= button_to [:make_happy, @user] do %> - # Make happy <%= @user.name %> - # <% end %> - # # => "
    - # # - # # - # #
    " - # - # <%= button_to "New", { action: "new" }, form_class: "new-thing" %> - # # => "
    - # # - # # - # #
    " - # - # <%= button_to "Create", { action: "create" }, form: { "data-type" => "json" } %> - # # => "
    - # # - # # - # #
    " - # - # ==== Deprecated: Rails UJS Attributes - # - # Prior to Rails 7, Rails shipped with a JavaScript library called @rails/ujs on by default. Following Rails 7, - # this library is no longer on by default. This library integrated with the following options: - # - # * :remote - If set to true, will allow @rails/ujs to control the - # submit behavior. By default this behavior is an Ajax submit. - # - # @rails/ujs also integrated with the following +:data+ options: - # - # * confirm: "question?" - This will allow @rails/ujs - # to prompt with the question specified (in this case, the - # resulting text would be question?). If the user accepts, the - # button is processed normally, otherwise no action is taken. - # * :disable_with - Value of this parameter will be - # used as the value for a disabled version of the submit - # button when the form is submitted. - # - # ===== Rails UJS Examples - # - # <%= button_to "Create", { action: "create" }, remote: true, form: { "data-type" => "json" } %> - # # => "
    - # # - # # - # #
    " - # - # source://actionview//lib/action_view/helpers/url_helper.rb#331 - 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 - def button_to_generates_button_tag; end - - # source://actionview//lib/action_view/helpers/url_helper.rb#32 - def button_to_generates_button_tag=(val); end - - # @return [Boolean] - # - # source://actionview//lib/action_view/helpers/url_helper.rb#582 - 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+. - # See the valid options in the documentation for +url_for+. It's also possible to - # pass a \String instead of an options hash, which generates an anchor element that uses the - # value of the \String as the href for the link. Using a :back \Symbol instead - # of an options hash will generate a link to the referrer (a JavaScript back link - # will be used in place of a referrer if none exists). If +nil+ is passed as the name - # the value of the link itself will become the name. - # - # ==== Signatures - # - # link_to(body, url, html_options = {}) - # # url is a String; you can use URL helpers like - # # posts_path - # - # link_to(body, url_options = {}, html_options = {}) - # # url_options, except :method, is passed to url_for - # - # link_to(options = {}, html_options = {}) do - # # name - # end - # - # link_to(url, html_options = {}) do - # # name - # end - # - # link_to(active_record_model) - # - # ==== Options - # * :data - This option can be used to add custom data attributes. - # - # ==== 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 - # your application on resources and use - # - # link_to "Profile", profile_path(@profile) - # # => Profile - # - # or the even pithier - # - # link_to "Profile", @profile - # # => Profile - # - # in place of the older more verbose, non-resource-oriented - # - # link_to "Profile", controller: "profiles", action: "show", id: @profile - # # => Profile - # - # Similarly, - # - # link_to "Profiles", profiles_path - # # => Profiles - # - # is better than - # - # link_to "Profiles", controller: "profiles" - # # => Profiles - # - # When name is +nil+ the href is presented instead - # - # link_to nil, "http://example.com" - # # => http://www.example.com - # - # More concise yet, when +name+ is an Active Record model that defines a - # +to_s+ method returning a default value or a model instance attribute - # - # link_to @profile - # # => Eileen - # - # You can use a block as well if your link target is hard to fit into the name parameter. ERB example: - # - # <%= link_to(@profile) do %> - # <%= @profile.name %> -- Check it out! - # <% end %> - # # => - # David -- Check it out! - # - # - # Classes and ids for CSS are easy to produce: - # - # link_to "Articles", articles_path, id: "news", class: "article" - # # => Articles - # - # Be careful when using the older argument style, as an extra literal hash is needed: - # - # link_to "Articles", { controller: "articles" }, id: "news", class: "article" - # # => Articles - # - # Leaving the hash off gives the wrong link: - # - # link_to "WRONG!", controller: "articles", id: "news", class: "article" - # # => WRONG! - # - # +link_to+ can also produce links with anchors or query strings: - # - # link_to "Comment wall", profile_path(@profile, anchor: "wall") - # # => Comment wall - # - # link_to "Ruby on Rails search", controller: "searches", query: "ruby on rails" - # # => Ruby on Rails search - # - # link_to "Nonsense search", searches_path(foo: "bar", baz: "quux") - # # => Nonsense search - # - # You can set any link attributes such as target, rel, type: - # - # link_to "External link", "http://www.rubyonrails.org/", target: "_blank", rel: "nofollow" - # # => External link - # - # ==== Deprecated: Rails UJS Attributes - # - # Prior to Rails 7, Rails shipped with a JavaScript library called @rails/ujs on by default. Following Rails 7, - # this library is no longer on by default. This library integrated with the following options: - # - # * method: symbol of HTTP verb - This modifier will dynamically - # create an HTML form and immediately submit the form for processing using - # the HTTP verb specified. Useful for having links perform a POST operation - # in dangerous actions like deleting a record (which search bots can follow - # while spidering your site). Supported verbs are :post, :delete, :patch, and :put. - # Note that if the user has JavaScript disabled, the request will fall back - # to using GET. If href: '#' is used and the user has JavaScript - # disabled clicking the link will have no effect. If you are relying on the - # POST behavior, you should check for it in your controller's action by using - # the request object's methods for post?, delete?, patch?, or put?. - # * remote: true - This will allow @rails/ujs - # to make an Ajax request to the URL in question instead of following - # the link. - # - # @rails/ujs also integrated with the following +:data+ options: - # - # * confirm: "question?" - This will allow @rails/ujs - # to prompt with the question specified (in this case, the - # resulting text would be question?). If the user accepts, the - # link is processed normally, otherwise no action is taken. - # * :disable_with - Value of this parameter will be used as the - # name for a disabled version of the link. - # - # ===== Rails UJS Examples - # - # link_to "Remove Profile", profile_path(@profile), method: :delete - # # => Remove Profile - # - # 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 - 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 - # +options+ if +condition+ is true, otherwise only the name is - # returned. To specialize the default behavior, you can pass a block that - # accepts the name or the full argument list for +link_to_if+. - # - # ==== Examples - # <%= link_to_if(@current_user.nil?, "Login", { controller: "sessions", action: "new" }) %> - # # If the user isn't logged in... - # # => Login - # - # <%= - # link_to_if(@current_user.nil?, "Login", { controller: "sessions", action: "new" }) do - # link_to(@current_user.login, { controller: "accounts", action: "show", id: @current_user }) - # end - # %> - # # If the user isn't logged in... - # # => Login - # # If they are logged in... - # # => my_username - # - # source://actionview//lib/action_view/helpers/url_helper.rb#471 - 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 - # +options+ unless +condition+ is true, in which case only the name is - # returned. To specialize the default behavior (i.e., show a login link rather - # than just the plaintext link text), you can pass a block that - # accepts the name or the full argument list for +link_to_unless+. - # - # ==== Examples - # <%= link_to_unless(@current_user.nil?, "Reply", { action: "reply" }) %> - # # If the user is logged in... - # # => Reply - # - # <%= - # link_to_unless(@current_user.nil?, "Reply", { action: "reply" }) do |name| - # link_to(name, { controller: "accounts", action: "signup" }) - # end - # %> - # # If the user is logged in... - # # => Reply - # # If not... - # # => Reply - # - # source://actionview//lib/action_view/helpers/url_helper.rb#448 - 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 - # +options+ unless the current request URI is the same as the links, in - # which case only the name is returned (or the given block is yielded, if - # one exists). You can give +link_to_unless_current+ a block which will - # specialize the default behavior (e.g., show a "Start Here" link rather - # than the link's text). - # - # ==== Examples - # Let's say you have a navigation menu... - # - # - # - # If in the "about" action, it will render... - # - # - # - # ...but if in the "index" action, it will render: - # - # - # - # The implicit block given to +link_to_unless_current+ is evaluated if the current - # action is the action given. So, if we had a comments page and wanted to render a - # "Go Back" link instead of a link to the comments page, we could do something like this... - # - # <%= - # link_to_unless_current("Comment", { controller: "comments", action: "new" }) do - # link_to("Go back", { controller: "posts", action: "index" }) - # end - # %> - # - # source://actionview//lib/action_view/helpers/url_helper.rb#424 - 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 - # also used as the name of the link unless +name+ is specified. Additional - # HTML attributes for the link can be passed in +html_options+. - # - # +mail_to+ has several methods for customizing the email itself by - # passing special keys to +html_options+. - # - # ==== Options - # * :subject - Preset the subject line of the email. - # * :body - Preset the body of the email. - # * :cc - Carbon Copy additional recipients on the email. - # * :bcc - Blind Carbon Copy additional recipients on the email. - # * :reply_to - Preset the Reply-To field of the email. - # - # ==== Obfuscation - # 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. - # - # ==== Examples - # mail_to "me@domain.com" - # # => me@domain.com - # - # mail_to "me@domain.com", "My email" - # # => My email - # - # mail_to "me@domain.com", cc: "ccaddress@domain.com", - # subject: "This is an example email" - # # => me@domain.com - # - # You can use a block as well if your link target is hard to fit into the name parameter. ERB example: - # - # <%= mail_to "me@domain.com" do %> - # Email me: me@domain.com - # <% end %> - # # => - # Email me: me@domain.com - # - # - # source://actionview//lib/action_view/helpers/url_helper.rb#521 - 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 - # link is clicked, the default app to make phone calls is opened and - # prepopulated with the phone number. - # - # If +name+ is not specified, +phone_number+ will be used as the name of - # the link. - # - # A +country_code+ option is supported, which prepends a plus sign and the - # given country code to the linked phone number. For example, - # country_code: "01" will prepend +01 to the linked - # phone number. - # - # Additional HTML attributes for the link can be passed via +html_options+. - # - # ==== Options - # * :country_code - Prepends the country code to the phone number - # - # ==== Examples - # phone_to "1234567890" - # # => 1234567890 - # - # phone_to "1234567890", "Phone me" - # # => Phone me - # - # phone_to "1234567890", country_code: "01" - # # => 1234567890 - # - # You can use a block as well if your link target is hard to fit into the name parameter. \ERB example: - # - # <%= phone_to "1234567890" do %> - # Phone me: - # <% end %> - # # => - # Phone me: - # - # - # source://actionview//lib/action_view/helpers/url_helper.rb#716 - 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 - # link is clicked, the default SMS messaging app is opened ready to send a - # message to the linked phone number. If the +body+ option is specified, - # the contents of the message will be preset to +body+. - # - # If +name+ is not specified, +phone_number+ will be used as the name of - # the link. - # - # A +country_code+ option is supported, which prepends a plus sign and the - # given country code to the linked phone number. For example, - # country_code: "01" will prepend +01 to the linked - # phone number. - # - # Additional HTML attributes for the link can be passed via +html_options+. - # - # ==== Options - # * :country_code - Prepend the country code to the phone number. - # * :body - Preset the body of the message. - # - # ==== Examples - # sms_to "5155555785" - # # => 5155555785 - # - # sms_to "5155555785", country_code: "01" - # # => 5155555785 - # - # sms_to "5155555785", "Text me" - # # => Text me - # - # sms_to "5155555785", body: "I have a question about your product." - # # => 5155555785 - # - # You can use a block as well if your link target is hard to fit into the name parameter. \ERB example: - # - # <%= sms_to "5155555785" do %> - # Text me: - # <% end %> - # # => - # Text me: - # - # - # source://actionview//lib/action_view/helpers/url_helper.rb#665 - 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 - def url_for(options = T.unsafe(nil)); end - - private - - # source://actionview//lib/action_view/helpers/url_helper.rb#47 - def _back_url; end - - # source://actionview//lib/action_view/helpers/url_helper.rb#52 - def _filtered_referrer; end - - # source://actionview//lib/action_view/helpers/url_helper.rb#759 - def add_method_to_attributes!(html_options, method); end - - # source://actionview//lib/action_view/helpers/url_helper.rb#730 - def convert_options_to_data_attributes(options, html_options); end - - # @return [Boolean] - # - # source://actionview//lib/action_view/helpers/url_helper.rb#753 - def link_to_remote_options?(options); end - - # source://actionview//lib/action_view/helpers/url_helper.rb#770 - def method_for_options(options); end - - # @return [Boolean] - # - # source://actionview//lib/action_view/helpers/url_helper.rb#788 - def method_not_get_method?(method); end - - # source://actionview//lib/action_view/helpers/url_helper.rb#807 - def method_tag(method); end - - # source://actionview//lib/action_view/helpers/url_helper.rb#853 - def remove_trailing_slash!(url_string); end - - # Returns an array of hashes each containing :name and :value keys - # suitable for use as the names and values of form input fields: - # - # to_form_params(name: 'David', nationality: 'Danish') - # # => [{name: 'name', value: 'David'}, {name: 'nationality', value: 'Danish'}] - # - # to_form_params(country: { name: 'Denmark' }) - # # => [{name: 'country[name]', value: 'Denmark'}] - # - # to_form_params(countries: ['Denmark', 'Sweden']}) - # # => [{name: 'countries[]', value: 'Denmark'}, {name: 'countries[]', value: 'Sweden'}] - # - # An optional namespace can be passed to enclose key names: - # - # to_form_params({ name: 'Denmark' }, 'country') - # # => [{name: 'country[name]', value: 'Denmark'}] - # - # source://actionview//lib/action_view/helpers/url_helper.rb#827 - def to_form_params(attribute, namespace = T.unsafe(nil)); end - - # source://actionview//lib/action_view/helpers/url_helper.rb#793 - def token_tag(token = T.unsafe(nil), form_options: T.unsafe(nil)); end - - # source://actionview//lib/action_view/helpers/url_helper.rb#745 - def url_target(name, options); end - - class << self - # source://actionview//lib/action_view/helpers/url_helper.rb#32 - def button_to_generates_button_tag; end - - # source://actionview//lib/action_view/helpers/url_helper.rb#32 - def button_to_generates_button_tag=(val); end - end -end - -# This helper may be included in any class that includes the -# URL helpers of a routes (routes.url_helpers). Some methods -# provided here will only work in the context of a request -# (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 -ActionView::Helpers::UrlHelper::BUTTON_TAG_METHOD_VERBS = T.let(T.unsafe(nil), Array) - -# source://actionview//lib/action_view/helpers/url_helper.rb#26 -module ActionView::Helpers::UrlHelper::ClassMethods - # source://actionview//lib/action_view/helpers/url_helper.rb#27 - def _url_for_modules; end -end - -# source://actionview//lib/action_view/helpers/url_helper.rb#780 -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, -# it will trigger the lookup_context and consequently expire the cache. -# -# source://actionview//lib/action_view/rendering.rb#8 -class ActionView::I18nProxy < ::I18n::Config - # @return [I18nProxy] a new instance of I18nProxy - # - # source://actionview//lib/action_view/rendering.rb#11 - def initialize(original_config, lookup_context); end - - # source://actionview//lib/action_view/rendering.rb#16 - def locale; end - - # source://actionview//lib/action_view/rendering.rb#20 - def locale=(value); end - - # source://actionview//lib/action_view/rendering.rb#9 - def lookup_context; end - - # source://actionview//lib/action_view/rendering.rb#9 - def original_config; end -end - -# 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" %> -# Hello World -# <%= render "shared/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. -# -# With layouts, you can flip it around and have the common structure know where to insert changing content. This means -# that the header and footer are only mentioned in one place, like this: -# -# // The header part of this layout -# <%= yield %> -# // The footer part of this layout -# -# And then you have content pages that look like this: -# -# hello world -# -# At rendering time, the content page is computed and then inserted in the layout, like this: -# -# // The header part of this layout -# hello world -# // The footer part of this layout -# -# == Accessing shared variables -# -# Layouts have access to variables specified in the content pages and vice versa. This allows you to have layouts with -# references that won't materialize before rendering time: -# -#

    <%= @page_title %>

    -# <%= yield %> -# -# ...and content pages that fulfill these references _at_ rendering time: -# -# <% @page_title = "Welcome" %> -# Off-world colonies offers you a chance to start a new life -# -# The result after rendering is: -# -#

    Welcome

    -# Off-world colonies offers you a chance to start a new life -# -# == Layout assignment -# -# You can either specify a layout declaratively (using the #layout class method) or give -# it the same name as your controller, and place it in app/views/layouts. -# If a subclass does not have a layout specified, it inherits its layout using normal Ruby inheritance. -# -# For instance, if you have PostsController and a template named app/views/layouts/posts.html.erb, -# that template will be used for all actions in PostsController and controllers inheriting -# from PostsController. -# -# If you use a module, for instance Weblog::PostsController, you will need a template named -# app/views/layouts/weblog/posts.html.erb. -# -# Since all your controllers inherit from ApplicationController, they will use -# app/views/layouts/application.html.erb if no other layout is specified -# or provided. -# -# == Inheritance Examples -# -# class BankController < ActionController::Base -# # bank.html.erb exists -# -# class ExchangeController < BankController -# # exchange.html.erb exists -# -# class CurrencyController < BankController -# -# class InformationController < BankController -# layout "information" -# -# class TellerController < InformationController -# # teller.html.erb exists -# -# class EmployeeController < InformationController -# # employee.html.erb exists -# layout nil -# -# class VaultController < BankController -# layout :access_level_layout -# -# class TillController < BankController -# layout false -# -# In these examples, we have three implicit lookup scenarios: -# * The +BankController+ uses the "bank" layout. -# * The +ExchangeController+ uses the "exchange" layout. -# * The +CurrencyController+ inherits the layout from BankController. -# -# However, when a layout is explicitly set, the explicitly set layout wins: -# * The +InformationController+ uses the "information" layout, explicitly set. -# * The +TellerController+ also uses the "information" layout, because the parent explicitly set it. -# * The +EmployeeController+ uses the "employee" layout, because it set the layout to +nil+, resetting the parent configuration. -# * The +VaultController+ chooses a layout dynamically by calling the access_level_layout method. -# * The +TillController+ does not use a layout at all. -# -# == Types of layouts -# -# Layouts are basically just regular templates, but the name of this template needs not be specified statically. Sometimes -# you want to alternate layouts depending on runtime information, such as whether someone is logged in or not. This can -# be done either by specifying a method reference as a symbol or using an inline method (as a proc). -# -# The method reference is the preferred approach to variable layouts and is used like this: -# -# class WeblogController < ActionController::Base -# layout :writers_and_readers -# -# def index -# # fetching posts -# end -# -# private -# def writers_and_readers -# logged_in? ? "writer_layout" : "reader_layout" -# end -# end -# -# Now when a new request for the index action is processed, the layout will vary depending on whether the person accessing -# is logged in or not. -# -# If you want to use an inline method, such as a proc, do something like this: -# -# class WeblogController < ActionController::Base -# layout proc { |controller| controller.logged_in? ? "writer_layout" : "reader_layout" } -# end -# -# If an argument isn't given to the proc, it's evaluated in the context of -# the current controller anyway. -# -# class WeblogController < ActionController::Base -# layout proc { logged_in? ? "writer_layout" : "reader_layout" } -# end -# -# Of course, the most common way of specifying a layout is still just as a plain template name: -# -# class WeblogController < ActionController::Base -# layout "weblog_standard" -# end -# -# The template will be looked always in app/views/layouts/ folder. But you can point -# layouts folder direct also. layout "layouts/demo" is the same as layout "demo". -# -# Setting the layout to +nil+ forces it to be looked up in the filesystem and fallbacks to the parent behavior if none exists. -# Setting it to +nil+ is useful to re-enable template lookup overriding a previous configuration set in the parent: -# -# class ApplicationController < ActionController::Base -# layout "application" -# end -# -# class PostsController < ApplicationController -# # Will use "application" layout -# end -# -# class CommentsController < ApplicationController -# # Will search for "comments" layout and fallback "application" layout -# layout nil -# end -# -# == Conditional layouts -# -# If you have a layout that by default is applied to all the actions of a controller, you still have the option of rendering -# a given action or set of actions without a layout, or restricting a layout to only a single action or a set of actions. The -# :only and :except options can be passed to the layout call. For example: -# -# class WeblogController < ActionController::Base -# layout "weblog_standard", except: :rss -# -# # ... -# -# end -# -# This will assign "weblog_standard" as the WeblogController's layout for all actions except for the +rss+ action, which will -# be rendered directly, without wrapping a layout around the rendered view. -# -# Both the :only and :except condition can accept an arbitrary number of method references, so -# except: [ :rss, :text_only ] is valid, as is except: :rss. -# -# == Using a different layout in the action render call -# -# If most of your actions use the same layout, it makes perfect sense to define a controller-wide layout as described above. -# Sometimes you'll have exceptions where one action wants to use a different layout than the rest of the controller. -# You can do this by passing a :layout option to the render call. For example: -# -# class WeblogController < ActionController::Base -# layout "weblog_standard" -# -# def help -# render action: "help", layout: "help" -# end -# 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 -module ActionView::Layouts - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - include ::ActionView::ViewPaths - include ::ActionView::Rendering - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActionView::ViewPaths::ClassMethods - mixes_in_class_methods ::ActionView::Rendering::ClassMethods - mixes_in_class_methods ::ActionView::Layouts::ClassMethods - - # source://actionview//lib/action_view/layouts.rb#361 - 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 - def _normalize_options(options); end - - def action_has_layout=(_arg0); end - - # Controls whether an action should be rendered using a layout. - # If you want to disable any layout settings for the - # current action so that it is rendered without a layout then - # either override this method in your controller to return false - # for that action or set the action_has_layout attribute - # to false before rendering. - # - # @return [Boolean] - # - # source://actionview//lib/action_view/layouts.rb#372 - def action_has_layout?; end - - private - - # @return [Boolean] - # - # source://actionview//lib/action_view/layouts.rb#377 - def _conditional_layout?; end - - # Returns the default layout for this controller. - # Optionally raises an exception if the layout could not be found. - # - # ==== Parameters - # * formats - The formats accepted to this layout - # * require_layout - If set to +true+ and layout is not found, - # an +ArgumentError+ exception is raised (defaults to +false+) - # - # ==== Returns - # * template - The template object for the default layout (or +nil+) - # - # source://actionview//lib/action_view/layouts.rb#415 - def _default_layout(lookup_context, formats, require_layout = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://actionview//lib/action_view/layouts.rb#430 - def _include_layout?(options); end - - # This will be overwritten by _write_layout_method - # - # source://actionview//lib/action_view/layouts.rb#382 - def _layout(*_arg0); end - - # Determine the layout for a given name, taking into account the name type. - # - # ==== Parameters - # * name - The name of the template - # - # source://actionview//lib/action_view/layouts.rb#388 - def _layout_for_option(name); end - - # source://actionview//lib/action_view/layouts.rb#401 - def _normalize_layout(value); end - - module GeneratedClassMethods - def _layout; end - def _layout=(value); end - def _layout?; end - def _layout_conditions; end - def _layout_conditions=(value); end - def _layout_conditions?; end - end - - module GeneratedInstanceMethods; end -end - -# source://actionview//lib/action_view/layouts.rb#217 -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 - def _write_layout_method; end - - # source://actionview//lib/action_view/layouts.rb#218 - def inherited(klass); end - - # Specify the layout to use for this class. - # - # If the specified layout is a: - # String:: the String is the template name - # Symbol:: call the method specified by the symbol - # Proc:: call the passed Proc - # false:: There is no layout - # true:: raise an ArgumentError - # nil:: Force default layout behavior with inheritance - # - # Return value of +Proc+ and +Symbol+ arguments should be +String+, +false+, +true+, or +nil+ - # with the same meaning as described above. - # - # ==== Parameters - # - # * layout - The layout to use. - # - # ==== Options (conditions) - # - # * +: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 - def layout(layout, conditions = T.unsafe(nil)); end - - private - - # If no layout is supplied, look for a template named the return - # value of this method. - # - # ==== Returns - # * String - A template name - # - # source://actionview//lib/action_view/layouts.rb#345 - 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 -module ActionView::Layouts::ClassMethods::LayoutConditions - private - - # Determines whether the current action has a layout definition by - # checking the action name against the :only and :except conditions - # set by the layout method. - # - # ==== Returns - # * Boolean - True if the action has a layout definition, false otherwise. - # - # @return [Boolean] - # - # source://actionview//lib/action_view/layouts.rb#233 - def _conditional_layout?; end -end - -# = Action View Log Subscriber -# -# 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 - # @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 - def render_collection(event); end - - # source://actionview//lib/action_view/log_subscriber.rb#35 - def render_layout(event); end - - # source://actionview//lib/action_view/log_subscriber.rb#25 - 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 - 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#92 - def log_rendering_start(payload, name); end - - # source://actionview//lib/action_view/log_subscriber.rb#71 - def rails_root; end - - # source://actionview//lib/action_view/log_subscriber.rb#75 - def render_count(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#10 -ActionView::LogSubscriber::VIEWS_PATTERN = T.let(T.unsafe(nil), Regexp) - -# = Action View Lookup Context -# -# LookupContext is the object responsible for holding all information -# required for looking up templates, i.e. view paths and details. -# LookupContext is also responsible for generating a key, given to -# view paths, used in the resolver cache lookup. Since this key is generated -# only once during the request, it speeds up all cache accesses. -# -# source://actionview//lib/action_view/lookup_context.rb#15 -class ActionView::LookupContext - include ::ActionView::LookupContext::Accessors - include ::ActionView::LookupContext::DetailsCache - include ::ActionView::LookupContext::ViewPaths - - # @return [LookupContext] a new instance of LookupContext - # - # source://actionview//lib/action_view/lookup_context.rb#216 - def initialize(view_paths, details = T.unsafe(nil), prefixes = T.unsafe(nil)); end - - # source://actionview//lib/action_view/lookup_context.rb#226 - 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 - def formats=(values); end - - # Override locale to return a symbol instead of array. - # - # source://actionview//lib/action_view/lookup_context.rb#267 - 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 - def locale=(value); end - - # source://actionview//lib/action_view/lookup_context.rb#16 - def prefixes; end - - # 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 - def with_prepended_formats(formats); end - - private - - # source://actionview//lib/action_view/lookup_context.rb#237 - def initialize_details(target, details); end - - class << self - # source://actionview//lib/action_view/lookup_context.rb#21 - def register_detail(name, &block); end - - # source://actionview//lib/action_view/lookup_context.rb#18 - def registered_details; end - - # source://actionview//lib/action_view/lookup_context.rb#18 - def registered_details=(_arg0); end - end -end - -# Holds accessors for the registered details. -# -# source://actionview//lib/action_view/lookup_context.rb#39 -module ActionView::LookupContext::Accessors - # source://actionview//lib/action_view/lookup_context.rb#50 - def default_formats; end - - # source://actionview//lib/action_view/lookup_context.rb#52 - def default_handlers; end - - # source://actionview//lib/action_view/lookup_context.rb#43 - def default_locale; end - - # source://actionview//lib/action_view/lookup_context.rb#51 - def default_variants; end - - # source://actionview//lib/action_view/lookup_context.rb#27 - def formats; end - - # source://actionview//lib/action_view/lookup_context.rb#31 - def formats=(value); end - - # source://actionview//lib/action_view/lookup_context.rb#27 - def handlers; end - - # source://actionview//lib/action_view/lookup_context.rb#31 - def handlers=(value); end - - # source://actionview//lib/action_view/lookup_context.rb#27 - def locale; end - - # source://actionview//lib/action_view/lookup_context.rb#31 - def locale=(value); end - - # source://actionview//lib/action_view/lookup_context.rb#27 - def variants; end - - # source://actionview//lib/action_view/lookup_context.rb#31 - def variants=(value); end -end - -# source://actionview//lib/action_view/lookup_context.rb#40 -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 -module ActionView::LookupContext::DetailsCache - # Returns the value of attribute cache. - # - # source://actionview//lib/action_view/lookup_context.rb#95 - 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 - 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 - def details_key; end - - # Temporary skip passing the details_key forward. - # - # source://actionview//lib/action_view/lookup_context.rb#104 - def disable_cache; end - - private - - # source://actionview//lib/action_view/lookup_context.rb#112 - def _set_detail(key, value); end -end - -# source://actionview//lib/action_view/lookup_context.rb#54 -class ActionView::LookupContext::DetailsKey - def eql?(_arg0); end - - class << self - # source://actionview//lib/action_view/lookup_context.rb#73 - def clear; end - - # source://actionview//lib/action_view/lookup_context.rb#65 - def details_cache_key(details); end - - # source://actionview//lib/action_view/lookup_context.rb#61 - def digest_cache(details); end - - # source://actionview//lib/action_view/lookup_context.rb#82 - def digest_caches; end - - # source://actionview//lib/action_view/lookup_context.rb#86 - def view_context_class(klass); end - end -end - -# Helpers related to template lookup using the lookup context information. -# -# source://actionview//lib/action_view/lookup_context.rb#121 -module ActionView::LookupContext::ViewPaths - # @return [Boolean] - # - # source://actionview//lib/action_view/lookup_context.rb#144 - def any?(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://actionview//lib/action_view/lookup_context.rb#144 - def any_templates?(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://actionview//lib/action_view/lookup_context.rb#137 - 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 - 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 - 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 - 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 - def html_fallback_for_js; end - - # @return [Boolean] - # - # source://actionview//lib/action_view/lookup_context.rb#137 - 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 - def view_paths; end - - private - - # 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 - 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 - def detail_args_for(options); end - - # source://actionview//lib/action_view/lookup_context.rb#172 - 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 - def normalize_name(name, prefixes); end -end - -# source://actionview//lib/action_view/template/error.rb#29 -class ActionView::MissingTemplate < ::ActionView::ActionViewError - include ::DidYouMean::Correctable - - # @return [MissingTemplate] a new instance of MissingTemplate - # - # source://actionview//lib/action_view/template/error.rb#32 - def initialize(paths, path, prefixes, partial, details, *_arg5); end - - # Apps may have thousands of candidate templates so we attempt to - # generate the suggestions as efficiently as possible. - # First we split templates into prefixes and basenames, so that those can - # be matched separately. - # - # source://actionview//lib/action_view/template/error.rb#92 - def corrections; end - - # Returns the value of attribute partial. - # - # source://actionview//lib/action_view/template/error.rb#30 - def partial; end - - # Returns the value of attribute path. - # - # source://actionview//lib/action_view/template/error.rb#30 - def path; end - - # Returns the value of attribute paths. - # - # source://actionview//lib/action_view/template/error.rb#30 - def paths; end - - # Returns the value of attribute prefixes. - # - # source://actionview//lib/action_view/template/error.rb#30 - def prefixes; end -end - -# source://actionview//lib/action_view/template/error.rb#59 -class ActionView::MissingTemplate::Results - # @return [Results] a new instance of Results - # - # source://actionview//lib/action_view/template/error.rb#62 - def initialize(size); end - - # source://actionview//lib/action_view/template/error.rb#79 - def add(path, score); end - - # @return [Boolean] - # - # source://actionview//lib/action_view/template/error.rb#71 - def should_record?(score); end - - # source://actionview//lib/action_view/template/error.rb#67 - def to_a; end -end - -# source://actionview//lib/action_view/template/error.rb#60 -class ActionView::MissingTemplate::Results::Result < ::Struct - # Returns the value of attribute path - # - # @return [Object] the current value of path - def path; end - - # Sets the attribute path - # - # @param value [Object] the value to set the attribute path to. - # @return [Object] the newly set value - def path=(_); end - - # Returns the value of attribute score - # - # @return [Object] the current value of score - def score; end - - # Sets the attribute score - # - # @param value [Object] the value to set the attribute score to. - # @return [Object] the newly set value - def score=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://actionview//lib/action_view/model_naming.rb#4 -module ActionView::ModelNaming - # Converts the given object to an Active Model compliant one. - # - # source://actionview//lib/action_view/model_naming.rb#6 - def convert_to_model(object); end - - # source://actionview//lib/action_view/model_naming.rb#10 - def model_name_from_record_or_class(record_or_class); end -end - -# source://actionview//lib/action_view/renderer/object_renderer.rb#4 -class ActionView::ObjectRenderer < ::ActionView::PartialRenderer - include ::ActionView::AbstractRenderer::ObjectRendering - - # @return [ObjectRenderer] a new instance of ObjectRenderer - # - # source://actionview//lib/action_view/renderer/object_renderer.rb#7 - def initialize(lookup_context, options); end - - # source://actionview//lib/action_view/renderer/object_renderer.rb#19 - def render_object_derive_partial(object, context, block); end - - # source://actionview//lib/action_view/renderer/object_renderer.rb#13 - def render_object_with_partial(object, partial, context, block); end - - private - - # source://actionview//lib/action_view/renderer/object_renderer.rb#29 - def render_partial_template(view, locals, template, layout, block); end - - # source://actionview//lib/action_view/renderer/object_renderer.rb#25 - def template_keys(path); end -end - -# Used as a buffer for views -# -# The main difference between this and ActiveSupport::SafeBuffer -# is for the methods `<<` and `safe_expr_append=` the inputs are -# checked for nil before they are assigned and `to_s` is called on -# the input. For example: -# -# obuf = ActionView::OutputBuffer.new "hello" -# obuf << 5 -# puts obuf # => "hello5" -# -# sbuf = ActiveSupport::SafeBuffer.new "hello" -# sbuf << 5 -# puts sbuf # => "hello\u0005" -# -# source://actionview//lib/action_view/buffers.rb#21 -class ActionView::OutputBuffer < ::ActiveSupport::SafeBuffer - # @return [OutputBuffer] a new instance of OutputBuffer - # - # source://actionview//lib/action_view/buffers.rb#22 - def initialize(*_arg0); end - - # source://actionview//lib/action_view/buffers.rb#27 - def <<(value); end - - # source://actionview//lib/action_view/buffers.rb#27 - def append=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/core_ext/string/output_safety.rb#195 - def safe_append=(value); end - - # source://actionview//lib/action_view/buffers.rb#33 - def safe_expr_append=(val); end -end - -# source://actionview//lib/action_view/flows.rb#6 -class ActionView::OutputFlow - # @return [OutputFlow] a new instance of OutputFlow - # - # source://actionview//lib/action_view/flows.rb#9 - def initialize; end - - # Called by content_for - # - # source://actionview//lib/action_view/flows.rb#24 - def append(key, value); end - - # Called by content_for - # - # source://actionview//lib/action_view/flows.rb#24 - def append!(key, value); end - - # Returns the value of attribute content. - # - # source://actionview//lib/action_view/flows.rb#7 - def content; end - - # Called by _layout_for to read stored values. - # - # source://actionview//lib/action_view/flows.rb#14 - def get(key); end - - # Called by each renderer object to set the layout contents. - # - # source://actionview//lib/action_view/flows.rb#19 - def set(key, value); end -end - -# source://actionview//lib/action_view/renderer/collection_renderer.rb#6 -class ActionView::PartialIteration - # @return [PartialIteration] a new instance of PartialIteration - # - # source://actionview//lib/action_view/renderer/collection_renderer.rb#13 - def initialize(size); end - - # Check if this is the first iteration of the partial. - # - # @return [Boolean] - # - # source://actionview//lib/action_view/renderer/collection_renderer.rb#19 - def first?; end - - # The current iteration of the partial. - # - # source://actionview//lib/action_view/renderer/collection_renderer.rb#11 - def index; end - - # source://actionview//lib/action_view/renderer/collection_renderer.rb#28 - def iterate!; end - - # Check if this is the last iteration of the partial. - # - # @return [Boolean] - # - # source://actionview//lib/action_view/renderer/collection_renderer.rb#24 - def last?; end - - # The number of iterations that will be done by the partial. - # - # source://actionview//lib/action_view/renderer/collection_renderer.rb#8 - def size; end -end - -# = Action View Partials -# -# There's also a convenience method for rendering sub templates within the current controller that depends on a -# single object (we call this kind of sub templates for partials). It relies on the fact that partials should -# follow the naming convention of being prefixed with an underscore -- as to separate them from regular -# templates that could be rendered on their own. -# -# In a template for Advertiser#account: -# -# <%= render partial: "account" %> -# -# This would render "advertiser/_account.html.erb". -# -# In another template for Advertiser#buy, we could have: -# -# <%= render partial: "account", locals: { account: @buyer } %> -# -# <% @advertisements.each do |ad| %> -# <%= render partial: "ad", locals: { ad: ad } %> -# <% end %> -# -# This would first render advertiser/_account.html.erb with @buyer passed in as the local variable +account+, then -# render advertiser/_ad.html.erb and pass the local variable +ad+ to the template for display. -# -# == The +:as+ and +:object+ options -# -# By default ActionView::PartialRenderer doesn't have any local variables. -# The :object option can be used to pass an object to the partial. For instance: -# -# <%= render partial: "account", object: @buyer %> -# -# would provide the @buyer object to the partial, available under the local variable +account+ and is -# equivalent to: -# -# <%= render partial: "account", locals: { account: @buyer } %> -# -# With the :as option we can specify a different name for said local variable. For example, if we -# wanted it to be +user+ instead of +account+ we'd do: -# -# <%= render partial: "account", object: @buyer, as: 'user' %> -# -# This is equivalent to -# -# <%= render partial: "account", locals: { user: @buyer } %> -# -# == \Rendering a collection of partials -# -# The example of partial use describes a familiar pattern where a template needs to iterate over an array and -# render a sub template for each of the elements. This pattern has been implemented as a single method that -# accepts an array and renders a partial by the same name as the elements contained within. So the three-lined -# example in "Using partials" can be rewritten with a single line: -# -# <%= render partial: "ad", collection: @advertisements %> -# -# This will render advertiser/_ad.html.erb and pass the local variable +ad+ to the template for display. An -# iteration object will automatically be made available to the template with a name of the form -# +partial_name_iteration+. The iteration object has knowledge about which index the current object has in -# the collection and the total size of the collection. The iteration object also has two convenience methods, -# +first?+ and +last?+. In the case of the example above, the template would be fed +ad_iteration+. -# For backwards compatibility the +partial_name_counter+ is still present and is mapped to the iteration's -# +index+ method. -# -# The :as option may be used when rendering partials. -# -# You can specify a partial to be rendered between elements via the :spacer_template option. -# The following example will render advertiser/_ad_divider.html.erb between each ad partial: -# -# <%= render partial: "ad", collection: @advertisements, spacer_template: "ad_divider" %> -# -# If the given :collection is +nil+ or empty, render will return +nil+. This will allow you -# to specify a text which will be displayed instead by using this form: -# -# <%= render(partial: "ad", collection: @advertisements) || "There's no ad to be displayed" %> -# -# == \Rendering shared partials -# -# Two controllers can share a set of partials and render them like this: -# -# <%= render partial: "advertisement/ad", locals: { ad: @advertisement } %> -# -# This will render the partial advertisement/_ad.html.erb regardless of which controller this is being called from. -# -# == \Rendering objects that respond to +to_partial_path+ -# -# Instead of explicitly naming the location of a partial, you can also let PartialRenderer do the work -# and pick the proper path by checking +to_partial_path+ method. -# -# # @account.to_partial_path returns 'accounts/account', so it can be used to replace: -# # <%= render partial: "accounts/account", locals: { account: @account} %> -# <%= render partial: @account %> -# -# # @posts is an array of Post instances, so every post record returns 'posts/post' on +to_partial_path+, -# # that's why we can replace: -# # <%= render partial: "posts/post", collection: @posts %> -# <%= render partial: @posts %> -# -# == \Rendering the default case -# -# If you're not going to be using any of the options like collections or layouts, you can also use the short-hand -# defaults of render to render partials. Examples: -# -# # Instead of <%= render partial: "account" %> -# <%= render "account" %> -# -# # Instead of <%= render partial: "account", locals: { account: @buyer } %> -# <%= render "account", account: @buyer %> -# -# # @account.to_partial_path returns 'accounts/account', so it can be used to replace: -# # <%= render partial: "accounts/account", locals: { account: @account} %> -# <%= render @account %> -# -# # @posts is an array of Post instances, so every post record returns 'posts/post' on +to_partial_path+, -# # that's why we can replace: -# # <%= render partial: "posts/post", collection: @posts %> -# <%= render @posts %> -# -# == \Rendering partials with layouts -# -# Partials can have their own layouts applied to them. These layouts are different than the ones that are -# specified globally for the entire action, but they work in a similar fashion. Imagine a list with two types -# of users: -# -# <%# app/views/users/index.html.erb %> -# Here's the administrator: -# <%= render partial: "user", layout: "administrator", locals: { user: administrator } %> -# -# Here's the editor: -# <%= render partial: "user", layout: "editor", locals: { user: editor } %> -# -# <%# app/views/users/_user.html.erb %> -# Name: <%= user.name %> -# -# <%# app/views/users/_administrator.html.erb %> -#
    -# Budget: $<%= user.budget %> -# <%= yield %> -#
    -# -# <%# app/views/users/_editor.html.erb %> -#
    -# Deadline: <%= user.deadline %> -# <%= yield %> -#
    -# -# ...this will return: -# -# Here's the administrator: -#
    -# Budget: $<%= user.budget %> -# Name: <%= user.name %> -#
    -# -# Here's the editor: -#
    -# Deadline: <%= user.deadline %> -# Name: <%= user.name %> -#
    -# -# If a collection is given, the layout will be rendered once for each item in -# the collection. For example, these two snippets have the same output: -# -# <%# app/views/users/_user.html.erb %> -# Name: <%= user.name %> -# -# <%# app/views/users/index.html.erb %> -# <%# This does not use layouts %> -#
      -# <% users.each do |user| -%> -#
    • -# <%= render partial: "user", locals: { user: user } %> -#
    • -# <% end -%> -#
    -# -# <%# app/views/users/_li_layout.html.erb %> -#
  • -# <%= yield %> -#
  • -# -# <%# app/views/users/index.html.erb %> -#
      -# <%= render partial: "user", layout: "li_layout", collection: users %> -#
    -# -# Given two users whose names are Alice and Bob, these snippets return: -# -#
      -#
    • -# Name: Alice -#
    • -#
    • -# Name: Bob -#
    • -#
    -# -# The current object being rendered, as well as the object_counter, will be -# available as local variables inside the layout template under the same names -# as available in the partial. -# -# You can also apply a layout to a block within any template: -# -# <%# app/views/users/_chief.html.erb %> -# <%= render(layout: "administrator", locals: { user: chief }) do %> -# Title: <%= chief.title %> -# <% end %> -# -# ...this will return: -# -#
    -# Budget: $<%= user.budget %> -# Title: <%= chief.name %> -#
    -# -# As you can see, the :locals hash is shared between both the partial and its layout. -# -# source://actionview//lib/action_view/renderer/partial_renderer.rb#220 -class ActionView::PartialRenderer < ::ActionView::AbstractRenderer - include ::ActionView::CollectionCaching - - # @return [PartialRenderer] a new instance of PartialRenderer - # - # source://actionview//lib/action_view/renderer/partial_renderer.rb#223 - def initialize(lookup_context, options); end - - # source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#12 - def collection_cache; end - - # source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#12 - def collection_cache=(val); end - - # source://actionview//lib/action_view/renderer/partial_renderer.rb#230 - def render(partial, context, block); end - - private - - # source://actionview//lib/action_view/renderer/partial_renderer.rb#261 - def find_template(path, locals); end - - # source://actionview//lib/action_view/renderer/partial_renderer.rb#245 - def render_partial_template(view, locals, template, layout, block); end - - # source://actionview//lib/action_view/renderer/partial_renderer.rb#241 - def template_keys(_); end - - class << self - # source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#12 - def collection_cache; end - - # source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#12 - def collection_cache=(val); end - end -end - -# = Action View PathSet -# -# This class is used to store and access paths in Action View. A number of -# operations are defined so that you can search among the paths in this -# set and also perform operations on other +PathSet+ objects. -# -# A +LookupContext+ will use a +PathSet+ to store the paths in its context. -# -# source://actionview//lib/action_view/path_set.rb#11 -class ActionView::PathSet - include ::Enumerable - - # @return [PathSet] a new instance of PathSet - # - # source://actionview//lib/action_view/path_set.rb#18 - 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 - - # source://actionview//lib/action_view/path_set.rb#16 - def [](*_arg0, **_arg1, &_arg2); end - - # 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 - def exists?(path, prefixes, partial, details, details_key, locals); end - - # source://actionview//lib/action_view/path_set.rb#47 - def find(path, prefixes, partial, details, details_key, locals); end - - # source://actionview//lib/action_view/path_set.rb#52 - 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 - def search_combinations(prefixes); end - - # source://actionview//lib/action_view/path_set.rb#74 - def typecast(paths); end -end - -# = Action View Railtie -# -# source://actionview//lib/action_view/railtie.rb#8 -class ActionView::Railtie < ::Rails::Engine - class << self - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - end -end - -# RecordIdentifier encapsulates methods used by various ActionView helpers -# to associate records with DOM elements. -# -# Consider for example the following code that form of post: -# -# <%= form_for(post) do |f| %> -# <%= f.text_field :body %> -# <% end %> -# -# When +post+ is a new, unsaved ActiveRecord::Base instance, the resulting HTML -# is: -# -#
    -# -#
    -# -# When +post+ is a persisted ActiveRecord::Base instance, the resulting HTML -# is: -# -#
    -# -#
    -# -# In both cases, the +id+ and +class+ of the wrapping DOM element are -# automatically generated, following naming conventions encapsulated by the -# RecordIdentifier methods #dom_id and #dom_class: -# -# dom_id(Post.new) # => "new_post" -# dom_class(Post.new) # => "post" -# dom_id(Post.find 42) # => "post_42" -# dom_class(Post.find 42) # => "post" -# -# Note that these methods do not strictly require +Post+ to be a subclass of -# ActiveRecord::Base. -# Any +Post+ class will work as long as its instances respond to +to_key+ -# and +model_name+, given that +model_name+ responds to +param_key+. -# For instance: -# -# class Post -# attr_accessor :to_key -# -# def model_name -# OpenStruct.new param_key: 'post' -# end -# -# def self.find(id) -# new.tap { |post| post.to_key = [id] } -# end -# end -# -# source://actionview//lib/action_view/record_identifier.rb#56 -module ActionView::RecordIdentifier - include ::ActionView::ModelNaming - extend ::ActionView::RecordIdentifier - extend ::ActionView::ModelNaming - - # The DOM class convention is to use the singular form of an object or class. - # - # dom_class(post) # => "post" - # dom_class(Person) # => "person" - # - # If you need to address multiple instances of the same class in the same view, you can prefix the dom_class: - # - # dom_class(post, :edit) # => "edit_post" - # dom_class(Person, :edit) # => "edit_person" - # - # source://actionview//lib/action_view/record_identifier.rb#74 - 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" - # - # 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" - # - # source://actionview//lib/action_view/record_identifier.rb#89 - def dom_id(record, prefix = T.unsafe(nil)); end - - private - - # Returns a string representation of the key attribute(s) that is suitable for use in an HTML DOM id. - # This can be overwritten to customize the default generated string representation if desired. - # If you need to read back a key from a dom_id in order to query for the underlying database record, - # you should write a helper like 'person_record_from_dom_id' that will extract the key either based - # on the default implementation (which just joins all key attributes with '_') or on your own - # overwritten version of the method. By default, this implementation passes the key string through a - # 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 - def record_key_for_dom_id(record); end -end - -# source://actionview//lib/action_view/record_identifier.rb#62 -ActionView::RecordIdentifier::JOIN = T.let(T.unsafe(nil), String) - -# source://actionview//lib/action_view/record_identifier.rb#63 -ActionView::RecordIdentifier::NEW = T.let(T.unsafe(nil), String) - -# source://actionview//lib/action_view/ripper_ast_parser.rb#6 -class ActionView::RenderParser - # @return [RenderParser] a new instance of RenderParser - # - # source://actionview//lib/action_view/render_parser.rb#7 - def initialize(name, code); end - - # source://actionview//lib/action_view/render_parser.rb#13 - def render_calls; end - - private - - # source://actionview//lib/action_view/render_parser.rb#22 - def directory; end - - # source://actionview//lib/action_view/render_parser.rb#184 - def layout_to_virtual_path(layout_path); end - - # Convert - # render("foo", ...) - # into either - # render(template: "foo", ...) - # or - # render(partial: "foo", ...) - # - # source://actionview//lib/action_view/render_parser.rb#40 - def normalize_args(string, options_hash); end - - # source://actionview//lib/action_view/render_parser.rb#72 - def parse_hash(node); end - - # source://actionview//lib/action_view/render_parser.rb#76 - def parse_hash_to_symbols(node); end - - # source://actionview//lib/action_view/render_parser.rb#48 - def parse_render(node); end - - # source://actionview//lib/action_view/render_parser.rb#95 - def parse_render_from_options(options_hash); end - - # source://actionview//lib/action_view/render_parser.rb#155 - def parse_str(node); end - - # source://actionview//lib/action_view/render_parser.rb#159 - def parse_sym(node); end - - # source://actionview//lib/action_view/render_parser.rb#176 - def partial_to_virtual_path(render_type, partial_path); end - - # @return [Boolean] - # - # source://actionview//lib/action_view/render_parser.rb#164 - def render_template_with_layout?(render_type, options_hash); end - - # @return [Boolean] - # - # source://actionview//lib/action_view/render_parser.rb#170 - def render_template_with_spacer?(options_hash); end - - # source://actionview//lib/action_view/render_parser.rb#26 - def resolve_path_directory(path); end -end - -# source://actionview//lib/action_view/render_parser.rb#90 -ActionView::RenderParser::ALL_KNOWN_KEYS = T.let(T.unsafe(nil), Array) - -# source://actionview//lib/action_view/render_parser.rb#92 -ActionView::RenderParser::RENDER_TYPE_KEYS = T.let(T.unsafe(nil), Array) - -# source://actionview//lib/action_view/ripper_ast_parser.rb#7 -module ActionView::RenderParser::RipperASTParser - extend ::ActionView::RenderParser::RipperASTParser - - # source://actionview//lib/action_view/ripper_ast_parser.rb#188 - def parse_render_nodes(code); end -end - -# source://actionview//lib/action_view/ripper_ast_parser.rb#8 -class ActionView::RenderParser::RipperASTParser::Node < ::Array - # @return [Node] a new instance of Node - # - # source://actionview//lib/action_view/ripper_ast_parser.rb#11 - def initialize(type, arr, opts = T.unsafe(nil)); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#35 - def argument_nodes; end - - # @return [Boolean] - # - # source://actionview//lib/action_view/ripper_ast_parser.rb#57 - def call?; end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#65 - def call_method_name; end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#16 - def children; end - - # @return [Boolean] - # - # source://actionview//lib/action_view/ripper_ast_parser.rb#25 - def fcall?; end - - # @return [Boolean] - # - # source://actionview//lib/action_view/ripper_ast_parser.rb#29 - def fcall_named?(name); end - - # @return [Boolean] - # - # source://actionview//lib/action_view/ripper_ast_parser.rb#74 - def hash?; end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#88 - def hash_from_body(body); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#20 - def inspect; end - - # @return [Boolean] - # - # source://actionview//lib/action_view/ripper_ast_parser.rb#45 - def string?; end - - # @return [Boolean] - # - # source://actionview//lib/action_view/ripper_ast_parser.rb#96 - def symbol?; end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#78 - def to_hash; end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#69 - def to_string; end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#100 - def to_symbol; end - - # Returns the value of attribute type. - # - # source://actionview//lib/action_view/ripper_ast_parser.rb#9 - def type; end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#61 - def variable_name; end - - # @return [Boolean] - # - # source://actionview//lib/action_view/ripper_ast_parser.rb#49 - def variable_reference?; end - - # @return [Boolean] - # - # source://actionview//lib/action_view/ripper_ast_parser.rb#53 - def vcall?; end -end - -# source://actionview//lib/action_view/ripper_ast_parser.rb#111 -class ActionView::RenderParser::RipperASTParser::NodeParser < ::Ripper - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_BEGIN(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_CHAR(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_END(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on___end__(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_alias(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_alias_error(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_aref(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_aref_field(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_arg_ambiguous(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_arg_paren(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#123 - def on_args_add(list, item); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#123 - def on_args_add_block(list, item); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#123 - def on_args_add_star(list, item); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_args_forward(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#116 - def on_args_new(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_array(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_aryptn(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_assign(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_assign_error(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_assoc_new(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_assoc_splat(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_assoclist_from_args(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_backref(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_backtick(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_bare_assoc_hash(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_begin(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_binary(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_block_var(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_blockarg(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_bodystmt(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_brace_block(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_break(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_call(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_case(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_class(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_class_name_error(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_comma(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_command(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_command_call(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_comment(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_const(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_const_path_field(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_const_path_ref(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_const_ref(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_cvar(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_def(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_defined(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_defs(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_do_block(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_dot2(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_dot3(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_dyna_symbol(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_else(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_elsif(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_embdoc(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_embdoc_beg(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_embdoc_end(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_embexpr_beg(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_embexpr_end(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_embvar(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_ensure(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_excessed_comma(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_fcall(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_field(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_float(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_fndptn(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_for(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_gvar(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_hash(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_heredoc_beg(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_heredoc_dedent(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_heredoc_end(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_hshptn(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_ident(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_if(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_if_mod(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_ifop(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_ignored_nl(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_ignored_sp(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_imaginary(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_in(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_int(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_ivar(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_kw(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_kwrest_param(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_label(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_label_end(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_lambda(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_lbrace(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_lbracket(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_lparen(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_magic_comment(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_massign(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#123 - def on_method_add_arg(list, item); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#123 - def on_method_add_block(list, item); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#123 - def on_mlhs_add(list, item); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#123 - def on_mlhs_add_post(list, item); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#123 - def on_mlhs_add_star(list, item); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#116 - def on_mlhs_new(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_mlhs_paren(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_module(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#123 - def on_mrhs_add(list, item); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#123 - def on_mrhs_add_star(list, item); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#116 - def on_mrhs_new(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_mrhs_new_from_args(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_next(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_nl(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_nokw_param(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_op(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_opassign(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_operator_ambiguous(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_param_error(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_params(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_paren(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_parse_error(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_period(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_program(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#123 - def on_qsymbols_add(list, item); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_qsymbols_beg(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#116 - def on_qsymbols_new(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#123 - def on_qwords_add(list, item); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_qwords_beg(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#116 - def on_qwords_new(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_rational(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_rbrace(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_rbracket(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_redo(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#123 - def on_regexp_add(list, item); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_regexp_beg(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_regexp_end(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_regexp_literal(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#116 - def on_regexp_new(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_rescue(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_rescue_mod(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_rest_param(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_retry(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_return(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_return0(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_rparen(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_sclass(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_semicolon(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_sp(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#123 - def on_stmts_add(list, item); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#116 - def on_stmts_new(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#123 - def on_string_add(list, item); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_string_concat(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_string_content(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_string_dvar(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_string_embexpr(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_string_literal(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_super(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_symbeg(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_symbol(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_symbol_literal(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#123 - def on_symbols_add(list, item); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_symbols_beg(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#116 - def on_symbols_new(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_tlambda(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_tlambeg(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_top_const_field(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_top_const_ref(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_tstring_beg(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_tstring_content(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_tstring_end(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_unary(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_undef(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_unless(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_unless_mod(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_until(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_until_mod(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_var_alias(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_var_field(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_var_ref(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_vcall(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_void_stmt(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_when(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_while(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_while_mod(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#123 - def on_word_add(list, item); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#116 - def on_word_new(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#123 - def on_words_add(list, item); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_words_beg(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#116 - def on_words_new(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_words_sep(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#123 - def on_xstring_add(list, item); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_xstring_literal(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#116 - def on_xstring_new(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_yield(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_yield0(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_zsuper(*args); end -end - -# source://actionview//lib/action_view/ripper_ast_parser.rb#147 -class ActionView::RenderParser::RipperASTParser::RenderCallExtractor < ::ActionView::RenderParser::RipperASTParser::NodeParser - # @return [RenderCallExtractor] a new instance of RenderCallExtractor - # - # source://actionview//lib/action_view/ripper_ast_parser.rb#152 - def initialize(*args); end - - # Returns the value of attribute render_calls. - # - # source://actionview//lib/action_view/ripper_ast_parser.rb#148 - def render_calls; end - - private - - # source://actionview//lib/action_view/ripper_ast_parser.rb#177 - def on_arg_paren(content); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#163 - def on_command(name, *args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#159 - def on_fcall(name, *args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#181 - def on_paren(content); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#167 - def on_render_call(node); end -end - -# source://actionview//lib/action_view/ripper_ast_parser.rb#150 -ActionView::RenderParser::RipperASTParser::RenderCallExtractor::METHODS_TO_PARSE = T.let(T.unsafe(nil), Array) - -# This is the main entry point for rendering. It basically delegates -# to other objects like TemplateRenderer and PartialRenderer which -# actually renders the template. -# -# The Renderer will parse the options from the +render+ or +render_body+ -# method and render a partial or a template based on the options. The -# +TemplateRenderer+ and +PartialRenderer+ objects are wrappers which do all -# 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 -class ActionView::Renderer - # @return [Renderer] a new instance of Renderer - # - # source://actionview//lib/action_view/renderer/renderer.rb#16 - def initialize(lookup_context); end - - # source://actionview//lib/action_view/renderer/renderer.rb#56 - def cache_hits; end - - # Returns the value of attribute lookup_context. - # - # source://actionview//lib/action_view/renderer/renderer.rb#14 - 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 - 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 - def render(context, options); end - - # Render but returns a valid Rack body. If fibers are defined, we return - # a streaming body that renders the template piece by piece. - # - # 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 - def render_body(context, options); end - - # Direct access to partial rendering. - # - # source://actionview//lib/action_view/renderer/renderer.rb#52 - def render_partial(context, options, &block); end - - # source://actionview//lib/action_view/renderer/renderer.rb#64 - def render_partial_to_object(context, options, &block); end - - # Direct access to template rendering. - # - # source://actionview//lib/action_view/renderer/renderer.rb#47 - def render_template(context, options); end - - # source://actionview//lib/action_view/renderer/renderer.rb#60 - def render_template_to_object(context, options); end - - # source://actionview//lib/action_view/renderer/renderer.rb#25 - def render_to_object(context, options); end - - private - - # source://actionview//lib/action_view/renderer/renderer.rb#107 - def collection_from_object(object); end - - # source://actionview//lib/action_view/renderer/renderer.rb#100 - def collection_from_options(options); end -end - -# source://actionview//lib/action_view/rendering.rb#25 -module ActionView::Rendering - extend ::ActiveSupport::Concern - include ::ActionView::ViewPaths - - mixes_in_class_methods ::ActionView::ViewPaths::ClassMethods - mixes_in_class_methods ::ActionView::Rendering::ClassMethods - - # source://actionview//lib/action_view/rendering.rb#31 - def initialize; end - - # Override process to set up I18n proxy. - # - # source://actionview//lib/action_view/rendering.rb#37 - def process(*_arg0, **_arg1, &_arg2); end - - # source://actionview//lib/action_view/rendering.rb#101 - def render_to_body(options = T.unsafe(nil)); end - - # Returns the value of attribute rendered_format. - # - # source://actionview//lib/action_view/rendering.rb#29 - def rendered_format; end - - # An instance of a view class. The default view class is ActionView::Base. - # - # The view class must have the following methods: - # - # * View.new(lookup_context, assigns, controller) — Create a new - # ActionView instance for a controller and we can also pass the arguments. - # - # * View#render(option) — Returns String with the rendered template. - # - # Override this method in a module to change the default behavior. - # - # source://actionview//lib/action_view/rendering.rb#91 - def view_context; end - - # source://actionview//lib/action_view/rendering.rb#77 - def view_context_class; end - - # Returns an object that is able to render templates. - # - # source://actionview//lib/action_view/rendering.rb#96 - def view_renderer; end - - private - - # 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 - def _normalize_args(action = T.unsafe(nil), options = T.unsafe(nil)); end - - # Normalize options. - # - # source://actionview//lib/action_view/rendering.rb#158 - def _normalize_options(options); end - - # Assign the rendered format to look up context. - # - # source://actionview//lib/action_view/rendering.rb#127 - def _process_format(format); end - - # Find and render a template based on the options given. - # - # source://actionview//lib/action_view/rendering.rb#108 - def _render_template(options); end -end - -# source://actionview//lib/action_view/rendering.rb#44 -module ActionView::Rendering::ClassMethods - # source://actionview//lib/action_view/rendering.rb#48 - def _helpers; end - - # source://actionview//lib/action_view/rendering.rb#45 - def _routes; end - - # source://actionview//lib/action_view/rendering.rb#51 - def build_view_context_class(klass, supports_path, routes, helpers); end - - # source://actionview//lib/action_view/rendering.rb#64 - def view_context_class; end -end - -# = Action View Resolver -# -# source://actionview//lib/action_view/template/resolver.rb#12 -class ActionView::Resolver - # source://actionview//lib/action_view/template/resolver.rb#66 - def all_template_paths; end - - # source://actionview//lib/action_view/template/resolver.rb#52 - def caching; end - - # source://actionview//lib/action_view/template/resolver.rb#52 - def caching=(val); end - - # source://actionview//lib/action_view/template/resolver.rb#76 - def caching?(*_arg0, **_arg1, &_arg2); end - - # source://actionview//lib/action_view/template/resolver.rb#58 - def clear_cache; end - - # Normalizes the arguments and passes it on to find_templates. - # - # source://actionview//lib/action_view/template/resolver.rb#62 - 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#72 - def _find_all(name, prefix, partial, details, key, locals); end - - # This is what child classes implement. No defaults are needed - # because Resolver guarantees that the arguments are present and - # normalized. - # - # @raise [NotImplementedError] - # - # source://actionview//lib/action_view/template/resolver.rb#81 - def find_templates(name, prefix, partial, details, locals = T.unsafe(nil)); end - - class << self - # source://actionview//lib/action_view/template/resolver.rb#52 - def caching; end - - # source://actionview//lib/action_view/template/resolver.rb#52 - def caching=(val); end - - # source://actionview//lib/action_view/template/resolver.rb#52 - 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 -class ActionView::Resolver::PathParser - # source://actionview//lib/action_view/template/resolver.rb#19 - def build_path_regex; end - - # source://actionview//lib/action_view/template/resolver.rb#38 - def parse(path); end -end - -# source://actionview//lib/action_view/template/resolver.rb#17 -class ActionView::Resolver::PathParser::ParsedPath < ::Struct - # Returns the value of attribute details - # - # @return [Object] the current value of details - def details; end - - # Sets the attribute details - # - # @param value [Object] the value to set the attribute details to. - # @return [Object] the newly set value - def details=(_); end - - # Returns the value of attribute path - # - # @return [Object] the current value of path - def path; end - - # Sets the attribute path - # - # @param value [Object] the value to set the attribute path to. - # @return [Object] the newly set value - def path=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://actionview//lib/action_view/routing_url_for.rb#6 -module ActionView::RoutingUrlFor - include ::ActionDispatch::Routing::PolymorphicRoutes - - # source://actionpack/7.0.4.2/lib/action_dispatch/routing/url_for.rb#97 - def default_url_options=(val); end - - # Returns the URL for the set of +options+ provided. This takes the - # same options as +url_for+ in Action Controller (see the - # documentation for ActionController::Base#url_for). Note that by default - # :only_path is true so you'll get the relative "/controller/action" - # instead of the fully qualified URL like "http://example.com/controller/action". - # - # ==== Options - # * :anchor - Specifies the anchor name to be appended to the path. - # * :only_path - If true, returns the relative URL (omitting the protocol, host name, and port) (true by default unless :host is specified). - # * :trailing_slash - If true, adds a trailing slash, as in "/archive/2005/". Note that this - # is currently not recommended since it breaks caching. - # * :host - Overrides the default (current) host if provided. - # * :protocol - Overrides the default (current) protocol if provided. - # * :user - Inline HTTP authentication (only plucked out if :password is also present). - # * :password - Inline HTTP authentication (only plucked out if :user is also present). - # - # ==== Relying on named routes - # - # Passing a record (like an Active Record) instead of a hash as the options parameter will - # trigger the named route for that record. The lookup will happen on the name of the class. So passing a - # Workshop object will attempt to use the +workshop_path+ route. If you have a nested route, such as - # +admin_workshop_path+ you'll have to call that explicitly (it's impossible for +url_for+ to guess that route). - # - # ==== Implicit Controller Namespacing - # - # Controllers passed in using the +:controller+ option will retain their namespace unless it is an absolute one. - # - # ==== Examples - # <%= url_for(action: 'index') %> - # # => /blogs/ - # - # <%= url_for(action: 'find', controller: 'books') %> - # # => /books/find - # - # <%= url_for(action: 'login', controller: 'members', only_path: false, protocol: 'https') %> - # # => https://www.example.com/members/login/ - # - # <%= url_for(action: 'play', anchor: 'player') %> - # # => /messages/play/#player - # - # <%= url_for(action: 'jump', anchor: 'tax&ship') %> - # # => /testing/jump/#tax&ship - # - # <%= url_for(Workshop) %> - # # => /workshops - # - # <%= url_for(Workshop.new) %> - # # relies on Workshop answering a persisted? call (and in this case returning false) - # # => /workshops - # - # <%= url_for(@workshop) %> - # # calls @workshop.to_param which by default returns the id - # # => /workshops/5 - # - # # to_param can be re-defined in a model to provide different URL names: - # # => /workshops/1-workshop-name - # - # <%= url_for("http://www.example.com") %> - # # => http://www.example.com - # - # <%= url_for(:back) %> - # # if request.env["HTTP_REFERER"] is set to "http://www.example.com" - # # => http://www.example.com - # - # <%= url_for(:back) %> - # # if request.env["HTTP_REFERER"] is not set or is blank - # # => javascript:history.back() - # - # <%= url_for(action: 'index', controller: 'users') %> - # # Assuming an "admin" namespace - # # => /admin/users - # - # <%= url_for(action: 'index', controller: '/users') %> - # # Specify absolute path with beginning slash - # # => /users - # - # source://actionview//lib/action_view/routing_url_for.rb#82 - def url_for(options = T.unsafe(nil)); end - - # source://actionview//lib/action_view/routing_url_for.rb#124 - def url_options; end - - private - - # source://actionview//lib/action_view/routing_url_for.rb#139 - def _generate_paths_by_default; end - - # source://actionview//lib/action_view/routing_url_for.rb#130 - def _routes_context; end - - # source://actionview//lib/action_view/routing_url_for.rb#143 - def ensure_only_path_option(options); end - - # @return [Boolean] - # - # source://actionview//lib/action_view/routing_url_for.rb#134 - def optimize_routes_generation?; end - - class << self - # source://actionpack/7.0.4.2/lib/action_dispatch/routing/url_for.rb#97 - def default_url_options=(val); end - end -end - -# source://actionview//lib/action_view/buffers.rb#41 -class ActionView::StreamingBuffer - # @return [StreamingBuffer] a new instance of StreamingBuffer - # - # source://actionview//lib/action_view/buffers.rb#42 - def initialize(block); end - - # source://actionview//lib/action_view/buffers.rb#46 - def <<(value); end - - # source://actionview//lib/action_view/buffers.rb#46 - def append=(value); end - - # source://actionview//lib/action_view/buffers.rb#46 - def concat(value); end - - # source://actionview//lib/action_view/buffers.rb#63 - def html_safe; end - - # @return [Boolean] - # - # source://actionview//lib/action_view/buffers.rb#59 - def html_safe?; end - - # source://actionview//lib/action_view/buffers.rb#54 - def safe_append=(value); end - - # source://actionview//lib/action_view/buffers.rb#54 - def safe_concat(value); end -end - -# source://actionview//lib/action_view/flows.rb#30 -class ActionView::StreamingFlow < ::ActionView::OutputFlow - # @return [StreamingFlow] a new instance of StreamingFlow - # - # source://actionview//lib/action_view/flows.rb#31 - def initialize(view, fiber); end - - # Appends the contents for the given key. This is called - # by providing and resuming back to the fiber, - # if that's the key it's waiting for. - # - # source://actionview//lib/action_view/flows.rb#65 - def append!(key, value); end - - # Try to get stored content. If the content - # is not available and we're inside the layout fiber, - # then it will begin waiting for the given key and yield. - # - # source://actionview//lib/action_view/flows.rb#43 - def get(key); end - - private - - # @return [Boolean] - # - # source://actionview//lib/action_view/flows.rb#71 - def inside_fiber?; end -end - -# == TODO -# -# * Support streaming from child templates, partials and so on. -# * Rack::Cache needs to support streaming bodies -# -# source://actionview//lib/action_view/renderer/streaming_template_renderer.rb#13 -class ActionView::StreamingTemplateRenderer < ::ActionView::TemplateRenderer - # For streaming, instead of rendering a given a template, we return a Body - # object that responds to each. This object is initialized with a block - # that knows how to render the template. - # - # source://actionview//lib/action_view/renderer/streaming_template_renderer.rb#45 - def render_template(view, template, layout_name = T.unsafe(nil), locals = T.unsafe(nil)); end - - private - - # source://actionview//lib/action_view/renderer/streaming_template_renderer.rb#57 - def delayed_render(buffer, template, layout, view, locals); end -end - -# A valid Rack::Body (i.e. it responds to each). -# It is initialized with a block that, when called, starts -# rendering the template. -# -# source://actionview//lib/action_view/renderer/streaming_template_renderer.rb#14 -class ActionView::StreamingTemplateRenderer::Body - # @return [Body] a new instance of Body - # - # source://actionview//lib/action_view/renderer/streaming_template_renderer.rb#15 - def initialize(&start); end - - # source://actionview//lib/action_view/renderer/streaming_template_renderer.rb#19 - def each(&block); end - - private - - # This is the same logging logic as in ShowExceptions middleware. - # - # source://actionview//lib/action_view/renderer/streaming_template_renderer.rb#31 - def log_error(exception); end -end - -# source://actionview//lib/action_view/template/error.rb#232 -class ActionView::SyntaxErrorInTemplate < ::ActionView::Template::Error - # @return [SyntaxErrorInTemplate] a new instance of SyntaxErrorInTemplate - # - # source://actionview//lib/action_view/template/error.rb#233 - def initialize(template, offending_code_string); end - - # source://actionview//lib/action_view/template/error.rb#244 - def annotated_source_code; end - - # source://actionview//lib/action_view/template/error.rb#238 - def message; end -end - -# = Action View Template -# -# source://actionview//lib/action_view/template.rb#8 -class ActionView::Template - extend ::ActiveSupport::Autoload - extend ::ActionView::Template::Handlers - - # @return [Template] a new instance of Template - # - # source://actionview//lib/action_view/template.rb#123 - 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 - # source. Until this point, we assume that the source is BINARY data. - # If no additional information is supplied, we assume the encoding is - # the same as Encoding.default_external. - # - # The user can also specify the encoding via a comment on the first - # with any template engine, as we process out the encoding comment - # before passing the source on to the template engine, leaving a - # blank line in its stead. - # - # source://actionview//lib/action_view/template.rb#189 - def encode!; end - - # Returns the value of attribute format. - # - # source://actionview//lib/action_view/template.rb#121 - def format; end - - # Returns the value of attribute handler. - # - # source://actionview//lib/action_view/template.rb#120 - def handler; end - - # Returns the value of attribute identifier. - # - # source://actionview//lib/action_view/template.rb#120 - def identifier; end - - # source://actionview//lib/action_view/template.rb#171 - def inspect; end - - # Returns the value of attribute locals. - # - # source://actionview//lib/action_view/template.rb#121 - 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 - def marshal_dump; end - - # source://actionview//lib/action_view/template.rb#233 - def marshal_load(array); end - - # Render a template. If the template was not compiled yet, it is done - # exactly before rendering. - # - # This method is instrumented as "!render_template.action_view". Notice that - # we use a bang in this instrumentation because you don't want to - # consume this in production. This is only slow if it's being listened to. - # - # source://actionview//lib/action_view/template.rb#154 - def render(view, locals, buffer = T.unsafe(nil), add_to_stack: T.unsafe(nil), &block); end - - # source://actionview//lib/action_view/template.rb#167 - def short_identifier; end - - # source://actionview//lib/action_view/template.rb#175 - def source; 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 - def supports_streaming?; end - - # source://actionview//lib/action_view/template.rb#163 - def type; end - - # Returns the value of attribute variable. - # - # source://actionview//lib/action_view/template.rb#121 - def variable; end - - # Returns the value of attribute variant. - # - # source://actionview//lib/action_view/template.rb#121 - def variant; end - - # Returns the value of attribute virtual_path. - # - # source://actionview//lib/action_view/template.rb#121 - def virtual_path; end - - private - - # Among other things, this method is responsible for properly setting - # the encoding of the compiled template. - # - # If the template engine handles encodings, we send the encoded - # String to the engine without further processing. This allows - # the template engine to support additional mechanisms for - # - # Otherwise, after we figure out the correct encoding, we then - # encode the source into Encoding.default_internal. - # 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 - 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 - def compile!(view); end - - # source://actionview//lib/action_view/template.rb#316 - def handle_render_error(view, e); end - - # source://actionview//lib/action_view/template.rb#352 - def identifier_method_name; end - - # source://actionview//lib/action_view/template.rb#356 - def instrument(action, &block); end - - # source://actionview//lib/action_view/template.rb#364 - def instrument_payload; end - - # source://actionview//lib/action_view/template.rb#360 - def instrument_render_template(&block); end - - # source://actionview//lib/action_view/template.rb#325 - def locals_code; end - - # source://actionview//lib/action_view/template.rb#344 - def method_name; end - - class << self - # source://actionview//lib/action_view/template.rb#117 - def frozen_string_literal; end - - # source://actionview//lib/action_view/template.rb#117 - def frozen_string_literal=(_arg0); end - end -end - -# The Template::Error exception is raised when the compilation or rendering of the template -# 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 -class ActionView::Template::Error < ::ActionView::ActionViewError - # @return [Error] a new instance of Error - # - # source://actionview//lib/action_view/template/error.rb#159 - def initialize(template); end - - # source://actionview//lib/action_view/template/error.rb#207 - def annotated_source_code; end - - # Override to prevent #cause resetting during re-raise. - # - # source://actionview//lib/action_view/template/error.rb#157 - def cause; end - - # source://actionview//lib/action_view/template/error.rb#166 - def file_name; end - - # source://actionview//lib/action_view/template/error.rb#199 - def line_number; end - - # source://actionview//lib/action_view/template/error.rb#179 - def source_extract(indentation = T.unsafe(nil)); end - - # source://actionview//lib/action_view/template/error.rb#170 - def sub_template_message; end - - # source://actionview//lib/action_view/template/error.rb#194 - def sub_template_of(template_path); end - - private - - # source://actionview//lib/action_view/template/error.rb#220 - def formatted_code_for(source_code, line_counter, indent); end - - # source://actionview//lib/action_view/template/error.rb#212 - def source_location; end -end - -# source://actionview//lib/action_view/template/error.rb#154 -ActionView::Template::Error::SOURCE_CODE_RADIUS = T.let(T.unsafe(nil), Integer) - -# source://actionview//lib/action_view/template/html.rb#6 -class ActionView::Template::HTML - # @return [HTML] a new instance of HTML - # - # source://actionview//lib/action_view/template/html.rb#9 - def initialize(string, type); end - - # source://actionview//lib/action_view/template/html.rb#28 - def format; end - - # source://actionview//lib/action_view/template/html.rb#14 - def identifier; end - - # source://actionview//lib/action_view/template/html.rb#14 - def inspect; end - - # source://actionview//lib/action_view/template/html.rb#24 - def render(*args); end - - # source://actionview//lib/action_view/template/html.rb#20 - def to_str; end - - # source://actionview//lib/action_view/template/html.rb#7 - def type; end -end - -# source://actionview//lib/action_view/template/handlers.rb#6 -module ActionView::Template::Handlers - # source://actionview//lib/action_view/template/handlers.rb#61 - def handler_for_extension(extension); end - - # source://actionview//lib/action_view/template/handlers.rb#56 - def register_default_template_handler(extension, klass); end - - # Register an object that knows how to handle template files with the given - # extensions. This can be used to implement new template types. - # The handler must respond to +:call+, which will be passed the template - # and should return the rendered template as a String. - # - # @raise [ArgumentError] - # - # source://actionview//lib/action_view/template/handlers.rb#31 - def register_template_handler(*extensions, handler); end - - # source://actionview//lib/action_view/template/handlers.rb#52 - def registered_template_handler(extension); end - - # source://actionview//lib/action_view/template/handlers.rb#48 - def template_handler_extensions; end - - # Opposite to register_template_handler. - # - # source://actionview//lib/action_view/template/handlers.rb#40 - def unregister_template_handler(*extensions); end - - class << self - # @private - # - # source://actionview//lib/action_view/template/handlers.rb#12 - def extended(base); end - - # source://actionview//lib/action_view/template/handlers.rb#23 - def extensions; end - end -end - -# source://actionview//lib/action_view/template/handlers/builder.rb#5 -class ActionView::Template::Handlers::Builder - # source://actionview//lib/action_view/template/handlers/builder.rb#8 - def call(template, source); end - - # source://actionview//lib/action_view/template/handlers/builder.rb#6 - def default_format; end - - # source://actionview//lib/action_view/template/handlers/builder.rb#6 - def default_format=(_arg0); end - - # source://actionview//lib/action_view/template/handlers/builder.rb#6 - def default_format?; end - - private - - # source://actionview//lib/action_view/template/handlers/builder.rb#17 - def require_engine; end - - class << self - # source://actionview//lib/action_view/template/handlers/builder.rb#6 - def default_format; end - - # source://actionview//lib/action_view/template/handlers/builder.rb#6 - def default_format=(value); end - - # source://actionview//lib/action_view/template/handlers/builder.rb#6 - def default_format?; end - end -end - -# source://actionview//lib/action_view/template/handlers/erb.rb#6 -class ActionView::Template::Handlers::ERB - # source://actionview//lib/action_view/template/handlers/erb.rb#36 - def call(template, source); end - - # source://actionview//lib/action_view/template/handlers/erb.rb#14 - def erb_implementation; end - - # source://actionview//lib/action_view/template/handlers/erb.rb#14 - def erb_implementation=(_arg0); end - - # source://actionview//lib/action_view/template/handlers/erb.rb#14 - def erb_implementation?; end - - # source://actionview//lib/action_view/template/handlers/erb.rb#11 - def erb_trim_mode; end - - # source://actionview//lib/action_view/template/handlers/erb.rb#11 - def erb_trim_mode=(_arg0); end - - # source://actionview//lib/action_view/template/handlers/erb.rb#11 - def erb_trim_mode?; end - - # source://actionview//lib/action_view/template/handlers/erb.rb#17 - def escape_ignore_list; end - - # source://actionview//lib/action_view/template/handlers/erb.rb#17 - def escape_ignore_list=(_arg0); end - - # source://actionview//lib/action_view/template/handlers/erb.rb#17 - def escape_ignore_list?; end - - # @return [Boolean] - # - # source://actionview//lib/action_view/template/handlers/erb.rb#32 - def handles_encoding?; end - - # source://actionview//lib/action_view/template/handlers/erb.rb#20 - def strip_trailing_newlines; end - - # source://actionview//lib/action_view/template/handlers/erb.rb#20 - def strip_trailing_newlines=(_arg0); end - - # source://actionview//lib/action_view/template/handlers/erb.rb#20 - def strip_trailing_newlines?; end - - # @return [Boolean] - # - # source://actionview//lib/action_view/template/handlers/erb.rb#28 - def supports_streaming?; end - - private - - # @raise [WrongEncodingError] - # - # source://actionview//lib/action_view/template/handlers/erb.rb#68 - def valid_encoding(string, encoding); end - - class << self - # source://actionview//lib/action_view/template/handlers/erb.rb#24 - def call(template, source); end - - # source://actionview//lib/action_view/template/handlers/erb.rb#14 - def erb_implementation; end - - # source://actionview//lib/action_view/template/handlers/erb.rb#14 - def erb_implementation=(value); end - - # source://actionview//lib/action_view/template/handlers/erb.rb#14 - def erb_implementation?; end - - # source://actionview//lib/action_view/template/handlers/erb.rb#11 - def erb_trim_mode; end - - # source://actionview//lib/action_view/template/handlers/erb.rb#11 - def erb_trim_mode=(value); end - - # source://actionview//lib/action_view/template/handlers/erb.rb#11 - def erb_trim_mode?; end - - # source://actionview//lib/action_view/template/handlers/erb.rb#17 - def escape_ignore_list; end - - # source://actionview//lib/action_view/template/handlers/erb.rb#17 - def escape_ignore_list=(value); end - - # source://actionview//lib/action_view/template/handlers/erb.rb#17 - def escape_ignore_list?; end - - # source://actionview//lib/action_view/template/handlers/erb.rb#20 - def strip_trailing_newlines; end - - # source://actionview//lib/action_view/template/handlers/erb.rb#20 - def strip_trailing_newlines=(value); end - - # source://actionview//lib/action_view/template/handlers/erb.rb#20 - def strip_trailing_newlines?; end - end -end - -# source://actionview//lib/action_view/template/handlers/erb.rb#22 -ActionView::Template::Handlers::ERB::ENCODING_TAG = T.let(T.unsafe(nil), Regexp) - -# source://actionview//lib/action_view/template/handlers/erb/erubi.rb#10 -class ActionView::Template::Handlers::ERB::Erubi < ::Erubi::Engine - # @return [Erubi] a new instance of Erubi - # - # 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 - def add_code(code); end - - # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#53 - def add_expression(indicator, code); end - - # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#74 - def add_postamble(_); end - - # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#36 - def add_text(text); end - - # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#79 - def flush_newline_if_pending(src); end -end - -# source://actionview//lib/action_view/template/handlers/erb/erubi.rb#51 -ActionView::Template::Handlers::ERB::Erubi::BLOCK_EXPR = T.let(T.unsafe(nil), Regexp) - -# 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 - def call(template, source); end -end - -# source://actionview//lib/action_view/template/handlers/raw.rb#5 -class ActionView::Template::Handlers::Raw - # source://actionview//lib/action_view/template/handlers/raw.rb#6 - def call(template, source); end -end - -# source://actionview//lib/action_view/template/inline.rb#7 -class ActionView::Template::Inline < ::ActionView::Template - # source://actionview//lib/action_view/template/inline.rb#16 - def compile(mod); end -end - -# This finalizer is needed (and exactly with a proc inside another proc) -# otherwise templates leak in development. -# -# 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/raw_file.rb#6 -class ActionView::Template::RawFile - # @return [RawFile] a new instance of RawFile - # - # source://actionview//lib/action_view/template/raw_file.rb#9 - def initialize(filename); end - - # source://actionview//lib/action_view/template/raw_file.rb#7 - def format; end - - # source://actionview//lib/action_view/template/raw_file.rb#7 - def format=(_arg0); end - - # source://actionview//lib/action_view/template/raw_file.rb#16 - def identifier; end - - # source://actionview//lib/action_view/template/raw_file.rb#20 - def render(*args); end - - # source://actionview//lib/action_view/template/raw_file.rb#7 - def type; end - - # source://actionview//lib/action_view/template/raw_file.rb#7 - def type=(_arg0); end -end - -# source://actionview//lib/action_view/template/renderable.rb#6 -class ActionView::Template::Renderable - # @return [Renderable] a new instance of Renderable - # - # source://actionview//lib/action_view/template/renderable.rb#7 - def initialize(renderable); end - - # source://actionview//lib/action_view/template/renderable.rb#19 - def format; end - - # source://actionview//lib/action_view/template/renderable.rb#11 - def identifier; end - - # source://actionview//lib/action_view/template/renderable.rb#15 - def render(context, *args); end -end - -# source://actionview//lib/action_view/template/sources.rb#5 -module ActionView::Template::Sources - extend ::ActiveSupport::Autoload -end - -# source://actionview//lib/action_view/template/sources/file.rb#6 -class ActionView::Template::Sources::File - # @return [File] a new instance of File - # - # source://actionview//lib/action_view/template/sources/file.rb#7 - def initialize(filename); end - - # source://actionview//lib/action_view/template/sources/file.rb#11 - def to_s; end -end - -# source://actionview//lib/action_view/template/text.rb#6 -class ActionView::Template::Text - # @return [Text] a new instance of Text - # - # source://actionview//lib/action_view/template/text.rb#9 - def initialize(string); end - - # source://actionview//lib/action_view/template/text.rb#27 - def format; end - - # source://actionview//lib/action_view/template/text.rb#13 - def identifier; end - - # source://actionview//lib/action_view/template/text.rb#13 - def inspect; end - - # source://actionview//lib/action_view/template/text.rb#23 - def render(*args); end - - # source://actionview//lib/action_view/template/text.rb#19 - def to_str; end - - # source://actionview//lib/action_view/template/text.rb#7 - def type; end - - # source://actionview//lib/action_view/template/text.rb#7 - 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_details.rb#4 -class ActionView::TemplateDetails - # @return [TemplateDetails] a new instance of TemplateDetails - # - # source://actionview//lib/action_view/template_details.rb#35 - def initialize(locale, handler, format, variant); end - - # Returns the value of attribute format. - # - # source://actionview//lib/action_view/template_details.rb#33 - def format; end - - # source://actionview//lib/action_view/template_details.rb#62 - def format_or_default; end - - # Returns the value of attribute handler. - # - # source://actionview//lib/action_view/template_details.rb#33 - def handler; end - - # source://actionview//lib/action_view/template_details.rb#58 - def handler_class; end - - # Returns the value of attribute locale. - # - # source://actionview//lib/action_view/template_details.rb#33 - def locale; end - - # @return [Boolean] - # - # source://actionview//lib/action_view/template_details.rb#42 - def matches?(requested); end - - # source://actionview//lib/action_view/template_details.rb#49 - def sort_key_for(requested); end - - # Returns the value of attribute variant. - # - # source://actionview//lib/action_view/template_details.rb#33 - def variant; end -end - -# source://actionview//lib/action_view/template_details.rb#5 -class ActionView::TemplateDetails::Requested - # @return [Requested] a new instance of Requested - # - # source://actionview//lib/action_view/template_details.rb#11 - def initialize(locale:, handlers:, formats:, variants:); end - - # Returns the value of attribute formats. - # - # source://actionview//lib/action_view/template_details.rb#6 - def formats; end - - # Returns the value of attribute formats_idx. - # - # source://actionview//lib/action_view/template_details.rb#7 - def formats_idx; end - - # Returns the value of attribute handlers. - # - # source://actionview//lib/action_view/template_details.rb#6 - def handlers; end - - # Returns the value of attribute handlers_idx. - # - # source://actionview//lib/action_view/template_details.rb#7 - def handlers_idx; end - - # Returns the value of attribute locale. - # - # source://actionview//lib/action_view/template_details.rb#6 - def locale; end - - # Returns the value of attribute locale_idx. - # - # source://actionview//lib/action_view/template_details.rb#7 - def locale_idx; end - - # Returns the value of attribute variants. - # - # source://actionview//lib/action_view/template_details.rb#6 - def variants; end - - # Returns the value of attribute variants_idx. - # - # source://actionview//lib/action_view/template_details.rb#7 - def variants_idx; end - - private - - # source://actionview//lib/action_view/template_details.rb#28 - def build_idx_hash(arr); end -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 -ActionView::TemplateError = ActionView::Template::Error - -# 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 -class ActionView::TemplatePath - # @return [TemplatePath] a new instance of TemplatePath - # - # source://actionview//lib/action_view/template_path.rb#45 - def initialize(name, prefix, partial, virtual); end - - # @return [Boolean] - # - # source://actionview//lib/action_view/template_path.rb#59 - def ==(other); end - - # @return [Boolean] - # - # source://actionview//lib/action_view/template_path.rb#59 - def eql?(other); end - - # source://actionview//lib/action_view/template_path.rb#55 - def hash; end - - # Returns the value of attribute name. - # - # source://actionview//lib/action_view/template_path.rb#10 - def name; end - - # Returns the value of attribute partial. - # - # source://actionview//lib/action_view/template_path.rb#10 - def partial; end - - # Returns the value of attribute partial. - # - # source://actionview//lib/action_view/template_path.rb#10 - def partial?; end - - # Returns the value of attribute prefix. - # - # source://actionview//lib/action_view/template_path.rb#10 - def prefix; end - - # Returns the value of attribute virtual. - # - # source://actionview//lib/action_view/template_path.rb#10 - def to_s; end - - # Returns the value of attribute virtual. - # - # source://actionview//lib/action_view/template_path.rb#10 - def to_str; end - - # Returns the value of attribute virtual. - # - # source://actionview//lib/action_view/template_path.rb#10 - def virtual; end - - # Returns the value of attribute virtual. - # - # source://actionview//lib/action_view/template_path.rb#10 - def virtual_path; end - - class << self - # Convert name, prefix, and partial into a TemplatePath - # - # source://actionview//lib/action_view/template_path.rb#41 - def build(name, prefix, partial); end - - # Build a TemplatePath form a virtual path - # - # source://actionview//lib/action_view/template_path.rb#26 - def parse(virtual); end - - # Convert name, prefix, and partial into a virtual path string - # - # source://actionview//lib/action_view/template_path.rb#15 - def virtual(name, prefix, partial); end - end -end - -# source://actionview//lib/action_view/renderer/template_renderer.rb#4 -class ActionView::TemplateRenderer < ::ActionView::AbstractRenderer - # source://actionview//lib/action_view/renderer/template_renderer.rb#5 - def render(context, options); end - - private - - # Determine the template to be rendered using the given options. - # - # source://actionview//lib/action_view/renderer/template_renderer.rb#16 - def determine_template(options); end - - # This is the method which actually finds the layout using details in the lookup - # 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 - def find_layout(layout, keys, formats); end - - # Renders the given template. A string representing the layout can be - # supplied as well. - # - # 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 - def render_with_layout(view, template, path, locals); end - - # source://actionview//lib/action_view/renderer/template_renderer.rb#91 - def resolve_layout(layout, keys, formats); end -end - -# = Action View Test Case -# -# source://actionview//lib/action_view/test_case.rb#12 -class ActionView::TestCase < ::ActiveSupport::TestCase - 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 ::AbstractController::Helpers - 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::ControllerHelper - include ::ActionView::Helpers::CspHelper - include ::ActionView::Helpers::CsrfHelper - include ::ActionView::Helpers::DateHelper - include ::ActionView::Helpers::DebugHelper - include ::ActionView::Helpers::TextHelper - include ::ActionView::Helpers::FormTagHelper - include ::ActionDispatch::Assertions - include ::ActionController::TemplateAssertions - include ::ActionView::Context - include ::ActionDispatch::Routing::PolymorphicRoutes - include ::ActionView::ModelNaming - include ::ActionView::RecordIdentifier - include ::ActionView::Helpers::FormHelper - include ::ActionView::Helpers::TranslationHelper - include ::ActionView::Helpers::FormOptionsHelper - include ::ActionView::Helpers::JavaScriptHelper - include ::ActionView::Helpers::NumberHelper - include ::ActionView::Helpers::RenderingHelper - include ::ActionView::Helpers - include ::ActiveSupport::Testing::ConstantLookup - include ::ActionDispatch::Routing::UrlFor - include ::ActionView::RoutingUrlFor - include ::ActionView::TestCase::Behavior - 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.4.2/lib/abstract_controller/helpers.rb#11 - def _helper_methods; end - - # source://actionpack/7.0.4.2/lib/abstract_controller/helpers.rb#11 - def _helper_methods=(_arg0); end - - # source://actionpack/7.0.4.2/lib/abstract_controller/helpers.rb#11 - def _helper_methods?; end - - # source://actionview//lib/action_view/helpers/translation_helper.rb#18 - def debug_missing_translation; end - - # source://actionview//lib/action_view/helpers/translation_helper.rb#18 - def debug_missing_translation=(val); end - - class << self - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://actionpack/7.0.4.2/lib/abstract_controller/helpers.rb#11 - def _helper_methods; end - - # source://actionpack/7.0.4.2/lib/abstract_controller/helpers.rb#11 - def _helper_methods=(value); end - - # source://actionpack/7.0.4.2/lib/abstract_controller/helpers.rb#11 - def _helper_methods?; end - - # source://actionpack/7.0.4.2/lib/abstract_controller/helpers.rb#15 - def _helpers; end - - # source://actionview//lib/action_view/helpers/translation_helper.rb#18 - def debug_missing_translation; end - - # source://actionview//lib/action_view/helpers/translation_helper.rb#18 - def debug_missing_translation=(val); end - end -end - -# source://actionview//lib/action_view/test_case.rb#42 -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 - include ::ActionView::ModelNaming - include ::ActionView::RecordIdentifier - include ::ActionDispatch::Routing::UrlFor - include ::ActionView::RoutingUrlFor - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - include ::Rails::Dom::Testing::Assertions - include ::AbstractController::Helpers - include ::ActionView::Helpers::UrlHelper - include ::ActionView::Helpers::SanitizeHelper - include ::ActionView::Helpers::TextHelper - include ::ActionView::Helpers::FormTagHelper - include ::ActionView::Helpers::FormHelper - include ::ActionView::Helpers::TranslationHelper - include ::ActionView::Helpers - include ::ActiveSupport::Testing::ConstantLookup - - mixes_in_class_methods GeneratedClassMethods - 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 - def _routes; end - - # source://actionview//lib/action_view/test_case.rb#122 - def config; end - - # Returns the value of attribute controller. - # - # source://actionview//lib/action_view/test_case.rb#60 - 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 - def controller=(_arg0); end - - # source://actionview//lib/action_view/test_case.rb#59 - def lookup_context(*_arg0, **_arg1, &_arg2); end - - # Returns the value of attribute output_buffer. - # - # source://actionview//lib/action_view/test_case.rb#60 - 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 - def output_buffer=(_arg0); end - - # source://actionview//lib/action_view/test_case.rb#126 - def render(options = T.unsafe(nil), local_assigns = T.unsafe(nil), &block); end - - # Returns the value of attribute rendered. - # - # source://actionview//lib/action_view/test_case.rb#60 - def rendered; end - - # Sets the attribute rendered - # - # @param value the value to set the attribute rendered to. - # - # source://actionview//lib/action_view/test_case.rb#60 - def rendered=(_arg0); end - - # source://actionview//lib/action_view/test_case.rb#132 - def rendered_views; end - - # Returns the value of attribute request. - # - # source://actionview//lib/action_view/test_case.rb#60 - 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 - def request=(_arg0); end - - # source://actionview//lib/action_view/test_case.rb#108 - def setup_with_controller; end - - private - - # source://actionview//lib/action_view/test_case.rb#251 - def _user_defined_ivars; end - - # The instance of ActionView::Base that is used by +render+. - # - # source://actionview//lib/action_view/test_case.rb#207 - 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 - def document_root_element; end - - # source://actionview//lib/action_view/test_case.rb#265 - def method_missing(selector, *args); end - - # @return [Boolean] - # - # source://actionview//lib/action_view/test_case.rb#281 - 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 - def view; end - - # Returns a Hash of instance variables and their values, as defined by - # the user in the test case, which are then assigned to the view being - # rendered. This is generally intended for internal use and extension - # frameworks. - # - # source://actionview//lib/action_view/test_case.rb#259 - def view_assigns; end - - module GeneratedClassMethods - def _helper_methods; end - def _helper_methods=(value); end - def _helper_methods?; end - end - - module GeneratedInstanceMethods - def _helper_methods; end - def _helper_methods=(value); end - def _helper_methods?; end - end -end - -# source://actionview//lib/action_view/test_case.rb#62 -module ActionView::TestCase::Behavior::ClassMethods - # source://actionview//lib/action_view/test_case.rb#72 - def determine_default_helper_class(name); end - - # source://actionview//lib/action_view/test_case.rb#92 - 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 - def helper_class=(_arg0); end - - # source://actionview//lib/action_view/test_case.rb#78 - def helper_method(*methods); end - - # source://actionview//lib/action_view/test_case.rb#96 - def new(*_arg0); end - - # source://actionview//lib/action_view/test_case.rb#63 - def tests(helper_class); end - - private - - # source://actionview//lib/action_view/test_case.rb#102 - def include_helper_modules!; end -end - -# source://actionview//lib/action_view/test_case.rb#220 -ActionView::TestCase::Behavior::INTERNAL_IVARS = T.let(T.unsafe(nil), Array) - -# source://actionview//lib/action_view/test_case.rb#187 -module ActionView::TestCase::Behavior::Locals - # source://actionview//lib/action_view/test_case.rb#190 - 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 - 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 - 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 -class ActionView::TestCase::Behavior::RenderedViewsCollection - # @return [RenderedViewsCollection] a new instance of RenderedViewsCollection - # - # source://actionview//lib/action_view/test_case.rb#142 - def initialize; end - - # source://actionview//lib/action_view/test_case.rb#146 - def add(view, locals); end - - # source://actionview//lib/action_view/test_case.rb#151 - def locals_for(view); end - - # source://actionview//lib/action_view/test_case.rb#155 - def rendered_views; end - - # @return [Boolean] - # - # source://actionview//lib/action_view/test_case.rb#159 - 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 - def _test_case; end - - # source://actionview//lib/action_view/test_case.rb#171 - def protect_against_forgery?; end -end - -# source://actionview//lib/action_view/test_case.rb#13 -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 - def initialize; end - - # source://actionview//lib/action_view/test_case.rb#23 - def controller_path=(path); end - - # Returns the value of attribute params. - # - # source://actionview//lib/action_view/test_case.rb#16 - 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 - def params=(_arg0); end - - # Returns the value of attribute request. - # - # source://actionview//lib/action_view/test_case.rb#16 - 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 - def request=(_arg0); end - - # Returns the value of attribute response. - # - # source://actionview//lib/action_view/test_case.rb#16 - 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 - def response=(_arg0); end - - private - - # source://actionview//lib/action_view/layouts.rb#328 - def _layout(lookup_context, formats); end - - def _layout_from_proc; end - - class << self - # source://actionview//lib/action_view/test_case.rb#27 - def controller_name; end - - # Overrides AbstractController::Base#controller_path - # - # source://actionview//lib/action_view/test_case.rb#20 - def controller_path; end - - # Overrides AbstractController::Base#controller_path - # - # source://actionview//lib/action_view/test_case.rb#20 - def controller_path=(_arg0); end - - # source://actionpack/7.0.4.2/lib/action_controller/metal.rb#210 - def middleware_stack; end - end -end - -# source://actionview//lib/action_view/unbound_template.rb#6 -class ActionView::UnboundTemplate - # @return [UnboundTemplate] a new instance of UnboundTemplate - # - # source://actionview//lib/action_view/unbound_template.rb#10 - def initialize(source, identifier, details:, virtual_path:); end - - # source://actionview//lib/action_view/unbound_template.rb#20 - def bind_locals(locals); end - - # Returns the value of attribute details. - # - # source://actionview//lib/action_view/unbound_template.rb#7 - def details; end - - # source://actionview//lib/action_view/unbound_template.rb#8 - def format(*_arg0, **_arg1, &_arg2); end - - # source://actionview//lib/action_view/unbound_template.rb#8 - def handler(*_arg0, **_arg1, &_arg2); end - - # source://actionview//lib/action_view/unbound_template.rb#8 - def locale(*_arg0, **_arg1, &_arg2); end - - # source://actionview//lib/action_view/unbound_template.rb#8 - def variant(*_arg0, **_arg1, &_arg2); end - - # Returns the value of attribute virtual_path. - # - # source://actionview//lib/action_view/unbound_template.rb#7 - def virtual_path; end - - private - - # source://actionview//lib/action_view/unbound_template.rb#39 - def build_template(locals); end - - # source://actionview//lib/action_view/unbound_template.rb#53 - def normalize_locals(locals); end -end - -# source://actionview//lib/action_view/gem_version.rb#9 -module ActionView::VERSION; end - -# source://actionview//lib/action_view/gem_version.rb#10 -ActionView::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) - -# source://actionview//lib/action_view/gem_version.rb#11 -ActionView::VERSION::MINOR = T.let(T.unsafe(nil), Integer) - -# source://actionview//lib/action_view/gem_version.rb#13 -ActionView::VERSION::PRE = T.let(T.unsafe(nil), String) - -# source://actionview//lib/action_view/gem_version.rb#15 -ActionView::VERSION::STRING = T.let(T.unsafe(nil), String) - -# source://actionview//lib/action_view/gem_version.rb#12 -ActionView::VERSION::TINY = T.let(T.unsafe(nil), Integer) - -# source://actionview//lib/action_view/view_paths.rb#4 -module ActionView::ViewPaths - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActionView::ViewPaths::ClassMethods - - # The prefixes used in render "foo" shortcuts. - # - # source://actionview//lib/action_view/view_paths.rb#90 - def _prefixes; end - - # source://actionview//lib/action_view/view_paths.rb#11 - def any_templates?(*_arg0, **_arg1, &_arg2); end - - # Append a path to the list of view paths for the current LookupContext. - # - # ==== Parameters - # * path - If a String is provided, it gets converted into - # 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 - def append_view_path(path); end - - # source://actionview//lib/action_view/view_paths.rb#102 - def details_for_lookup; end - - # source://actionview//lib/action_view/view_paths.rb#11 - def formats(*_arg0, **_arg1, &_arg2); end - - # source://actionview//lib/action_view/view_paths.rb#11 - def formats=(arg); end - - # source://actionview//lib/action_view/view_paths.rb#11 - def locale(*_arg0, **_arg1, &_arg2); end - - # source://actionview//lib/action_view/view_paths.rb#11 - def locale=(arg); end - - # LookupContext is the object responsible for holding all - # 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 - def lookup_context; end - - # Prepend a path to the list of view paths for the current LookupContext. - # - # ==== Parameters - # * path - If a String is provided, it gets converted into - # 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 - def prepend_view_path(path); end - - # source://actionview//lib/action_view/view_paths.rb#11 - def template_exists?(*_arg0, **_arg1, &_arg2); end - - # 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#23 - def _prefixes; end - - # source://actionview//lib/action_view/view_paths.rb#15 - def _view_paths; end - - # source://actionview//lib/action_view/view_paths.rb#19 - def _view_paths=(paths); end - - # Append a path to the list of view paths for this controller. - # - # ==== Parameters - # * path - If a String is provided, it gets converted into - # 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 - def append_view_path(path); end - - # Prepend a path to the list of view paths for this controller. - # - # ==== Parameters - # * path - If a String is provided, it gets converted into - # 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 - 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 - def view_paths; end - - # Set the view paths. - # - # ==== Parameters - # * paths - If a PathSet is provided, use that; - # otherwise, process the parameter into a PathSet. - # - # source://actionview//lib/action_view/view_paths.rb#61 - def view_paths=(paths); end - - private - - # 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 - def local_prefixes; end -end - -# source://actionview//lib/action_view/template/error.rb#13 -class ActionView::WrongEncodingError < ::ActionView::EncodingError - # @return [WrongEncodingError] a new instance of WrongEncodingError - # - # source://actionview//lib/action_view/template/error.rb#14 - def initialize(string, encoding); end - - # source://actionview//lib/action_view/template/error.rb#18 - def message; end -end diff --git a/sorbet/rbi/gems/activejob@7.0.4.2.rbi b/sorbet/rbi/gems/activejob@7.0.4.2.rbi deleted file mode 100644 index e7a8e8d..0000000 --- a/sorbet/rbi/gems/activejob@7.0.4.2.rbi +++ /dev/null @@ -1,2545 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `activejob` gem. -# Please instead update this file by running `bin/tapioca gem activejob`. - -# 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/gem_version.rb#5 - def gem_version; end - - # Returns the currently loaded version of Active Job as a Gem::Version. - # - # source://activejob//lib/active_job/version.rb#7 - def version; end - end -end - -# source://activejob//lib/active_job/arguments.rb#28 -module ActiveJob::Arguments - extend ::ActiveJob::Arguments - - # Deserializes a set of arguments. Intrinsic types that can safely be - # deserialized without mutation are returned as-is. Arrays/Hashes are - # deserialized element by element. All other types are deserialized using - # GlobalID. - # - # source://activejob//lib/active_job/arguments.rb#42 - def deserialize(arguments); end - - # Serializes a set of arguments. Intrinsic types that can safely be - # serialized without mutation are returned as-is. Arrays/Hashes are - # serialized element by element. All other types are serialized using - # GlobalID. - # - # source://activejob//lib/active_job/arguments.rb#34 - def serialize(arguments); end - - private - - # source://activejob//lib/active_job/arguments.rb#204 - def convert_to_global_id_hash(argument); end - - # @return [Boolean] - # - # source://activejob//lib/active_job/arguments.rb#151 - def custom_serialized?(hash); end - - # source://activejob//lib/active_job/arguments.rb#122 - def deserialize_argument(argument); end - - # source://activejob//lib/active_job/arguments.rb#147 - def deserialize_global_id(hash); end - - # source://activejob//lib/active_job/arguments.rb#161 - def deserialize_hash(serialized_hash); end - - # source://activejob//lib/active_job/arguments.rb#95 - def serialize_argument(argument); end - - # source://activejob//lib/active_job/arguments.rb#155 - def serialize_hash(argument); end - - # source://activejob//lib/active_job/arguments.rb#174 - def serialize_hash_key(key); end - - # source://activejob//lib/active_job/arguments.rb#185 - def serialize_indifferent_hash(indifferent_hash); end - - # @return [Boolean] - # - # source://activejob//lib/active_job/arguments.rb#143 - def serialized_global_id?(hash); end - - # source://activejob//lib/active_job/arguments.rb#191 - def transform_symbol_keys(hash, symbol_keys); end -end - -# source://activejob//lib/active_job/arguments.rb#52 -ActiveJob::Arguments::GLOBALID_KEY = T.let(T.unsafe(nil), String) - -# source://activejob//lib/active_job/arguments.rb#60 -ActiveJob::Arguments::OBJECT_SERIALIZER_KEY = T.let(T.unsafe(nil), String) - -# source://activejob//lib/active_job/arguments.rb#50 -ActiveJob::Arguments::PERMITTED_TYPES = T.let(T.unsafe(nil), Array) - -# source://activejob//lib/active_job/arguments.rb#63 -ActiveJob::Arguments::RESERVED_KEYS = T.let(T.unsafe(nil), Array) - -# source://activejob//lib/active_job/arguments.rb#56 -ActiveJob::Arguments::RUBY2_KEYWORDS_KEY = T.let(T.unsafe(nil), String) - -# source://activejob//lib/active_job/arguments.rb#54 -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 objects can be configured to work with different backend -# queuing frameworks. To specify a queue adapter to use: -# -# ActiveJob::Base.queue_adapter = :inline -# -# A list of supported adapters can be found in QueueAdapters. -# -# Active Job objects can be defined by creating a class that inherits -# from the ActiveJob::Base class. The only necessary method to -# implement is the "perform" method. -# -# To define an Active Job object: -# -# class ProcessPhotoJob < ActiveJob::Base -# def perform(photo) -# photo.watermark!('Rails') -# photo.rotate!(90.degrees) -# photo.resize_to_fit!(300, 300) -# photo.upload! -# end -# end -# -# Records that are passed in are serialized/deserialized using Global -# ID. More information can be found in Arguments. -# -# To enqueue a job to be performed as soon as the queuing system is free: -# -# ProcessPhotoJob.perform_later(photo) -# -# To enqueue a job to be processed at some point in the future: -# -# ProcessPhotoJob.set(wait_until: Date.tomorrow.noon).perform_later(photo) -# -# More information can be found in ActiveJob::Core::ClassMethods#set -# -# A job can also be processed immediately without sending to the queue: -# -# ProcessPhotoJob.perform_now(photo) -# -# == Exceptions -# -# * DeserializationError - Error class for deserialization errors. -# * SerializationError - Error class for serialization errors. -# -# source://activejob//lib/active_job/base.rb#63 -class ActiveJob::Base - include ::ActiveJob::Core - include ::ActiveJob::QueueAdapter - include ::ActiveJob::QueueName - include ::ActiveJob::QueuePriority - include ::ActiveJob::Enqueuing - include ::ActiveSupport::Rescuable - include ::ActiveJob::Execution - include ::ActiveSupport::Callbacks - include ::ActiveJob::Callbacks - include ::ActiveJob::Exceptions - include ::ActiveJob::Instrumentation - include ::ActiveJob::Logging - include ::ActiveJob::Timezones - include ::ActiveJob::Translation - include ::ActiveJob::TestHelper::TestQueueAdapter - extend ::ActiveJob::Core::ClassMethods - extend ::ActiveJob::QueueAdapter::ClassMethods - extend ::ActiveJob::QueueName::ClassMethods - extend ::ActiveJob::QueuePriority::ClassMethods - extend ::ActiveJob::Enqueuing::ClassMethods - extend ::ActiveSupport::Rescuable::ClassMethods - extend ::ActiveJob::Execution::ClassMethods - extend ::ActiveSupport::Callbacks::ClassMethods - extend ::ActiveSupport::DescendantsTracker - extend ::ActiveJob::Callbacks::ClassMethods - extend ::ActiveJob::Exceptions::ClassMethods - extend ::ActiveJob::TestHelper::TestQueueAdapter::ClassMethods - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#940 - def _enqueue_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#940 - def _perform_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#928 - def _run_enqueue_callbacks(&block); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#928 - def _run_perform_callbacks(&block); 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_name.rb#58 - def queue_name_prefix; end - - # source://activejob//lib/active_job/queue_name.rb#58 - def queue_name_prefix=(_arg0); end - - # source://activejob//lib/active_job/queue_name.rb#58 - def queue_name_prefix?; end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers; end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers=(_arg0); end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers?; end - - class << self - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#932 - def _enqueue_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#936 - def _enqueue_callbacks=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#932 - def _perform_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#936 - def _perform_callbacks=(value); end - - # source://activejob//lib/active_job/queue_adapter.rb#13 - def _queue_adapter; end - - # source://activejob//lib/active_job/queue_adapter.rb#13 - def _queue_adapter=(value); end - - # source://activejob//lib/active_job/queue_adapter.rb#12 - def _queue_adapter_name; end - - # source://activejob//lib/active_job/queue_adapter.rb#12 - def _queue_adapter_name=(value); end - - # source://activejob//lib/active_job/test_helper.rb#19 - def _test_adapter; end - - # source://activejob//lib/active_job/test_helper.rb#19 - def _test_adapter=(value); end - - # source://activejob//lib/active_job/logging.rb#12 - def log_arguments; end - - # source://activejob//lib/active_job/logging.rb#12 - def log_arguments=(value); end - - # source://activejob//lib/active_job/logging.rb#12 - def log_arguments?; 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_priority.rb#32 - def priority; end - - # source://activejob//lib/active_job/queue_priority.rb#32 - def priority=(value); end - - # source://activejob//lib/active_job/queue_priority.rb#32 - def priority?; end - - # source://activejob//lib/active_job/queue_name.rb#56 - def queue_name; end - - # source://activejob//lib/active_job/queue_name.rb#56 - def queue_name=(value); end - - # source://activejob//lib/active_job/queue_name.rb#56 - def queue_name?; end - - # source://activejob//lib/active_job/queue_name.rb#57 - def queue_name_delimiter; end - - # source://activejob//lib/active_job/queue_name.rb#57 - def queue_name_delimiter=(value); end - - # source://activejob//lib/active_job/queue_name.rb#57 - def queue_name_delimiter?; end - - # source://activejob//lib/active_job/queue_name.rb#58 - def queue_name_prefix; end - - # source://activejob//lib/active_job/queue_name.rb#58 - def queue_name_prefix=(value); end - - # source://activejob//lib/active_job/queue_name.rb#58 - def queue_name_prefix?; end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers; end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers?; end - - # source://activejob//lib/active_job/exceptions.rb#11 - def retry_jitter; end - - # source://activejob//lib/active_job/exceptions.rb#11 - def retry_jitter=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/deprecation/method_wrappers.rb#63 - def skip_after_callbacks_if_terminated(*args, **_arg1, &block); end - - # source://activesupport/7.0.4.2/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 provides hooks during the life cycle of a job. Callbacks allow you -# to trigger logic during this cycle. Available callbacks are: -# -# * before_enqueue -# * around_enqueue -# * after_enqueue -# * before_perform -# * around_perform -# * after_perform -# -# NOTE: Calling the same callback multiple times will overwrite previous callback definitions. -# -# source://activejob//lib/active_job/callbacks.rb#21 -module ActiveJob::Callbacks - extend ::ActiveSupport::Concern - extend ::ActiveSupport::Callbacks - 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 ::ActiveJob::Callbacks::ClassMethods - - class << self - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#940 - def _execute_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#928 - def _run_execute_callbacks(&block); end - end - - module GeneratedClassMethods - def __callbacks; end - def __callbacks=(value); end - def __callbacks?; end - end - - module GeneratedInstanceMethods - def __callbacks; end - def __callbacks?; end - end -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 -module ActiveJob::Callbacks::ClassMethods - # Defines a callback that will get called right after the - # job is enqueued. - # - # class VideoProcessJob < ActiveJob::Base - # queue_as :default - # - # after_enqueue do |job| - # $statsd.increment "enqueue-video-job.success" - # end - # - # def perform(video_id) - # Video.find(video_id).process - # end - # end - # - # source://activejob//lib/active_job/callbacks.rb#146 - def after_enqueue(*filters, &blk); end - - # Defines a callback that will get called right after the - # job's perform method has finished. - # - # class VideoProcessJob < ActiveJob::Base - # queue_as :default - # - # after_perform do |job| - # UserMailer.notify_video_processed(job.arguments.first) - # end - # - # def perform(video_id) - # Video.find(video_id).process - # end - # end - # - # source://activejob//lib/active_job/callbacks.rb#75 - def after_perform(*filters, &blk); end - - # Defines a callback that will get called around the enqueuing - # of the job. - # - # class VideoProcessJob < ActiveJob::Base - # queue_as :default - # - # around_enqueue do |job, block| - # $statsd.time "video-job.process" do - # block.call - # end - # end - # - # def perform(video_id) - # Video.find(video_id).process - # end - # end - # - # source://activejob//lib/active_job/callbacks.rb#167 - def around_enqueue(*filters, &blk); end - - # Defines a callback that will get called around the job's perform method. - # - # class VideoProcessJob < ActiveJob::Base - # queue_as :default - # - # around_perform do |job, block| - # UserMailer.notify_video_started_processing(job.arguments.first) - # block.call - # UserMailer.notify_video_processed(job.arguments.first) - # end - # - # def perform(video_id) - # Video.find(video_id).process - # end - # end - # - # You can access the return value of the job only if the execution wasn't halted. - # - # class VideoProcessJob < ActiveJob::Base - # around_perform do |job, block| - # value = block.call - # puts value # => "Hello World!" - # end - # - # def perform - # "Hello World!" - # end - # end - # - # source://activejob//lib/active_job/callbacks.rb#108 - def around_perform(*filters, &blk); end - - # Defines a callback that will get called right before the - # job is enqueued. - # - # class VideoProcessJob < ActiveJob::Base - # queue_as :default - # - # before_enqueue do |job| - # $statsd.increment "enqueue-video-job.try" - # end - # - # def perform(video_id) - # Video.find(video_id).process - # end - # end - # - # source://activejob//lib/active_job/callbacks.rb#127 - def before_enqueue(*filters, &blk); end - - # Defines a callback that will get called right before the - # job's perform method is executed. - # - # class VideoProcessJob < ActiveJob::Base - # queue_as :default - # - # before_perform do |job| - # UserMailer.notify_video_started_processing(job.arguments.first) - # end - # - # def perform(video_id) - # Video.find(video_id).process - # end - # end - # - # source://activejob//lib/active_job/callbacks.rb#56 - def before_perform(*filters, &blk); end -end - -# source://activejob//lib/active_job/configured_job.rb#4 -class ActiveJob::ConfiguredJob - # @return [ConfiguredJob] a new instance of 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#14 - def perform_later(*_arg0, **_arg1, &_arg2); end - - # source://activejob//lib/active_job/configured_job.rb#10 - def perform_now(*_arg0, **_arg1, &_arg2); end -end - -# 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 -module ActiveJob::Core - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActiveJob::Core::ClassMethods - - # Creates a new job instance. Takes the arguments that will be - # passed to the perform method. - # - # source://activejob//lib/active_job/core.rb#91 - def initialize(*arguments, **_arg1); end - - # Job arguments - # - # source://activejob//lib/active_job/core.rb#10 - def arguments; end - - # Job arguments - # - # source://activejob//lib/active_job/core.rb#10 - def arguments=(_arg0); end - - # Attaches the stored job data to the current instance. Receives a hash - # returned from +serialize+ - # - # ==== Examples - # - # class DeliverWebhookJob < ActiveJob::Base - # attr_writer :attempt_number - # - # def attempt_number - # @attempt_number ||= 0 - # end - # - # def serialize - # super.merge('attempt_number' => attempt_number + 1) - # end - # - # def deserialize(job_data) - # super - # self.attempt_number = job_data['attempt_number'] - # end - # - # rescue_from(Timeout::Error) do |exception| - # raise exception if attempt_number > 5 - # retry_job(wait: 10) - # end - # end - # - # source://activejob//lib/active_job/core.rb#146 - 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 - 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 - def enqueue_error=(_arg0); end - - # Track when a job was enqueued - # - # source://activejob//lib/active_job/core.rb#44 - def enqueued_at; end - - # Track when a job was enqueued - # - # source://activejob//lib/active_job/core.rb#44 - def enqueued_at=(_arg0); end - - # Hash that contains the number of times this job handled errors for each specific retry_on declaration. - # Keys are the string representation of the exceptions listed in the retry_on declaration, - # 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 - def exception_executions; end - - # Hash that contains the number of times this job handled errors for each specific retry_on declaration. - # Keys are the string representation of the exceptions listed in the retry_on declaration, - # 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 - 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 - 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 - def executions=(_arg0); end - - # Job Identifier - # - # source://activejob//lib/active_job/core.rb#17 - def job_id; end - - # Job Identifier - # - # source://activejob//lib/active_job/core.rb#17 - def job_id=(_arg0); end - - # I18n.locale to be used during the job. - # - # source://activejob//lib/active_job/core.rb#38 - def locale; end - - # I18n.locale to be used during the job. - # - # source://activejob//lib/active_job/core.rb#38 - def locale=(_arg0); end - - # Priority that the job will have (lower is more priority). - # - # source://activejob//lib/active_job/core.rb#23 - def priority=(_arg0); end - - # ID optionally provided by adapter - # - # source://activejob//lib/active_job/core.rb#26 - def provider_job_id; end - - # ID optionally provided by adapter - # - # source://activejob//lib/active_job/core.rb#26 - def provider_job_id=(_arg0); end - - # Queue in which the job will reside. - # - # source://activejob//lib/active_job/core.rb#20 - def queue_name=(_arg0); end - - # Timestamp when the job should be performed - # - # source://activejob//lib/active_job/core.rb#14 - def scheduled_at; end - - # Timestamp when the job should be performed - # - # source://activejob//lib/active_job/core.rb#14 - def scheduled_at=(_arg0); 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 - 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 - def serialized_arguments=(_arg0); end - - # Configures the job with the given options. - # - # source://activejob//lib/active_job/core.rb#160 - def set(options = T.unsafe(nil)); end - - # Track whether the adapter received the job successfully. - # - # source://activejob//lib/active_job/core.rb#47 - def successfully_enqueued=(_arg0); end - - # @return [Boolean] - # - # source://activejob//lib/active_job/core.rb#49 - def successfully_enqueued?; end - - # Timezone to be used during the job. - # - # source://activejob//lib/active_job/core.rb#41 - def timezone; end - - # Timezone to be used during the job. - # - # source://activejob//lib/active_job/core.rb#41 - def timezone=(_arg0); end - - private - - # @return [Boolean] - # - # source://activejob//lib/active_job/core.rb#193 - def arguments_serialized?; end - - # source://activejob//lib/active_job/core.rb#189 - def deserialize_arguments(serialized_args); end - - # source://activejob//lib/active_job/core.rb#178 - def deserialize_arguments_if_needed; end - - # source://activejob//lib/active_job/core.rb#185 - def serialize_arguments(arguments); end - - # source://activejob//lib/active_job/core.rb#170 - 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 -module ActiveJob::Core::ClassMethods - # Creates a new job instance from a hash created with +serialize+ - # - # source://activejob//lib/active_job/core.rb#60 - def deserialize(job_data); end - - # Creates a job preconfigured with the given options. You can call - # perform_later with the job arguments to enqueue the job with the - # preconfigured options - # - # ==== Options - # * :wait - Enqueues the job with the specified delay - # * :wait_until - Enqueues the job at the time specified - # * :queue - Enqueues the job on the specified queue - # * :priority - Enqueues the job with the specified priority - # - # ==== Examples - # - # VideoJob.set(queue: :some_queue).perform_later(Video.last) - # VideoJob.set(wait: 5.minutes).perform_later(Video.last) - # VideoJob.set(wait_until: Time.now.tomorrow).perform_later(Video.last) - # VideoJob.set(queue: :some_queue, wait: 5.minutes).perform_later(Video.last) - # 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 - def set(options = T.unsafe(nil)); end -end - -# Raised when an exception is raised during job arguments deserialization. -# -# Wraps the original exception raised as +cause+. -# -# source://activejob//lib/active_job/arguments.rb#10 -class ActiveJob::DeserializationError < ::StandardError - # @return [DeserializationError] a new instance of DeserializationError - # - # source://activejob//lib/active_job/arguments.rb#11 - def initialize; end -end - -# Can be raised by adapters if they wish to communicate to the caller a reason -# why the adapter was unexpectedly unable to enqueue a job. -# -# source://activejob//lib/active_job/enqueuing.rb#10 -class ActiveJob::EnqueueError < ::StandardError; end - -# source://activejob//lib/active_job/enqueuing.rb#12 -module ActiveJob::Enqueuing - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActiveJob::Enqueuing::ClassMethods - - # Enqueues the job to be performed by the queue adapter. - # - # ==== Options - # * :wait - Enqueues the job with the specified delay - # * :wait_until - Enqueues the job at the time specified - # * :queue - Enqueues the job on the specified queue - # * :priority - Enqueues the job with the specified priority - # - # ==== Examples - # - # my_job_instance.enqueue - # my_job_instance.enqueue wait: 5.minutes - # my_job_instance.enqueue queue: :important - # my_job_instance.enqueue wait_until: Date.tomorrow.midnight - # my_job_instance.enqueue priority: 10 - # - # source://activejob//lib/active_job/enqueuing.rb#59 - def enqueue(options = T.unsafe(nil)); end -end - -# Includes the +perform_later+ method for job initialization. -# -# source://activejob//lib/active_job/enqueuing.rb#16 -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, - # Time, DateTime, ActiveSupport::TimeWithZone, ActiveSupport::Duration, - # Hash, ActiveSupport::HashWithIndifferentAccess, Array, Range, or - # GlobalID::Identification instances, although this can be extended by adding - # custom serializers. - # - # Returns an instance of the job class queued with arguments available in - # Job#arguments or false if the enqueue did not succeed. - # - # After the attempted enqueue, the job will be yielded to an optional block. - # - # @yield [job] - # - # source://activejob//lib/active_job/enqueuing.rb#28 - def perform_later(*_arg0, **_arg1, &_arg2); end - - private - - # source://activejob//lib/active_job/enqueuing.rb#38 - def job_or_instantiate(*args, **_arg1); end -end - -# Provides behavior for retrying and discarding jobs on exceptions. -# -# source://activejob//lib/active_job/exceptions.rb#7 -module ActiveJob::Exceptions - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveJob::Exceptions::ClassMethods - - # Reschedules the job to be re-executed. This is useful in combination - # with the +rescue_from+ option. When you rescue an exception from your job - # you can ask Active Job to retry performing your job. - # - # ==== Options - # * :wait - Enqueues the job with the specified delay in seconds - # * :wait_until - Enqueues the job at the time specified - # * :queue - Enqueues the job on the specified queue - # * :priority - Enqueues the job with the specified priority - # - # ==== Examples - # - # class SiteScraperJob < ActiveJob::Base - # rescue_from(ErrorLoadingSite) do - # retry_job queue: :low_priority - # end - # - # def perform(*args) - # # raise ErrorLoadingSite if cannot scrape - # end - # end - # - # source://activejob//lib/active_job/exceptions.rb#124 - def retry_job(options = T.unsafe(nil)); end - - private - - # source://activejob//lib/active_job/exceptions.rb#134 - def determine_delay(seconds_or_duration_or_algorithm:, executions:, jitter: T.unsafe(nil)); end - - # source://activejob//lib/active_job/exceptions.rb#154 - def determine_jitter_for_delay(delay, jitter); end - - # source://activejob//lib/active_job/exceptions.rb#159 - def executions_for(exceptions); end - - module GeneratedClassMethods - def retry_jitter; end - def retry_jitter=(value); end - end - - module GeneratedInstanceMethods; end -end - -# source://activejob//lib/active_job/exceptions.rb#14 -module ActiveJob::Exceptions::ClassMethods - # 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. - # - # ==== Example - # - # class SearchIndexingJob < ActiveJob::Base - # discard_on ActiveJob::DeserializationError - # discard_on(CustomAppException) do |job, error| - # ExceptionNotifier.caught(error) - # end - # - # def perform(record) - # # Will raise ActiveJob::DeserializationError if the record can't be deserialized - # # Might raise CustomAppException for something domain specific - # end - # end - # - # source://activejob//lib/active_job/exceptions.rb#94 - def discard_on(*exceptions); end - - # Catch the exception and reschedule job for re-execution after so many seconds, for a specific number of attempts. - # If the exception keeps getting raised beyond the specified number of attempts, the exception is allowed to - # bubble up to the underlying queuing system, which may have its own retry mechanism or place it in a - # holding queue for inspection. - # - # 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. - # - # ==== 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 - # (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 - # * :queue - Re-enqueues the job on a different queue - # * :priority - Re-enqueues the job with a different priority - # * :jitter - A random delay of wait time used when calculating backoff. The default is 15% (0.15) which represents the upper bound of possible wait time (expressed as a percentage) - # - # ==== Examples - # - # class RemoteServiceJob < ActiveJob::Base - # retry_on CustomAppException # defaults to ~3s wait, 5 attempts - # retry_on AnotherCustomAppException, wait: ->(executions) { executions * 2 } - # 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 - # # To retry at most 10 times for each individual exception: - # # retry_on Net::OpenTimeout, wait: :exponentially_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(YetAnotherCustomAppException) do |job, error| - # ExceptionNotifier.caught(error) - # end - # - # def perform(*args) - # # Might raise CustomAppException, AnotherCustomAppException, or YetAnotherCustomAppException for something domain specific - # # Might raise ActiveRecord::Deadlocked when a local db deadlock is detected - # # Might raise Net::OpenTimeout or Timeout::Error when the remote service is down - # end - # end - # - # source://activejob//lib/active_job/exceptions.rb#58 - 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#131 -ActiveJob::Exceptions::JITTER_DEFAULT = T.let(T.unsafe(nil), Object) - -# source://activejob//lib/active_job/execution.rb#7 -module ActiveJob::Execution - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - include ::ActiveSupport::Rescuable - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveSupport::Rescuable::ClassMethods - mixes_in_class_methods ::ActiveJob::Execution::ClassMethods - - # source://activejob//lib/active_job/execution.rb#51 - def perform(*_arg0); end - - # Performs the job immediately. The job is not sent to the queuing adapter - # but directly executed by blocking the execution of others until it's finished. - # +perform_now+ returns the value of your job's +perform+ method. - # - # class MyJob < ActiveJob::Base - # def perform - # "Hello World!" - # end - # end - # - # puts MyJob.new(*args).perform_now # => "Hello World!" - # - # source://activejob//lib/active_job/execution.rb#40 - def perform_now; end - - private - - # source://activejob//lib/active_job/execution.rb#56 - def _perform_job; end - - module GeneratedClassMethods - def rescue_handlers; end - def rescue_handlers=(value); end - def rescue_handlers?; end - end - - module GeneratedInstanceMethods - def rescue_handlers; end - def rescue_handlers=(value); end - def rescue_handlers?; end - end -end - -# Includes methods for executing and performing jobs instantly. -# -# source://activejob//lib/active_job/execution.rb#12 -module ActiveJob::Execution::ClassMethods - # source://activejob//lib/active_job/execution.rb#21 - def execute(job_data); end - - # Performs the job immediately. - # - # MyJob.perform_now("mike") - # - # source://activejob//lib/active_job/execution.rb#17 - def perform_now(*_arg0, **_arg1, &_arg2); end -end - -# source://activejob//lib/active_job/instrumentation.rb#4 -module ActiveJob::Instrumentation - extend ::ActiveSupport::Concern - - # source://activejob//lib/active_job/instrumentation.rb#13 - def perform_now; end - - private - - # source://activejob//lib/active_job/instrumentation.rb#18 - def _perform_job; end - - # source://activejob//lib/active_job/instrumentation.rb#39 - def halted_callback_hook(*_arg0); end - - # source://activejob//lib/active_job/instrumentation.rb#23 - def instrument(operation, payload = T.unsafe(nil), &block); end -end - -# source://activejob//lib/active_job/log_subscriber.rb#7 -class ActiveJob::LogSubscriber < ::ActiveSupport::LogSubscriber - # source://activejob//lib/active_job/log_subscriber.rb#94 - def discard(event); end - - # source://activejob//lib/active_job/log_subscriber.rb#8 - def enqueue(event); end - - # source://activejob//lib/active_job/log_subscriber.rb#27 - def enqueue_at(event); end - - # source://activejob//lib/active_job/log_subscriber.rb#71 - def enqueue_retry(event); end - - # source://activejob//lib/active_job/log_subscriber.rb#53 - def perform(event); end - - # source://activejob//lib/active_job/log_subscriber.rb#46 - def perform_start(event); end - - # source://activejob//lib/active_job/log_subscriber.rb#85 - def retry_stopped(event); end - - private - - # source://activejob//lib/active_job/log_subscriber.rb#108 - def args_info(job); end - - # source://activejob//lib/active_job/log_subscriber.rb#117 - def format(arg); end - - # source://activejob//lib/active_job/log_subscriber.rb#134 - def logger; end - - # source://activejob//lib/active_job/log_subscriber.rb#104 - def queue_name(event); end - - # source://activejob//lib/active_job/log_subscriber.rb#130 - def scheduled_at(event); end -end - -# source://activejob//lib/active_job/logging.rb#7 -module ActiveJob::Logging - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - - # source://activejob//lib/active_job/logging.rb#17 - def perform_now; end - - private - - # @return [Boolean] - # - # source://activejob//lib/active_job/logging.rb#31 - def logger_tagged_by_active_job?; end - - # source://activejob//lib/active_job/logging.rb#22 - def tag_logger(*tags, &block); end - - module GeneratedClassMethods - def log_arguments; end - def log_arguments=(value); end - def log_arguments?; end - end - - module GeneratedInstanceMethods; end -end - -# 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 -module ActiveJob::QueueAdapter - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveJob::QueueAdapter::ClassMethods - - module GeneratedClassMethods - def _queue_adapter; end - def _queue_adapter=(value); end - def _queue_adapter_name; end - def _queue_adapter_name=(value); end - end - - module GeneratedInstanceMethods; end -end - -# Includes the setter method for changing the active queue adapter. -# -# source://activejob//lib/active_job/queue_adapter.rb#21 -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 - 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 - 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 - def queue_adapter_name; end - - private - - # source://activejob//lib/active_job/queue_adapter.rb#53 - def assign_adapter(adapter_name, queue_adapter); end - - # @return [Boolean] - # - # source://activejob//lib/active_job/queue_adapter.rb#60 - def queue_adapter?(object); end -end - -# source://activejob//lib/active_job/queue_adapter.rb#58 -ActiveJob::QueueAdapter::ClassMethods::QUEUE_ADAPTER_METHODS = T.let(T.unsafe(nil), Array) - -# == Active Job adapters -# -# Active Job has adapters for the following queuing backends: -# -# * {Backburner}[https://github.com/nesquena/backburner] -# * {Delayed Job}[https://github.com/collectiveidea/delayed_job] -# * {Que}[https://github.com/chanks/que] -# * {queue_classic}[https://github.com/QueueClassic/queue_classic] -# * {Resque}[https://github.com/resque/resque] -# * {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. -# -# === Backends Features -# -# | | Async | Queues | Delayed | Priorities | Timeout | Retries | -# |-------------------|-------|--------|------------|------------|---------|---------| -# | Backburner | Yes | Yes | Yes | Yes | Job | Global | -# | Delayed Job | Yes | Yes | Yes | Job | Global | Global | -# | Que | Yes | Yes | Yes | Job | No | Job | -# | queue_classic | Yes | Yes | Yes* | No | No | No | -# | Resque | Yes | Yes | Yes (Gem) | Queue | Global | Yes | -# | Sidekiq | Yes | Yes | Yes | Queue | No | Job | -# | Sneakers | Yes | Yes | No | Queue | Queue | No | -# | 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 | -# -# ==== Async -# -# Yes: The Queue Adapter has the ability to run the job in a non-blocking manner. -# It either runs on a separate or forked process, or on a different thread. -# -# No: The job is run in the same process. -# -# ==== Queues -# -# Yes: Jobs may set which queue they are run in with queue_as or by using the set -# method. -# -# ==== Delayed -# -# Yes: The adapter will run the job in the future through perform_later. -# -# (Gem): An additional gem is required to use perform_later with this adapter. -# -# No: The adapter will run jobs at the next opportunity and cannot use perform_later. -# -# N/A: The adapter does not support queuing. -# -# NOTE: -# queue_classic supports job scheduling since version 3.1. -# For older versions you can use the queue_classic-later gem. -# -# ==== Priorities -# -# The order in which jobs are processed can be configured differently depending -# on the adapter. -# -# Job: Any class inheriting from the adapter may set the priority on the job -# object relative to other jobs. -# -# Queue: The adapter can set the priority for job queues, when setting a queue -# with Active Job this will be respected. -# -# Yes: Allows the priority to be set on the job object, at the queue level or -# as default configuration option. -# -# No: The adapter does not allow the priority of jobs to be configured. -# -# N/A: The adapter does not support queuing, and therefore sorting them. -# -# ==== Timeout -# -# When a job will stop after the allotted time. -# -# Job: The timeout can be set for each instance of the job class. -# -# Queue: The timeout is set for all jobs on the queue. -# -# Global: The adapter is configured that all jobs have a maximum run time. -# -# No: The adapter does not allow the timeout of jobs to be configured. -# -# N/A: This adapter does not run in a separate process, and therefore timeout -# is unsupported. -# -# ==== Retries -# -# Job: The number of retries can be set per instance of the job class. -# -# Yes: The Number of retries can be configured globally, for each instance or -# on the queue. This adapter may also present failed instances of the job class -# that can be restarted. -# -# Global: The adapter has a global number of retries. -# -# No: The adapter does not allow the number of retries to be configured. -# -# 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 -module ActiveJob::QueueAdapters - extend ::ActiveSupport::Autoload - - class << self - # Returns adapter for specified name. - # - # ActiveJob::QueueAdapters.lookup(:sidekiq) - # # => ActiveJob::QueueAdapters::SidekiqAdapter - # - # source://activejob//lib/active_job/queue_adapters.rb#136 - def lookup(name); end - end -end - -# source://activejob//lib/active_job/queue_adapters.rb#128 -ActiveJob::QueueAdapters::ADAPTER = T.let(T.unsafe(nil), String) - -# == Active Job Async adapter -# -# The Async adapter runs jobs with an in-process thread pool. -# -# This is the default queue adapter. It's well-suited for dev/test since -# it doesn't need an external infrastructure, but it's a poor fit for -# production since it drops pending jobs on restart. -# -# To use this adapter, set queue adapter to +:async+: -# -# config.active_job.queue_adapter = :async -# -# To configure the adapter's thread pool, instantiate the adapter and -# pass your own config: -# -# config.active_job.queue_adapter = ActiveJob::QueueAdapters::AsyncAdapter.new \ -# min_threads: 1, -# max_threads: 2 * Concurrent.processor_count, -# idletime: 600.seconds -# -# The adapter uses a {Concurrent Ruby}[https://github.com/ruby-concurrency/concurrent-ruby] thread pool to schedule and execute -# jobs. Since jobs share a single thread pool, long-running jobs will block -# short-lived jobs. Fine for dev/test; bad for production. -# -# source://activejob//lib/active_job/queue_adapters/async_adapter.rb#33 -class ActiveJob::QueueAdapters::AsyncAdapter - # See {Concurrent::ThreadPoolExecutor}[https://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/ThreadPoolExecutor.html] for executor options. - # - # @return [AsyncAdapter] a new instance of AsyncAdapter - # - # source://activejob//lib/active_job/queue_adapters/async_adapter.rb#35 - def initialize(**executor_options); end - - # source://activejob//lib/active_job/queue_adapters/async_adapter.rb#39 - def enqueue(job); end - - # source://activejob//lib/active_job/queue_adapters/async_adapter.rb#43 - def enqueue_at(job, timestamp); end - - # Used for our test suite. - # - # source://activejob//lib/active_job/queue_adapters/async_adapter.rb#55 - def immediate=(immediate); end - - # Gracefully stop processing jobs. Finishes in-progress work and handles - # any new jobs following the executor's fallback policy (`caller_runs`). - # Waits for termination by default. Pass `wait: false` to continue. - # - # source://activejob//lib/active_job/queue_adapters/async_adapter.rb#50 - def shutdown(wait: T.unsafe(nil)); end -end - -# Note that we don't actually need to serialize the jobs since we're -# performing them in-process, but we do so anyway for parity with other -# adapters and deployment environments. Otherwise, serialization bugs -# may creep in undetected. -# -# source://activejob//lib/active_job/queue_adapters/async_adapter.rb#63 -class ActiveJob::QueueAdapters::AsyncAdapter::JobWrapper - # @return [JobWrapper] a new instance of JobWrapper - # - # source://activejob//lib/active_job/queue_adapters/async_adapter.rb#64 - def initialize(job); end - - # source://activejob//lib/active_job/queue_adapters/async_adapter.rb#69 - def perform; end -end - -# source://activejob//lib/active_job/queue_adapters/async_adapter.rb#74 -class ActiveJob::QueueAdapters::AsyncAdapter::Scheduler - # @return [Scheduler] a new instance of Scheduler - # - # source://activejob//lib/active_job/queue_adapters/async_adapter.rb#86 - def initialize(**options); end - - # source://activejob//lib/active_job/queue_adapters/async_adapter.rb#92 - def enqueue(job, queue_name:); end - - # source://activejob//lib/active_job/queue_adapters/async_adapter.rb#96 - def enqueue_at(job, timestamp, queue_name:); end - - # source://activejob//lib/active_job/queue_adapters/async_adapter.rb#110 - def executor; end - - # Returns the value of attribute immediate. - # - # source://activejob//lib/active_job/queue_adapters/async_adapter.rb#84 - def immediate; end - - # Sets the attribute immediate - # - # @param value the value to set the attribute immediate to. - # - # source://activejob//lib/active_job/queue_adapters/async_adapter.rb#84 - def immediate=(_arg0); end - - # source://activejob//lib/active_job/queue_adapters/async_adapter.rb#105 - def shutdown(wait: T.unsafe(nil)); end -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 -# -# When enqueuing jobs with the Inline adapter the job will be executed -# immediately. -# -# To use the Inline set the queue_adapter config to +:inline+. -# -# Rails.application.config.active_job.queue_adapter = :inline -# -# source://activejob//lib/active_job/queue_adapters/inline_adapter.rb#13 -class ActiveJob::QueueAdapters::InlineAdapter - # source://activejob//lib/active_job/queue_adapters/inline_adapter.rb#14 - def enqueue(job); end - - # @raise [NotImplementedError] - # - # source://activejob//lib/active_job/queue_adapters/inline_adapter.rb#18 - def enqueue_at(*_arg0); end -end - -# == 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. -# -# To use the test adapter set +queue_adapter+ config to +:test+. -# -# Rails.application.config.active_job.queue_adapter = :test -# -# source://activejob//lib/active_job/queue_adapters/test_adapter.rb#14 -class ActiveJob::QueueAdapters::TestAdapter - # Returns the value of attribute at. - # - # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#15 - def at; end - - # Sets the attribute at - # - # @param value the value to set the attribute at to. - # - # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#15 - def at=(_arg0); end - - # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#28 - def enqueue(job); end - - # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#33 - def enqueue_at(job, timestamp); end - - # Provides a store of all the enqueued jobs with the TestAdapter so you can check them. - # - # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#19 - def enqueued_jobs; end - - # Sets the attribute enqueued_jobs - # - # @param value the value to set the attribute enqueued_jobs to. - # - # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#16 - def enqueued_jobs=(_arg0); end - - # Returns the value of attribute filter. - # - # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#15 - def filter; end - - # Sets the attribute filter - # - # @param value the value to set the attribute filter to. - # - # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#15 - def filter=(_arg0); end - - # Returns the value of attribute perform_enqueued_at_jobs. - # - # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#15 - def perform_enqueued_at_jobs; end - - # Sets the attribute perform_enqueued_at_jobs - # - # @param value the value to set the attribute perform_enqueued_at_jobs to. - # - # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#15 - def perform_enqueued_at_jobs=(_arg0); end - - # Returns the value of attribute perform_enqueued_jobs. - # - # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#15 - def perform_enqueued_jobs; end - - # Sets the attribute perform_enqueued_jobs - # - # @param value the value to set the attribute perform_enqueued_jobs to. - # - # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#15 - def perform_enqueued_jobs=(_arg0); end - - # Provides a store of all the performed jobs with the TestAdapter so you can check them. - # - # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#24 - def performed_jobs; end - - # Sets the attribute performed_jobs - # - # @param value the value to set the attribute performed_jobs to. - # - # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#16 - def performed_jobs=(_arg0); end - - # Returns the value of attribute queue. - # - # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#15 - def queue; end - - # Sets the attribute queue - # - # @param value the value to set the attribute queue to. - # - # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#15 - def queue=(_arg0); end - - # Returns the value of attribute reject. - # - # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#15 - def reject; end - - # Sets the attribute reject - # - # @param value the value to set the attribute reject to. - # - # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#15 - def reject=(_arg0); end - - private - - # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#79 - def filter_as_proc(filter); end - - # @return [Boolean] - # - # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#57 - def filtered?(job); end - - # @return [Boolean] - # - # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#71 - def filtered_job_class?(job); end - - # @return [Boolean] - # - # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#65 - def filtered_queue?(job); end - - # @return [Boolean] - # - # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#61 - def filtered_time?(job); end - - # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#39 - def job_to_hash(job, extras = T.unsafe(nil)); end - - # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#48 - def perform_or_enqueue(perform, job, job_data); end -end - -# source://activejob//lib/active_job/queue_name.rb#4 -module ActiveJob::QueueName - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveJob::QueueName::ClassMethods - - # Returns the name of the queue the job will be run on. - # - # source://activejob//lib/active_job/queue_name.rb#62 - def queue_name; end - - module GeneratedClassMethods - def queue_name; end - def queue_name=(value); end - def queue_name?; end - def queue_name_delimiter; end - def queue_name_delimiter=(value); end - def queue_name_delimiter?; end - def queue_name_prefix; end - def queue_name_prefix=(value); end - def queue_name_prefix?; end - end - - module GeneratedInstanceMethods - def queue_name_prefix; end - def queue_name_prefix=(value); end - def queue_name_prefix?; end - end -end - -# Includes the ability to override the default queue name and prefix. -# -# source://activejob//lib/active_job/queue_name.rb#8 -module ActiveJob::QueueName::ClassMethods - # source://activejob//lib/active_job/queue_name.rb#9 - def default_queue_name; end - - # source://activejob//lib/active_job/queue_name.rb#9 - def default_queue_name=(val); end - - # Specifies the name of the queue to process the job on. - # - # class PublishToFeedJob < ActiveJob::Base - # queue_as :feeds - # - # def perform(post) - # post.to_feed! - # end - # end - # - # Can be given a block that will evaluate in the context of the job - # allowing +self.arguments+ to be accessed so that a dynamic queue name - # can be applied: - # - # class PublishToFeedJob < ApplicationJob - # queue_as do - # post = self.arguments.first - # - # if post.paid? - # :paid_feeds - # else - # :feeds - # end - # end - # - # def perform(post) - # post.to_feed! - # end - # end - # - # source://activejob//lib/active_job/queue_name.rb#40 - def queue_as(part_name = T.unsafe(nil), &block); end - - # source://activejob//lib/active_job/queue_name.rb#48 - def queue_name_from_part(part_name); end - - class << self - # source://activejob//lib/active_job/queue_name.rb#9 - def default_queue_name; end - - # source://activejob//lib/active_job/queue_name.rb#9 - def default_queue_name=(val); end - end -end - -# source://activejob//lib/active_job/queue_priority.rb#4 -module ActiveJob::QueuePriority - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveJob::QueuePriority::ClassMethods - - # Returns the priority that the job will be created with - # - # source://activejob//lib/active_job/queue_priority.rb#36 - def priority; end - - module GeneratedClassMethods - def priority; end - def priority=(value); end - def priority?; end - end - - module GeneratedInstanceMethods; end -end - -# Includes the ability to override the default queue priority. -# -# source://activejob//lib/active_job/queue_priority.rb#8 -module ActiveJob::QueuePriority::ClassMethods - # source://activejob//lib/active_job/queue_priority.rb#9 - def default_priority; end - - # source://activejob//lib/active_job/queue_priority.rb#9 - def default_priority=(val); end - - # Specifies the priority of the queue to create the job with. - # - # class PublishToFeedJob < ActiveJob::Base - # queue_with_priority 50 - # - # def perform(post) - # post.to_feed! - # end - # end - # - # Specify either an argument or a block. - # - # source://activejob//lib/active_job/queue_priority.rb#22 - def queue_with_priority(priority = T.unsafe(nil), &block); end - - class << self - # source://activejob//lib/active_job/queue_priority.rb#9 - def default_priority; end - - # source://activejob//lib/active_job/queue_priority.rb#9 - def default_priority=(val); end - end -end - -# = Active Job Railtie -# -# source://activejob//lib/active_job/railtie.rb#8 -class ActiveJob::Railtie < ::Rails::Railtie; end - -# Raised when an unsupported argument type is set as a job argument. We -# currently support String, Integer, Float, NilClass, TrueClass, FalseClass, -# BigDecimal, Symbol, Date, Time, DateTime, ActiveSupport::TimeWithZone, -# ActiveSupport::Duration, Hash, ActiveSupport::HashWithIndifferentAccess, -# Array, Range, or GlobalID::Identification instances, although this can be -# extended by adding custom serializers. -# Raised if you set the key for a Hash something else than a string or -# a symbol. Also raised when trying to serialize an object which can't be -# identified with a GlobalID - such as an unpersisted Active Record model. -# -# 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 -# and to add new ones. It also has helpers to serialize/deserialize objects. -# -# source://activejob//lib/active_job/serializers.rb#8 -module ActiveJob::Serializers - extend ::ActiveSupport::Autoload - - # source://activejob//lib/active_job/serializers.rb#22 - def _additional_serializers; end - - # source://activejob//lib/active_job/serializers.rb#22 - def _additional_serializers=(val); end - - class << self - # source://activejob//lib/active_job/serializers.rb#22 - def _additional_serializers; end - - # source://activejob//lib/active_job/serializers.rb#22 - def _additional_serializers=(val); end - - # Adds new serializers to a list of known serializers. - # - # source://activejob//lib/active_job/serializers.rb#54 - def add_serializers(*new_serializers); end - - # Returns deserialized object. - # Will look up through all known serializers. - # If no serializer found will raise ArgumentError. - # - # @raise [ArgumentError] - # - # source://activejob//lib/active_job/serializers.rb#38 - 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. - # - # @raise [SerializationError] - # - # source://activejob//lib/active_job/serializers.rb#29 - def serialize(argument); end - - # Returns list of known serializers. - # - # source://activejob//lib/active_job/serializers.rb#49 - def serializers; end - 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 - def deserialize(hash); end - - # source://activejob//lib/active_job/serializers/date_serializer.rb#6 - def serialize(date); end - - private - - # source://activejob//lib/active_job/serializers/date_serializer.rb#15 - def klass; end -end - -# source://activejob//lib/active_job/serializers/date_time_serializer.rb#5 -class ActiveJob::Serializers::DateTimeSerializer < ::ActiveJob::Serializers::TimeObjectSerializer - # source://activejob//lib/active_job/serializers/date_time_serializer.rb#6 - def deserialize(hash); end - - private - - # source://activejob//lib/active_job/serializers/date_time_serializer.rb#11 - def klass; end -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 - def deserialize(hash); end - - # source://activejob//lib/active_job/serializers/duration_serializer.rb#6 - def serialize(duration); end - - private - - # source://activejob//lib/active_job/serializers/duration_serializer.rb#18 - def klass; end -end - -# source://activejob//lib/active_job/serializers/module_serializer.rb#5 -class ActiveJob::Serializers::ModuleSerializer < ::ActiveJob::Serializers::ObjectSerializer - # source://activejob//lib/active_job/serializers/module_serializer.rb#11 - def deserialize(hash); end - - # @raise [SerializationError] - # - # source://activejob//lib/active_job/serializers/module_serializer.rb#6 - def serialize(constant); end - - private - - # source://activejob//lib/active_job/serializers/module_serializer.rb#16 - def klass; end -end - -# Base class for serializing and deserializing custom objects. -# -# Example: -# -# class MoneySerializer < ActiveJob::Serializers::ObjectSerializer -# def serialize(money) -# super("amount" => money.amount, "currency" => money.currency) -# end -# -# def deserialize(hash) -# Money.new(hash["amount"], hash["currency"]) -# end -# -# private -# -# def klass -# Money -# end -# end -# -# source://activejob//lib/active_job/serializers/object_serializer.rb#24 -class ActiveJob::Serializers::ObjectSerializer - include ::Singleton - extend ::Singleton::SingletonClassMethods - - # Deserializes an argument from a JSON primitive type. - # - # @raise [NotImplementedError] - # - # source://activejob//lib/active_job/serializers/object_serializer.rb#42 - def deserialize(json); end - - # Serializes an argument to a JSON primitive type. - # - # source://activejob//lib/active_job/serializers/object_serializer.rb#37 - def serialize(hash); end - - # Determines if an argument should be serialized by a serializer. - # - # @return [Boolean] - # - # source://activejob//lib/active_job/serializers/object_serializer.rb#32 - def serialize?(argument); end - - private - - # The class of the object that will be serialized. - # - # @raise [NotImplementedError] - # - # source://activejob//lib/active_job/serializers/object_serializer.rb#48 - def klass; end - - class << self - # source://activejob//lib/active_job/serializers/object_serializer.rb#28 - def deserialize(*_arg0, **_arg1, &_arg2); end - - # source://activejob//lib/active_job/serializers/object_serializer.rb#28 - def serialize(*_arg0, **_arg1, &_arg2); end - - # source://activejob//lib/active_job/serializers/object_serializer.rb#28 - def serialize?(*_arg0, **_arg1, &_arg2); end - end -end - -# source://activejob//lib/active_job/serializers/range_serializer.rb#5 -class ActiveJob::Serializers::RangeSerializer < ::ActiveJob::Serializers::ObjectSerializer - # source://activejob//lib/active_job/serializers/range_serializer.rb#13 - def deserialize(hash); end - - # source://activejob//lib/active_job/serializers/range_serializer.rb#8 - def serialize(range); end - - private - - # source://activejob//lib/active_job/serializers/range_serializer.rb#18 - def klass; end -end - -# source://activejob//lib/active_job/serializers/range_serializer.rb#6 -ActiveJob::Serializers::RangeSerializer::KEYS = T.let(T.unsafe(nil), Array) - -# source://activejob//lib/active_job/serializers/symbol_serializer.rb#5 -class ActiveJob::Serializers::SymbolSerializer < ::ActiveJob::Serializers::ObjectSerializer - # source://activejob//lib/active_job/serializers/symbol_serializer.rb#10 - def deserialize(argument); end - - # source://activejob//lib/active_job/serializers/symbol_serializer.rb#6 - def serialize(argument); end - - private - - # source://activejob//lib/active_job/serializers/symbol_serializer.rb#15 - def klass; end -end - -# source://activejob//lib/active_job/serializers/time_object_serializer.rb#5 -class ActiveJob::Serializers::TimeObjectSerializer < ::ActiveJob::Serializers::ObjectSerializer - # source://activejob//lib/active_job/serializers/time_object_serializer.rb#8 - def serialize(time); end -end - -# source://activejob//lib/active_job/serializers/time_object_serializer.rb#6 -ActiveJob::Serializers::TimeObjectSerializer::NANO_PRECISION = T.let(T.unsafe(nil), Integer) - -# source://activejob//lib/active_job/serializers/time_serializer.rb#5 -class ActiveJob::Serializers::TimeSerializer < ::ActiveJob::Serializers::TimeObjectSerializer - # source://activejob//lib/active_job/serializers/time_serializer.rb#6 - def deserialize(hash); end - - private - - # source://activejob//lib/active_job/serializers/time_serializer.rb#11 - def klass; end -end - -# source://activejob//lib/active_job/serializers/time_with_zone_serializer.rb#5 -class ActiveJob::Serializers::TimeWithZoneSerializer < ::ActiveJob::Serializers::TimeObjectSerializer - # source://activejob//lib/active_job/serializers/time_with_zone_serializer.rb#6 - def deserialize(hash); end - - private - - # source://activejob//lib/active_job/serializers/time_with_zone_serializer.rb#11 - def klass; end -end - -# source://activejob//lib/active_job/test_case.rb#6 -class ActiveJob::TestCase < ::ActiveSupport::TestCase - include ::ActiveJob::TestHelper -end - -# Provides helper methods for testing Active Job -# -# source://activejob//lib/active_job/test_helper.rb#8 -module ActiveJob::TestHelper - include ::ActiveSupport::Testing::Assertions - - # source://activejob//lib/active_job/test_helper.rb#51 - def after_teardown; end - - # Asserts that the number of enqueued jobs matches the given number. - # - # def test_jobs - # assert_enqueued_jobs 0 - # HelloJob.perform_later('david') - # assert_enqueued_jobs 1 - # HelloJob.perform_later('abdelkader') - # assert_enqueued_jobs 2 - # end - # - # If a block is passed, asserts that the block will cause the specified number of - # jobs to be enqueued. - # - # def test_jobs_again - # assert_enqueued_jobs 1 do - # HelloJob.perform_later('cristian') - # end - # - # assert_enqueued_jobs 2 do - # HelloJob.perform_later('aaron') - # HelloJob.perform_later('rafael') - # end - # end - # - # Asserts the number of times a specific job was enqueued by passing +:only+ option. - # - # def test_logging_job - # assert_enqueued_jobs 1, only: LoggingJob do - # LoggingJob.perform_later - # HelloJob.perform_later('jeremy') - # end - # end - # - # Asserts the number of times a job except specific class was enqueued by passing +:except+ option. - # - # def test_logging_job - # assert_enqueued_jobs 1, except: HelloJob do - # LoggingJob.perform_later - # HelloJob.perform_later('jeremy') - # end - # end - # - # +:only+ and +:except+ options accept Class, Array of Class, or Proc. When passed a Proc, - # a hash containing the job's class and it's argument are passed as argument. - # - # Asserts the number of times a job is enqueued to a specific queue by passing +:queue+ option. - # - # def test_logging_job - # assert_enqueued_jobs 2, queue: 'default' do - # LoggingJob.perform_later - # HelloJob.perform_later('elfassy') - # end - # end - # - # source://activejob//lib/active_job/test_helper.rb#123 - 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. - # - # def test_assert_enqueued_with - # MyJob.perform_later(1,2,3) - # assert_enqueued_with(job: MyJob, args: [1,2,3]) - # - # MyJob.set(wait_until: Date.tomorrow.noon, queue: "my_queue").perform_later - # assert_enqueued_with(at: Date.tomorrow.noon, queue: "my_queue") - # 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. - # - # For example, a proc can be used to match a range of times: - # - # def test_assert_enqueued_with - # at_matcher = ->(job_at) { (Date.yesterday..Date.tomorrow).cover?(job_at) } - # - # MyJob.set(wait_until: Date.today.noon).perform_later - # - # assert_enqueued_with(job: MyJob, at: at_matcher) - # end - # - # A proc can also be used to match a subset of a job's args: - # - # def test_assert_enqueued_with - # args_matcher = ->(job_args) { job_args[0].key?(:foo) } - # - # MyJob.perform_later(foo: "bar", other_arg: "No need to check in the test") - # - # assert_enqueued_with(job: MyJob, args: args_matcher) - # end - # - # If a block is passed, asserts that the block will cause the job to be - # enqueued with the given arguments. - # - # def test_assert_enqueued_with - # assert_enqueued_with(job: MyJob, args: [1,2,3]) do - # MyJob.perform_later(1,2,3) - # end - # - # assert_enqueued_with(job: MyJob, at: Date.tomorrow.noon) do - # MyJob.set(wait_until: Date.tomorrow.noon).perform_later - # end - # end - # - # source://activejob//lib/active_job/test_helper.rb#392 - 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. - # - # def test_jobs - # assert_no_enqueued_jobs - # HelloJob.perform_later('jeremy') - # assert_enqueued_jobs 1 - # end - # - # If a block is passed, asserts that the block will not cause any job to be enqueued. - # - # def test_jobs_again - # assert_no_enqueued_jobs do - # # No job should be enqueued from this block - # end - # end - # - # Asserts that no jobs of a specific kind are enqueued by passing +:only+ option. - # - # def test_no_logging - # assert_no_enqueued_jobs only: LoggingJob do - # HelloJob.perform_later('jeremy') - # end - # end - # - # Asserts that no jobs except specific class are enqueued by passing +:except+ option. - # - # def test_no_logging - # assert_no_enqueued_jobs except: HelloJob do - # HelloJob.perform_later('jeremy') - # end - # end - # - # +:only+ and +:except+ options accept Class, Array of Class, or Proc. When passed a Proc, - # a hash containing the job's class and it's argument are passed as argument. - # - # Asserts that no jobs are enqueued to a specific queue by passing +:queue+ option - # - # def test_no_logging - # assert_no_enqueued_jobs queue: 'default' do - # LoggingJob.set(queue: :some_queue).perform_later - # end - # end - # - # Note: This assertion is simply a shortcut for: - # - # assert_enqueued_jobs 0, &block - # - # source://activejob//lib/active_job/test_helper.rb#185 - 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. - # - # def test_jobs - # assert_no_performed_jobs - # - # perform_enqueued_jobs do - # HelloJob.perform_later('matthew') - # assert_performed_jobs 1 - # end - # end - # - # If a block is passed, asserts that the block will not cause any job to be performed. - # - # def test_jobs_again - # assert_no_performed_jobs do - # # No job should be performed from this block - # end - # end - # - # The block form supports filtering. If the +:only+ option is specified, - # then only the listed job(s) will not be performed. - # - # def test_no_logging - # assert_no_performed_jobs only: LoggingJob do - # HelloJob.perform_later('jeremy') - # end - # end - # - # Also if the +:except+ option is specified, - # then the job(s) except specific class will not be performed. - # - # def test_no_logging - # assert_no_performed_jobs except: HelloJob do - # HelloJob.perform_later('jeremy') - # end - # end - # - # +:only+ and +:except+ options accept Class, Array of Class, or Proc. When passed a Proc, - # an instance of the job will be passed as argument. - # - # If the +:queue+ option is specified, - # then only the job(s) enqueued to a specific queue will not be performed. - # - # def test_assert_no_performed_jobs_with_queue_option - # assert_no_performed_jobs queue: :some_queue do - # HelloJob.set(queue: :other_queue).perform_later("jeremy") - # end - # end - # - # Note: This assertion is simply a shortcut for: - # - # assert_performed_jobs 0, &block - # - # source://activejob//lib/active_job/test_helper.rb#343 - 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. - # If no block is passed, perform_enqueued_jobs - # must be called around or after the job call. - # - # def test_jobs - # assert_performed_jobs 0 - # - # perform_enqueued_jobs do - # HelloJob.perform_later('xavier') - # end - # assert_performed_jobs 1 - # - # HelloJob.perform_later('yves') - # - # perform_enqueued_jobs - # - # assert_performed_jobs 2 - # end - # - # If a block is passed, asserts that the block will cause the specified number of - # jobs to be performed. - # - # def test_jobs_again - # assert_performed_jobs 1 do - # HelloJob.perform_later('robin') - # end - # - # assert_performed_jobs 2 do - # HelloJob.perform_later('carlos') - # HelloJob.perform_later('sean') - # end - # end - # - # This method also supports filtering. If the +:only+ option is specified, - # then only the listed job(s) will be performed. - # - # def test_hello_job - # assert_performed_jobs 1, only: HelloJob do - # HelloJob.perform_later('jeremy') - # LoggingJob.perform_later - # end - # end - # - # Also if the +:except+ option is specified, - # then the job(s) except specific class will be performed. - # - # def test_hello_job - # assert_performed_jobs 1, except: LoggingJob do - # HelloJob.perform_later('jeremy') - # LoggingJob.perform_later - # end - # end - # - # An array may also be specified, to support testing multiple jobs. - # - # def test_hello_and_logging_jobs - # assert_nothing_raised do - # assert_performed_jobs 2, only: [HelloJob, LoggingJob] do - # HelloJob.perform_later('jeremy') - # LoggingJob.perform_later('stewie') - # RescueJob.perform_later('david') - # end - # end - # end - # - # A proc may also be specified. When passed a Proc, the job's instance will be passed as argument. - # - # def test_hello_and_logging_jobs - # assert_nothing_raised do - # assert_performed_jobs(1, only: ->(job) { job.is_a?(HelloJob) }) do - # HelloJob.perform_later('jeremy') - # LoggingJob.perform_later('stewie') - # RescueJob.perform_later('david') - # end - # end - # end - # - # If the +:queue+ option is specified, - # then only the job(s) enqueued to a specific queue will be performed. - # - # def test_assert_performed_jobs_with_queue_option - # assert_performed_jobs 1, queue: :some_queue do - # HelloJob.set(queue: :some_queue).perform_later("jeremy") - # HelloJob.set(queue: :other_queue).perform_later("bogdan") - # end - # end - # - # source://activejob//lib/active_job/test_helper.rb#275 - 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. - # - # def test_assert_performed_with - # MyJob.perform_later(1,2,3) - # - # perform_enqueued_jobs - # - # assert_performed_with(job: MyJob, args: [1,2,3]) - # - # MyJob.set(wait_until: Date.tomorrow.noon, queue: "my_queue").perform_later - # - # perform_enqueued_jobs - # - # assert_performed_with(at: Date.tomorrow.noon, queue: "my_queue") - # 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. - # - # For example, a proc can be used to match a range of times: - # - # def test_assert_performed_with - # at_matcher = ->(job_at) { (Date.yesterday..Date.tomorrow).cover?(job_at) } - # - # MyJob.set(wait_until: Date.today.noon).perform_later - # - # perform_enqueued_jobs - # - # assert_performed_with(job: MyJob, at: at_matcher) - # end - # - # A proc can also be used to match a subset of a job's args: - # - # def test_assert_performed_with - # args_matcher = ->(job_args) { job_args[0].key?(:foo) } - # - # MyJob.perform_later(foo: "bar", other_arg: "No need to check in the test") - # - # perform_enqueued_jobs - # - # assert_performed_with(job: MyJob, args: args_matcher) - # end - # - # If a block is passed, that block performs all of the jobs that were - # enqueued throughout the duration of the block and asserts that - # the job has been performed with the given arguments in the block. - # - # def test_assert_performed_with - # assert_performed_with(job: MyJob, args: [1,2,3]) do - # MyJob.perform_later(1,2,3) - # end - # - # assert_performed_with(job: MyJob, at: Date.tomorrow.noon) do - # MyJob.set(wait_until: Date.tomorrow.noon).perform_later - # end - # end - # - # source://activejob//lib/active_job/test_helper.rb#494 - 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 - def before_setup; end - - # source://activejob//lib/active_job/test_helper.rb#9 - def enqueued_jobs(*_arg0, **_arg1, &_arg2); end - - # source://activejob//lib/active_job/test_helper.rb#9 - def enqueued_jobs=(arg); end - - # Performs all enqueued jobs. If a block is given, performs all of the jobs - # that were enqueued throughout the duration of the block. If a block is - # not given, performs all of the enqueued jobs up to this point in the test. - # - # def test_perform_enqueued_jobs - # perform_enqueued_jobs do - # MyJob.perform_later(1, 2, 3) - # end - # assert_performed_jobs 1 - # end - # - # def test_perform_enqueued_jobs_without_block - # MyJob.perform_later(1, 2, 3) - # - # perform_enqueued_jobs - # - # assert_performed_jobs 1 - # end - # - # This method also supports filtering. If the +:only+ option is specified, - # then only the listed job(s) will be performed. - # - # def test_perform_enqueued_jobs_with_only - # perform_enqueued_jobs(only: MyJob) do - # MyJob.perform_later(1, 2, 3) # will be performed - # HelloJob.perform_later(1, 2, 3) # will not be performed - # end - # assert_performed_jobs 1 - # end - # - # Also if the +:except+ option is specified, - # then the job(s) except specific class will be performed. - # - # def test_perform_enqueued_jobs_with_except - # perform_enqueued_jobs(except: HelloJob) do - # MyJob.perform_later(1, 2, 3) # will be performed - # HelloJob.perform_later(1, 2, 3) # will not be performed - # end - # assert_performed_jobs 1 - # end - # - # +:only+ and +:except+ options accept Class, Array of Class, or Proc. When passed a Proc, - # an instance of the job will be passed as argument. - # - # If the +:queue+ option is specified, - # then only the job(s) enqueued to a specific queue will be performed. - # - # def test_perform_enqueued_jobs_with_queue - # perform_enqueued_jobs queue: :some_queue do - # MyJob.set(queue: :some_queue).perform_later(1, 2, 3) # will be performed - # HelloJob.set(queue: :other_queue).perform_later(1, 2, 3) # will not be performed - # end - # assert_performed_jobs 1 - # end - # - # If the +:at+ option is specified, then only run jobs enqueued to run - # immediately or before the given time - # - # source://activejob//lib/active_job/test_helper.rb#598 - 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 - def performed_jobs(*_arg0, **_arg1, &_arg2); end - - # source://activejob//lib/active_job/test_helper.rb#9 - def performed_jobs=(arg); end - - # Accesses the queue_adapter set by ActiveJob::Base. - # - # def test_assert_job_has_custom_queue_adapter_set - # assert_instance_of CustomQueueAdapter, HelloJob.queue_adapter - # end - # - # source://activejob//lib/active_job/test_helper.rb#634 - def queue_adapter; end - - # Specifies the queue adapter to use with all Active Job test helpers. - # - # Returns an instance of the queue adapter and defaults to - # ActiveJob::QueueAdapters::TestAdapter. - # - # 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 - def queue_adapter_for_test; end - - private - - # source://activejob//lib/active_job/test_helper.rb#639 - def clear_enqueued_jobs; end - - # source://activejob//lib/active_job/test_helper.rb#643 - def clear_performed_jobs; end - - # source://activejob//lib/active_job/test_helper.rb#704 - def deserialize_args_for_assertion(job); end - - # source://activejob//lib/active_job/test_helper.rb#679 - 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 - def filter_as_proc(filter); end - - # source://activejob//lib/active_job/test_helper.rb#687 - 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 - def instantiate_job(payload, skip_deserialize_arguments: T.unsafe(nil)); end - - # source://activejob//lib/active_job/test_helper.rb#647 - 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 - 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 - def prepare_args_for_assertion(args); end - - # source://activejob//lib/active_job/test_helper.rb#718 - def queue_adapter_changed_jobs; end - - # @raise [ArgumentError] - # - # source://activejob//lib/active_job/test_helper.rb#725 - def validate_option(only: T.unsafe(nil), except: T.unsafe(nil)); end -end - -# source://activejob//lib/active_job/test_helper.rb#15 -module ActiveJob::TestHelper::TestQueueAdapter - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveJob::TestHelper::TestQueueAdapter::ClassMethods - - module GeneratedClassMethods - def _test_adapter; end - def _test_adapter=(value); end - end - - module GeneratedInstanceMethods; end -end - -# source://activejob//lib/active_job/test_helper.rb#22 -module ActiveJob::TestHelper::TestQueueAdapter::ClassMethods - # source://activejob//lib/active_job/test_helper.rb#27 - def disable_test_adapter; end - - # source://activejob//lib/active_job/test_helper.rb#31 - def enable_test_adapter(test_adapter); end - - # source://activejob//lib/active_job/test_helper.rb#23 - def queue_adapter; end -end - -# source://activejob//lib/active_job/timezones.rb#4 -module ActiveJob::Timezones - extend ::ActiveSupport::Concern -end - -# source://activejob//lib/active_job/translation.rb#4 -module ActiveJob::Translation - extend ::ActiveSupport::Concern -end - -# source://activejob//lib/active_job/gem_version.rb#9 -module ActiveJob::VERSION; end - -# source://activejob//lib/active_job/gem_version.rb#10 -ActiveJob::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) - -# source://activejob//lib/active_job/gem_version.rb#11 -ActiveJob::VERSION::MINOR = T.let(T.unsafe(nil), Integer) - -# source://activejob//lib/active_job/gem_version.rb#13 -ActiveJob::VERSION::PRE = T.let(T.unsafe(nil), String) - -# source://activejob//lib/active_job/gem_version.rb#15 -ActiveJob::VERSION::STRING = T.let(T.unsafe(nil), String) - -# source://activejob//lib/active_job/gem_version.rb#12 -ActiveJob::VERSION::TINY = T.let(T.unsafe(nil), Integer) diff --git a/sorbet/rbi/gems/activemodel@7.0.4.2.rbi b/sorbet/rbi/gems/activemodel@7.0.4.2.rbi deleted file mode 100644 index a217eb6..0000000 --- a/sorbet/rbi/gems/activemodel@7.0.4.2.rbi +++ /dev/null @@ -1,6018 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `activemodel` gem. -# Please instead update this file by running `bin/tapioca gem activemodel`. - -# source://activemodel//lib/active_model/gem_version.rb#3 -module ActiveModel - extend ::ActiveSupport::Autoload - - class << self - # source://activemodel//lib/active_model.rb#71 - def eager_load!; end - - # 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. - # - # source://activemodel//lib/active_model/version.rb#7 - def version; end - end -end - -# == Active \Model \API -# -# Includes the required interface for an object to interact with -# 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. -# -# A minimal implementation could be: -# -# class Person -# include ActiveModel::API -# attr_accessor :name, :age -# end -# -# person = Person.new(name: 'bob', age: '18') -# person.name # => "bob" -# person.age # => "18" -# -# 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: -# -# class Person -# include ActiveModel::API -# attr_accessor :id, :name -# -# def persisted? -# self.id.present? -# end -# end -# -# person = Person.new(id: 1, name: 'bob') -# person.persisted? # => true -# -# Also, if for some reason you need to run code on initialize, make -# sure you call +super+ if you want the attributes hash initialization to -# happen. -# -# class Person -# include ActiveModel::API -# attr_accessor :id, :name, :omg -# -# def initialize(attributes={}) -# super -# @omg ||= true -# end -# end -# -# person = Person.new(id: 1, name: 'bob') -# person.omg # => true -# -# For more detailed information on other functionalities available, please -# refer to the specific modules included in ActiveModel::API -# (see below). -# -# source://activemodel//lib/active_model/api.rb#59 -module ActiveModel::API - include ::ActiveModel::ForbiddenAttributesProtection - include ::ActiveModel::AttributeAssignment - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - include ::ActiveSupport::Callbacks - include ::ActiveModel::Validations::HelperMethods - include ::ActiveModel::Validations - include ::ActiveModel::Conversion - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveModel::Validations::ClassMethods - mixes_in_class_methods ::ActiveModel::Callbacks - mixes_in_class_methods ::ActiveSupport::Callbacks::ClassMethods - mixes_in_class_methods ::ActiveSupport::DescendantsTracker - mixes_in_class_methods ::ActiveModel::Translation - mixes_in_class_methods ::ActiveModel::Validations::HelperMethods - mixes_in_class_methods ::ActiveModel::Conversion::ClassMethods - - # Initializes a new model with the given +params+. - # - # class Person - # include ActiveModel::API - # attr_accessor :name, :age - # end - # - # person = Person.new(name: 'bob', age: '18') - # person.name # => "bob" - # person.age # => "18" - # - # source://activemodel//lib/active_model/api.rb#80 - def initialize(attributes = T.unsafe(nil)); end - - # Indicates if the model is persisted. Default is +false+. - # - # class Person - # include ActiveModel::API - # attr_accessor :id, :name - # end - # - # person = Person.new(id: 1, name: 'bob') - # person.persisted? # => false - # - # @return [Boolean] - # - # source://activemodel//lib/active_model/api.rb#95 - def persisted?; end - - module GeneratedClassMethods - def __callbacks; end - def __callbacks=(value); end - def __callbacks?; end - def _validators; end - def _validators=(value); end - def _validators?; end - end - - module GeneratedInstanceMethods - def __callbacks; end - def __callbacks?; end - def _validators; end - def _validators?; end - end -end - -# source://activemodel//lib/active_model/attribute.rb#6 -class ActiveModel::Attribute - # This method should not be called directly. - # Use #from_database or #from_user - # - # @return [Attribute] a new instance of 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 - def ==(other); end - - # @return [Boolean] - # - # source://activemodel//lib/active_model/attribute.rb#104 - def came_from_user?; end - - # @return [Boolean] - # - # source://activemodel//lib/active_model/attribute.rb#63 - def changed?; end - - # @return [Boolean] - # - # source://activemodel//lib/active_model/attribute.rb#67 - def changed_in_place?; end - - # source://activemodel//lib/active_model/attribute.rb#132 - def encode_with(coder); end - - # source://activemodel//lib/active_model/attribute.rb#112 - def eql?(other); end - - # source://activemodel//lib/active_model/attribute.rb#71 - def forgetting_assignment; end - - # @return [Boolean] - # - # source://activemodel//lib/active_model/attribute.rb#108 - def has_been_read?; end - - # source://activemodel//lib/active_model/attribute.rb#120 - def hash; end - - # source://activemodel//lib/active_model/attribute.rb#124 - def init_with(coder); end - - # @return [Boolean] - # - # source://activemodel//lib/active_model/attribute.rb#100 - def initialized?; end - - # Returns the value of attribute name. - # - # source://activemodel//lib/active_model/attribute.rb#29 - def name; end - - # source://activemodel//lib/active_model/attribute.rb#47 - def original_value; end - - # source://activemodel//lib/active_model/attribute.rb#140 - def original_value_for_database; end - - # @return [Boolean] - # - # source://activemodel//lib/active_model/attribute.rb#59 - def serializable?(&block); end - - # Returns the value of attribute type. - # - # source://activemodel//lib/active_model/attribute.rb#29 - def type; end - - # @raise [NotImplementedError] - # - # source://activemodel//lib/active_model/attribute.rb#96 - def type_cast(*_arg0); end - - # source://activemodel//lib/active_model/attribute.rb#41 - def value; end - - # Returns the value of attribute value_before_type_cast. - # - # source://activemodel//lib/active_model/attribute.rb#29 - def value_before_type_cast; end - - # source://activemodel//lib/active_model/attribute.rb#55 - def value_for_database; end - - # source://activemodel//lib/active_model/attribute.rb#84 - def with_cast_value(value); end - - # source://activemodel//lib/active_model/attribute.rb#88 - def with_type(type); end - - # source://activemodel//lib/active_model/attribute.rb#80 - def with_value_from_database(value); end - - # source://activemodel//lib/active_model/attribute.rb#75 - def with_value_from_user(value); end - - private - - # source://activemodel//lib/active_model/attribute.rb#162 - def _original_value_for_database; end - - # Returns the value of attribute original_attribute. - # - # source://activemodel//lib/active_model/attribute.rb#149 - def assigned?; end - - # @return [Boolean] - # - # source://activemodel//lib/active_model/attribute.rb#158 - def changed_from_assignment?; end - - # source://activemodel//lib/active_model/attribute.rb#152 - def initialize_dup(other); end - - # Returns the value of attribute original_attribute. - # - # source://activemodel//lib/active_model/attribute.rb#149 - def original_attribute; end - - class << self - # source://activemodel//lib/active_model/attribute.rb#8 - def from_database(name, value_before_type_cast, type, value = T.unsafe(nil)); end - - # source://activemodel//lib/active_model/attribute.rb#12 - def from_user(name, value_before_type_cast, type, original_attribute = T.unsafe(nil)); end - - # source://activemodel//lib/active_model/attribute.rb#20 - def null(name); end - - # source://activemodel//lib/active_model/attribute.rb#24 - def uninitialized(name, type); end - - # source://activemodel//lib/active_model/attribute.rb#16 - def with_cast_value(name, value_before_type_cast, type); end - end -end - -# source://activemodel//lib/active_model/attribute.rb#166 -class ActiveModel::Attribute::FromDatabase < ::ActiveModel::Attribute - # source://activemodel//lib/active_model/attribute.rb#167 - def type_cast(value); end - - private - - # source://activemodel//lib/active_model/attribute.rb#172 - def _original_value_for_database; end -end - -# source://activemodel//lib/active_model/attribute.rb#177 -class ActiveModel::Attribute::FromUser < ::ActiveModel::Attribute - # @return [Boolean] - # - # source://activemodel//lib/active_model/attribute.rb#182 - def came_from_user?; end - - # source://activemodel//lib/active_model/attribute.rb#178 - def type_cast(value); end -end - -# source://activemodel//lib/active_model/attribute.rb#197 -class ActiveModel::Attribute::Null < ::ActiveModel::Attribute - # @return [Null] a new instance of Null - # - # source://activemodel//lib/active_model/attribute.rb#198 - def initialize(name); end - - # source://activemodel//lib/active_model/attribute.rb#202 - def type_cast(*_arg0); end - - # @raise [ActiveModel::MissingAttributeError] - # - # source://activemodel//lib/active_model/attribute.rb#210 - def with_cast_value(value); end - - # source://activemodel//lib/active_model/attribute.rb#206 - def with_type(type); end - - # @raise [ActiveModel::MissingAttributeError] - # - # source://activemodel//lib/active_model/attribute.rb#210 - def with_value_from_database(value); end - - # @raise [ActiveModel::MissingAttributeError] - # - # source://activemodel//lib/active_model/attribute.rb#210 - def with_value_from_user(value); end -end - -# source://activemodel//lib/active_model/attribute.rb#217 -class ActiveModel::Attribute::Uninitialized < ::ActiveModel::Attribute - # @return [Uninitialized] a new instance of Uninitialized - # - # source://activemodel//lib/active_model/attribute.rb#220 - def initialize(name, type); end - - # source://activemodel//lib/active_model/attribute.rb#241 - def forgetting_assignment; end - - # @return [Boolean] - # - # source://activemodel//lib/active_model/attribute.rb#237 - def initialized?; end - - # source://activemodel//lib/active_model/attribute.rb#230 - def original_value; end - - # source://activemodel//lib/active_model/attribute.rb#224 - def value; end - - # source://activemodel//lib/active_model/attribute.rb#234 - def value_for_database; end - - # source://activemodel//lib/active_model/attribute.rb#245 - def with_type(type); end -end - -# source://activemodel//lib/active_model/attribute.rb#218 -ActiveModel::Attribute::Uninitialized::UNINITIALIZED_ORIGINAL_VALUE = T.let(T.unsafe(nil), Object) - -# source://activemodel//lib/active_model/attribute/user_provided_default.rb#7 -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 - def initialize(name, value, type, database_default); end - - # source://activemodel//lib/active_model/attribute/user_provided_default.rb#25 - def marshal_dump; end - - # source://activemodel//lib/active_model/attribute/user_provided_default.rb#36 - def marshal_load(values); end - - # source://activemodel//lib/active_model/attribute/user_provided_default.rb#13 - def value_before_type_cast; end - - # source://activemodel//lib/active_model/attribute/user_provided_default.rb#21 - 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 - def user_provided_value; end -end - -# source://activemodel//lib/active_model/attribute.rb#187 -class ActiveModel::Attribute::WithCastValue < ::ActiveModel::Attribute - # @return [Boolean] - # - # source://activemodel//lib/active_model/attribute.rb#192 - def changed_in_place?; end - - # source://activemodel//lib/active_model/attribute.rb#188 - def type_cast(value); end -end - -# source://activemodel//lib/active_model/attribute_assignment.rb#6 -module ActiveModel::AttributeAssignment - include ::ActiveModel::ForbiddenAttributesProtection - - # Allows you to set all the attributes by passing in a hash of attributes with - # 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 - # exception is raised. - # - # class Cat - # include ActiveModel::AttributeAssignment - # attr_accessor :name, :status - # end - # - # cat = Cat.new - # cat.assign_attributes(name: "Gorby", status: "yawning") - # cat.name # => 'Gorby' - # cat.status # => 'yawning' - # cat.assign_attributes(status: "sleeping") - # cat.name # => 'Gorby' - # cat.status # => 'sleeping' - # - # source://activemodel//lib/active_model/attribute_assignment.rb#28 - def assign_attributes(new_attributes); end - - # Allows you to set all the attributes by passing in a hash of attributes with - # 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 - # exception is raised. - # - # class Cat - # include ActiveModel::AttributeAssignment - # attr_accessor :name, :status - # end - # - # cat = Cat.new - # cat.assign_attributes(name: "Gorby", status: "yawning") - # cat.name # => 'Gorby' - # cat.status # => 'yawning' - # cat.assign_attributes(status: "sleeping") - # cat.name # => 'Gorby' - # cat.status # => 'sleeping' - # - # source://activemodel//lib/active_model/attribute_assignment.rb#28 - def attributes=(new_attributes); end - - private - - # source://activemodel//lib/active_model/attribute_assignment.rb#46 - def _assign_attribute(k, v); end - - # source://activemodel//lib/active_model/attribute_assignment.rb#40 - def _assign_attributes(attributes); end -end - -# == 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 -# class methods such as +table_name+. -# -# 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+ -# or +attribute_method_prefix+. -# * Call +define_attribute_methods+ after the other methods are called. -# * Define the various generic +_attribute+ methods that you have declared. -# * Define an +attributes+ method which returns a hash with each -# attribute name in your model as hash key and the attribute value as hash value. -# Hash keys must be strings. -# -# A minimal implementation could be: -# -# class Person -# include ActiveModel::AttributeMethods -# -# attribute_method_affix prefix: 'reset_', suffix: '_to_default!' -# attribute_method_suffix '_contrived?' -# attribute_method_prefix 'clear_' -# define_attribute_methods :name -# -# attr_accessor :name -# -# def attributes -# { 'name' => @name } -# end -# -# private -# -# def attribute_contrived?(attr) -# true -# end -# -# def clear_attribute(attr) -# send("#{attr}=", nil) -# end -# -# def reset_attribute_to_default!(attr) -# send("#{attr}=", 'Default Name') -# end -# end -# -# source://activemodel//lib/active_model/attribute_methods.rb#65 -module ActiveModel::AttributeMethods - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveModel::AttributeMethods::ClassMethods - - # +attribute_missing+ is like +method_missing+, but for attributes. When - # +method_missing+ is called we check to see if there is a matching - # 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#467 - def attribute_missing(match, *args, **_arg2, &block); end - - # Allows access to the object attributes, which are held in the hash - # returned by attributes, as though they were first-class - # methods. So a +Person+ class with a +name+ attribute can for example use - # Person#name and Person#name= and never directly use - # the attributes hash -- except for multiple assignments with - # ActiveRecord::Base#attributes=. - # - # It's also possible to instantiate related objects, so a Client - # 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#453 - def method_missing(method, *args, **_arg2, &block); end - - # @return [Boolean] - # - # source://activemodel//lib/active_model/attribute_methods.rb#476 - def respond_to?(method, include_private_methods = T.unsafe(nil)); end - - # A +Person+ instance with a +name+ attribute can ask - # person.respond_to?(:name), person.respond_to?(:name=), - # and person.respond_to?(:name?) which will all return +true+. - def respond_to_without_attributes?(*_arg0); end - - private - - # source://activemodel//lib/active_model/attribute_methods.rb#504 - def _read_attribute(attr); end - - # @return [Boolean] - # - # source://activemodel//lib/active_model/attribute_methods.rb#489 - 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#495 - def matched_attribute_method(method_name); end - - # @raise [ActiveModel::MissingAttributeError] - # - # source://activemodel//lib/active_model/attribute_methods.rb#500 - 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 - end - - module GeneratedInstanceMethods - def attribute_aliases; end - def attribute_aliases?; end - def attribute_method_matchers; end - def attribute_method_matchers?; end - end -end - -# source://activemodel//lib/active_model/attribute_methods.rb#508 -module ActiveModel::AttributeMethods::AttrNames - class << self - # We want to generate the methods via module_eval rather than - # define_method, because define_method is slower on dispatch. - # - # But sometimes the database might return columns with - # characters that are not allowed in normal method names (like - # 'my_column(omg)'. So to work around this we first define with - # the __temp__ identifier, and then use alias method to rename - # it to what we want. - # - # We are also defining a constant to hold the frozen string of - # the attribute name. Using a constant means that we do not have - # to allocate an object on each call to the attribute method. - # 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#525 - def define_attribute_accessor_method(owner, attr_name, writer: T.unsafe(nil)); end - end -end - -# source://activemodel//lib/active_model/attribute_methods.rb#509 -ActiveModel::AttributeMethods::AttrNames::DEF_SAFE_NAME = T.let(T.unsafe(nil), Regexp) - -# source://activemodel//lib/active_model/attribute_methods.rb#69 -ActiveModel::AttributeMethods::CALL_COMPILABLE_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://activemodel//lib/active_model/attribute_methods.rb#77 -module ActiveModel::AttributeMethods::ClassMethods - # Allows you to make aliases for attributes. - # - # class Person - # include ActiveModel::AttributeMethods - # - # attr_accessor :name - # attribute_method_suffix '_short?' - # define_attribute_methods :name - # - # alias_attribute :nickname, :name - # - # private - # - # def attribute_short?(attr) - # send(attr).length < 5 - # end - # end - # - # person = Person.new - # person.name = 'Bob' - # person.name # => "Bob" - # person.nickname # => "Bob" - # person.name_short? # => true - # person.nickname_short? # => true - # - # source://activemodel//lib/active_model/attribute_methods.rb#209 - def alias_attribute(new_name, old_name); end - - # Returns the original name for the alias +name+ - # - # source://activemodel//lib/active_model/attribute_methods.rb#248 - def attribute_alias(name); end - - # Is +new_name+ an alias? - # - # @return [Boolean] - # - # source://activemodel//lib/active_model/attribute_methods.rb#243 - def attribute_alias?(new_name); end - - # Declares a method available for all attributes with the given prefix - # and suffix. Uses +method_missing+ and respond_to? to rewrite - # the method. - # - # #{prefix}#{attr}#{suffix}(*args, &block) - # - # to - # - # #{prefix}attribute#{suffix}(#{attr}, *args, &block) - # - # An #{prefix}attribute#{suffix} instance method must exist and - # accept at least the +attr+ argument. - # - # class Person - # include ActiveModel::AttributeMethods - # - # attr_accessor :name - # attribute_method_affix prefix: 'reset_', suffix: '_to_default!' - # define_attribute_methods :name - # - # private - # - # def reset_attribute_to_default!(attr) - # send("#{attr}=", 'Default Name') - # end - # end - # - # person = Person.new - # person.name # => 'Gem' - # person.reset_name_to_default! - # person.name # => 'Default Name' - # - # source://activemodel//lib/active_model/attribute_methods.rb#180 - def attribute_method_affix(*affixes); end - - # Declares a method available for all attributes with the given prefix. - # Uses +method_missing+ and respond_to? to rewrite the method. - # - # #{prefix}#{attr}(*args, &block) - # - # to - # - # #{prefix}attribute(#{attr}, *args, &block) - # - # An instance method #{prefix}attribute must exist and accept - # at least the +attr+ argument. - # - # class Person - # include ActiveModel::AttributeMethods - # - # attr_accessor :name - # attribute_method_prefix 'clear_' - # define_attribute_methods :name - # - # private - # - # def clear_attribute(attr) - # send("#{attr}=", nil) - # end - # end - # - # person = Person.new - # person.name = 'Bob' - # person.name # => "Bob" - # person.clear_name - # person.name # => nil - # - # source://activemodel//lib/active_model/attribute_methods.rb#109 - def attribute_method_prefix(*prefixes, parameters: T.unsafe(nil)); end - - # Declares a method available for all attributes with the given suffix. - # Uses +method_missing+ and respond_to? to rewrite the method. - # - # #{attr}#{suffix}(*args, &block) - # - # to - # - # attribute#{suffix}(#{attr}, *args, &block) - # - # An attribute#{suffix} instance method must exist and accept at - # least the +attr+ argument. - # - # class Person - # include ActiveModel::AttributeMethods - # - # attr_accessor :name - # attribute_method_suffix '_short?' - # define_attribute_methods :name - # - # private - # - # def attribute_short?(attr) - # send(attr).length < 5 - # end - # end - # - # person = Person.new - # person.name = 'Bob' - # person.name # => "Bob" - # person.name_short? # => true - # - # source://activemodel//lib/active_model/attribute_methods.rb#144 - def attribute_method_suffix(*suffixes, parameters: T.unsafe(nil)); end - - # Declares an attribute that should be prefixed and suffixed by - # 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 - # method, or they will not hook in. - # - # class Person - # include ActiveModel::AttributeMethods - # - # attr_accessor :name - # attribute_method_suffix '_short?' - # - # # Call to define_attribute_method must appear after the - # # attribute_method_prefix, attribute_method_suffix or - # # attribute_method_affix declarations. - # define_attribute_method :name - # - # private - # - # def attribute_short?(attr) - # send(attr).length < 5 - # end - # end - # - # person = Person.new - # person.name = 'Bob' - # person.name # => "Bob" - # person.name_short? # => true - # - # source://activemodel//lib/active_model/attribute_methods.rb#311 - def define_attribute_method(attr_name, _owner: T.unsafe(nil)); end - - # Declares the attributes that should be prefixed and suffixed by - # 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 - # methods, or they will not hook in. - # - # class Person - # include ActiveModel::AttributeMethods - # - # attr_accessor :name, :age, :address - # attribute_method_prefix 'clear_' - # - # # Call to define_attribute_methods must appear after the - # # attribute_method_prefix, attribute_method_suffix or - # # attribute_method_affix declarations. - # define_attribute_methods :name, :age, :address - # - # private - # - # def clear_attribute(attr) - # send("#{attr}=", nil) - # end - # end - # - # source://activemodel//lib/active_model/attribute_methods.rb#276 - def define_attribute_methods(*attr_names); end - - # Removes all the previously dynamically defined methods from the class. - # - # class Person - # include ActiveModel::AttributeMethods - # - # attr_accessor :name - # attribute_method_suffix '_short?' - # define_attribute_method :name - # - # private - # - # def attribute_short?(attr) - # send(attr).length < 5 - # end - # end - # - # person = Person.new - # person.name = 'Bob' - # person.name_short? # => true - # - # Person.undefine_attribute_methods - # - # person.name_short? # => NoMethodError - # - # source://activemodel//lib/active_model/attribute_methods.rb#353 - def undefine_attribute_methods; end - - private - - # The methods +method_missing+ and +respond_to?+ of this module are - # invoked often in a typical rails, both of which invoke the method - # +matched_attribute_method+. The latter method iterates through an - # array doing regular expression matches, which results in a lot of - # object creations. Most of the time it returns a +nil+ match. As the - # match result is always the same given a +method_name+, this cache is - # used to alleviate the GC, which ultimately also speeds up the app - # significantly (in our case our test suite finishes 10% faster with - # this cache). - # - # source://activemodel//lib/active_model/attribute_methods.rb#378 - def attribute_method_matchers_cache; end - - # source://activemodel//lib/active_model/attribute_methods.rb#382 - def attribute_method_matchers_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#391 - def define_proxy_call(code_generator, name, target, parameters, *call_args, namespace:); end - - # source://activemodel//lib/active_model/attribute_methods.rb#361 - def generated_attribute_methods; end - - # @return [Boolean] - # - # source://activemodel//lib/active_model/attribute_methods.rb#365 - def instance_method_already_implemented?(method_name); end -end - -# source://activemodel//lib/active_model/attribute_methods.rb#417 -class ActiveModel::AttributeMethods::ClassMethods::AttributeMethodMatcher - # @return [AttributeMethodMatcher] a new instance of AttributeMethodMatcher - # - # source://activemodel//lib/active_model/attribute_methods.rb#422 - def initialize(prefix: T.unsafe(nil), suffix: T.unsafe(nil), parameters: T.unsafe(nil)); end - - # source://activemodel//lib/active_model/attribute_methods.rb#431 - def match(method_name); end - - # source://activemodel//lib/active_model/attribute_methods.rb#437 - def method_name(attr_name); end - - # Returns the value of attribute parameters. - # - # source://activemodel//lib/active_model/attribute_methods.rb#418 - def parameters; end - - # Returns the value of attribute prefix. - # - # source://activemodel//lib/active_model/attribute_methods.rb#418 - def prefix; end - - # Returns the value of attribute suffix. - # - # source://activemodel//lib/active_model/attribute_methods.rb#418 - def suffix; end - - # Returns the value of attribute target. - # - # source://activemodel//lib/active_model/attribute_methods.rb#418 - def target; end -end - -# source://activemodel//lib/active_model/attribute_methods.rb#420 -class ActiveModel::AttributeMethods::ClassMethods::AttributeMethodMatcher::AttributeMethodMatch < ::Struct - # Returns the value of attribute attr_name - # - # @return [Object] the current value of attr_name - def attr_name; end - - # Sets the attribute attr_name - # - # @param value [Object] the value to set the attribute attr_name to. - # @return [Object] the newly set value - def attr_name=(_); 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://activemodel//lib/active_model/attribute_methods.rb#70 -ActiveModel::AttributeMethods::FORWARD_PARAMETERS = T.let(T.unsafe(nil), String) - -# source://activemodel//lib/active_model/attribute_methods.rb#68 -ActiveModel::AttributeMethods::NAME_COMPILABLE_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://activemodel//lib/active_model/attribute_mutation_tracker.rb#7 -class ActiveModel::AttributeMutationTracker - # @return [AttributeMutationTracker] a new instance of AttributeMutationTracker - # - # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#10 - def initialize(attributes); end - - # @return [Boolean] - # - # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#40 - def any_changes?; end - - # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#34 - def change_to_attribute(attr_name); end - - # @return [Boolean] - # - # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#44 - def changed?(attr_name, from: T.unsafe(nil), to: T.unsafe(nil)); end - - # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#14 - def changed_attribute_names; end - - # @return [Boolean] - # - # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#50 - def changed_in_place?(attr_name); end - - # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#18 - def changed_values; end - - # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#26 - def changes; end - - # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#63 - def force_change(attr_name); end - - # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#54 - def forget_change(attr_name); end - - # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#59 - def original_value(attr_name); end - - private - - # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#74 - def attr_names; end - - # @return [Boolean] - # - # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#78 - def attribute_changed?(attr_name); end - - # Returns the value of attribute attributes. - # - # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#68 - def attributes; end - - # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#82 - def fetch_value(attr_name); end - - # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#70 - def forced_changes; end -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_set/builder.rb#6 -class ActiveModel::AttributeSet - # @return [AttributeSet] a new instance of AttributeSet - # - # source://activemodel//lib/active_model/attribute_set.rb#12 - def initialize(attributes); end - - # source://activemodel//lib/active_model/attribute_set.rb#97 - def ==(other); end - - # source://activemodel//lib/active_model/attribute_set.rb#16 - def [](name); end - - # source://activemodel//lib/active_model/attribute_set.rb#20 - def []=(name, value); end - - # source://activemodel//lib/active_model/attribute_set.rb#88 - def accessed; end - - # source://activemodel//lib/active_model/attribute_set.rb#68 - def deep_dup; end - - # source://activemodel//lib/active_model/attribute_set.rb#10 - def each_value(*_arg0, **_arg1, &_arg2); end - - # source://activemodel//lib/active_model/attribute_set.rb#10 - def except(*_arg0, **_arg1, &_arg2); end - - # source://activemodel//lib/active_model/attribute_set.rb#10 - def fetch(*_arg0, **_arg1, &_arg2); end - - # source://activemodel//lib/active_model/attribute_set.rb#45 - def fetch_value(name, &block); end - - # source://activemodel//lib/active_model/attribute_set.rb#63 - 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 keys; end - - # source://activemodel//lib/active_model/attribute_set.rb#92 - def map(&block); end - - # source://activemodel//lib/active_model/attribute_set.rb#82 - def reset(key); end - - # source://activemodel//lib/active_model/attribute_set.rb#32 - def to_h; end - - # source://activemodel//lib/active_model/attribute_set.rb#32 - def to_hash; end - - # source://activemodel//lib/active_model/attribute_set.rb#24 - def values_before_type_cast; end - - # source://activemodel//lib/active_model/attribute_set.rb#28 - def values_for_database; end - - # source://activemodel//lib/active_model/attribute_set.rb#59 - def write_cast_value(name, value); end - - # source://activemodel//lib/active_model/attribute_set.rb#49 - def write_from_database(name, value); end - - # @raise [FrozenError] - # - # source://activemodel//lib/active_model/attribute_set.rb#53 - def write_from_user(name, value); end - - protected - - # Returns the value of attribute attributes. - # - # source://activemodel//lib/active_model/attribute_set.rb#102 - def attributes; end - - private - - # source://activemodel//lib/active_model/attribute_set.rb#105 - def default_attribute(name); end - - # source://activemodel//lib/active_model/attribute_set.rb#77 - def initialize_clone(_); end - - # source://activemodel//lib/active_model/attribute_set.rb#72 - def initialize_dup(_); end -end - -# source://activemodel//lib/active_model/attribute_set/builder.rb#7 -class ActiveModel::AttributeSet::Builder - # @return [Builder] a new instance of Builder - # - # source://activemodel//lib/active_model/attribute_set/builder.rb#10 - def initialize(types, default_attributes = T.unsafe(nil)); end - - # source://activemodel//lib/active_model/attribute_set/builder.rb#15 - def build_from_database(values = T.unsafe(nil), additional_types = T.unsafe(nil)); end - - # Returns the value of attribute default_attributes. - # - # source://activemodel//lib/active_model/attribute_set/builder.rb#8 - def default_attributes; end - - # Returns the value of attribute types. - # - # source://activemodel//lib/active_model/attribute_set/builder.rb#8 - def types; end -end - -# Attempts to do more intelligent YAML dumping of an -# ActiveModel::AttributeSet to reduce the size of the resulting string -# -# source://activemodel//lib/active_model/attribute_set/yaml_encoder.rb#7 -class ActiveModel::AttributeSet::YAMLEncoder - # @return [YAMLEncoder] a new instance of YAMLEncoder - # - # source://activemodel//lib/active_model/attribute_set/yaml_encoder.rb#8 - def initialize(default_types); end - - # source://activemodel//lib/active_model/attribute_set/yaml_encoder.rb#22 - def decode(coder); end - - # source://activemodel//lib/active_model/attribute_set/yaml_encoder.rb#12 - def encode(attribute_set, coder); end - - private - - # Returns the value of attribute default_types. - # - # source://activemodel//lib/active_model/attribute_set/yaml_encoder.rb#37 - def default_types; end -end - -# source://activemodel//lib/active_model/attributes.rb#7 -module ActiveModel::Attributes - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - include ::ActiveModel::AttributeMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveModel::AttributeMethods::ClassMethods - mixes_in_class_methods ::ActiveModel::Attributes::ClassMethods - - # source://activemodel//lib/active_model/attributes.rb#78 - def initialize(*_arg0); end - - # Returns an array of attribute names as strings - # - # class Person - # include ActiveModel::Attributes - # - # attribute :name, :string - # attribute :age, :integer - # end - # - # person = Person.new - # person.attribute_names - # # => ["name", "age"] - # - # source://activemodel//lib/active_model/attributes.rb#116 - def attribute_names; end - - # 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 - # - # attribute :name, :string - # attribute :age, :integer - # end - # - # person = Person.new(name: 'Francesco', age: 22) - # person.attributes - # # => {"name"=>"Francesco", "age"=>22} - # - # source://activemodel//lib/active_model/attributes.rb#100 - def attributes; end - - # source://activemodel//lib/active_model/attributes.rb#120 - def freeze; end - - private - - # source://activemodel//lib/active_model/attributes.rb#126 - def _write_attribute(attr_name, value); end - - # source://activemodel//lib/active_model/attributes.rb#131 - def attribute(attr_name); end - - # source://activemodel//lib/active_model/attributes.rb#126 - def attribute=(attr_name, value); end - - # source://activemodel//lib/active_model/attributes.rb#83 - 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 - end - - module GeneratedInstanceMethods - def attribute_aliases; end - def attribute_aliases?; end - def attribute_method_matchers; end - def attribute_method_matchers?; end - end -end - -# source://activemodel//lib/active_model/attributes.rb#18 -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 - - # Returns an array of attribute names as strings - # - # class Person - # include ActiveModel::Attributes - # - # attribute :name, :string - # attribute :age, :integer - # end - # - # Person.attribute_names - # # => ["name", "age"] - # - # source://activemodel//lib/active_model/attributes.rb#41 - 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 - 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 -class ActiveModel::BlockValidator < ::ActiveModel::EachValidator - # @return [BlockValidator] a new instance of BlockValidator - # - # source://activemodel//lib/active_model/validator.rb#178 - def initialize(options, &block); end - - private - - # source://activemodel//lib/active_model/validator.rb#184 - def validate_each(record, attribute, value); end -end - -# == 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: -# -# class MyModel -# extend ActiveModel::Callbacks -# end -# -# Then define a list of methods that you want callbacks attached to: -# -# define_model_callbacks :create, :update -# -# This will provide all three standard callbacks (before, around and after) -# for both the :create and :update methods. To implement, -# you need to wrap the methods you want callbacks on in a block so that the -# callbacks get a chance to fire: -# -# def create -# run_callbacks :create do -# # Your create action methods here -# end -# end -# -# Then in your class, you can use the +before_create+, +after_create+, and -# +around_create+ methods, just as you would in an Active Record model. -# -# before_create :action_before_create -# -# def action_before_create -# # Your code here -# end -# -# When defining an around callback remember to yield to the block, otherwise -# it won't be executed: -# -# around_create :log_status -# -# def log_status -# puts 'going to call the block...' -# yield -# puts 'block successfully called.' -# end -# -# You can choose to have only specific callbacks by passing a hash to the -# +define_model_callbacks+ method. -# -# define_model_callbacks :create, only: [:after, :before] -# -# Would only create the +after_create+ and +before_create+ callback methods in -# your class. -# -# NOTE: Calling the same callback multiple times will overwrite previous callback definitions. -# -# source://activemodel//lib/active_model/callbacks.rb#65 -module ActiveModel::Callbacks - # 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. - # - # define_model_callbacks :initializer, 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 - # method as many times as you need. - # - # define_model_callbacks :create, only: :after - # define_model_callbacks :update, only: :before - # define_model_callbacks :destroy, only: :around - # - # Would create +after_create+, +before_update+, and +around_destroy+ methods - # only. - # - # You can pass in a class to before_, after_ and around_, - # in which case the callback will call that class's _ method - # passing the object that the callback is being called on. - # - # class MyModel - # extend ActiveModel::Callbacks - # define_model_callbacks :create - # - # before_create AnotherClass - # end - # - # class AnotherClass - # def self.before_create( obj ) - # # obj is the MyModel instance that the callback is being called on - # end - # end - # - # NOTE: +method_name+ passed to define_model_callbacks must not end with - # !, ? or =. - # - # source://activemodel//lib/active_model/callbacks.rb#109 - def define_model_callbacks(*callbacks); end - - private - - # source://activemodel//lib/active_model/callbacks.rb#143 - def _define_after_model_callback(klass, callback); end - - # source://activemodel//lib/active_model/callbacks.rb#136 - def _define_around_model_callback(klass, callback); end - - # source://activemodel//lib/active_model/callbacks.rb#129 - def _define_before_model_callback(klass, callback); end - - class << self - # source://activemodel//lib/active_model/callbacks.rb#66 - def extended(base); end - end -end - -# == Active \Model \Conversion -# -# Handles default conversions: to_model, to_key, to_param, and to_partial_path. -# -# Let's take for example this non-persisted object. -# -# class ContactMessage -# include ActiveModel::Conversion -# -# # ContactMessage are never persisted in the DB -# def persisted? -# false -# end -# end -# -# cm = ContactMessage.new -# cm.to_model == cm # => true -# cm.to_key # => nil -# cm.to_param # => nil -# cm.to_partial_path # => "contact_messages/contact_message" -# -# source://activemodel//lib/active_model/conversion.rb#24 -module ActiveModel::Conversion - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActiveModel::Conversion::ClassMethods - - # Returns an Array of all key attributes if any of the attributes is set, whether or not - # the object is persisted. Returns +nil+ if there are no key attributes. - # - # class Person - # include ActiveModel::Conversion - # attr_accessor :id - # - # def initialize(id) - # @id = id - # end - # end - # - # person = Person.new(1) - # person.to_key # => [1] - # - # source://activemodel//lib/active_model/conversion.rb#59 - def to_key; end - - # If your object is already designed to implement all of the \Active \Model - # you can use the default :to_model implementation, which simply - # returns +self+. - # - # class Person - # include ActiveModel::Conversion - # end - # - # person = Person.new - # person.to_model == person # => true - # - # If your model does not act like an \Active \Model object, then you should - # 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 - def to_model; end - - # Returns a +string+ representing the object's key suitable for use in URLs, - # or +nil+ if persisted? is +false+. - # - # class Person - # include ActiveModel::Conversion - # attr_accessor :id - # - # def initialize(id) - # @id = id - # end - # - # def persisted? - # true - # end - # end - # - # person = Person.new(1) - # person.to_param # => "1" - # - # source://activemodel//lib/active_model/conversion.rb#82 - def to_param; end - - # Returns a +string+ identifying the path associated with the object. - # ActionPack uses this to find a suitable partial to represent the object. - # - # class Person - # include ActiveModel::Conversion - # end - # - # person = Person.new - # person.to_partial_path # => "people/person" - # - # source://activemodel//lib/active_model/conversion.rb#95 - def to_partial_path; end -end - -# source://activemodel//lib/active_model/conversion.rb#99 -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 - def _to_partial_path; end -end - -# == Active \Model \Dirty -# -# Provides a way to track changes in your object in the same way as -# Active Record does. -# -# The requirements for implementing ActiveModel::Dirty are: -# -# * 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 changes_applied after the changes are persisted. -# * Call clear_changes_information when you want to reset the changes -# information. -# * Call restore_attributes when you want to restore previous data. -# -# A minimal implementation could be: -# -# class Person -# include ActiveModel::Dirty -# -# define_attribute_methods :name -# -# def initialize -# @name = nil -# end -# -# def name -# @name -# end -# -# def name=(val) -# name_will_change! unless val == @name -# @name = val -# end -# -# def save -# # do persistence work -# -# changes_applied -# end -# -# def reload! -# # get the values from the persistence layer -# -# clear_changes_information -# end -# -# def rollback! -# restore_attributes -# end -# end -# -# A newly instantiated +Person+ object is unchanged: -# -# person = Person.new -# person.changed? # => false -# -# Change the name: -# -# person.name = 'Bob' -# person.changed? # => true -# person.name_changed? # => true -# person.name_changed?(from: nil, to: "Bob") # => true -# person.name_was # => nil -# person.name_change # => [nil, "Bob"] -# person.name = 'Bill' -# person.name_change # => [nil, "Bill"] -# -# Save the changes: -# -# person.save -# person.changed? # => false -# person.name_changed? # => false -# -# Reset the changes: -# -# person.previous_changes # => {"name" => [nil, "Bill"]} -# person.name_previously_changed? # => true -# person.name_previously_changed?(from: nil, to: "Bill") # => true -# person.name_previous_change # => [nil, "Bill"] -# person.name_previously_was # => nil -# person.reload! -# person.previous_changes # => {} -# -# Rollback the changes: -# -# person.name = "Uncle Bob" -# person.rollback! -# person.name # => "Bill" -# person.name_changed? # => false -# -# Assigning the same value leaves the attribute unchanged: -# -# person.name = 'Bill' -# person.name_changed? # => false -# person.name_change # => nil -# -# Which attributes have changed? -# -# person.name = 'Bob' -# person.changed # => ["name"] -# 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. -# 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. -# -# 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 -module ActiveModel::Dirty - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - include ::ActiveModel::AttributeMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveModel::AttributeMethods::ClassMethods - - # source://activemodel//lib/active_model/dirty.rb#143 - def as_json(options = T.unsafe(nil)); end - - # Dispatch target for *_changed? attribute methods. - # - # @return [Boolean] - # - # source://activemodel//lib/active_model/dirty.rb#178 - def attribute_changed?(attr_name, **options); end - - # @return [Boolean] - # - # source://activemodel//lib/active_model/dirty.rb#245 - def attribute_changed_in_place?(attr_name); end - - # Dispatch target for *_previously_changed? attribute methods. - # - # @return [Boolean] - # - # source://activemodel//lib/active_model/dirty.rb#188 - def attribute_previously_changed?(attr_name, **options); end - - # Dispatch target for *_previously_was attribute methods. - # - # source://activemodel//lib/active_model/dirty.rb#193 - def attribute_previously_was(attr_name); end - - # Dispatch target for *_was attribute methods. - # - # source://activemodel//lib/active_model/dirty.rb#183 - def attribute_was(attr_name); end - - # Returns an array with the name of the attributes with unsaved changes. - # - # person.changed # => [] - # person.name = 'bob' - # person.changed # => ["name"] - # - # source://activemodel//lib/active_model/dirty.rb#173 - def changed; end - - # Returns +true+ if any of the attributes has unsaved changes, +false+ otherwise. - # - # person.changed? # => false - # person.name = 'bob' - # person.changed? # => true - # - # @return [Boolean] - # - # source://activemodel//lib/active_model/dirty.rb#164 - def changed?; end - - # Returns a hash of the attributes with unsaved changes indicating their original - # values like attr => original value. - # - # person.name # => "bob" - # person.name = 'robert' - # person.changed_attributes # => {"name" => "bob"} - # - # source://activemodel//lib/active_model/dirty.rb#221 - def changed_attributes; end - - # Returns a hash of changed attributes indicating their original - # and new values like attr => [original value, new value]. - # - # person.changes # => {} - # person.name = 'bob' - # person.changes # => { "name" => ["bill", "bob"] } - # - # source://activemodel//lib/active_model/dirty.rb#231 - 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 - def changes_applied; end - - # source://activemodel//lib/active_model/dirty.rb#209 - def clear_attribute_changes(attr_names); end - - # Clears all dirty data: current changes and previous changes. - # - # source://activemodel//lib/active_model/dirty.rb#203 - def clear_changes_information; end - - # Returns a hash of attributes that were changed before the model was saved. - # - # person.name # => "bob" - # person.name = 'robert' - # person.save - # person.previous_changes # => {"name" => ["bob", "robert"]} - # - # source://activemodel//lib/active_model/dirty.rb#241 - def previous_changes; end - - # Restore all previous data of the provided attributes. - # - # source://activemodel//lib/active_model/dirty.rb#198 - def restore_attributes(attr_names = T.unsafe(nil)); end - - private - - # Dispatch target for *_change attribute methods. - # - # source://activemodel//lib/active_model/dirty.rb#271 - def attribute_change(attr_name); end - - # Dispatch target for *_previous_change attribute methods. - # - # source://activemodel//lib/active_model/dirty.rb#276 - def attribute_previous_change(attr_name); end - - # Dispatch target for *_will_change! attribute methods. - # - # source://activemodel//lib/active_model/dirty.rb#281 - def attribute_will_change!(attr_name); end - - # source://activemodel//lib/active_model/dirty.rb#250 - def clear_attribute_change(attr_name); end - - # source://activemodel//lib/active_model/dirty.rb#262 - def forget_attribute_assignments; end - - # source://activemodel//lib/active_model/dirty.rb#133 - def initialize_dup(other); end - - # source://activemodel//lib/active_model/dirty.rb#266 - def mutations_before_last_save; end - - # source://activemodel//lib/active_model/dirty.rb#254 - def mutations_from_database; end - - # Dispatch target for restore_*! attribute methods. - # - # source://activemodel//lib/active_model/dirty.rb#286 - 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 - end - - module GeneratedInstanceMethods - def attribute_aliases; end - def attribute_aliases?; end - def attribute_method_matchers; end - def attribute_method_matchers?; end - end -end - -# +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 -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 - # and instead be made available through the +attributes+ reader. - # - # @raise [ArgumentError] - # @return [EachValidator] a new instance of EachValidator - # - # source://activemodel//lib/active_model/validator.rb#138 - def initialize(options); end - - # Returns the value of attribute attributes. - # - # source://activemodel//lib/active_model/validator.rb#133 - 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 - 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 - def validate(record); end - - # Override this method in subclasses with the validation logic, adding - # errors to the records +errors+ array where necessary. - # - # @raise [NotImplementedError] - # - # source://activemodel//lib/active_model/validator.rb#159 - def validate_each(record, attribute, value); end - - private - - # source://activemodel//lib/active_model/validator.rb#170 - def prepare_value_for_validation(value, record, attr_name); end -end - -# == Active \Model \Error -# -# Represents one single error -# -# source://activemodel//lib/active_model/error.rb#9 -class ActiveModel::Error - # @return [Error] a new instance of 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 - def ==(other); end - - # The attribute of +base+ which the error belongs to - # - # source://activemodel//lib/active_model/error.rb#121 - def attribute; end - - # The object which the error belongs to - # - # source://activemodel//lib/active_model/error.rb#119 - def base; end - - # Returns the error details. - # - # error = ActiveModel::Error.new(person, :name, :too_short, count: 5) - # error.details - # # => { error: :too_short, count: 5 } - # - # source://activemodel//lib/active_model/error.rb#148 - def detail; end - - # Returns the error details. - # - # error = ActiveModel::Error.new(person, :name, :too_short, count: 5) - # error.details - # # => { error: :too_short, count: 5 } - # - # source://activemodel//lib/active_model/error.rb#148 - def details; end - - # source://activemodel//lib/active_model/error.rb#189 - def eql?(other); end - - # Returns the full error message. - # - # error = ActiveModel::Error.new(person, :name, :too_short, count: 5) - # error.full_message - # # => "Name is too short (minimum is 5 characters)" - # - # source://activemodel//lib/active_model/error.rb#158 - def full_message; end - - # source://activemodel//lib/active_model/error.rb#194 - def hash; end - - # source://activemodel//lib/active_model/error.rb#13 - def i18n_customize_full_message; end - - # source://activemodel//lib/active_model/error.rb#13 - def i18n_customize_full_message=(_arg0); end - - # source://activemodel//lib/active_model/error.rb#13 - def i18n_customize_full_message?; end - - # source://activemodel//lib/active_model/error.rb#198 - def inspect; end - - # See if error matches provided +attribute+, +type+, and +options+. - # - # Omitted params are not checked for a match. - # - # @return [Boolean] - # - # source://activemodel//lib/active_model/error.rb#165 - def match?(attribute, type = T.unsafe(nil), **options); end - - # Returns the error message. - # - # error = ActiveModel::Error.new(person, :name, :too_short, count: 5) - # error.message - # # => "is too short (minimum is 5 characters)" - # - # source://activemodel//lib/active_model/error.rb#134 - def message; end - - # The options provided when calling +errors#add+ - # - # source://activemodel//lib/active_model/error.rb#127 - def options; end - - # The raw value provided as the second parameter when calling +errors#add+ - # - # source://activemodel//lib/active_model/error.rb#125 - def raw_type; end - - # See if error matches provided +attribute+, +type+, and +options+ exactly. - # - # All params must be equal to Error's own attributes to be considered a - # strict match. - # - # @return [Boolean] - # - # source://activemodel//lib/active_model/error.rb#183 - def strict_match?(attribute, type, **options); end - - # The type of error, defaults to +:invalid+ unless specified - # - # source://activemodel//lib/active_model/error.rb#123 - def type; end - - protected - - # source://activemodel//lib/active_model/error.rb#203 - def attributes_for_hash; end - - private - - # source://activemodel//lib/active_model/error.rb#111 - def initialize_dup(other); end - - class << self - # source://activemodel//lib/active_model/error.rb#15 - def full_message(attribute, message, base); end - - # source://activemodel//lib/active_model/error.rb#64 - def generate_message(attribute, type, base, options); end - - # source://activemodel//lib/active_model/error.rb#13 - def i18n_customize_full_message; end - - # source://activemodel//lib/active_model/error.rb#13 - def i18n_customize_full_message=(value); end - - # source://activemodel//lib/active_model/error.rb#13 - def i18n_customize_full_message?; end - end -end - -# source://activemodel//lib/active_model/error.rb#10 -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 -# -# Provides error related functionalities you can include in your object -# for handling error messages and interacting with Action View helpers. -# -# A minimal implementation could be: -# -# class Person -# # Required dependency for ActiveModel::Errors -# extend ActiveModel::Naming -# -# def initialize -# @errors = ActiveModel::Errors.new(self) -# end -# -# attr_accessor :name -# attr_reader :errors -# -# def validate! -# errors.add(:name, :blank, message: "cannot be nil") if name.nil? -# end -# -# # The following methods are needed to be minimally implemented -# -# def read_attribute_for_validation(attr) -# send(attr) -# end -# -# def self.human_attribute_name(attr, options = {}) -# attr -# end -# -# def self.lookup_ancestors -# [self] -# end -# end -# -# The last three methods are required in your object for +Errors+ to be -# able to generate error messages correctly and also handle multiple -# languages. Of course, if you extend your object with ActiveModel::Translation -# you will not need to implement the last two. Likewise, using -# ActiveModel::Validations will handle the validation related methods -# for you. -# -# The above allows you to do: -# -# person = Person.new -# person.validate! # => ["cannot be nil"] -# person.errors.full_messages # => ["name cannot be nil"] -# # etc.. -# -# source://activemodel//lib/active_model/errors.rb#62 -class ActiveModel::Errors - include ::Enumerable - extend ::Forwardable - - # Pass in the instance of the object that is using the errors object. - # - # class Person - # def initialize - # @errors = ActiveModel::Errors.new(self) - # end - # end - # - # @return [Errors] a new instance of Errors - # - # source://activemodel//lib/active_model/errors.rb#92 - def initialize(base); end - - # When passed a symbol or a name of a method, returns an array of errors - # for the method. - # - # person.errors[:name] # => ["cannot be nil"] - # person.errors['name'] # => ["cannot be nil"] - # - # source://activemodel//lib/active_model/errors.rb#204 - def [](attribute); end - - # Adds a new error of +type+ on +attribute+. - # More than one error can be added to the same +attribute+. - # If no +type+ is supplied, :invalid is assumed. - # - # person.errors.add(:name) - # # Adds <#ActiveModel::Error attribute=name, type=invalid> - # person.errors.add(:name, :not_implemented, message: "must be implemented") - # # Adds <#ActiveModel::Error attribute=name, type=not_implemented, - # options={:message=>"must be implemented"}> - # - # person.errors.messages - # # => {:name=>["is invalid", "must be implemented"]} - # - # If +type+ is a string, it will be used as error message. - # - # If +type+ is a symbol, it will be translated using the appropriate - # scope (see +generate_message+). - # - # person.errors.add(:name, :blank) - # person.errors.messages - # # => {:name=>["can't be blank"]} - # - # person.errors.add(:name, :too_long, { count: 25 }) - # person.errors.messages - # # => ["is too long (maximum is 25 characters)"] - # - # If +type+ is a proc, it will be called, allowing for things like - # Time.now to be used within an error. - # - # If the :strict option is set to +true+, it will raise - # ActiveModel::StrictValidationFailed instead of adding the error. - # :strict option can also be set to any other exception. - # - # person.errors.add(:name, :invalid, strict: true) - # # => ActiveModel::StrictValidationFailed: Name is invalid - # person.errors.add(:name, :invalid, strict: NameIsInvalid) - # # => NameIsInvalid: Name is invalid - # - # person.errors.messages # => {} - # - # +attribute+ should be set to :base if the error is not - # directly associated with a single attribute. - # - # person.errors.add(:base, :name_or_email_blank, - # message: "either name or email must be present") - # person.errors.messages - # # => {:base=>["either name or email must be present"]} - # person.errors.details - # # => {:base=>[{error: :name_or_email_blank}]} - # - # source://activemodel//lib/active_model/errors.rb#317 - def add(attribute, type = T.unsafe(nil), **options); end - - # Returns +true+ if an error matches provided +attribute+ and +type+, - # or +false+ otherwise. +type+ is treated the same as for +add+. - # - # person.errors.add :name, :blank - # person.errors.added? :name, :blank # => true - # person.errors.added? :name, "can't be blank" # => true - # - # 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.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 - # person.errors.added? :name, :too_long # => false - # person.errors.added? :name, "is too long" # => false - # - # @return [Boolean] - # - # source://activemodel//lib/active_model/errors.rb#347 - 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). - # - # 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 - def as_json(options = T.unsafe(nil)); end - - # Returns all error attribute names - # - # person.errors.messages # => {:name=>["cannot be nil", "must be specified"]} - # person.errors.attribute_names # => [:name] - # - # source://activemodel//lib/active_model/errors.rb#212 - def attribute_names; end - - # source://forwardable/1.3.2/forwardable.rb#229 - def clear(*args, **_arg1, &block); end - - # Copies the errors from other. - # For copying errors but keep @base as is. - # - # ==== Parameters - # - # * +other+ - The ActiveModel::Errors instance. - # - # ==== Examples - # - # person.errors.copy!(other) - # - # source://activemodel//lib/active_model/errors.rb#113 - def copy!(other); end - - # Delete messages for +key+. Returns the deleted messages. - # - # person.errors[:name] # => ["cannot be nil"] - # person.errors.delete(:name) # => ["cannot be nil"] - # person.errors[:name] # => [] - # - # source://activemodel//lib/active_model/errors.rb#190 - 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 - def details; end - - # source://forwardable/1.3.2/forwardable.rb#229 - def each(*args, **_arg1, &block); end - - # source://forwardable/1.3.2/forwardable.rb#229 - def empty?(*args, **_arg1, &block); end - - # The actual array of +Error+ objects - # This method is aliased to objects. - # - # source://activemodel//lib/active_model/errors.rb#82 - 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 - def full_message(attribute, message); end - - # Returns all the full error messages in an array. - # - # class Person - # validates_presence_of :name, :address, :email - # validates_length_of :name, in: 5..30 - # end - # - # person = Person.create(address: '123 First St.') - # 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 - def full_messages; end - - # Returns all the full error messages for a given attribute in an array. - # - # class Person - # validates_presence_of :name, :email - # validates_length_of :name, in: 5..30 - # end - # - # person = Person.create() - # 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 - def full_messages_for(attribute); end - - # Translates an error message in its default scope - # (activemodel.errors.messages). - # - # Error messages are first looked up in activemodel.errors.models.MODEL.attributes.ATTRIBUTE.MESSAGE, - # if it's not there, it's looked up in activemodel.errors.models.MODEL.MESSAGE and if - # that is not there also, it returns the translation of the default message - # (e.g. activemodel.errors.messages.MESSAGE). The translated model - # name, translated attribute name, and the value are available for - # interpolation. - # - # When using inheritance in your models, it will check all the inherited - # models too, but only if the model itself hasn't been found. Say you have - # class Admin < User; end and you wanted the translation for - # the :blank error message for the title attribute, - # it looks for these translations: - # - # * activemodel.errors.models.admin.attributes.title.blank - # * activemodel.errors.models.admin.blank - # * activemodel.errors.models.user.attributes.title.blank - # * activemodel.errors.models.user.blank - # * any default you provided through the +options+ hash (in the activemodel.errors scope) - # * activemodel.errors.messages.blank - # * errors.attributes.title.blank - # * errors.messages.blank - # - # source://activemodel//lib/active_model/errors.rb#454 - 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. - # - # person.errors.group_by_attribute - # # => {:name=>[<#ActiveModel::Error>, <#ActiveModel::Error>]} - # - # source://activemodel//lib/active_model/errors.rb#264 - def group_by_attribute; end - - # Returns +true+ if the error messages include an error for the given key - # +attribute+, +false+ otherwise. - # - # person.errors.messages # => {:name=>["cannot be nil"]} - # person.errors.include?(:name) # => true - # person.errors.include?(:age) # => false - # - # @return [Boolean] - # - # source://activemodel//lib/active_model/errors.rb#177 - def has_key?(attribute); end - - # Imports one error. - # Imported errors are wrapped as a NestedError, - # providing access to original error object. - # If attribute or type needs to be overridden, use +override_options+. - # - # ==== Options - # - # * +:attribute+ - Override the attribute the error belongs to. - # * +:type+ - Override type of the error. - # - # source://activemodel//lib/active_model/errors.rb#129 - def import(error, override_options = T.unsafe(nil)); end - - # Returns +true+ if the error messages include an error for the given key - # +attribute+, +false+ otherwise. - # - # person.errors.messages # => {:name=>["cannot be nil"]} - # person.errors.include?(:name) # => true - # person.errors.include?(:age) # => false - # - # @return [Boolean] - # - # source://activemodel//lib/active_model/errors.rb#177 - def include?(attribute); end - - # source://activemodel//lib/active_model/errors.rb#458 - def inspect; end - - # Returns +true+ if the error messages include an error for the given key - # +attribute+, +false+ otherwise. - # - # person.errors.messages # => {:name=>["cannot be nil"]} - # person.errors.include?(:name) # => true - # person.errors.include?(:age) # => false - # - # @return [Boolean] - # - # source://activemodel//lib/active_model/errors.rb#177 - def key?(attribute); end - - # Merges the errors from other, - # each Error wrapped as NestedError. - # - # ==== Parameters - # - # * +other+ - The ActiveModel::Errors instance. - # - # ==== Examples - # - # person.errors.merge!(other) - # - # source://activemodel//lib/active_model/errors.rb#149 - def merge!(other); end - - # Returns a Hash of attributes with an array of their error messages. - # - # source://activemodel//lib/active_model/errors.rb#243 - def messages; end - - # Returns all the error messages for a given attribute in an array. - # - # class Person - # validates_presence_of :name, :email - # validates_length_of :name, in: 5..30 - # end - # - # person = Person.create() - # person.errors.messages_for(:name) - # # => ["is too short (minimum is 5 characters)", "can't be blank"] - # - # source://activemodel//lib/active_model/errors.rb#419 - 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 - 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.of_kind? :age # => true - # person.errors.of_kind? :name # => false - # person.errors.of_kind? :name, :too_long # => true - # person.errors.of_kind? :name, "is too long (maximum is 25 characters)" # => true - # person.errors.of_kind? :name, :not_too_long # => false - # person.errors.of_kind? :name, "is too long" # => false - # - # @return [Boolean] - # - # source://activemodel//lib/active_model/errors.rb#370 - def of_kind?(attribute, type = T.unsafe(nil)); end - - # source://forwardable/1.3.2/forwardable.rb#229 - def size(*args, **_arg1, &block); end - - # Returns all the full error messages in an array. - # - # class Person - # validates_presence_of :name, :address, :email - # validates_length_of :name, in: 5..30 - # end - # - # person = Person.create(address: '123 First St.') - # 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 - def to_a; end - - # Returns a Hash of attributes with their error messages. If +full_messages+ - # is +true+, it will contain full messages (see +full_message+). - # - # 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 - def to_hash(full_messages = T.unsafe(nil)); end - - # source://forwardable/1.3.2/forwardable.rb#229 - def uniq!(*args, **_arg1, &block); end - - # Search for errors matching +attribute+, +type+, or +options+. - # - # Only supplied params will be matched. - # - # person.errors.where(:name) # => all name 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 - def where(attribute, type = T.unsafe(nil), **options); end - - private - - # source://activemodel//lib/active_model/errors.rb#97 - def initialize_dup(other); end - - # source://activemodel//lib/active_model/errors.rb#465 - def normalize_arguments(attribute, type, **options); end -end - -# source://activemodel//lib/active_model/errors.rb#240 -ActiveModel::Errors::EMPTY_ARRAY = T.let(T.unsafe(nil), Array) - -# Raised when forbidden attributes are used for mass assignment. -# -# class Person < ActiveRecord::Base -# end -# -# params = ActionController::Parameters.new(name: 'Bob') -# Person.new(params) -# # => ActiveModel::ForbiddenAttributesError -# -# params.permit! -# Person.new(params) -# # => # -# -# source://activemodel//lib/active_model/forbidden_attributes_protection.rb#16 -class ActiveModel::ForbiddenAttributesError < ::StandardError; end - -# source://activemodel//lib/active_model/forbidden_attributes_protection.rb#19 -module ActiveModel::ForbiddenAttributesProtection - private - - # source://activemodel//lib/active_model/forbidden_attributes_protection.rb#21 - def sanitize_for_mass_assignment(attributes); end - - # source://activemodel//lib/active_model/forbidden_attributes_protection.rb#21 - def sanitize_forbidden_attributes(attributes); end -end - -# source://activemodel//lib/active_model/attribute_mutation_tracker.rb#87 -class ActiveModel::ForcedMutationTracker < ::ActiveModel::AttributeMutationTracker - # @return [ForcedMutationTracker] a new instance of ForcedMutationTracker - # - # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#88 - def initialize(attributes); end - - # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#97 - def change_to_attribute(attr_name); end - - # @return [Boolean] - # - # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#93 - def changed_in_place?(attr_name); end - - # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#121 - def finalize_changes; end - - # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#117 - def force_change(attr_name); end - - # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#105 - def forget_change(attr_name); end - - # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#109 - def original_value(attr_name); end - - private - - # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#128 - def attr_names; end - - # @return [Boolean] - # - # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#132 - def attribute_changed?(attr_name); end - - # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#140 - def clone_value(attr_name); end - - # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#136 - def fetch_value(attr_name); end - - # Returns the value of attribute finalized_changes. - # - # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#126 - def finalized_changes; end -end - -# source://activemodel//lib/active_model/attribute_set/builder.rb#94 -class ActiveModel::LazyAttributeHash - # @return [LazyAttributeHash] a new instance of LazyAttributeHash - # - # source://activemodel//lib/active_model/attribute_set/builder.rb#97 - def initialize(types, values, additional_types, default_attributes, delegate_hash = T.unsafe(nil)); end - - # source://activemodel//lib/active_model/attribute_set/builder.rb#134 - def ==(other); end - - # source://activemodel//lib/active_model/attribute_set/builder.rb#110 - def [](key); end - - # source://activemodel//lib/active_model/attribute_set/builder.rb#114 - def []=(key, value); end - - # source://activemodel//lib/active_model/attribute_set/builder.rb#118 - def deep_dup; end - - # source://activemodel//lib/active_model/attribute_set/builder.rb#129 - def each_key(&block); end - - # source://activemodel//lib/active_model/attribute_set/builder.rb#95 - def each_value(*_arg0, **_arg1, &_arg2); end - - # source://activemodel//lib/active_model/attribute_set/builder.rb#95 - def except(*_arg0, **_arg1, &_arg2); end - - # source://activemodel//lib/active_model/attribute_set/builder.rb#95 - def fetch(*_arg0, **_arg1, &_arg2); end - - # @return [Boolean] - # - # source://activemodel//lib/active_model/attribute_set/builder.rb#106 - def key?(key); end - - # source://activemodel//lib/active_model/attribute_set/builder.rb#142 - def marshal_dump; end - - # source://activemodel//lib/active_model/attribute_set/builder.rb#146 - def marshal_load(values); end - - # source://activemodel//lib/active_model/attribute_set/builder.rb#95 - def transform_values(*_arg0, **_arg1, &_arg2); end - - protected - - # source://activemodel//lib/active_model/attribute_set/builder.rb#151 - def materialize; end - - private - - # Returns the value of attribute additional_types. - # - # source://activemodel//lib/active_model/attribute_set/builder.rb#163 - def additional_types; end - - # source://activemodel//lib/active_model/attribute_set/builder.rb#165 - def assign_default_value(name); end - - # Returns the value of attribute default_attributes. - # - # source://activemodel//lib/active_model/attribute_set/builder.rb#163 - def default_attributes; end - - # Returns the value of attribute delegate_hash. - # - # source://activemodel//lib/active_model/attribute_set/builder.rb#163 - def delegate_hash; end - - # source://activemodel//lib/active_model/attribute_set/builder.rb#124 - def initialize_dup(_); end - - # Returns the value of attribute types. - # - # source://activemodel//lib/active_model/attribute_set/builder.rb#163 - def types; end - - # Returns the value of attribute values. - # - # source://activemodel//lib/active_model/attribute_set/builder.rb#163 - def values; end -end - -# source://activemodel//lib/active_model/attribute_set/builder.rb#21 -class ActiveModel::LazyAttributeSet < ::ActiveModel::AttributeSet - # @return [LazyAttributeSet] a new instance of LazyAttributeSet - # - # source://activemodel//lib/active_model/attribute_set/builder.rb#22 - def initialize(values, types, additional_types, default_attributes, attributes = T.unsafe(nil)); end - - # source://activemodel//lib/active_model/attribute_set/builder.rb#41 - def fetch_value(name, &block); end - - # @return [Boolean] - # - # source://activemodel//lib/active_model/attribute_set/builder.rb#32 - def key?(name); end - - # source://activemodel//lib/active_model/attribute_set/builder.rb#36 - def keys; end - - protected - - # source://activemodel//lib/active_model/attribute_set/builder.rb#61 - def attributes; end - - private - - # Returns the value of attribute additional_types. - # - # source://activemodel//lib/active_model/attribute_set/builder.rb#71 - def additional_types; end - - # source://activemodel//lib/active_model/attribute_set/builder.rb#73 - def default_attribute(name, value_present = T.unsafe(nil), value = T.unsafe(nil)); end - - # Returns the value of attribute default_attributes. - # - # source://activemodel//lib/active_model/attribute_set/builder.rb#71 - def default_attributes; end - - # Returns the value of attribute types. - # - # source://activemodel//lib/active_model/attribute_set/builder.rb#71 - def types; end - - # Returns the value of attribute values. - # - # source://activemodel//lib/active_model/attribute_set/builder.rb#71 - def values; end -end - -# source://activemodel//lib/active_model/lint.rb#4 -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 -# include tests that tell you whether your object is fully compliant, -# or if not, which aspects of the API are not implemented. -# -# Note an object is not required to implement all APIs in order to work -# with Action Pack. This module only intends to provide guidance in case -# you want all features out of the box. -# -# These tests do not attempt to determine the semantic correctness of the -# returned values. For instance, you could implement valid? to -# always return +true+, and the tests would pass. It is up to you to ensure -# that the values are semantically meaningful. -# -# Objects you pass in are expected to return a compliant object from a call -# to to_model. It is perfectly fine for to_model to return -# +self+. -# -# source://activemodel//lib/active_model/lint.rb#24 -module ActiveModel::Lint::Tests - # Passes if the object's model responds to errors and if calling - # [](attribute) on the result of this method returns an array. - # Fails otherwise. - # - # errors[attribute] is used to retrieve the errors of a model - # for a given attribute. If errors are present, the method should return - # an array of strings that are the errors for the attribute in question. - # If localization is used, the strings should be localized for the current - # locale. If no error is present, the method should return an empty array. - # - # source://activemodel//lib/active_model/lint.rb#102 - def test_errors_aref; end - - # Passes if the object's model responds to model_name both as - # an instance method and as a class method, and if calling this method - # returns a string with some convenience methods: :human, - # :singular and :plural. - # - # Check ActiveModel::Naming for more information. - # - # source://activemodel//lib/active_model/lint.rb#81 - def test_model_naming; end - - # Passes if the object's model responds to persisted? and if - # calling this method returns either +true+ or +false+. Fails otherwise. - # - # persisted? is used when calculating the URL for an object. - # If the object is not persisted, a form for that object, for instance, - # will route to the create action. If it is persisted, a form for the - # object will route to the update action. - # - # @return [Boolean] - # - # source://activemodel//lib/active_model/lint.rb#70 - def test_persisted?; end - - # Passes if the object's model responds to to_key and if calling - # this method returns +nil+ when the object is not persisted. - # Fails otherwise. - # - # to_key returns an Enumerable of all (primary) key attributes - # of the model, and is used to a generate unique DOM id for the object. - # - # source://activemodel//lib/active_model/lint.rb#31 - def test_to_key; end - - # Passes if the object's model responds to to_param and if - # calling this method returns +nil+ when the object is not persisted. - # Fails otherwise. - # - # to_param is used to represent the object's key in URLs. - # Implementers can decide to either raise an exception or provide a - # default in case the record uses a composite primary key. There are no - # tests for this behavior in lint because it doesn't make sense to force - # any of the possible implementation strategies on the implementer. - # - # source://activemodel//lib/active_model/lint.rb#46 - def test_to_param; end - - # Passes if the object's model responds to to_partial_path and if - # calling this method returns a string. Fails otherwise. - # - # to_partial_path is used for looking up partials. For example, - # a BlogPost model might return "blog_posts/blog_post". - # - # source://activemodel//lib/active_model/lint.rb#58 - def test_to_partial_path; end - - private - - # source://activemodel//lib/active_model/lint.rb#113 - def assert_boolean(result, name); end - - # source://activemodel//lib/active_model/lint.rb#108 - def model; end -end - -# Raised when an attribute is not defined. -# -# class User < ActiveRecord::Base -# has_many :pets -# end -# -# user = User::User.first -# user.pets.select(:id).first.user_id -# # => ActiveModel::MissingAttributeError: missing attribute: user_id -# -# source://activemodel//lib/active_model/attribute_methods.rb#15 -class ActiveModel::MissingAttributeError < ::NoMethodError; end - -# == Active \Model \Basic \Model -# -# Allows implementing models similar to ActiveRecord::Base. -# Includes ActiveModel::API for the required interface for an -# object to interact with Action Pack and Action View, but can be -# extended with other functionalities. -# -# A minimal implementation could be: -# -# class Person -# include ActiveModel::Model -# attr_accessor :name, :age -# end -# -# person = Person.new(name: 'bob', age: '18') -# person.name # => "bob" -# person.age # => "18" -# -# If for some reason you need to run code on initialize, make -# sure you call +super+ if you want the attributes hash initialization to -# happen. -# -# class Person -# include ActiveModel::Model -# attr_accessor :id, :name, :omg -# -# def initialize(attributes={}) -# super -# @omg ||= true -# end -# end -# -# person = Person.new(id: 1, name: 'bob') -# person.omg # => true -# -# For more detailed information on other functionalities available, please -# refer to the specific modules included in ActiveModel::Model -# (see below). -# -# source://activemodel//lib/active_model/model.rb#42 -module ActiveModel::Model - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - include ::ActiveSupport::Callbacks - include ::ActiveModel::Validations::HelperMethods - include ::ActiveModel::Validations - include ::ActiveModel::Conversion - include ::ActiveModel::API - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveModel::Validations::ClassMethods - mixes_in_class_methods ::ActiveModel::Callbacks - mixes_in_class_methods ::ActiveSupport::Callbacks::ClassMethods - mixes_in_class_methods ::ActiveSupport::DescendantsTracker - mixes_in_class_methods ::ActiveModel::Translation - mixes_in_class_methods ::ActiveModel::Validations::HelperMethods - mixes_in_class_methods ::ActiveModel::Conversion::ClassMethods - - module GeneratedClassMethods - def __callbacks; end - def __callbacks=(value); end - def __callbacks?; end - def _validators; end - def _validators=(value); end - def _validators?; end - end - - module GeneratedInstanceMethods - def __callbacks; end - def __callbacks?; end - def _validators; end - def _validators?; end - end -end - -# source://activemodel//lib/active_model/naming.rb#9 -class ActiveModel::Name - include ::Comparable - - # Returns a new ActiveModel::Name instance. By default, the +namespace+ - # and +name+ option will take the namespace and name of the given class - # respectively. - # Use +locale+ argument for singularize and pluralize model name. - # - # module Foo - # class Bar - # end - # end - # - # ActiveModel::Name.new(Foo::Bar).to_s - # # => "Foo::Bar" - # - # @raise [ArgumentError] - # @return [Name] a new instance of Name - # - # source://activemodel//lib/active_model/naming.rb#166 - def initialize(klass, namespace = T.unsafe(nil), name = T.unsafe(nil), locale = T.unsafe(nil)); end - - # source://activemodel//lib/active_model/naming.rb#151 - def !~(*_arg0, **_arg1, &_arg2); end - - # source://activemodel//lib/active_model/naming.rb#151 - def <=>(*_arg0, **_arg1, &_arg2); end - - # source://activemodel//lib/active_model/naming.rb#151 - def ==(arg); end - - # source://activemodel//lib/active_model/naming.rb#151 - def ===(arg); end - - # source://activemodel//lib/active_model/naming.rb#151 - def =~(*_arg0, **_arg1, &_arg2); end - - # source://activemodel//lib/active_model/naming.rb#151 - def as_json(*_arg0, **_arg1, &_arg2); end - - # Returns the value of attribute collection. - # - # source://activemodel//lib/active_model/naming.rb#12 - def cache_key; end - - # Returns the value of attribute collection. - # - # source://activemodel//lib/active_model/naming.rb#12 - def collection; end - - # Sets the attribute collection - # - # @param value the value to set the attribute collection to. - # - # source://activemodel//lib/active_model/naming.rb#12 - def collection=(_arg0); end - - # Returns the value of attribute element. - # - # source://activemodel//lib/active_model/naming.rb#12 - def element; end - - # Sets the attribute element - # - # @param value the value to set the attribute element to. - # - # source://activemodel//lib/active_model/naming.rb#12 - def element=(_arg0); end - - # source://activemodel//lib/active_model/naming.rb#151 - def eql?(*_arg0, **_arg1, &_arg2); end - - # Transform the model name into a more human format, using I18n. By default, - # it will underscore then humanize the class name. - # - # class BlogPost - # extend ActiveModel::Naming - # end - # - # BlogPost.model_name.human # => "Blog post" - # - # Specify +options+ with additional translating options. - # - # source://activemodel//lib/active_model/naming.rb#197 - def human(options = T.unsafe(nil)); end - - # Returns the value of attribute i18n_key. - # - # source://activemodel//lib/active_model/naming.rb#12 - def i18n_key; end - - # Sets the attribute i18n_key - # - # @param value the value to set the attribute i18n_key to. - # - # source://activemodel//lib/active_model/naming.rb#12 - def i18n_key=(_arg0); end - - # source://activemodel//lib/active_model/naming.rb#151 - def match?(*_arg0, **_arg1, &_arg2); end - - # Returns the value of attribute name. - # - # source://activemodel//lib/active_model/naming.rb#12 - def name; end - - # Sets the attribute name - # - # @param value the value to set the attribute name to. - # - # source://activemodel//lib/active_model/naming.rb#12 - def name=(_arg0); end - - # Returns the value of attribute param_key. - # - # source://activemodel//lib/active_model/naming.rb#12 - def param_key; end - - # Sets the attribute param_key - # - # @param value the value to set the attribute param_key to. - # - # source://activemodel//lib/active_model/naming.rb#12 - def param_key=(_arg0); end - - # Returns the value of attribute plural. - # - # source://activemodel//lib/active_model/naming.rb#12 - def plural; end - - # Sets the attribute plural - # - # @param value the value to set the attribute plural to. - # - # source://activemodel//lib/active_model/naming.rb#12 - def plural=(_arg0); end - - # Returns the value of attribute route_key. - # - # source://activemodel//lib/active_model/naming.rb#12 - def route_key; end - - # Sets the attribute route_key - # - # @param value the value to set the attribute route_key to. - # - # source://activemodel//lib/active_model/naming.rb#12 - def route_key=(_arg0); end - - # Returns the value of attribute singular. - # - # source://activemodel//lib/active_model/naming.rb#12 - def singular; end - - # Sets the attribute singular - # - # @param value the value to set the attribute singular to. - # - # source://activemodel//lib/active_model/naming.rb#12 - def singular=(_arg0); end - - # Returns the value of attribute singular_route_key. - # - # source://activemodel//lib/active_model/naming.rb#12 - def singular_route_key; end - - # Sets the attribute singular_route_key - # - # @param value the value to set the attribute singular_route_key to. - # - # source://activemodel//lib/active_model/naming.rb#12 - def singular_route_key=(_arg0); end - - # source://activemodel//lib/active_model/naming.rb#151 - def to_s(*_arg0, **_arg1, &_arg2); end - - # source://activemodel//lib/active_model/naming.rb#151 - def to_str(*_arg0, **_arg1, &_arg2); end - - # @return [Boolean] - # - # source://activemodel//lib/active_model/naming.rb#212 - def uncountable?; end - - private - - # source://activemodel//lib/active_model/naming.rb#217 - def _singularize(string); end -end - -# == Active \Model \Naming -# -# Creates a +model_name+ method on your object. -# -# To implement, just extend ActiveModel::Naming in your object: -# -# class BookCover -# extend ActiveModel::Naming -# end -# -# BookCover.model_name.name # => "BookCover" -# BookCover.model_name.human # => "Book cover" -# -# BookCover.model_name.i18n_key # => :book_cover -# BookModule::BookCover.model_name.i18n_key # => :"book_module/book_cover" -# -# Providing the functionality that ActiveModel::Naming provides in your object -# 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 -module ActiveModel::Naming - # Returns an ActiveModel::Name object for module. It can be - # used to retrieve all kinds of naming-related information - # (See ActiveModel::Name for more information). - # - # class Person - # extend ActiveModel::Naming - # end - # - # Person.model_name.name # => "Person" - # Person.model_name.class # => ActiveModel::Name - # Person.model_name.singular # => "person" - # Person.model_name.plural # => "people" - # - # source://activemodel//lib/active_model/naming.rb#259 - def model_name; end - - class << self - # source://activemodel//lib/active_model/naming.rb#242 - def extended(base); end - - # Returns string to use for params names. It differs for - # namespaced models regarding whether it's inside isolated engine. - # - # # For isolated engine: - # ActiveModel::Naming.param_key(Blog::Post) # => "post" - # - # # For shared engine: - # ActiveModel::Naming.param_key(Blog::Post) # => "blog_post" - # - # source://activemodel//lib/active_model/naming.rb#327 - def param_key(record_or_class); end - - # Returns the plural class name of a record or class. - # - # ActiveModel::Naming.plural(post) # => "posts" - # ActiveModel::Naming.plural(Highrise::Person) # => "highrise_people" - # - # source://activemodel//lib/active_model/naming.rb#272 - def plural(record_or_class); end - - # Returns string to use while generating route names. It differs for - # namespaced models regarding whether it's inside isolated engine. - # - # # For isolated engine: - # ActiveModel::Naming.route_key(Blog::Post) # => "posts" - # - # # For shared engine: - # ActiveModel::Naming.route_key(Blog::Post) # => "blog_posts" - # - # 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 - def route_key(record_or_class); end - - # Returns the singular class name of a record or class. - # - # ActiveModel::Naming.singular(post) # => "post" - # ActiveModel::Naming.singular(Highrise::Person) # => "highrise_person" - # - # source://activemodel//lib/active_model/naming.rb#280 - def singular(record_or_class); end - - # Returns string to use while generating route names. It differs for - # namespaced models regarding whether it's inside isolated engine. - # - # # For isolated engine: - # ActiveModel::Naming.singular_route_key(Blog::Post) # => "post" - # - # # For shared engine: - # ActiveModel::Naming.singular_route_key(Blog::Post) # => "blog_post" - # - # source://activemodel//lib/active_model/naming.rb#300 - def singular_route_key(record_or_class); end - - # Identifies whether the class name of a record or class is uncountable. - # - # ActiveModel::Naming.uncountable?(Sheep) # => true - # ActiveModel::Naming.uncountable?(Post) # => false - # - # @return [Boolean] - # - # source://activemodel//lib/active_model/naming.rb#288 - def uncountable?(record_or_class); end - - private - - # source://activemodel//lib/active_model/naming.rb#331 - def model_name_from_record_or_class(record_or_class); end - end -end - -# source://activemodel//lib/active_model/nested_error.rb#7 -class ActiveModel::NestedError < ::ActiveModel::Error - extend ::Forwardable - - # @return [NestedError] a new instance of NestedError - # - # source://activemodel//lib/active_model/nested_error.rb#8 - def initialize(base, inner_error, override_options = T.unsafe(nil)); end - - # Returns the value of attribute inner_error. - # - # source://activemodel//lib/active_model/nested_error.rb#17 - def inner_error; end - - # source://forwardable/1.3.2/forwardable.rb#229 - def message(*args, **_arg1, &block); end -end - -# source://activemodel//lib/active_model/attribute_mutation_tracker.rb#148 -class ActiveModel::NullMutationTracker - include ::Singleton - extend ::Singleton::SingletonClassMethods - - # @return [Boolean] - # - # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#166 - def any_changes?; end - - # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#163 - def change_to_attribute(attr_name); end - - # @return [Boolean] - # - # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#170 - def changed?(attr_name, **_arg1); end - - # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#151 - def changed_attribute_names; end - - # @return [Boolean] - # - # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#174 - def changed_in_place?(attr_name); end - - # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#155 - def changed_values; end - - # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#159 - def changes; end - - # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#178 - def original_value(attr_name); end -end - -# source://activemodel//lib/active_model/railtie.rb#7 -class ActiveModel::Railtie < ::Rails::Railtie; end - -# Raised when attribute values are out of range. -# -# source://activemodel//lib/active_model/errors.rb#494 -class ActiveModel::RangeError < ::RangeError; end - -# source://activemodel//lib/active_model/secure_password.rb#4 -module ActiveModel::SecurePassword - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActiveModel::SecurePassword::ClassMethods - - class << self - # source://activemodel//lib/active_model/secure_password.rb#13 - def min_cost; end - - # source://activemodel//lib/active_model/secure_password.rb#13 - def min_cost=(_arg0); end - end -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. - # - # The following validations are added automatically: - # * Password must be present on creation - # * Password length should be less than or equal to 72 bytes - # * Confirmation of password (using a +XXX_confirmation+ attribute) - # - # If confirmation validation is not needed, simply leave out the - # value for +XXX_confirmation+ (i.e. don't provide a form field for - # 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. - # - # Add bcrypt (~> 3.1.7) to Gemfile to use #has_secure_password: - # - # gem 'bcrypt', '~> 3.1.7' - # - # ==== Examples - # - # ===== Using Active Record (which automatically includes ActiveModel::SecurePassword) - # - # # Schema: User(name:string, password_digest:string, recovery_password_digest:string) - # class User < ActiveRecord::Base - # has_secure_password - # has_secure_password :recovery_password, validations: false - # end - # - # user = 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.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::User.find_by(name: 'david')&.authenticate('notright') # => false - # User::User.find_by(name: 'david')&.authenticate('mUc3m00RsqyRe') # => user - # - # ===== Conditionally requiring a password - # - # class Account - # include ActiveModel::SecurePassword - # - # attr_accessor :is_guest, :password_digest - # - # has_secure_password - # - # def errors - # super.tap { |errors| errors.delete(:password, :blank) if is_guest } - # end - # end - # - # account = Account.new - # account.valid? # => false, password required - # - # account.is_guest = true - # account.valid? # => true - # - # source://activemodel//lib/active_model/secure_password.rb#84 - def has_secure_password(attribute = T.unsafe(nil), validations: T.unsafe(nil)); end -end - -# source://activemodel//lib/active_model/secure_password.rb#114 -class ActiveModel::SecurePassword::InstanceMethodsOnActivation < ::Module - # @return [InstanceMethodsOnActivation] a new instance of InstanceMethodsOnActivation - # - # source://activemodel//lib/active_model/secure_password.rb#115 - def initialize(attribute); end -end - -# BCrypt hash function can handle maximum 72 bytes, and if we pass -# password of length more than 72 bytes it ignores extra characters. -# Hence need to put a restriction on password length. -# -# source://activemodel//lib/active_model/secure_password.rb#10 -ActiveModel::SecurePassword::MAX_PASSWORD_LENGTH_ALLOWED = T.let(T.unsafe(nil), Integer) - -# == Active \Model \Serialization -# -# Provides a basic serialization to a serializable_hash for your objects. -# -# A minimal implementation could be: -# -# class Person -# include ActiveModel::Serialization -# -# attr_accessor :name -# -# def attributes -# {'name' => nil} -# end -# end -# -# Which would provide you with: -# -# person = Person.new -# person.serializable_hash # => {"name"=>nil} -# person.name = "Bob" -# person.serializable_hash # => {"name"=>"Bob"} -# -# An +attributes+ hash must be defined and should contain any attributes you -# need to be serialized. Attributes must be strings, not symbols. -# When called, serializable hash will use instance methods that match the name -# of the attributes hash's keys. In order to override this behavior, take a look -# 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. -# -# A minimal implementation including JSON would be: -# -# class Person -# include ActiveModel::Serializers::JSON -# -# attr_accessor :name -# -# def attributes -# {'name' => nil} -# end -# end -# -# Which would provide you with: -# -# person = Person.new -# person.serializable_hash # => {"name"=>nil} -# person.as_json # => {"name"=>nil} -# person.to_json # => "{\"name\":null}" -# -# person.name = "Bob" -# person.serializable_hash # => {"name"=>"Bob"} -# person.as_json # => {"name"=>"Bob"} -# person.to_json # => "{\"name\":\"Bob\"}" -# -# Valid options are :only, :except, :methods and -# :include. The following are all valid examples: -# -# person.serializable_hash(only: 'name') -# person.serializable_hash(include: :address) -# person.serializable_hash(include: { address: { only: 'city' }}) -# -# source://activemodel//lib/active_model/serialization.rb#69 -module ActiveModel::Serialization - # Hook method defining how an attribute value should be retrieved for - # serialization. By default this is assumed to be an instance named after - # the attribute. Override this method in subclasses should you need to - # retrieve the value for a given attribute differently: - # - # class MyClass - # include ActiveModel::Serialization - # - # def initialize(data = {}) - # @data = data - # end - # - # def read_attribute_for_serialization(key) - # @data[key] - # end - # end - def read_attribute_for_serialization(*_arg0); end - - # Returns a serialized hash of your object. - # - # class Person - # include ActiveModel::Serialization - # - # attr_accessor :name, :age - # - # def attributes - # {'name' => nil, 'age' => nil} - # end - # - # def capitalized_name - # name.capitalize - # end - # end - # - # person = Person.new - # person.name = 'bob' - # person.age = 22 - # person.serializable_hash # => {"name"=>"bob", "age"=>22} - # person.serializable_hash(only: :name) # => {"name"=>"bob"} - # person.serializable_hash(except: :name) # => {"age"=>22} - # person.serializable_hash(methods: :capitalized_name) - # # => {"name"=>"bob", "age"=>22, "capitalized_name"=>"Bob"} - # - # Example with :include option - # - # class User - # include ActiveModel::Serializers::JSON - # attr_accessor :name, :notes # Emulate has_many :notes - # def attributes - # {'name' => nil} - # end - # end - # - # class Note - # include ActiveModel::Serializers::JSON - # attr_accessor :title, :text - # def attributes - # {'title' => nil, 'text' => nil} - # end - # end - # - # note = Note.new - # note.title = 'Battle of Austerlitz' - # note.text = 'Some text here' - # - # user = User::User.new - # user.name = 'Napoleon' - # user.notes = [note] - # - # user.serializable_hash - # # => {"name" => "Napoleon"} - # user.serializable_hash(include: { notes: { only: 'title' }}) - # # => {"name" => "Napoleon", "notes" => [{"title"=>"Battle of Austerlitz"}]} - # - # source://activemodel//lib/active_model/serialization.rb#125 - def serializable_hash(options = T.unsafe(nil)); end - - private - - # source://activemodel//lib/active_model/serialization.rb#152 - def attribute_names_for_serialization; end - - # Add associations specified via the :include option. - # - # Expects a block that takes as arguments: - # +association+ - name of the association - # +records+ - the association record(s) to be serialized - # +opts+ - options for the association records - # - # source://activemodel//lib/active_model/serialization.rb#184 - def serializable_add_includes(options = T.unsafe(nil)); end - - # source://activemodel//lib/active_model/serialization.rb#174 - def serializable_attributes(attribute_names); end -end - -# source://activemodel//lib/active_model.rb#63 -module ActiveModel::Serializers - extend ::ActiveSupport::Autoload -end - -# == Active \Model \JSON \Serializer -# -# source://activemodel//lib/active_model/serializers/json.rb#8 -module ActiveModel::Serializers::JSON - include ::ActiveModel::Serialization - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveModel::Naming - - # Returns a hash representing the model. Some configuration can be - # passed through +options+. - # - # The option include_root_in_json controls the top-level behavior - # of +as_json+. If +true+, +as_json+ will emit a single root node named - # after the object's type. The default value for include_root_in_json - # option is +false+. - # - # user = User::User.find(1) - # user.as_json - # # => { "id" => 1, "name" => "Konata Izumi", "age" => 16, - # # "created_at" => "2006-08-01T17:27:133.000Z", "awesome" => true} - # - # ActiveRecord::Base.include_root_in_json = true - # - # user.as_json - # # => { "user" => { "id" => 1, "name" => "Konata Izumi", "age" => 16, - # # "created_at" => "2006-08-01T17:27:13.000Z", "awesome" => true } } - # - # This behavior can also be achieved by setting the :root option - # to +true+ as in: - # - # user = User::User.find(1) - # user.as_json(root: true) - # # => { "user" => { "id" => 1, "name" => "Konata Izumi", "age" => 16, - # # "created_at" => "2006-08-01T17:27:13.000Z", "awesome" => true } } - # - # If you prefer, :root may also be set to a custom string key instead as in: - # - # user = User::User.find(1) - # user.as_json(root: "author") - # # => { "author" => { "id" => 1, "name" => "Konata Izumi", "age" => 16, - # # "created_at" => "2006-08-01T17:27:13.000Z", "awesome" => true } } - # - # Without any +options+, the returned Hash will include all the model's - # attributes. - # - # user = User::User.find(1) - # user.as_json - # # => { "id" => 1, "name" => "Konata Izumi", "age" => 16, - # # "created_at" => "2006-08-01T17:27:13.000Z", "awesome" => true} - # - # The :only and :except options can be used to limit - # the attributes included, and work similar to the +attributes+ method. - # - # user.as_json(only: [:id, :name]) - # # => { "id" => 1, "name" => "Konata Izumi" } - # - # user.as_json(except: [:id, :created_at, :age]) - # # => { "name" => "Konata Izumi", "awesome" => true } - # - # To include the result of some method calls on the model use :methods: - # - # user.as_json(methods: :permalink) - # # => { "id" => 1, "name" => "Konata Izumi", "age" => 16, - # # "created_at" => "2006-08-01T17:27:13.000Z", "awesome" => true, - # # "permalink" => "1-konata-izumi" } - # - # To include associations use :include: - # - # user.as_json(include: :posts) - # # => { "id" => 1, "name" => "Konata Izumi", "age" => 16, - # # "created_at" => "2006-08-01T17:27:13.000Z", "awesome" => true, - # # "posts" => [ { "id" => 1, "author_id" => 1, "title" => "Welcome to the weblog" }, - # # { "id" => 2, "author_id" => 1, "title" => "So I was thinking" } ] } - # - # Second level and higher order associations work as well: - # - # user.as_json(include: { posts: { - # include: { comments: { - # only: :body } }, - # only: :title } }) - # # => { "id" => 1, "name" => "Konata Izumi", "age" => 16, - # # "created_at" => "2006-08-01T17:27:13.000Z", "awesome" => true, - # # "posts" => [ { "comments" => [ { "body" => "1st post!" }, { "body" => "Second!" } ], - # # "title" => "Welcome to the weblog" }, - # # { "comments" => [ { "body" => "Don't think too hard" } ], - # # "title" => "So I was thinking" } ] } - # - # source://activemodel//lib/active_model/serializers/json.rb#96 - def as_json(options = T.unsafe(nil)); end - - # Sets the model +attributes+ from a JSON string. Returns +self+. - # - # class Person - # include ActiveModel::Serializers::JSON - # - # attr_accessor :name, :age, :awesome - # - # def attributes=(hash) - # hash.each do |key, value| - # send("#{key}=", value) - # end - # end - # - # def attributes - # instance_values - # end - # end - # - # json = { name: 'bob', age: 22, awesome:true }.to_json - # person = Person.new - # person.from_json(json) # => # - # person.name # => "bob" - # person.age # => 22 - # person.awesome # => true - # - # The default value for +include_root+ is +false+. You can change it to - # +true+ if the given JSON string includes a single root node. - # - # json = { person: { name: 'bob', age: 22, awesome:true } }.to_json - # person = Person.new - # person.from_json(json, true) # => # - # person.name # => "bob" - # person.age # => 22 - # person.awesome # => true - # - # source://activemodel//lib/active_model/serializers/json.rb#146 - def from_json(json, include_root = T.unsafe(nil)); end - - module GeneratedClassMethods - def include_root_in_json; end - def include_root_in_json=(value); end - def include_root_in_json?; end - end - - module GeneratedInstanceMethods - def include_root_in_json; end - def include_root_in_json?; end - end -end - -# Raised when a validation cannot be corrected by end users and are considered -# exceptional. -# -# class Person -# include ActiveModel::Validations -# -# attr_accessor :name -# -# validates_presence_of :name, strict: true -# end -# -# person = Person.new -# person.name = nil -# person.valid? -# # => ActiveModel::StrictValidationFailed: Name can't be blank -# -# source://activemodel//lib/active_model/errors.rb#490 -class ActiveModel::StrictValidationFailed < ::StandardError; end - -# == Active \Model \Translation -# -# Provides integration between your object and the Rails internationalization -# (i18n) framework. -# -# A minimal implementation could be: -# -# class TranslatedPerson -# extend ActiveModel::Translation -# end -# -# TranslatedPerson.human_attribute_name('my_attribute') -# # => "My attribute" -# -# This also provides the required class methods for hooking into the -# Rails internationalization API, including being able to define a -# class-based +i18n_scope+ and +lookup_ancestors+ to find translations in -# parent classes. -# -# source://activemodel//lib/active_model/translation.rb#22 -module ActiveModel::Translation - include ::ActiveModel::Naming - - # Transforms attribute names into a more human format, such as "First name" - # instead of "first_name". - # - # Person.human_attribute_name("first_name") # => "First name" - # - # Specify +options+ with additional translating options. - # - # source://activemodel//lib/active_model/translation.rb#44 - def human_attribute_name(attribute, options = T.unsafe(nil)); end - - # Returns the +i18n_scope+ for the class. Override if you want custom lookup. - # - # source://activemodel//lib/active_model/translation.rb#26 - def i18n_scope; end - - # When localizing a string, it goes through the lookup returned by this - # method, which is used in ActiveModel::Name#human, - # ActiveModel::Errors#full_messages and - # ActiveModel::Translation#human_attribute_name. - # - # source://activemodel//lib/active_model/translation.rb#34 - def lookup_ancestors; end -end - -# 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 - def default_value; end - - # source://activemodel//lib/active_model/type.rb#33 - 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 - def register(type_name, klass = T.unsafe(nil), &block); end - - # source://activemodel//lib/active_model/type.rb#25 - def registry; end - - # source://activemodel//lib/active_model/type.rb#25 - def registry=(_arg0); end - end -end - -# source://activemodel//lib/active_model/type/big_integer.rb#7 -class ActiveModel::Type::BigInteger < ::ActiveModel::Type::Integer - private - - # source://activemodel//lib/active_model/type/big_integer.rb#9 - def max_value; end -end - -# source://activemodel//lib/active_model/type/binary.rb#5 -class ActiveModel::Type::Binary < ::ActiveModel::Type::Value - # @return [Boolean] - # - # source://activemodel//lib/active_model/type/binary.rb#10 - def binary?; end - - # source://activemodel//lib/active_model/type/binary.rb#14 - def cast(value); end - - # @return [Boolean] - # - # source://activemodel//lib/active_model/type/binary.rb#27 - def changed_in_place?(raw_old_value, value); end - - # source://activemodel//lib/active_model/type/binary.rb#22 - def serialize(value); end - - # source://activemodel//lib/active_model/type/binary.rb#6 - def type; end -end - -# source://activemodel//lib/active_model/type/binary.rb#32 -class ActiveModel::Type::Binary::Data - # @return [Data] a new instance of Data - # - # source://activemodel//lib/active_model/type/binary.rb#33 - def initialize(value); end - - # source://activemodel//lib/active_model/type/binary.rb#46 - def ==(other); end - - # source://activemodel//lib/active_model/type/binary.rb#42 - def hex; end - - # source://activemodel//lib/active_model/type/binary.rb#37 - def to_s; end - - # source://activemodel//lib/active_model/type/binary.rb#37 - def to_str; end -end - -# == Active \Model \Type \Boolean -# -# 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+ -# -# source://activemodel//lib/active_model/type/boolean.rb#16 -class ActiveModel::Type::Boolean < ::ActiveModel::Type::Value - # source://activemodel//lib/active_model/type/boolean.rb#32 - def serialize(value); end - - # source://activemodel//lib/active_model/type/boolean.rb#28 - def type; end - - private - - # source://activemodel//lib/active_model/type/boolean.rb#37 - def cast_value(value); end -end - -# source://activemodel//lib/active_model/type/boolean.rb#17 -ActiveModel::Type::Boolean::FALSE_VALUES = T.let(T.unsafe(nil), Set) - -# source://activemodel//lib/active_model/type/date.rb#5 -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 - def type; end - - # source://activemodel//lib/active_model/type/date.rb#13 - def type_cast_for_schema(value); end - - private - - # source://activemodel//lib/active_model/type/date.rb#18 - def cast_value(value); end - - # source://activemodel//lib/active_model/type/date.rb#36 - def fallback_string_to_date(string); end - - # source://activemodel//lib/active_model/type/date.rb#30 - def fast_string_to_date(string); end - - # source://activemodel//lib/active_model/type/date.rb#40 - def new_date(year, mon, mday); end - - # source://activemodel//lib/active_model/type/date.rb#46 - def value_from_multiparameter_assignment(*_arg0); end -end - -# source://activemodel//lib/active_model/type/date.rb#29 -ActiveModel::Type::Date::ISO_DATE = T.let(T.unsafe(nil), Regexp) - -# source://activemodel//lib/active_model/type/date_time.rb#5 -class ActiveModel::Type::DateTime < ::ActiveModel::Type::Value - include ::ActiveModel::Type::Helpers::Timezone - include ::ActiveModel::Type::Helpers::TimeValue - include ::ActiveModel::Type::Helpers::AcceptsMultiparameterTime::InstanceMethods - - # source://activemodel//lib/active_model/type/date_time.rb#12 - def type; end - - private - - # source://activemodel//lib/active_model/type/date_time.rb#17 - def cast_value(value); end - - # source://activemodel//lib/active_model/type/date_time.rb#30 - def fallback_string_to_time(string); end - - # '0.123456' -> 123456 - # '1.123456' -> 123456 - # - # source://activemodel//lib/active_model/type/date_time.rb#26 - def microseconds(time); end - - # source://activemodel//lib/active_model/type/date_time.rb#37 - def value_from_multiparameter_assignment(values_hash); end -end - -# source://activemodel//lib/active_model/type/decimal.rb#7 -class ActiveModel::Type::Decimal < ::ActiveModel::Type::Value - include ::ActiveModel::Type::Helpers::Numeric - - # source://activemodel//lib/active_model/type/decimal.rb#11 - def type; end - - # source://activemodel//lib/active_model/type/decimal.rb#15 - def type_cast_for_schema(value); end - - private - - # source://activemodel//lib/active_model/type/decimal.rb#60 - def apply_scale(value); end - - # source://activemodel//lib/active_model/type/decimal.rb#20 - def cast_value(value); end - - # source://activemodel//lib/active_model/type/decimal.rb#44 - def convert_float_to_big_decimal(value); end - - # source://activemodel//lib/active_model/type/decimal.rb#52 - def float_precision; end -end - -# source://activemodel//lib/active_model/type/decimal.rb#9 -ActiveModel::Type::Decimal::BIGDECIMAL_PRECISION = T.let(T.unsafe(nil), Integer) - -# source://activemodel//lib/active_model/type/float.rb#7 -class ActiveModel::Type::Float < ::ActiveModel::Type::Value - include ::ActiveModel::Type::Helpers::Numeric - - # source://activemodel//lib/active_model/type/float.rb#10 - def type; end - - # source://activemodel//lib/active_model/type/float.rb#14 - def type_cast_for_schema(value); end - - private - - # source://activemodel//lib/active_model/type/float.rb#24 - def cast_value(value); end -end - -# source://activemodel//lib/active_model/type/helpers/accepts_multiparameter_time.rb#5 -module ActiveModel::Type::Helpers; end - -# source://activemodel//lib/active_model/type/helpers/accepts_multiparameter_time.rb#6 -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 - 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 - def assert_valid_value(value); end - - # source://activemodel//lib/active_model/type/helpers/accepts_multiparameter_time.rb#12 - def cast(value); end - - # source://activemodel//lib/active_model/type/helpers/accepts_multiparameter_time.rb#8 - def serialize(value); end - - # @return [Boolean] - # - # source://activemodel//lib/active_model/type/helpers/accepts_multiparameter_time.rb#28 - 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#7 - def cast(value); end - - # +raw_old_value+ will be the `_before_type_cast` version of the - # value (likely a string). +new_value+ will be the current, type - # cast value. - # - # @return [Boolean] - # - # source://activemodel//lib/active_model/type/helpers/mutable.rb#14 - def changed_in_place?(raw_old_value, new_value); 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 - def cast(value); end - - # @return [Boolean] - # - # source://activemodel//lib/active_model/type/helpers/numeric.rb#27 - 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 - - private - - # @return [Boolean] - # - # source://activemodel//lib/active_model/type/helpers/numeric.rb#33 - def equal_nan?(old_value, new_value); end - - # @return [Boolean] - # - # source://activemodel//lib/active_model/type/helpers/numeric.rb#44 - def non_numeric_string?(value); end - - # @return [Boolean] - # - # source://activemodel//lib/active_model/type/helpers/numeric.rb#40 - def number_to_non_number?(old_value, new_value_before_type_cast); end -end - -# source://activemodel//lib/active_model/type/helpers/numeric.rb#51 -ActiveModel::Type::Helpers::Numeric::NUMERIC_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://activemodel//lib/active_model/type/helpers/time_value.rb#9 -module ActiveModel::Type::Helpers::TimeValue - # source://activemodel//lib/active_model/type/helpers/time_value.rb#24 - def apply_seconds_precision(value); end - - # source://activemodel//lib/active_model/type/helpers/time_value.rb#10 - def serialize(value); end - - # source://activemodel//lib/active_model/type/helpers/time_value.rb#38 - def type_cast_for_schema(value); end - - # source://activemodel//lib/active_model/type/helpers/time_value.rb#42 - def user_input_in_time_zone(value); end - - private - - # source://activemodel//lib/active_model/type/helpers/time_value.rb#72 - def fast_string_to_time(string); end - - # source://activemodel//lib/active_model/type/helpers/time_value.rb#47 - def new_time(year, mon, mday, hour, min, sec, microsec, offset = T.unsafe(nil)); end -end - -# source://activemodel//lib/active_model/type/helpers/time_value.rb#64 -ActiveModel::Type::Helpers::TimeValue::ISO_DATETIME = T.let(T.unsafe(nil), Regexp) - -# source://activemodel//lib/active_model/type/helpers/timezone.rb#8 -module ActiveModel::Type::Helpers::Timezone - # source://activemodel//lib/active_model/type/helpers/timezone.rb#13 - def default_timezone; end - - # @return [Boolean] - # - # source://activemodel//lib/active_model/type/helpers/timezone.rb#9 - def is_utc?; end -end - -# source://activemodel//lib/active_model/type/immutable_string.rb#5 -class ActiveModel::Type::ImmutableString < ::ActiveModel::Type::Value - # @return [ImmutableString] a new instance of ImmutableString - # - # source://activemodel//lib/active_model/type/immutable_string.rb#6 - def initialize(**args); end - - # source://activemodel//lib/active_model/type/immutable_string.rb#16 - def serialize(value); end - - # source://activemodel//lib/active_model/type/immutable_string.rb#12 - def type; end - - private - - # source://activemodel//lib/active_model/type/immutable_string.rb#26 - def cast_value(value); end -end - -# source://activemodel//lib/active_model/type/integer.rb#5 -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 - def initialize(**_arg0); end - - # source://activemodel//lib/active_model/type/integer.rb#21 - def deserialize(value); end - - # @return [Boolean] - # - # source://activemodel//lib/active_model/type/integer.rb#31 - def serializable?(value); end - - # source://activemodel//lib/active_model/type/integer.rb#26 - def serialize(value); end - - # source://activemodel//lib/active_model/type/integer.rb#17 - def type; end - - private - - # source://activemodel//lib/active_model/type/integer.rb#65 - def _limit; end - - # source://activemodel//lib/active_model/type/integer.rb#46 - def cast_value(value); end - - # source://activemodel//lib/active_model/type/integer.rb#50 - def ensure_in_range(value); end - - # @return [Boolean] - # - # source://activemodel//lib/active_model/type/integer.rb#42 - def in_range?(value); end - - # source://activemodel//lib/active_model/type/integer.rb#57 - def max_value; end - - # source://activemodel//lib/active_model/type/integer.rb#61 - def min_value; end - - # Returns the value of attribute range. - # - # source://activemodel//lib/active_model/type/integer.rb#40 - 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 -ActiveModel::Type::Integer::DEFAULT_LIMIT = T.let(T.unsafe(nil), Integer) - -# source://activemodel//lib/active_model/type/registry.rb#5 -class ActiveModel::Type::Registry - # @return [Registry] a new instance of Registry - # - # source://activemodel//lib/active_model/type/registry.rb#6 - def initialize; end - - # source://activemodel//lib/active_model/type/registry.rb#23 - def lookup(symbol, *args, **_arg2); end - - # source://activemodel//lib/active_model/type/registry.rb#15 - def register(type_name, klass = T.unsafe(nil), &block); end - - private - - # source://activemodel//lib/active_model/type/registry.rb#10 - def initialize_copy(other); end - - # Returns the value of attribute registrations. - # - # source://activemodel//lib/active_model/type/registry.rb#35 - def registrations; end -end - -# source://activemodel//lib/active_model/type/string.rb#7 -class ActiveModel::Type::String < ::ActiveModel::Type::ImmutableString - # @return [Boolean] - # - # source://activemodel//lib/active_model/type/string.rb#8 - def changed_in_place?(raw_old_value, new_value); end - - # source://activemodel//lib/active_model/type/string.rb#14 - def to_immutable_string; end - - private - - # source://activemodel//lib/active_model/type/string.rb#25 - def cast_value(value); end -end - -# source://activemodel//lib/active_model/type/time.rb#5 -class ActiveModel::Type::Time < ::ActiveModel::Type::Value - include ::ActiveModel::Type::Helpers::Timezone - include ::ActiveModel::Type::Helpers::TimeValue - include ::ActiveModel::Type::Helpers::AcceptsMultiparameterTime::InstanceMethods - - # source://activemodel//lib/active_model/type/time.rb#12 - def type; end - - # source://activemodel//lib/active_model/type/time.rb#16 - def user_input_in_time_zone(value); end - - private - - # source://activemodel//lib/active_model/type/time.rb#32 - def cast_value(value); end -end - -# source://activemodel//lib/active_model/type/value.rb#5 -class ActiveModel::Type::Value - # @return [Value] a new instance of Value - # - # source://activemodel//lib/active_model/type/value.rb#8 - def initialize(precision: T.unsafe(nil), limit: T.unsafe(nil), scale: T.unsafe(nil)); end - - # source://activemodel//lib/active_model/type/value.rb#109 - def ==(other); end - - # source://activemodel//lib/active_model/type/value.rb#121 - def assert_valid_value(_); end - - # These predicates are not documented, as I need to look further into - # their use, and see if they can be removed entirely. - # - # @return [Boolean] - # - # source://activemodel//lib/active_model/type/value.rb#65 - def binary?; end - - # Type casts a value from user input (e.g. from a setter). This value may - # be a string from the form builder, or a ruby object passed to a setter. - # There is currently no way to differentiate between which source it came - # from. - # - # The return value of this method will be returned from - # ActiveRecord::AttributeMethods::Read#read_attribute. See also: - # Value#cast_value. - # - # +value+ The raw input, as provided to the attribute setter. - # - # source://activemodel//lib/active_model/type/value.rb#45 - def cast(value); end - - # Determines whether a value has changed for dirty checking. +old_value+ - # and +new_value+ will always be type-cast. Types should not need to - # override this method. - # - # @return [Boolean] - # - # source://activemodel//lib/active_model/type/value.rb#72 - def changed?(old_value, new_value, _new_value_before_type_cast); end - - # Determines whether the mutable value has been modified since it was - # read. Returns +false+ by default. If your type returns an object - # which could be mutated, you should override this method. You will need - # to either: - # - # - pass +new_value+ to Value#serialize and compare it to - # +raw_old_value+ - # - # or - # - # - pass +raw_old_value+ to Value#deserialize and compare it to - # +new_value+ - # - # +raw_old_value+ The original value, before being passed to - # +deserialize+. - # - # +new_value+ The current value, after type casting. - # - # @return [Boolean] - # - # source://activemodel//lib/active_model/type/value.rb#93 - def changed_in_place?(raw_old_value, new_value); end - - # Converts a value from database input to the appropriate ruby type. The - # return value of this method will be returned from - # ActiveRecord::AttributeMethods::Read#read_attribute. The default - # implementation just calls Value#cast. - # - # +value+ The raw input, as provided from the database. - # - # source://activemodel//lib/active_model/type/value.rb#31 - def deserialize(value); end - - # source://activemodel//lib/active_model/type/value.rb#109 - def eql?(other); end - - # @return [Boolean] - # - # source://activemodel//lib/active_model/type/value.rb#101 - def force_equality?(_value); end - - # source://activemodel//lib/active_model/type/value.rb#117 - def hash; end - - # Returns the value of attribute limit. - # - # source://activemodel//lib/active_model/type/value.rb#6 - def limit; end - - # @yield [value] - # - # source://activemodel//lib/active_model/type/value.rb#105 - def map(value); end - - # Returns the value of attribute precision. - # - # source://activemodel//lib/active_model/type/value.rb#6 - def precision; end - - # Returns the value of attribute scale. - # - # source://activemodel//lib/active_model/type/value.rb#6 - def scale; end - - # Returns true if this type can convert +value+ to a type that is usable - # by the database. For example a boolean type can return +true+ if the - # value parameter is a Ruby boolean, but may return +false+ if the value - # parameter is some other object. - # - # @return [Boolean] - # - # source://activemodel//lib/active_model/type/value.rb#18 - def serializable?(value); end - - # Casts a value from the ruby type to a type that the database knows how - # to understand. The returned value from this method should be a - # +String+, +Numeric+, +Date+, +Time+, +Symbol+, +true+, +false+, or - # +nil+. - # - # source://activemodel//lib/active_model/type/value.rb#53 - def serialize(value); end - - # source://activemodel//lib/active_model/type/value.rb#22 - 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 - def type_cast_for_schema(value); end - - # @return [Boolean] - # - # source://activemodel//lib/active_model/type/value.rb#97 - def value_constructed_by_mass_assignment?(_value); end - - private - - # Convenience method for types which do not need separate type casting - # behavior for user and database inputs. Called by Value#cast for - # values except +nil+. - # - # source://activemodel//lib/active_model/type/value.rb#128 - def cast_value(value); end -end - -# Raised when unknown attributes are supplied via mass assignment. -# -# class Person -# include ActiveModel::AttributeAssignment -# include ActiveModel::Validations -# end -# -# person = Person.new -# person.assign_attributes(name: 'Gorby') -# # => ActiveModel::UnknownAttributeError: unknown attribute 'name' for Person. -# -# source://activemodel//lib/active_model/errors.rb#507 -class ActiveModel::UnknownAttributeError < ::NoMethodError - # @return [UnknownAttributeError] a new instance of UnknownAttributeError - # - # source://activemodel//lib/active_model/errors.rb#510 - def initialize(record, attribute); end - - # Returns the value of attribute attribute. - # - # source://activemodel//lib/active_model/errors.rb#508 - def attribute; end - - # Returns the value of attribute record. - # - # source://activemodel//lib/active_model/errors.rb#508 - def record; end -end - -# source://activemodel//lib/active_model/gem_version.rb#9 -module ActiveModel::VERSION; end - -# source://activemodel//lib/active_model/gem_version.rb#10 -ActiveModel::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) - -# source://activemodel//lib/active_model/gem_version.rb#11 -ActiveModel::VERSION::MINOR = T.let(T.unsafe(nil), Integer) - -# source://activemodel//lib/active_model/gem_version.rb#13 -ActiveModel::VERSION::PRE = T.let(T.unsafe(nil), String) - -# source://activemodel//lib/active_model/gem_version.rb#15 -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 -# -# Raised by validate! when the model is invalid. Use the -# +model+ method to retrieve the record which did not validate. -# -# begin -# complex_operation_that_internally_calls_validate! -# rescue ActiveModel::ValidationError => invalid -# puts invalid.model.errors -# end -# -# source://activemodel//lib/active_model/validations.rb#425 -class ActiveModel::ValidationError < ::StandardError - # @return [ValidationError] a new instance of ValidationError - # - # source://activemodel//lib/active_model/validations.rb#428 - def initialize(model); end - - # Returns the value of attribute model. - # - # source://activemodel//lib/active_model/validations.rb#426 - def model; end -end - -# == Active \Model \Validations -# -# Provides a full validation framework to your objects. -# -# A minimal implementation could be: -# -# class Person -# include ActiveModel::Validations -# -# attr_accessor :first_name, :last_name -# -# validates_each :first_name, :last_name do |record, attr, value| -# record.errors.add attr, "starts with z." if value.start_with?("z") -# end -# end -# -# Which provides you with the full standard validation stack that you -# know from Active Record: -# -# person = Person.new -# person.valid? # => true -# person.invalid? # => false -# -# person.first_name = 'zoolander' -# person.valid? # => false -# person.invalid? # => true -# person.errors.messages # => {first_name:["starts with z."]} -# -# 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. -# -# source://activemodel//lib/active_model/validations.rb#37 -module ActiveModel::Validations - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - include ::ActiveSupport::Callbacks - include ::ActiveModel::Validations::HelperMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveModel::Validations::ClassMethods - mixes_in_class_methods ::ActiveModel::Callbacks - mixes_in_class_methods ::ActiveSupport::Callbacks::ClassMethods - mixes_in_class_methods ::ActiveSupport::DescendantsTracker - mixes_in_class_methods ::ActiveModel::Translation - mixes_in_class_methods ::ActiveModel::Validations::HelperMethods - - # Returns the +Errors+ object that holds all information about attribute - # error messages. - # - # class Person - # include ActiveModel::Validations - # - # attr_accessor :name - # validates_presence_of :name - # end - # - # person = Person.new - # person.valid? # => false - # person.errors # => # - # - # source://activemodel//lib/active_model/validations.rb#301 - def errors; end - - # Performs the opposite of valid?. Returns +true+ if errors were - # added, +false+ otherwise. - # - # class Person - # include ActiveModel::Validations - # - # attr_accessor :name - # validates_presence_of :name - # end - # - # person = Person.new - # person.name = '' - # person.invalid? # => true - # person.name = 'david' - # person.invalid? # => false - # - # Context can optionally be supplied to define which callbacks to test - # against (the context is defined on the validations using :on). - # - # class Person - # include ActiveModel::Validations - # - # attr_accessor :name - # validates_presence_of :name, on: :new - # end - # - # person = Person.new - # person.invalid? # => false - # person.invalid?(:new) # => true - # - # @return [Boolean] - # - # source://activemodel//lib/active_model/validations.rb#373 - def invalid?(context = T.unsafe(nil)); end - - # Hook method defining how an attribute value should be retrieved. By default - # this is assumed to be an instance named after the attribute. Override this - # method in subclasses should you need to retrieve the value for a given - # attribute differently: - # - # class MyClass - # include ActiveModel::Validations - # - # def initialize(data = {}) - # @data = data - # end - # - # def read_attribute_for_validation(key) - # @data[key] - # end - # end - def read_attribute_for_validation(*_arg0); end - - # Runs all the specified validations and returns +true+ if no errors were - # added otherwise +false+. - # - # class Person - # include ActiveModel::Validations - # - # attr_accessor :name - # validates_presence_of :name - # end - # - # person = Person.new - # person.name = '' - # person.valid? # => false - # person.name = 'david' - # person.valid? # => true - # - # Context can optionally be supplied to define which callbacks to test - # against (the context is defined on the validations using :on). - # - # class Person - # include ActiveModel::Validations - # - # attr_accessor :name - # validates_presence_of :name, on: :new - # end - # - # person = Person.new - # person.valid? # => true - # person.valid?(:new) # => false - # - # @return [Boolean] - # - # source://activemodel//lib/active_model/validations.rb#334 - def valid?(context = T.unsafe(nil)); end - - # Runs all the specified validations and returns +true+ if no errors were - # added otherwise +false+. - # - # class Person - # include ActiveModel::Validations - # - # attr_accessor :name - # validates_presence_of :name - # end - # - # person = Person.new - # person.name = '' - # person.valid? # => false - # person.name = 'david' - # person.valid? # => true - # - # Context can optionally be supplied to define which callbacks to test - # against (the context is defined on the validations using :on). - # - # class Person - # include ActiveModel::Validations - # - # attr_accessor :name - # validates_presence_of :name, on: :new - # end - # - # person = Person.new - # person.valid? # => true - # person.valid?(:new) # => false - # - # @return [Boolean] - # - # source://activemodel//lib/active_model/validations.rb#334 - def validate(context = T.unsafe(nil)); end - - # Runs all the validations within the specified context. Returns +true+ if - # no errors are found, raises +ValidationError+ otherwise. - # - # 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 - def validate!(context = T.unsafe(nil)); end - - # Passes the record off to the class or classes specified and allows them - # to add errors based on more complex conditions. - # - # class Person - # include ActiveModel::Validations - # - # validate :instance_validations - # - # def instance_validations - # validates_with MyValidator - # end - # end - # - # Please consult the class method documentation for more information on - # creating your own validator. - # - # You may also pass it multiple classes, like so: - # - # class Person - # include ActiveModel::Validations - # - # validate :instance_validations, on: :create - # - # def instance_validations - # validates_with MyValidator, MyOtherValidator - # end - # end - # - # Standard configuration options (:on, :if and - # :unless), which are available on the class version of - # +validates_with+, should instead be placed on the +validates+ method - # as these are applied and tested in the callback. - # - # If you pass any additional configuration options, they will be passed - # 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 - def validates_with(*args, &block); end - - private - - # Clean the +Errors+ object if instance is duped. - # - # source://activemodel//lib/active_model/validations.rb#283 - def initialize_dup(other); end - - # @raise [ValidationError] - # - # source://activemodel//lib/active_model/validations.rb#410 - def raise_validation_error; end - - # source://activemodel//lib/active_model/validations.rb#405 - def run_validations!; end - - module GeneratedClassMethods - def __callbacks; end - def __callbacks=(value); end - def __callbacks?; end - def _validators; end - def _validators=(value); end - def _validators?; end - end - - module GeneratedInstanceMethods - def __callbacks; end - def __callbacks?; end - def _validators; end - def _validators?; end - end -end - -# == \Active \Model Absence Validator -# -# source://activemodel//lib/active_model/validations/absence.rb#6 -class ActiveModel::Validations::AbsenceValidator < ::ActiveModel::EachValidator - # source://activemodel//lib/active_model/validations/absence.rb#7 - def validate_each(record, attr_name, value); end -end - -# source://activemodel//lib/active_model/validations/acceptance.rb#5 -class ActiveModel::Validations::AcceptanceValidator < ::ActiveModel::EachValidator - # @return [AcceptanceValidator] a new instance of AcceptanceValidator - # - # source://activemodel//lib/active_model/validations/acceptance.rb#6 - def initialize(options); end - - # source://activemodel//lib/active_model/validations/acceptance.rb#11 - def validate_each(record, attribute, value); end - - private - - # @return [Boolean] - # - # source://activemodel//lib/active_model/validations/acceptance.rb#23 - def acceptable_option?(value); end - - # source://activemodel//lib/active_model/validations/acceptance.rb#18 - def setup!(klass); end -end - -# source://activemodel//lib/active_model/validations/acceptance.rb#27 -class ActiveModel::Validations::AcceptanceValidator::LazilyDefineAttributes < ::Module - # @return [LazilyDefineAttributes] a new instance of LazilyDefineAttributes - # - # source://activemodel//lib/active_model/validations/acceptance.rb#28 - def initialize(attributes); end - - # source://activemodel//lib/active_model/validations/acceptance.rb#73 - def ==(other); end - - # source://activemodel//lib/active_model/validations/acceptance.rb#56 - def define_on(klass); end - - # source://activemodel//lib/active_model/validations/acceptance.rb#32 - def included(klass); end - - # @return [Boolean] - # - # source://activemodel//lib/active_model/validations/acceptance.rb#51 - def matches?(method_name); end - - protected - - # Returns the value of attribute attributes. - # - # source://activemodel//lib/active_model/validations/acceptance.rb#78 - def attributes; end -end - -# == Active \Model \Validation \Callbacks -# -# Provides an interface for any class to have +before_validation+ and -# +after_validation+ callbacks. -# -# First, include ActiveModel::Validations::Callbacks from the class you are -# creating: -# -# class MyModel -# include ActiveModel::Validations::Callbacks -# -# before_validation :do_stuff_before_validation -# after_validation :do_stuff_after_validation -# end -# -# Like other before_* callbacks if +before_validation+ throws -# +:abort+ then valid? will not be called. -# -# source://activemodel//lib/active_model/validations/callbacks.rb#22 -module ActiveModel::Validations::Callbacks - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - include ::ActiveSupport::Callbacks - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveModel::Validations::Callbacks::ClassMethods - mixes_in_class_methods ::ActiveSupport::Callbacks::ClassMethods - mixes_in_class_methods ::ActiveSupport::DescendantsTracker - - private - - # Override run_validations! to include callbacks. - # - # source://activemodel//lib/active_model/validations/callbacks.rb#116 - def run_validations!; end - - module GeneratedClassMethods - def __callbacks; end - def __callbacks=(value); end - def __callbacks?; end - end - - module GeneratedInstanceMethods - def __callbacks; end - def __callbacks?; end - end -end - -# source://activemodel//lib/active_model/validations/callbacks.rb#32 -module ActiveModel::Validations::Callbacks::ClassMethods - # Defines a callback that will get called right after validation. - # - # class Person - # include ActiveModel::Validations - # include ActiveModel::Validations::Callbacks - # - # attr_accessor :name, :status - # - # validates_presence_of :name - # - # after_validation :set_status - # - # private - # - # def set_status - # self.status = errors.empty? - # end - # end - # - # person = Person.new - # person.name = '' - # person.valid? # => false - # person.status # => false - # person.name = 'bob' - # person.valid? # => true - # person.status # => true - # - # source://activemodel//lib/active_model/validations/callbacks.rb#90 - def after_validation(*args, &block); end - - # Defines a callback that will get called right before validation. - # - # class Person - # include ActiveModel::Validations - # include ActiveModel::Validations::Callbacks - # - # attr_accessor :name - # - # validates_length_of :name, maximum: 6 - # - # before_validation :remove_whitespaces - # - # private - # - # def remove_whitespaces - # name.strip! - # end - # end - # - # person = Person.new - # person.name = ' bob ' - # person.valid? # => true - # person.name # => "bob" - # - # source://activemodel//lib/active_model/validations/callbacks.rb#56 - def before_validation(*args, &block); end - - private - - # source://activemodel//lib/active_model/validations/callbacks.rb#101 - def set_options_for_callback(options); end -end - -# source://activemodel//lib/active_model/validations.rb#55 -module ActiveModel::Validations::ClassMethods - # Returns +true+ if +attribute+ is an attribute method, +false+ otherwise. - # - # class Person - # include ActiveModel::Validations - # - # attr_accessor :name - # end - # - # User::User.attribute_method?(:name) # => true - # User::User.attribute_method?(:age) # => false - # - # @return [Boolean] - # - # source://activemodel//lib/active_model/validations.rb#270 - def attribute_method?(attribute); end - - # Clears all of the validators and validations. - # - # Note that this will clear anything that is being used to validate - # the model for both the +validates_with+ and +validate+ methods. - # It clears the validators that are created with an invocation of - # +validates_with+ and the callbacks that are set by an invocation - # of +validate+. - # - # class Person - # include ActiveModel::Validations - # - # validates_with MyValidator - # validates_with OtherValidator, on: :create - # validates_with StrictValidator, strict: true - # validate :cannot_be_robot - # - # def cannot_be_robot - # errors.add(:base, 'A person cannot be a robot') if person_is_robot - # end - # end - # - # Person.validators - # # => [ - # # #, - # # #, - # # # - # # ] - # - # If one runs Person.clear_validators! and then checks to see what - # validators this class has, you would obtain: - # - # Person.validators # => [] - # - # Also, the callback set by validate :cannot_be_robot will be erased - # so that: - # - # Person._validate_callbacks.empty? # => true - # - # source://activemodel//lib/active_model/validations.rb#234 - def clear_validators!; end - - # Copy validators on inheritance. - # - # source://activemodel//lib/active_model/validations.rb#275 - def inherited(base); end - - # Adds a validation method or block to the class. This is useful when - # overriding the +validate+ instance method becomes too unwieldy and - # you're looking for more descriptive declaration of your validations. - # - # This can be done with a symbol pointing to a method: - # - # class Comment - # include ActiveModel::Validations - # - # validate :must_be_friends - # - # def must_be_friends - # errors.add(:base, 'Must be friends to leave a comment') unless commenter.friend_of?(commentee) - # end - # end - # - # With a block which is passed with the current record to be validated: - # - # class Comment - # include ActiveModel::Validations - # - # validate do |comment| - # comment.must_be_friends - # end - # - # def must_be_friends - # errors.add(:base, 'Must be friends to leave a comment') unless commenter.friend_of?(commentee) - # end - # end - # - # Or with a block where +self+ points to the current record to be validated: - # - # class Comment - # include ActiveModel::Validations - # - # validate do - # errors.add(:base, 'Must be friends to leave a comment') unless commenter.friend_of?(commentee) - # end - # end - # - # Note that the return value of validation methods is not relevant. - # It's not possible to halt the validate callback chain. - # - # Options: - # * :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. - # - # NOTE: Calling +validate+ multiple times on the same method will overwrite previous definitions. - # - # source://activemodel//lib/active_model/validations.rb#152 - 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 - # validators can be overridden inside specific classes by creating - # custom validator classes in their place such as PresenceValidator. - # - # Examples of using the default rails validators: - # - # validates :username, absence: true - # validates :terms, acceptance: true - # validates :password, confirmation: true - # validates :username, exclusion: { in: %w(admin superuser) } - # validates :email, format: { with: /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i, on: :create } - # validates :age, inclusion: { in: 0..9 } - # validates :first_name, length: { maximum: 30 } - # validates :age, numericality: true - # validates :username, presence: true - # - # The power of the +validates+ method comes when using custom validators - # and default validators in one call for a given attribute. - # - # class EmailValidator < ActiveModel::EachValidator - # def validate_each(record, attribute, value) - # record.errors.add attribute, (options[:message] || "is not an email") unless - # /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i.match?(value) - # end - # end - # - # class Person - # include ActiveModel::Validations - # attr_accessor :name, :email - # - # validates :name, presence: true, length: { maximum: 100 } - # validates :email, presence: true, email: true - # end - # - # Validator classes may also exist within the class being validated - # allowing custom modules of validators to be included as needed. - # - # class Film - # include ActiveModel::Validations - # - # class TitleValidator < ActiveModel::EachValidator - # def validate_each(record, attribute, value) - # record.errors.add attribute, "must start with 'the'" unless /\Athe/i.match?(value) - # end - # end - # - # validates :name, title: true - # end - # - # Additionally validator classes may be in another namespace and still - # used within any class. - # - # validates :name, :'film/title' => true - # - # The validators hash can also handle regular expressions, ranges, arrays - # and strings in shortcut form. - # - # validates :email, format: /@/ - # validates :role, inclusion: %w(admin contributor) - # validates :password, length: 6..20 - # - # When using shortcut form, ranges and arrays are passed to your - # validator's initializer as options[:in] while other types - # including regular expressions and strings are passed as options[:with]. - # - # There is also a list of options that could be used along with validators: - # - # * :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. - # * :allow_nil - Skip validation if the attribute is +nil+. - # * :allow_blank - Skip validation if the attribute is blank. - # * :strict - If the :strict option is set to true - # will raise ActiveModel::StrictValidationFailed instead of adding the error. - # :strict option can also be set to any other exception. - # - # Example: - # - # validates :password, presence: true, confirmation: true, if: :password_required? - # validates :token, length: 24, strict: TokenLengthException - # - # - # Finally, the options +:if+, +:unless+, +:on+, +:allow_blank+, +:allow_nil+, +:strict+ - # and +:message+ can be given to one specific validator, as a hash: - # - # validates :password, presence: { if: :password_required?, message: 'is forgotten.' }, confirmation: true - # - # @raise [ArgumentError] - # - # source://activemodel//lib/active_model/validations/validates.rb#106 - def validates(*attributes); end - - # 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 - # when validation fails. See validates for more information about - # the validation itself. - # - # class Person - # include ActiveModel::Validations - # - # attr_accessor :name - # validates! :name, presence: true - # end - # - # person = Person.new - # person.name = '' - # person.valid? - # # => ActiveModel::StrictValidationFailed: Name can't be blank - # - # source://activemodel//lib/active_model/validations/validates.rb#148 - def validates!(*attributes); end - - # Validates each attribute against a block. - # - # class Person - # include ActiveModel::Validations - # - # attr_accessor :first_name, :last_name - # - # validates_each :first_name, :last_name, allow_blank: true do |record, attr, value| - # record.errors.add attr, "starts with z." if value.start_with?("z") - # end - # end - # - # Options: - # * :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]) - # * :allow_nil - Skip validation if attribute is +nil+. - # * :allow_blank - Skip validation if attribute is blank. - # * :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. - # - # source://activemodel//lib/active_model/validations.rb#85 - def validates_each(*attr_names, &block); end - - # Passes the record off to the class or classes specified and allows them - # to add errors based on more complex conditions. - # - # class Person - # include ActiveModel::Validations - # validates_with MyValidator - # end - # - # class MyValidator < ActiveModel::Validator - # def validate(record) - # if some_complex_logic - # record.errors.add :base, 'This record is invalid' - # end - # end - # - # private - # def some_complex_logic - # # ... - # end - # end - # - # You may also pass it multiple classes, like so: - # - # class Person - # include ActiveModel::Validations - # validates_with MyValidator, MyOtherValidator, on: :create - # end - # - # Configuration options: - # * :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. - # - # If you pass any additional configuration options, they will be passed - # to the class and available as +options+: - # - # class Person - # include ActiveModel::Validations - # validates_with MyValidator, my_custom_key: 'my custom value' - # end - # - # class MyValidator < ActiveModel::Validator - # def validate(record) - # options[:my_custom_key] # => "my custom value" - # end - # end - # - # source://activemodel//lib/active_model/validations/with.rb#81 - def validates_with(*args, &block); end - - # List all validators that are being used to validate the model using - # +validates_with+ method. - # - # class Person - # include ActiveModel::Validations - # - # validates_with MyValidator - # validates_with OtherValidator, on: :create - # validates_with StrictValidator, strict: true - # end - # - # Person.validators - # # => [ - # # #, - # # #, - # # # - # # ] - # - # source://activemodel//lib/active_model/validations.rb#192 - def validators; end - - # List all validators that are being used to validate a specific attribute. - # - # class Person - # include ActiveModel::Validations - # - # attr_accessor :name, :age - # - # validates_presence_of :name - # validates_inclusion_of :age, in: 0..99 - # end - # - # Person.validators_on(:name) - # # => [ - # # #, - # # ] - # - # source://activemodel//lib/active_model/validations.rb#254 - def validators_on(*attributes); end - - private - - # source://activemodel//lib/active_model/validations/validates.rb#161 - def _parse_validates_options(options); end - - # When creating custom validators, it might be useful to be able to specify - # additional default keys. This can be done by overwriting this method. - # - # source://activemodel//lib/active_model/validations/validates.rb#157 - def _validates_default_keys; end -end - -# source://activemodel//lib/active_model/validations.rb#89 -ActiveModel::Validations::ClassMethods::VALID_OPTIONS_FOR_VALIDATE = T.let(T.unsafe(nil), Array) - -# source://activemodel//lib/active_model/validations/clusivity.rb#7 -module ActiveModel::Validations::Clusivity - # source://activemodel//lib/active_model/validations/clusivity.rb#11 - def check_validity!; end - - private - - # source://activemodel//lib/active_model/validations/clusivity.rb#34 - def delimiter; end - - # @return [Boolean] - # - # source://activemodel//lib/active_model/validations/clusivity.rb#18 - def include?(record, value); end - - # After Ruby 2.2, Range#include? on non-number-or-time-ish ranges checks all - # possible values in the range for equality, which is slower but more accurate. - # Range#cover? uses the previous logic of comparing a value with the range - # endpoints, which is fast but is only accurate on Numeric, Time, Date, - # or DateTime ranges. - # - # source://activemodel//lib/active_model/validations/clusivity.rb#43 - def inclusion_method(enumerable); end -end - -# source://activemodel//lib/active_model/validations/clusivity.rb#8 -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 -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 -class ActiveModel::Validations::ComparisonValidator < ::ActiveModel::EachValidator - include ::ActiveModel::Validations::Comparability - - # source://activemodel//lib/active_model/validations/comparison.rb#10 - def check_validity!; end - - # source://activemodel//lib/active_model/validations/comparison.rb#17 - def validate_each(record, attr_name, value); end -end - -# source://activemodel//lib/active_model/validations/confirmation.rb#5 -class ActiveModel::Validations::ConfirmationValidator < ::ActiveModel::EachValidator - # @return [ConfirmationValidator] a new instance of ConfirmationValidator - # - # source://activemodel//lib/active_model/validations/confirmation.rb#6 - def initialize(options); end - - # source://activemodel//lib/active_model/validations/confirmation.rb#11 - def validate_each(record, attribute, value); end - - private - - # @return [Boolean] - # - # source://activemodel//lib/active_model/validations/confirmation.rb#31 - def confirmation_value_equal?(record, attribute, value, confirmed); end - - # source://activemodel//lib/active_model/validations/confirmation.rb#21 - def setup!(klass); end -end - -# source://activemodel//lib/active_model/validations/exclusion.rb#7 -class ActiveModel::Validations::ExclusionValidator < ::ActiveModel::EachValidator - 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 -class ActiveModel::Validations::FormatValidator < ::ActiveModel::EachValidator - # source://activemodel//lib/active_model/validations/format.rb#16 - def check_validity!; end - - # source://activemodel//lib/active_model/validations/format.rb#6 - def validate_each(record, attribute, value); end - - private - - # source://activemodel//lib/active_model/validations/format.rb#35 - 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 - def record_error(record, attribute, name, value); end - - # @return [Boolean] - # - # source://activemodel//lib/active_model/validations/format.rb#49 - 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. - # - # class Person < ActiveRecord::Base - # validates_absence_of :first_name - # end - # - # The first_name attribute must be in the object and it must be blank. - # - # Configuration options: - # * :message - A custom error message (default is: "must be blank"). - # - # There is also a list of default options supported by every validator: - # +:if+, +:unless+, +:on+, +:allow_nil+, +:allow_blank+, and +:strict+. - # See ActiveModel::Validations::ClassMethods#validates for more information. - # - # source://activemodel//lib/active_model/validations/absence.rb#28 - def validates_absence_of(*attr_names); end - - # Encapsulates the pattern of wanting to validate the acceptance of a - # terms of service check box (or similar agreement). - # - # class Person < ActiveRecord::Base - # validates_acceptance_of :terms_of_service - # validates_acceptance_of :eula, message: 'must be abided' - # end - # - # 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. - # - # Configuration options: - # * :message - A custom error message (default is: "must be - # accepted"). - # * :accept - Specifies a value that is considered accepted. - # Also accepts an array of possible values. The default value is - # an array ["1", true], which makes it easy to relate to an HTML - # checkbox. This should be set to, or include, +true+ if you are validating - # a database column, since the attribute is typecast from "1" to +true+ - # before validation. - # - # There is also a list of default options supported by every validator: - # +:if+, +:unless+, +:on+, +:allow_nil+, +:allow_blank+, and +:strict+. - # See ActiveModel::Validations::ClassMethods#validates for more information. - # - # source://activemodel//lib/active_model/validations/acceptance.rb#108 - def validates_acceptance_of(*attr_names); end - - # Validates the value of a specified attribute fulfills all - # defined comparisons with another value, proc, or attribute. - # - # class Person < ActiveRecord::Base - # validates_comparison_of :value, greater_than: 'the sum of its parts' - # end - # - # Configuration options: - # * :message - A custom error message (default is: "failed comparison"). - # * :greater_than - Specifies the value must be greater than the - # supplied value. - # * :greater_than_or_equal_to - Specifies the value must be - # greater than or equal to the supplied value. - # * :equal_to - Specifies the value must be equal to the supplied - # value. - # * :less_than - Specifies the value must be less than the - # supplied value. - # * :less_than_or_equal_to - Specifies the value must be less - # than or equal to the supplied value. - # * :other_than - Specifies the value must not be equal to the - # supplied value. - # - # There is also a list of default options supported by every validator: - # +:if+, +:unless+, +:on+, +:allow_nil+, +:allow_blank+, and +:strict+ . - # See ActiveModel::Validations::ClassMethods#validates for more information. - # - # The validator requires at least one of the following checks to be supplied. - # Each will accept a proc, value, or a symbol which corresponds to a method: - # - # * :greater_than - # * :greater_than_or_equal_to - # * :equal_to - # * :less_than - # * :less_than_or_equal_to - # * :other_than - # - # For example: - # - # class Person < ActiveRecord::Base - # validates_comparison_of :birth_date, less_than_or_equal_to: -> { Date.today } - # validates_comparison_of :preferred_name, other_than: :given_name, allow_nil: true - # end - # - # source://activemodel//lib/active_model/validations/comparison.rb#77 - def validates_comparison_of(*attr_names); end - - # Encapsulates the pattern of wanting to validate a password or email - # address field with a confirmation. - # - # Model: - # class Person < ActiveRecord::Base - # validates_confirmation_of :user_name, :password - # validates_confirmation_of :email_address, - # message: 'should match confirmation' - # end - # - # View: - # <%= password_field "person", "password" %> - # <%= password_field "person", "password_confirmation" %> - # - # The added +password_confirmation+ attribute is virtual; it exists only - # as an in-memory attribute for validating the password. To achieve this, - # the validation adds accessors to the model for the confirmation - # attribute. - # - # NOTE: This check is performed only if +password_confirmation+ is not - # +nil+. To require confirmation, make sure to add a presence check for - # the confirmation attribute: - # - # validates_presence_of :password_confirmation, if: :password_changed? - # - # Configuration options: - # * :message - A custom error message (default is: "doesn't match - # %{translated_attribute_name}"). - # * :case_sensitive - Looks for an exact match. Ignored by - # non-text columns (+true+ by default). - # - # There is also a list of default options supported by every validator: - # +:if+, +:unless+, +:on+, +:allow_nil+, +:allow_blank+, and +:strict+. - # See ActiveModel::Validations::ClassMethods#validates for more information. - # - # source://activemodel//lib/active_model/validations/confirmation.rb#75 - def validates_confirmation_of(*attr_names); end - - # Validates that the value of the specified attribute is not in a - # particular enumerable object. - # - # class Person < ActiveRecord::Base - # validates_exclusion_of :username, in: %w( admin superuser ), message: "You don't belong here" - # validates_exclusion_of :age, in: 30..60, message: 'This site is only for under 30 and over 60' - # validates_exclusion_of :format, in: %w( mov avi ), message: "extension %{value} is not allowed" - # validates_exclusion_of :password, in: ->(person) { [person.username, person.first_name] }, - # message: 'should not be the same as your username or first name' - # validates_exclusion_of :karma, in: :reserved_karmas - # end - # - # Configuration options: - # * :in - An enumerable object of items that the value shouldn't - # be part of. This can be supplied as a proc, lambda, or symbol which returns an - # enumerable. If the enumerable is a numerical, time, or datetime range the test - # is performed with Range#cover?, otherwise with include?. When - # using a proc or lambda the instance under validation is passed as an argument. - # * :within - A synonym(or alias) for :in - # Range#cover?, otherwise with include?. - # * :message - Specifies a custom error message (default is: "is - # reserved"). - # - # There is also a list of default options supported by every validator: - # +:if+, +:unless+, +:on+, +:allow_nil+, +:allow_blank+, and +:strict+. - # See ActiveModel::Validations::ClassMethods#validates for more information. - # - # source://activemodel//lib/active_model/validations/exclusion.rb#44 - def validates_exclusion_of(*attr_names); end - - # Validates whether the value of the specified attribute is of the correct - # form, going by the regular expression provided. You can require that the - # attribute matches the regular expression: - # - # class Person < ActiveRecord::Base - # validates_format_of :email, with: /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i, on: :create - # end - # - # Alternatively, you can require that the specified attribute does _not_ - # match the regular expression: - # - # class Person < ActiveRecord::Base - # validates_format_of :email, without: /NOSPAM/ - # end - # - # You can also provide a proc or lambda which will determine the regular - # expression that will be used to validate the attribute. - # - # class Person < ActiveRecord::Base - # # Admin can have number as a first letter in their screen name - # validates_format_of :screen_name, - # with: ->(person) { person.admin? ? /\A[a-z0-9][a-z0-9_\-]*\z/i : /\A[a-z][a-z0-9_\-]*\z/i } - # end - # - # Note: use \A and \z to match the start and end of the - # string, ^ and $ match the start/end of a line. - # - # Due to frequent misuse of ^ and $, you need to pass - # the multiline: true option in case you use any of these two - # anchors in the provided regular expression. In most cases, you should be - # using \A and \z. - # - # You must pass either :with or :without as an option. - # In addition, both must be a regular expression or a proc or lambda, or - # else an exception will be raised. - # - # Configuration options: - # * :message - A custom error message (default is: "is invalid"). - # * :with - Regular expression that if the attribute matches will - # result in a successful validation. This can be provided as a proc or - # lambda returning regular expression which will be called at runtime. - # * :without - Regular expression that if the attribute does not - # match will result in a successful validation. This can be provided as - # a proc or lambda returning regular expression which will be called at - # runtime. - # * :multiline - Set to true if your regular expression contains - # anchors that match the beginning or end of lines as opposed to the - # beginning or end of the string. These anchors are ^ and $. - # - # There is also a list of default options supported by every validator: - # +: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 - def validates_format_of(*attr_names); end - - # Validates whether the value of the specified attribute is available in a - # particular enumerable object. - # - # class Person < ActiveRecord::Base - # validates_inclusion_of :role, in: %w( admin contributor ) - # validates_inclusion_of :age, in: 0..99 - # validates_inclusion_of :format, in: %w( jpg gif png ), message: "extension %{value} is not included in the list" - # validates_inclusion_of :states, in: ->(person) { STATES[person.country] } - # validates_inclusion_of :karma, in: :available_karmas - # end - # - # Configuration options: - # * :in - An enumerable object of available items. This can be - # supplied as a proc, lambda, or symbol which returns an enumerable. If the - # enumerable is a numerical, time, or datetime range the test is performed - # with Range#cover?, otherwise with include?. When using - # a proc or lambda the instance under validation is passed as an argument. - # * :within - A synonym(or alias) for :in - # * :message - Specifies a custom error message (default is: "is - # not included in the list"). - # - # There is also a list of default options supported by every validator: - # +:if+, +:unless+, +:on+, +:allow_nil+, +:allow_blank+, and +:strict+. - # See ActiveModel::Validations::ClassMethods#validates for more information. - # - # source://activemodel//lib/active_model/validations/inclusion.rb#42 - def validates_inclusion_of(*attr_names); end - - # Validates that the specified attributes match the length restrictions - # supplied. Only one constraint option can be used at a time apart from - # +:minimum+ and +:maximum+ that can be combined together: - # - # class Person < ActiveRecord::Base - # validates_length_of :first_name, maximum: 30 - # validates_length_of :last_name, maximum: 30, message: "less than 30 if you don't mind" - # validates_length_of :fax, in: 7..32, allow_nil: true - # validates_length_of :phone, in: 7..32, allow_blank: true - # validates_length_of :user_name, within: 6..20, too_long: 'pick a shorter name', too_short: 'pick a longer name' - # validates_length_of :zip_code, minimum: 5, too_short: 'please enter at least 5 characters' - # validates_length_of :smurf_leader, is: 4, message: "papa is spelled with 4 characters... don't play me." - # validates_length_of :words_in_essay, minimum: 100, too_short: 'Your essay must be at least 100 words.' - # - # private - # - # def words_in_essay - # essay.scan(/\w+/) - # end - # end - # - # Constraint options: - # - # * :minimum - The minimum size of the attribute. - # * :maximum - The maximum size of the attribute. Allows +nil+ by - # default if not used with +:minimum+. - # * :is - The exact size of the attribute. - # * :within - A range specifying the minimum and maximum size of - # the attribute. - # * :in - A synonym (or alias) for :within. - # - # Other options: - # - # * :allow_nil - Attribute may be +nil+; skip validation. - # * :allow_blank - Attribute may be blank; skip validation. - # * :too_long - The error message if the attribute goes over the - # maximum (default is: "is too long (maximum is %{count} characters)"). - # * :too_short - The error message if the attribute goes under the - # minimum (default is: "is too short (minimum is %{count} characters)"). - # * :wrong_length - The error message if using the :is - # method and the attribute is the wrong size (default is: "is the wrong - # length (should be %{count} characters)"). - # * :message - The error message to use for a :minimum, - # :maximum, or :is violation. An alias of the appropriate - # too_long/too_short/wrong_length message. - # - # There is also a list of default options supported by every validator: - # +:if+, +:unless+, +:on+, and +:strict+. - # See ActiveModel::Validations::ClassMethods#validates for more information. - # - # source://activemodel//lib/active_model/validations/length.rb#122 - 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. - # - # class Person < ActiveRecord::Base - # validates_numericality_of :value, on: :create - # end - # - # Configuration options: - # * :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+). - # * :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. - # * :greater_than_or_equal_to - Specifies the value must be - # greater than or equal the supplied value. - # * :equal_to - Specifies the value must be equal to the supplied - # value. - # * :less_than - Specifies the value must be less than the - # supplied value. - # * :less_than_or_equal_to - Specifies the value must be less - # than or equal the supplied value. - # * :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. - # - # There is also a list of default options supported by every validator: - # +:if+, +:unless+, +:on+, +:allow_nil+, +:allow_blank+, and +:strict+ . - # See ActiveModel::Validations::ClassMethods#validates for more information. - # - # The following checks can also be supplied with a proc or a symbol which - # corresponds to a method: - # - # * :greater_than - # * :greater_than_or_equal_to - # * :equal_to - # * :less_than - # * :less_than_or_equal_to - # * :only_integer - # * :other_than - # - # For example: - # - # class Person < ActiveRecord::Base - # validates_numericality_of :width, less_than: ->(person) { person.height } - # validates_numericality_of :width, greater_than: :minimum_weight - # end - # - # source://activemodel//lib/active_model/validations/numericality.rb#205 - 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. - # - # class Person < ActiveRecord::Base - # validates_presence_of :first_name - # end - # - # The first_name attribute must be in the object and it cannot be blank. - # - # 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. - # - # Configuration options: - # * :message - A custom error message (default is: "can't be blank"). - # - # There is also a list of default options supported by every validator: - # +:if+, +:unless+, +:on+, +:allow_nil+, +:allow_blank+, and +:strict+. - # See ActiveModel::Validations::ClassMethods#validates for more information. - # - # source://activemodel//lib/active_model/validations/presence.rb#34 - def validates_presence_of(*attr_names); end - - # Validates that the specified attributes match the length restrictions - # supplied. Only one constraint option can be used at a time apart from - # +:minimum+ and +:maximum+ that can be combined together: - # - # class Person < ActiveRecord::Base - # validates_length_of :first_name, maximum: 30 - # validates_length_of :last_name, maximum: 30, message: "less than 30 if you don't mind" - # validates_length_of :fax, in: 7..32, allow_nil: true - # validates_length_of :phone, in: 7..32, allow_blank: true - # validates_length_of :user_name, within: 6..20, too_long: 'pick a shorter name', too_short: 'pick a longer name' - # validates_length_of :zip_code, minimum: 5, too_short: 'please enter at least 5 characters' - # validates_length_of :smurf_leader, is: 4, message: "papa is spelled with 4 characters... don't play me." - # validates_length_of :words_in_essay, minimum: 100, too_short: 'Your essay must be at least 100 words.' - # - # private - # - # def words_in_essay - # essay.scan(/\w+/) - # end - # end - # - # Constraint options: - # - # * :minimum - The minimum size of the attribute. - # * :maximum - The maximum size of the attribute. Allows +nil+ by - # default if not used with +:minimum+. - # * :is - The exact size of the attribute. - # * :within - A range specifying the minimum and maximum size of - # the attribute. - # * :in - A synonym (or alias) for :within. - # - # Other options: - # - # * :allow_nil - Attribute may be +nil+; skip validation. - # * :allow_blank - Attribute may be blank; skip validation. - # * :too_long - The error message if the attribute goes over the - # maximum (default is: "is too long (maximum is %{count} characters)"). - # * :too_short - The error message if the attribute goes under the - # minimum (default is: "is too short (minimum is %{count} characters)"). - # * :wrong_length - The error message if using the :is - # method and the attribute is the wrong size (default is: "is the wrong - # length (should be %{count} characters)"). - # * :message - The error message to use for a :minimum, - # :maximum, or :is violation. An alias of the appropriate - # too_long/too_short/wrong_length message. - # - # There is also a list of default options supported by every validator: - # +:if+, +:unless+, +:on+, and +:strict+. - # See ActiveModel::Validations::ClassMethods#validates for more information. - # - # source://activemodel//lib/active_model/validations/length.rb#122 - def validates_size_of(*attr_names); end - - private - - # source://activemodel//lib/active_model/validations/helper_methods.rb#7 - def _merge_attributes(attr_names); end -end - -# source://activemodel//lib/active_model/validations/inclusion.rb#7 -class ActiveModel::Validations::InclusionValidator < ::ActiveModel::EachValidator - 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 -class ActiveModel::Validations::LengthValidator < ::ActiveModel::EachValidator - # @return [LengthValidator] a new instance of LengthValidator - # - # source://activemodel//lib/active_model/validations/length.rb#11 - def initialize(options); end - - # source://activemodel//lib/active_model/validations/length.rb#24 - def check_validity!; end - - # source://activemodel//lib/active_model/validations/length.rb#40 - def validate_each(record, attribute, value); end - - private - - # @return [Boolean] - # - # source://activemodel//lib/active_model/validations/length.rb#67 - def skip_nil_check?(key); end -end - -# source://activemodel//lib/active_model/validations/length.rb#7 -ActiveModel::Validations::LengthValidator::CHECKS = T.let(T.unsafe(nil), Hash) - -# source://activemodel//lib/active_model/validations/length.rb#6 -ActiveModel::Validations::LengthValidator::MESSAGES = T.let(T.unsafe(nil), Hash) - -# source://activemodel//lib/active_model/validations/length.rb#9 -ActiveModel::Validations::LengthValidator::RESERVED_OPTIONS = T.let(T.unsafe(nil), Array) - -# source://activemodel//lib/active_model/validations/numericality.rb#8 -class ActiveModel::Validations::NumericalityValidator < ::ActiveModel::EachValidator - include ::ActiveModel::Validations::Comparability - - # source://activemodel//lib/active_model/validations/numericality.rb#20 - def check_validity!; end - - # source://activemodel//lib/active_model/validations/numericality.rb#34 - 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 - def allow_only_integer?(record); end - - # source://activemodel//lib/active_model/validations/numericality.rb#106 - def filtered_options(value); end - - # @return [Boolean] - # - # source://activemodel//lib/active_model/validations/numericality.rb#102 - def is_hexadecimal_literal?(raw_value); end - - # @return [Boolean] - # - # source://activemodel//lib/active_model/validations/numericality.rb#98 - def is_integer?(raw_value); end - - # @return [Boolean] - # - # source://activemodel//lib/active_model/validations/numericality.rb#92 - def is_number?(raw_value, precision, scale); end - - # source://activemodel//lib/active_model/validations/numericality.rb#66 - def option_as_number(record, option_value, precision, scale); end - - # source://activemodel//lib/active_model/validations/numericality.rb#70 - def parse_as_number(raw_value, precision, scale); end - - # source://activemodel//lib/active_model/validations/numericality.rb#84 - def parse_float(raw_value, precision, scale); end - - # source://activemodel//lib/active_model/validations/numericality.rb#123 - def prepare_value_for_validation(value, record, attr_name); end - - # @return [Boolean] - # - # source://activemodel//lib/active_model/validations/numericality.rb#144 - def record_attribute_changed_in_place?(record, attr_name); end - - # source://activemodel//lib/active_model/validations/numericality.rb#88 - def round(raw_value, scale); end -end - -# source://activemodel//lib/active_model/validations/numericality.rb#18 -ActiveModel::Validations::NumericalityValidator::HEXADECIMAL_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://activemodel//lib/active_model/validations/numericality.rb#16 -ActiveModel::Validations::NumericalityValidator::INTEGER_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://activemodel//lib/active_model/validations/numericality.rb#12 -ActiveModel::Validations::NumericalityValidator::NUMBER_CHECKS = T.let(T.unsafe(nil), Hash) - -# source://activemodel//lib/active_model/validations/numericality.rb#11 -ActiveModel::Validations::NumericalityValidator::RANGE_CHECKS = T.let(T.unsafe(nil), Hash) - -# source://activemodel//lib/active_model/validations/numericality.rb#14 -ActiveModel::Validations::NumericalityValidator::RESERVED_OPTIONS = T.let(T.unsafe(nil), Array) - -# source://activemodel//lib/active_model/validations/presence.rb#5 -class ActiveModel::Validations::PresenceValidator < ::ActiveModel::EachValidator - # source://activemodel//lib/active_model/validations/presence.rb#6 - def validate_each(record, attr_name, 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 -# -# A simple base class that can be used along with -# ActiveModel::Validations::ClassMethods.validates_with -# -# class Person -# include ActiveModel::Validations -# validates_with MyValidator -# end -# -# class MyValidator < ActiveModel::Validator -# def validate(record) -# if some_complex_logic -# record.errors.add(:base, "This record is invalid") -# end -# end -# -# private -# def some_complex_logic -# # ... -# end -# end -# -# Any class that inherits from ActiveModel::Validator must implement a method -# called +validate+ which accepts a +record+. -# -# class Person -# include ActiveModel::Validations -# validates_with MyValidator -# end -# -# class MyValidator < ActiveModel::Validator -# def validate(record) -# record # => The person instance being validated -# options # => Any non-standard options passed to validates_with -# end -# end -# -# To cause a validation error, you must add to the +record+'s errors directly -# from within the validators message. -# -# class MyValidator < ActiveModel::Validator -# def validate(record) -# record.errors.add :base, "This is some custom error message" -# record.errors.add :first_name, "This is some complex validation" -# # etc... -# end -# end -# -# To add behavior to the initialize method, use the following signature: -# -# class MyValidator < ActiveModel::Validator -# def initialize(options) -# super -# @my_custom_field = options[:field_name] || :first_name -# end -# end -# -# Note that the validator is initialized only once for the whole application -# 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. -# -# class TitleValidator < ActiveModel::EachValidator -# def validate_each(record, attribute, value) -# record.errors.add attribute, 'must be Mr., Mrs., or Dr.' unless %w(Mr. Mrs. Dr.).include?(value) -# end -# end -# -# 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 -# attr_accessor :title -# -# validates :title, presence: true, title: true -# end -# -# It can be useful to access the class that is using that validator when there are prerequisites such -# as an +attr_accessor+ being present. This class is accessible via options[:class] in the constructor. -# To set up your validator override the constructor. -# -# class MyValidator < ActiveModel::Validator -# def initialize(options={}) -# super -# options[:class].attr_accessor :custom_attribute -# end -# end -# -# source://activemodel//lib/active_model/validator.rb#96 -class ActiveModel::Validator - # Accepts options that will be made available through the +options+ reader. - # - # @return [Validator] a new instance of Validator - # - # source://activemodel//lib/active_model/validator.rb#108 - def initialize(options = T.unsafe(nil)); end - - # Returns the kind for this validator. - # - # PresenceValidator.new(attributes: [:username]).kind # => :presence - # AcceptanceValidator.new(attributes: [:terms]).kind # => :acceptance - # - # source://activemodel//lib/active_model/validator.rb#116 - def kind; end - - # Returns the value of attribute options. - # - # source://activemodel//lib/active_model/validator.rb#97 - def options; end - - # Override this method in subclasses with validation logic, adding errors - # to the records +errors+ array where necessary. - # - # @raise [NotImplementedError] - # - # source://activemodel//lib/active_model/validator.rb#122 - def validate(record); end - - class << self - # Returns the kind of the validator. - # - # PresenceValidator.kind # => :presence - # AcceptanceValidator.kind # => :acceptance - # - # source://activemodel//lib/active_model/validator.rb#103 - def kind; end - end -end diff --git a/sorbet/rbi/gems/activerecord@7.0.4.2.rbi b/sorbet/rbi/gems/activerecord@7.0.4.2.rbi deleted file mode 100644 index b7a7f52..0000000 --- a/sorbet/rbi/gems/activerecord@7.0.4.2.rbi +++ /dev/null @@ -1,37845 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `activerecord` gem. -# Please instead update this file by running `bin/tapioca gem activerecord`. - -# source://activerecord//lib/active_record/gem_version.rb#3 -module ActiveRecord - extend ::ActiveSupport::Autoload - - class << self - # source://activerecord//lib/active_record.rb#277 - def action_on_strict_loading_violation; end - - # source://activerecord//lib/active_record.rb#277 - def action_on_strict_loading_violation=(_arg0); end - - # source://activerecord//lib/active_record.rb#270 - def application_record_class; end - - # source://activerecord//lib/active_record.rb#270 - def application_record_class=(_arg0); end - - # source://activerecord//lib/active_record.rb#213 - def async_query_executor; end - - # source://activerecord//lib/active_record.rb#213 - def async_query_executor=(_arg0); end - - # source://activerecord//lib/active_record.rb#183 - 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 - def default_timezone=(default_timezone); end - - # source://activerecord//lib/active_record.rb#311 - def dump_schema_after_migration; end - - # source://activerecord//lib/active_record.rb#311 - def dump_schema_after_migration=(_arg0); end - - # source://activerecord//lib/active_record.rb#321 - def dump_schemas; end - - # source://activerecord//lib/active_record.rb#321 - def dump_schemas=(_arg0); end - - # source://activerecord//lib/active_record.rb#365 - def eager_load!; end - - # source://activerecord//lib/active_record.rb#296 - def error_on_ignored_order; end - - # source://activerecord//lib/active_record.rb#296 - def error_on_ignored_order=(_arg0); end - - # 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 - 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 - def global_executor_concurrency=(global_executor_concurrency); end - - # source://activerecord//lib/active_record.rb#216 - def global_thread_pool_async_query_executor; end - - # source://activerecord//lib/active_record.rb#240 - def index_nested_attribute_errors; end - - # source://activerecord//lib/active_record.rb#240 - def index_nested_attribute_errors=(_arg0); end - - # source://activerecord//lib/active_record.rb#171 - def lazily_load_schema_cache; end - - # source://activerecord//lib/active_record.rb#171 - 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 - - # source://activerecord//lib/active_record.rb#258 - def maintain_test_schema; end - - # source://activerecord//lib/active_record.rb#258 - def maintain_test_schema=(_arg0); end - - # source://activerecord//lib/active_record.rb#340 - def query_transformers; end - - # source://activerecord//lib/active_record.rb#340 - def query_transformers=(_arg0); end - - # source://activerecord//lib/active_record.rb#255 - def queues; end - - # source://activerecord//lib/active_record.rb#255 - def queues=(_arg0); end - - # source://activerecord//lib/active_record.rb#355 - def raise_int_wider_than_64bit; end - - # source://activerecord//lib/active_record.rb#355 - def raise_int_wider_than_64bit=(_arg0); end - - # source://activerecord//lib/active_record.rb#200 - def reading_role; end - - # source://activerecord//lib/active_record.rb#200 - def reading_role=(_arg0); end - - # source://activerecord//lib/active_record.rb#177 - def schema_cache_ignored_tables; end - - # source://activerecord//lib/active_record.rb#177 - def schema_cache_ignored_tables=(_arg0); end - - # source://activerecord//lib/active_record.rb#288 - def schema_format; end - - # source://activerecord//lib/active_record.rb#288 - def schema_format=(_arg0); end - - # source://activerecord//lib/active_record.rb#328 - 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#302 - def timestamped_migrations; end - - # source://activerecord//lib/active_record.rb#302 - def timestamped_migrations=(_arg0); end - - # source://activerecord//lib/active_record.rb#347 - def use_yaml_unsafe_load; end - - # source://activerecord//lib/active_record.rb#347 - def use_yaml_unsafe_load=(_arg0); end - - # source://activerecord//lib/active_record.rb#248 - def verbose_query_logs; end - - # source://activerecord//lib/active_record.rb#248 - def verbose_query_logs=(_arg0); end - - # source://activerecord//lib/active_record.rb#337 - def verify_foreign_keys_for_fixtures; end - - # source://activerecord//lib/active_record.rb#337 - def verify_foreign_keys_for_fixtures=(_arg0); end - - # 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 - def warn_on_records_fetched_greater_than; end - - # source://activerecord//lib/active_record.rb#267 - def warn_on_records_fetched_greater_than=(_arg0); end - - # source://activerecord//lib/active_record.rb#197 - def writing_role; end - - # source://activerecord//lib/active_record.rb#197 - def writing_role=(_arg0); end - - # source://activerecord//lib/active_record.rb#362 - def yaml_column_permitted_classes; end - - # source://activerecord//lib/active_record.rb#362 - 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. -# -# source://activerecord//lib/active_record/errors.rb#7 -class ActiveRecord::ActiveRecordError < ::StandardError; end - -# Raised when Active Record cannot find database adapter specified in -# +config/database.yml+ or programmatically. -# -# source://activerecord//lib/active_record/errors.rb#51 -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 -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 -class ActiveRecord::AdapterTimeout < ::ActiveRecord::QueryAborted; end - -# See ActiveRecord::Aggregations::ClassMethods for documentation -# -# source://activerecord//lib/active_record/aggregations.rb#5 -module ActiveRecord::Aggregations - # source://activerecord//lib/active_record/aggregations.rb#11 - def reload(*_arg0); end - - private - - # source://activerecord//lib/active_record/aggregations.rb#17 - def clear_aggregation_cache; end - - # source://activerecord//lib/active_record/aggregations.rb#21 - def init_internals; end - - # source://activerecord//lib/active_record/aggregations.rb#6 - def initialize_dup(*_arg0); end -end - -# 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 -# to the macro adds a description of how the value objects are created from the attributes of -# the entity object (when the entity is initialized either as a new object or from finding an -# existing object) and how it can be turned back into attributes (when the entity is saved to -# 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) ] -# end -# -# The customer class now has the following methods to manipulate the value objects: -# * Customer#balance, Customer#balance=(money) -# * Customer#address, Customer#address=(address) -# -# These methods will operate with value objects like the ones described below: -# -# class Money -# include Comparable -# attr_reader :amount, :currency -# EXCHANGE_RATES = { "USD_TO_DKK" => 6 } -# -# def initialize(amount, currency = "USD") -# @amount, @currency = amount, currency -# end -# -# def exchange_to(other_currency) -# exchanged_amount = (amount * EXCHANGE_RATES["#{currency}_TO_#{other_currency}"]).floor -# Money.new(exchanged_amount, other_currency) -# end -# -# def ==(other_money) -# amount == other_money.amount && currency == other_money.currency -# end -# -# def <=>(other_money) -# if currency == other_money.currency -# amount <=> other_money.amount -# else -# amount <=> other_money.exchange_to(currency).amount -# end -# end -# end -# -# class Address -# attr_reader :street, :city -# def initialize(street, city) -# @street, @city = street, city -# end -# -# def close_to?(other_address) -# city == other_address.city -# end -# -# def ==(other_address) -# city == other_address.city && street == other_address.street -# end -# end -# -# Now it's possible to access attributes from the database through the value objects instead. If -# you choose to name the composition the same as the attribute's name, it will be the only way to -# access that attribute. That's the case with our +balance+ attribute. You interact with the value -# objects just like you would with any other attribute: -# -# customer.balance = Money.new(20) # sets the Money value object and the attribute -# customer.balance # => Money value object -# customer.balance.exchange_to("DKK") # => Money.new(120, "DKK") -# customer.balance > Money.new(10) # => true -# customer.balance == Money.new(20) # => true -# customer.balance < Money.new(5) # => false -# -# Value objects can also be composed of multiple attributes, such as the case of Address. The order -# of the mappings will determine the order of the parameters. -# -# customer.address_street = "Hyancintvej" -# customer.address_city = "Copenhagen" -# customer.address # => Address.new("Hyancintvej", "Copenhagen") -# -# customer.address = Address.new("May Street", "Chicago") -# customer.address_street # => "May Street" -# customer.address_city # => "Chicago" -# -# == Writing value objects -# -# Value objects are immutable and interchangeable objects that represent a given value, such as -# a Money object representing $5. Two Money objects both representing $5 should be equal (through -# methods such as == and <=> from Comparable if ranking makes sense). This is -# unlike entity objects where equality is determined by identity. An entity class such as Customer can -# easily have two different objects that both have an address on Hyancintvej. Entity identity is -# determined by object or relational unique identifiers (such as primary keys). Normal -# ActiveRecord::Base classes are entity objects. -# -# It's also important to treat the value objects as immutable. Don't allow the Money object to have -# its amount changed after creation. Create a new Money object with the new value instead. The -# Money#exchange_to method is an example of this. It returns a new value object instead of changing -# its own values. Active Record won't persist value objects that have been changed through means -# other than the writer method. -# -# The immutable requirement is enforced by Active Record by freezing any object assigned as a value -# object. Attempting to change it afterwards will result in a +RuntimeError+. -# -# Read more about value objects on http://c2.com/cgi/wiki?ValueObject and on the dangers of not -# keeping value objects immutable on http://c2.com/cgi/wiki?ValueObjectsShouldBeImmutable -# -# == Custom constructors and converters -# -# By default value objects are initialized by calling the new constructor of the value -# class passing each of the mapped attributes, in the order specified by the :mapping -# option, as arguments. If the value class doesn't support this convention then #composed_of allows -# a custom constructor to be specified. -# -# When a new value is assigned to the value object, the default assumption is that the new value -# is an instance of the value class. Specifying a custom converter allows the new value to be automatically -# converted to an instance of value class if necessary. -# -# For example, the +NetworkResource+ model has +network_address+ and +cidr_range+ attributes that should be -# aggregated using the +NetAddr::CIDR+ value class (https://www.rubydoc.info/gems/netaddr/1.5.0/NetAddr/CIDR). -# The constructor for the value class is called +create+ and it expects a CIDR address string as a parameter. -# New values can be assigned to the value object using either another +NetAddr::CIDR+ object, a string -# or an array. The :constructor and :converter options can be used to meet -# these requirements: -# -# class NetworkResource < ActiveRecord::Base -# composed_of :cidr, -# class_name: 'NetAddr::CIDR', -# mapping: [ %w(network_address network), %w(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) } -# end -# -# # This calls the :constructor -# network_resource = NetworkResource.new(network_address: '192.168.0.1', cidr_range: 24) -# -# # These assignments will both use the :converter -# network_resource.cidr = [ '192.168.2.1', 8 ] -# network_resource.cidr = '192.168.0.1/24' -# -# # This assignment won't use the :converter as the value is already an instance of the value class -# network_resource.cidr = NetAddr::CIDR.create('192.168.2.1/8') -# -# # Saving and then reloading will use the :constructor on reload -# network_resource.save -# network_resource.reload -# -# == Finding records by a value object -# -# Once a #composed_of relationship is specified for a model, records can be loaded from the database -# by specifying an instance of the value object in the conditions hash. The following example -# finds all customers with +address_street+ equal to "May Street" and +address_city+ equal to "Chicago": -# -# Customer.where(address: Address.new("May Street", "Chicago")) -# -# source://activerecord//lib/active_record/aggregations.rb#181 -module ActiveRecord::Aggregations::ClassMethods - # Adds reader and writer methods for manipulating a value object: - # composed_of :address adds address and address=(new_address) methods. - # - # Options are: - # * :class_name - Specifies the class name of the association. Use it only if that name - # can't be inferred from the part id. So composed_of :address will by default be linked - # 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 - # order in which mappings are defined determines the order in which attributes are sent to the - # value class constructor. - # * :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. - # This defaults to +false+. - # * :constructor - A symbol specifying the name of the constructor method or a Proc that - # is called to initialize the value object. The constructor is passed all of the mapped attributes, - # in the order that they are defined in the :mapping option, as arguments and uses them - # to instantiate a :class_name object. - # The default is :new. - # * :converter - A symbol specifying the name of a class method of :class_name - # or a Proc that is called when a new value is assigned to the value object. The converter is - # passed the single value that is used in the assignment and is only called if the new value is - # not an instance of :class_name. If :allow_nil is set to true, the converter - # 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 :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), - # 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 - def composed_of(part_id, options = T.unsafe(nil)); end - - private - - # source://activerecord//lib/active_record/aggregations.rb#245 - def reader_method(name, class_name, mapping, allow_nil, constructor); end - - # source://activerecord//lib/active_record/aggregations.rb#258 - def writer_method(name, class_name, mapping, allow_nil, converter); end -end - -# source://activerecord//lib/active_record/associations.rb#187 -class ActiveRecord::AmbiguousSourceReflectionForThroughAssociation < ::ActiveRecord::ActiveRecordError - # @return [AmbiguousSourceReflectionForThroughAssociation] a new instance of AmbiguousSourceReflectionForThroughAssociation - # - # source://activerecord//lib/active_record/associations.rb#188 - def initialize(klass, macro, association_name, options, possible_sources); end -end - -# source://activerecord//lib/active_record/associations.rb#4 -class ActiveRecord::AssociationNotFoundError < ::ActiveRecord::ConfigurationError - include ::DidYouMean::Correctable - - # @return [AssociationNotFoundError] a new instance of AssociationNotFoundError - # - # source://activerecord//lib/active_record/associations.rb#7 - def initialize(record = T.unsafe(nil), association_name = T.unsafe(nil)); end - - # Returns the value of attribute association_name. - # - # source://activerecord//lib/active_record/associations.rb#5 - def association_name; end - - # source://activerecord//lib/active_record/associations.rb#20 - def corrections; end - - # Returns the value of attribute record. - # - # source://activerecord//lib/active_record/associations.rb#5 - def record; end -end - -# source://activerecord//lib/active_record/association_relation.rb#4 -class ActiveRecord::AssociationRelation < ::ActiveRecord::Relation - # @return [AssociationRelation] a new instance of AssociationRelation - # - # source://activerecord//lib/active_record/association_relation.rb#5 - def initialize(klass, association, **_arg2); end - - # source://activerecord//lib/active_record/association_relation.rb#14 - def ==(other); end - - def insert(attributes, **kwargs); end - def insert!(attributes, **kwargs); end - def insert_all(attributes, **kwargs); end - def insert_all!(attributes, **kwargs); end - - # source://activerecord//lib/active_record/association_relation.rb#10 - def proxy_association; end - - def upsert(attributes, **kwargs); end - def upsert_all(attributes, **kwargs); end - - private - - # source://activerecord//lib/active_record/association_relation.rb#35 - def _create(attributes, &block); end - - # source://activerecord//lib/active_record/association_relation.rb#39 - def _create!(attributes, &block); end - - # source://activerecord//lib/active_record/association_relation.rb#31 - def _new(attributes, &block); end - - # source://activerecord//lib/active_record/association_relation.rb#43 - def exec_queries; end -end - -# Raised when an object assigned to an association has an incorrect type. -# -# class Ticket < ActiveRecord::Base -# has_many :patches -# end -# -# class Patch < ActiveRecord::Base -# belongs_to :ticket -# 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 -class ActiveRecord::AssociationTypeMismatch < ::ActiveRecord::ActiveRecordError; end - -# See ActiveRecord::Associations::ClassMethods for documentation. -# -# source://activerecord//lib/active_record/associations.rb#251 -module ActiveRecord::Associations - extend ::ActiveSupport::Autoload - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActiveRecord::Associations::ClassMethods - - # Returns the association instance for the given name, instantiating it if it doesn't already exist - # - # source://activerecord//lib/active_record/associations.rb#297 - def association(name); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations.rb#311 - def association_cached?(name); end - - private - - # Returns the specified association instance if it exists, +nil+ otherwise. - # - # source://activerecord//lib/active_record/associations.rb#327 - def association_instance_get(name); end - - # Set the specified association instance. - # - # source://activerecord//lib/active_record/associations.rb#332 - def association_instance_set(name, association); end - - # source://activerecord//lib/active_record/associations.rb#321 - def init_internals; end - - # source://activerecord//lib/active_record/associations.rb#315 - def initialize_dup(*_arg0); end - - class << self - # source://activerecord//lib/active_record/associations.rb#290 - def eager_load!; end - end -end - -# Keeps track of table aliases for ActiveRecord::Associations::JoinDependency -# -# source://activerecord//lib/active_record/associations/alias_tracker.rb#8 -class ActiveRecord::Associations::AliasTracker - # table_joins is an array of arel joins which might conflict with the aliases we assign here - # - # @return [AliasTracker] a new instance of AliasTracker - # - # source://activerecord//lib/active_record/associations/alias_tracker.rb#49 - def initialize(connection, aliases); end - - # source://activerecord//lib/active_record/associations/alias_tracker.rb#54 - def aliased_table_for(arel_table, table_name = T.unsafe(nil)); end - - # Returns the value of attribute aliases. - # - # source://activerecord//lib/active_record/associations/alias_tracker.rb#76 - def aliases; end - - private - - # source://activerecord//lib/active_record/associations/alias_tracker.rb#79 - def truncate(name); end - - class << self - # source://activerecord//lib/active_record/associations/alias_tracker.rb#9 - def create(connection, initial_table, joins, aliases = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/associations/alias_tracker.rb#26 - def initial_count_for(connection, name, table_joins); end - end -end - -# = Active Record Associations -# -# This is the root class of all associations ('+ Foo' signifies an included module Foo): -# -# Association -# SingularAssociation -# HasOneAssociation + ForeignAssociation -# HasOneThroughAssociation + ThroughAssociation -# BelongsToAssociation -# BelongsToPolymorphicAssociation -# CollectionAssociation -# HasManyAssociation + ForeignAssociation -# HasManyThroughAssociation + ThroughAssociation -# -# 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. -# -# For example, given -# -# class Blog < ActiveRecord::Base -# has_many :posts -# end -# -# blog = Blog.first -# -# The association of blog.posts has the object +blog+ as its -# owner, the collection of its posts as target, and -# the reflection object represents a :has_many macro. -# -# source://activerecord//lib/active_record/associations/association.rb#35 -class ActiveRecord::Associations::Association - # @return [Association] a new instance of Association - # - # source://activerecord//lib/active_record/associations/association.rb#40 - def initialize(owner, reflection); end - - # source://activerecord//lib/active_record/associations/association.rb#203 - def create(attributes = T.unsafe(nil), &block); end - - # source://activerecord//lib/active_record/associations/association.rb#207 - 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 - def extensions; end - - # source://activerecord//lib/active_record/associations/association.rb#193 - def initialize_attributes(record, except_from_scope_attributes = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/associations/association.rb#136 - def inversed_from(record); end - - # source://activerecord//lib/active_record/associations/association.rb#140 - 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 - def klass; end - - # Loads the \target if needed and returns it. - # - # This method is abstract in the sense that it relies on +find_target+, - # which is expected to be provided by descendants. - # - # If the \target is already \loaded it is just returned. Thus, you can call - # +load_target+ unconditionally to get the \target. - # - # 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 - 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 - def loaded!; end - - # Has the \target been already \loaded? - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/association.rb#72 - 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 - def marshal_dump; end - - # source://activerecord//lib/active_record/associations/association.rb#187 - def marshal_load(data); end - - # source://activerecord//lib/active_record/associations/association.rb#38 - def options(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/association.rb#36 - def owner; end - - # source://activerecord//lib/active_record/associations/association.rb#36 - def reflection; end - - # Reloads the \target and returns +self+ on success. - # The QueryCache is cleared if +force+ is true. - # - # source://activerecord//lib/active_record/associations/association.rb#63 - def reload(force = T.unsafe(nil)); end - - # Remove the inverse association, if possible - # - # source://activerecord//lib/active_record/associations/association.rb#130 - 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 - def reset; end - - # source://activerecord//lib/active_record/associations/association.rb#57 - def reset_negative_cache; end - - # source://activerecord//lib/active_record/associations/association.rb#110 - def reset_scope; end - - # source://activerecord//lib/active_record/associations/association.rb#98 - def scope; end - - # Set the inverse association, if possible - # - # source://activerecord//lib/active_record/associations/association.rb#115 - def set_inverse_instance(record); end - - # source://activerecord//lib/active_record/associations/association.rb#122 - def set_inverse_instance_from_queries(record); end - - # The target is stale if the target no longer points to the record(s) that the - # relevant foreign_key(s) refers to. If stale, the association accessor method - # on the owner will reload the target. It's up to subclasses to implement the - # stale_state method if relevant. - # - # Note that if the target has not been loaded, it is not considered stale. - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/association.rb#88 - def stale_target?; end - - # source://activerecord//lib/active_record/associations/association.rb#36 - def target; end - - # Sets the target of this association to \target, and the \loaded flag to +true+. - # - # source://activerecord//lib/active_record/associations/association.rb#93 - def target=(target); end - - private - - # The scope for this association. - # - # Note that the association_scope is merged into the target_scope only when the - # scope method is called. This is because at that point the call may be surrounded - # by scope.scoping { ... } or unscoped { ... } etc, which affects the scope which - # actually gets built. - # - # source://activerecord//lib/active_record/associations/association.rb#254 - def association_scope; end - - # source://activerecord//lib/active_record/associations/association.rb#336 - def build_record(attributes); end - - # source://activerecord//lib/active_record/associations/association.rb#351 - 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 - def ensure_klass_exists!; end - - # source://activerecord//lib/active_record/associations/association.rb#218 - def find_target; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/association.rb#274 - def find_target?; end - - # Returns true if record contains the foreign_key - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/association.rb#324 - def foreign_key_for?(record); end - - # Returns true if there is a foreign key present on the owner which - # references the target. This is used to determine whether we can load - # the target if the owner is currently a new record (and therefore - # without a key). If the owner is a new record then foreign_key must - # be present in order to load target. - # - # Currently implemented by belongs_to (vanilla and polymorphic) and - # has_one/has_many :through associations which go through a belongs_to. - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/association.rb#286 - def foreign_key_present?; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/association.rb#359 - def inversable?(record); end - - # source://activerecord//lib/active_record/associations/association.rb#304 - 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 - def inverse_reflection_for(record); end - - # Returns true if inverse association on the given record needs to be set. - # This method is redefined by subclasses. - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/association.rb#319 - def invertible_for?(record); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/association.rb#364 - 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 - def raise_on_type_mismatch!(record); end - - # source://activerecord//lib/active_record/associations/association.rb#270 - 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 - def skip_statement_cache?(scope); 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 - 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 - def target_scope; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/association.rb#242 - def violates_strict_loading?; end -end - -# source://activerecord//lib/active_record/associations/association_scope.rb#5 -class ActiveRecord::Associations::AssociationScope - # @return [AssociationScope] a new instance of AssociationScope - # - # source://activerecord//lib/active_record/associations/association_scope.rb#15 - def initialize(value_transformation); end - - # source://activerecord//lib/active_record/associations/association_scope.rb#21 - def scope(association); end - - private - - # source://activerecord//lib/active_record/associations/association_scope.rb#117 - def add_constraints(scope, owner, chain); end - - # source://activerecord//lib/active_record/associations/association_scope.rb#154 - def apply_scope(scope, table, key, value); end - - # source://activerecord//lib/active_record/associations/association_scope.rb#162 - def eval_scope(reflection, scope, owner); end - - # source://activerecord//lib/active_record/associations/association_scope.rb#105 - def get_chain(reflection, association, tracker); end - - # source://activerecord//lib/active_record/associations/association_scope.rb#54 - def join(table, constraint); end - - # 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 - def next_chain_scope(scope, reflection, next_reflection); end - - # source://activerecord//lib/active_record/associations/association_scope.rb#74 - def transform_value(value); end - - # Returns the value of attribute value_transformation. - # - # source://activerecord//lib/active_record/associations/association_scope.rb#52 - def value_transformation; end - - class << self - # source://activerecord//lib/active_record/associations/association_scope.rb#10 - def create(&block); end - - # source://activerecord//lib/active_record/associations/association_scope.rb#34 - def get_bind_values(owner, chain); end - - # source://activerecord//lib/active_record/associations/association_scope.rb#6 - def scope(association); end - end -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 -class ActiveRecord::Associations::AssociationScope::ReflectionProxy < ::SimpleDelegator - # @return [ReflectionProxy] a new instance of ReflectionProxy - # - # source://activerecord//lib/active_record/associations/association_scope.rb#97 - def initialize(reflection, aliased_table); end - - # Returns the value of attribute aliased_table. - # - # source://activerecord//lib/active_record/associations/association_scope.rb#95 - def aliased_table; end - - # source://activerecord//lib/active_record/associations/association_scope.rb#102 - def all_includes; end -end - -# = Active Record Belongs To Association -# -# 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 - def decrement_counters; end - - # source://activerecord//lib/active_record/associations/belongs_to_association.rb#56 - def decrement_counters_before_last_save; end - - # source://activerecord//lib/active_record/associations/belongs_to_association.rb#35 - 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 - def increment_counters; end - - # source://activerecord//lib/active_record/associations/belongs_to_association.rb#30 - def inversed_from(record); end - - # source://activerecord//lib/active_record/associations/belongs_to_association.rb#39 - def reset; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/belongs_to_association.rb#79 - def saved_change_to_target?; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/belongs_to_association.rb#71 - def target_changed?; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/belongs_to_association.rb#75 - def target_previously_changed?; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/belongs_to_association.rb#44 - def updated?; end - - private - - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/belongs_to_association.rb#113 - def find_target?; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/belongs_to_association.rb#133 - def foreign_key_present?; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/belongs_to_association.rb#137 - def invertible_for?(record); end - - # source://activerecord//lib/active_record/associations/belongs_to_association.rb#129 - def primary_key(klass); end - - # source://activerecord//lib/active_record/associations/belongs_to_association.rb#84 - def replace(record); end - - # source://activerecord//lib/active_record/associations/belongs_to_association.rb#121 - def replace_keys(record, force: T.unsafe(nil)); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/belongs_to_association.rb#117 - def require_counter_update?; end - - # source://activerecord//lib/active_record/associations/belongs_to_association.rb#142 - def stale_state; end - - # source://activerecord//lib/active_record/associations/belongs_to_association.rb#98 - def update_counters(by); end - - # source://activerecord//lib/active_record/associations/belongs_to_association.rb#108 - def update_counters_via_scope(klass, foreign_key, by); end -end - -# = Active Record Belongs To Polymorphic Association -# -# source://activerecord//lib/active_record/associations/belongs_to_polymorphic_association.rb#6 -class ActiveRecord::Associations::BelongsToPolymorphicAssociation < ::ActiveRecord::Associations::BelongsToAssociation - # source://activerecord//lib/active_record/associations/belongs_to_polymorphic_association.rb#7 - def klass; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/belongs_to_polymorphic_association.rb#20 - def saved_change_to_target?; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/belongs_to_polymorphic_association.rb#12 - def target_changed?; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/belongs_to_polymorphic_association.rb#16 - def target_previously_changed?; end - - private - - # source://activerecord//lib/active_record/associations/belongs_to_polymorphic_association.rb#35 - def inverse_reflection_for(record); end - - # source://activerecord//lib/active_record/associations/belongs_to_polymorphic_association.rb#39 - def raise_on_type_mismatch!(record); end - - # source://activerecord//lib/active_record/associations/belongs_to_polymorphic_association.rb#25 - def replace_keys(record, force: T.unsafe(nil)); end - - # source://activerecord//lib/active_record/associations/belongs_to_polymorphic_association.rb#43 - def stale_state; end -end - -# source://activerecord//lib/active_record/associations.rb#264 -module ActiveRecord::Associations::Builder; end - -# source://activerecord//lib/active_record/associations/builder/association.rb#15 -class ActiveRecord::Associations::Builder::Association - class << self - # source://activerecord//lib/active_record/associations/builder/association.rb#25 - def build(model, name, scope, options, &block); end - - # @raise [ArgumentError] - # - # source://activerecord//lib/active_record/associations/builder/association.rb#40 - def create_reflection(model, name, scope, options, &block); end - - # Returns the value of attribute extensions. - # - # source://activerecord//lib/active_record/associations/builder/association.rb#17 - def extensions; end - - # Sets the attribute extensions - # - # @param value the value to set the attribute extensions to. - # - # source://activerecord//lib/active_record/associations/builder/association.rb#17 - def extensions=(_arg0); end - - private - - # source://activerecord//lib/active_record/associations/builder/association.rb#144 - def add_after_commit_jobs_callback(model, dependent); end - - # source://activerecord//lib/active_record/associations/builder/association.rb#139 - def add_destroy_callbacks(model, reflection); end - - # source://activerecord//lib/active_record/associations/builder/association.rb#53 - def build_scope(scope); end - - # source://activerecord//lib/active_record/associations/builder/association.rb#129 - def check_dependent_options(dependent, model); end - - # Defines the setter and getter methods for the association - # class Post < ActiveRecord::Base - # has_many :comments - # end - # - # Post.first.comments and Post.first.comments= methods are defined by this method... - # - # source://activerecord//lib/active_record/associations/builder/association.rb#94 - def define_accessors(model, reflection); end - - # source://activerecord//lib/active_record/associations/builder/association.rb#76 - def define_callbacks(model, reflection); end - - # source://activerecord//lib/active_record/associations/builder/association.rb#121 - def define_change_tracking_methods(model, reflection); end - - # source://activerecord//lib/active_record/associations/builder/association.rb#73 - def define_extensions(model, name); end - - # source://activerecord//lib/active_record/associations/builder/association.rb#101 - def define_readers(mixin, name); end - - # source://activerecord//lib/active_record/associations/builder/association.rb#117 - def define_validations(model, reflection); end - - # source://activerecord//lib/active_record/associations/builder/association.rb#109 - def define_writers(mixin, name); end - - # @raise [NotImplementedError] - # - # source://activerecord//lib/active_record/associations/builder/association.rb#61 - def macro; end - - # @raise [NotImplementedError] - # - # source://activerecord//lib/active_record/associations/builder/association.rb#125 - def valid_dependent_options; end - - # source://activerecord//lib/active_record/associations/builder/association.rb#65 - def valid_options(options); end - - # source://activerecord//lib/active_record/associations/builder/association.rb#69 - def validate_options(options); end - end -end - -# source://activerecord//lib/active_record/associations/builder/association.rb#21 -ActiveRecord::Associations::Builder::Association::VALID_OPTIONS = T.let(T.unsafe(nil), Array) - -# source://activerecord//lib/active_record/associations/builder/belongs_to.rb#4 -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 - - private - - # source://activerecord//lib/active_record/associations/builder/belongs_to.rb#27 - def add_counter_cache_callbacks(model, reflection); end - - # source://activerecord//lib/active_record/associations/builder/belongs_to.rb#102 - def add_default_callbacks(model, reflection); end - - # source://activerecord//lib/active_record/associations/builder/belongs_to.rb#108 - def add_destroy_callbacks(model, reflection); end - - # source://activerecord//lib/active_record/associations/builder/belongs_to.rb#78 - def add_touch_callbacks(model, reflection); end - - # 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 - def define_change_tracking_methods(model, reflection); end - - # source://activerecord//lib/active_record/associations/builder/belongs_to.rb#112 - def define_validations(model, reflection); end - - # source://activerecord//lib/active_record/associations/builder/belongs_to.rb#5 - def macro; end - - # source://activerecord//lib/active_record/associations/builder/belongs_to.rb#16 - def valid_dependent_options; end - - # source://activerecord//lib/active_record/associations/builder/belongs_to.rb#9 - def valid_options(options); end - end -end - -# source://activerecord//lib/active_record/associations/builder/collection_association.rb#6 -class ActiveRecord::Associations::Builder::CollectionAssociation < ::ActiveRecord::Associations::Builder::Association - class << self - # source://activerecord//lib/active_record/associations/builder/collection_association.rb#13 - def define_callbacks(model, reflection); end - - private - - # source://activerecord//lib/active_record/associations/builder/collection_association.rb#30 - def define_callback(model, callback_name, name, options); end - - # source://activerecord//lib/active_record/associations/builder/collection_association.rb#22 - def define_extensions(model, name, &block); end - - # Defines the setter and getter methods for the collection_singular_ids. - # - # source://activerecord//lib/active_record/associations/builder/collection_association.rb#58 - def define_readers(mixin, name); end - - # source://activerecord//lib/active_record/associations/builder/collection_association.rb#68 - def define_writers(mixin, name); end - - # source://activerecord//lib/active_record/associations/builder/collection_association.rb#9 - def valid_options(options); end - end -end - -# source://activerecord//lib/active_record/associations/builder/collection_association.rb#7 -ActiveRecord::Associations::Builder::CollectionAssociation::CALLBACKS = T.let(T.unsafe(nil), Array) - -# source://activerecord//lib/active_record/associations/builder/has_and_belongs_to_many.rb#4 -class ActiveRecord::Associations::Builder::HasAndBelongsToMany - # @return [HasAndBelongsToMany] a new instance of HasAndBelongsToMany - # - # source://activerecord//lib/active_record/associations/builder/has_and_belongs_to_many.rb#7 - def initialize(association_name, lhs_model, options); end - - # Returns the value of attribute association_name. - # - # source://activerecord//lib/active_record/associations/builder/has_and_belongs_to_many.rb#5 - def association_name; end - - # Returns the value of attribute lhs_model. - # - # 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 - def middle_reflection(join_model); end - - # Returns the value of attribute options. - # - # source://activerecord//lib/active_record/associations/builder/has_and_belongs_to_many.rb#5 - def options; end - - # source://activerecord//lib/active_record/associations/builder/has_and_belongs_to_many.rb#13 - def through_model; end - - private - - # source://activerecord//lib/active_record/associations/builder/has_and_belongs_to_many.rb#96 - def belongs_to_options(options); end - - # source://activerecord//lib/active_record/associations/builder/has_and_belongs_to_many.rb#75 - def middle_options(join_model); end - - # source://activerecord//lib/active_record/associations/builder/has_and_belongs_to_many.rb#84 - def table_name; end -end - -# source://activerecord//lib/active_record/associations/builder/has_many.rb#4 -class ActiveRecord::Associations::Builder::HasMany < ::ActiveRecord::Associations::Builder::CollectionAssociation - class << self - private - - # source://activerecord//lib/active_record/associations/builder/has_many.rb#5 - def macro; end - - # source://activerecord//lib/active_record/associations/builder/has_many.rb#18 - def valid_dependent_options; end - - # source://activerecord//lib/active_record/associations/builder/has_many.rb#9 - def valid_options(options); end - end -end - -# source://activerecord//lib/active_record/associations/builder/has_one.rb#4 -class ActiveRecord::Associations::Builder::HasOne < ::ActiveRecord::Associations::Builder::SingularAssociation - class << self - # source://activerecord//lib/active_record/associations/builder/has_one.rb#38 - def touch_record(record, name, touch); end - - private - - # source://activerecord//lib/active_record/associations/builder/has_one.rb#27 - def add_destroy_callbacks(model, reflection); end - - # source://activerecord//lib/active_record/associations/builder/has_one.rb#47 - def add_touch_callbacks(model, reflection); end - - # source://activerecord//lib/active_record/associations/builder/has_one.rb#22 - def define_callbacks(model, reflection); end - - # source://activerecord//lib/active_record/associations/builder/has_one.rb#31 - def define_validations(model, reflection); end - - # source://activerecord//lib/active_record/associations/builder/has_one.rb#5 - def macro; end - - # source://activerecord//lib/active_record/associations/builder/has_one.rb#18 - def valid_dependent_options; end - - # source://activerecord//lib/active_record/associations/builder/has_one.rb#9 - def valid_options(options); end - end -end - -# source://activerecord//lib/active_record/associations/builder/singular_association.rb#6 -class ActiveRecord::Associations::Builder::SingularAssociation < ::ActiveRecord::Associations::Builder::Association - class << self - private - - # source://activerecord//lib/active_record/associations/builder/singular_association.rb#11 - def define_accessors(model, reflection); end - - # Defines the (build|create)_association methods for belongs_to or has_one association - # - # source://activerecord//lib/active_record/associations/builder/singular_association.rb#26 - def define_constructors(mixin, name); end - - # source://activerecord//lib/active_record/associations/builder/singular_association.rb#7 - def valid_options(options); end - end -end - -# \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 -# class which are specialized according to the collection or association symbol and the -# options hash. It works much the same way as Ruby's own attr* -# methods. -# -# class Project < ActiveRecord::Base -# belongs_to :portfolio -# has_one :project_manager -# has_many :milestones -# has_and_belongs_to_many :categories -# 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) -# -# === 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. -# -# == Auto-generated methods -# See also Instance Public methods below for more details. -# -# === Singular associations (one-to-one) -# | | belongs_to | -# generated methods | belongs_to | :polymorphic | has_one -# ----------------------------------+------------+--------------+--------- -# other | X | X | X -# other=(other) | X | X | X -# build_other(attributes={}) | X | | X -# create_other(attributes={}) | X | | X -# create_other!(attributes={}) | X | | X -# reload_other | X | X | X -# other_changed? | X | X | -# other_previously_changed? | X | X | -# -# === Collection associations (one-to-many / many-to-many) -# | | | has_many -# generated methods | habtm | has_many | :through -# ----------------------------------+-------+----------+---------- -# others | X | X | X -# others=(other,other,...) | X | X | X -# other_ids | X | X | X -# other_ids=(id,id,...) | X | X | X -# others<< | X | X | X -# others.push | X | X | X -# others.concat | X | X | X -# others.build(attributes={}) | X | X | X -# others.create(attributes={}) | X | X | X -# others.create!(attributes={}) | X | X | X -# others.size | X | X | X -# others.length | X | X | X -# others.count | X | X | X -# others.sum(*args) | X | X | X -# others.empty? | X | X | X -# others.clear | X | X | X -# others.delete(other,other,...) | X | X | X -# others.delete_all | X | X | X -# others.destroy(other,other,...) | X | X | X -# others.destroy_all | X | X | X -# others.find(*args) | X | X | X -# others.exists? | X | X | X -# others.distinct | X | X | X -# others.reset | X | X | X -# others.reload | X | X | X -# -# === Overriding generated methods -# -# Association methods are generated in a module included into the model -# class, making overrides easy. The original generated method can thus be -# called with +super+: -# -# class Car < ActiveRecord::Base -# belongs_to :owner -# belongs_to :old_owner -# -# def owner=(new_owner) -# self.old_owner = self.owner -# super -# end -# end -# -# The association methods module is included immediately after the -# generated attributes methods module, meaning an association will -# override the methods for an attribute with the same name. -# -# == Cardinality and associations -# -# Active Record associations can be used to describe one-to-one, one-to-many, and many-to-many -# relationships between models. Each model uses an association to describe its role in -# the relation. The #belongs_to association is always used in the model that has -# the foreign key. -# -# === One-to-one -# -# Use #has_one in the base, and #belongs_to in the associated model. -# -# class Employee < ActiveRecord::Base -# has_one :office -# end -# class Office < ActiveRecord::Base -# belongs_to :employee # foreign key - employee_id -# end -# -# === One-to-many -# -# Use #has_many in the base, and #belongs_to in the associated model. -# -# class Manager < ActiveRecord::Base -# has_many :employees -# end -# class Employee < ActiveRecord::Base -# belongs_to :manager # foreign key - manager_id -# end -# -# === Many-to-many -# -# There are two ways to build a many-to-many relationship. -# -# The first way uses a #has_many association with the :through option and a join model, so -# there are two stages of associations. -# -# class Assignment < ActiveRecord::Base -# belongs_to :programmer # foreign key - programmer_id -# belongs_to :project # foreign key - project_id -# end -# class Programmer < ActiveRecord::Base -# has_many :assignments -# has_many :projects, through: :assignments -# end -# class Project < ActiveRecord::Base -# has_many :assignments -# has_many :programmers, through: :assignments -# end -# -# For the second way, use #has_and_belongs_to_many in both models. This requires a join table -# that has no corresponding model or primary key. -# -# class Programmer < ActiveRecord::Base -# has_and_belongs_to_many :projects # foreign keys in the join table -# end -# class Project < ActiveRecord::Base -# has_and_belongs_to_many :programmers # foreign keys in the join table -# end -# -# Choosing which way to build a many-to-many relationship is not always simple. -# If you need to work with the relationship model as its own entity, -# use #has_many :through. Use #has_and_belongs_to_many when working with legacy schemas or when -# you never work directly with the relationship itself. -# -# == Is it a #belongs_to or #has_one association? -# -# Both express a 1-1 relationship. The difference is mostly where to place the foreign -# key, which goes on the table for the class declaring the #belongs_to relationship. -# -# class User < ActiveRecord::Base -# # I reference an account. -# belongs_to :account -# end -# -# class Account < ActiveRecord::Base -# # One user references me. -# has_one :user -# end -# -# The tables for these classes could look something like: -# -# CREATE TABLE users ( -# id bigint NOT NULL auto_increment, -# account_id bigint default NULL, -# name varchar default NULL, -# PRIMARY KEY (id) -# ) -# -# CREATE TABLE accounts ( -# id bigint NOT NULL auto_increment, -# name varchar default NULL, -# PRIMARY KEY (id) -# ) -# -# == Unsaved objects and associations -# -# You can manipulate objects and associations before they are saved to the database, but -# there is some special behavior you should be aware of, mostly involving the saving of -# associated objects. -# -# You can set the :autosave option on a #has_one, #belongs_to, -# #has_many, or #has_and_belongs_to_many association. Setting it -# to +true+ will _always_ save the members, whereas setting it to +false+ will -# _never_ save the members. More details about :autosave option is available at -# AutosaveAssociation. -# -# === One-to-one associations -# -# * Assigning an object to a #has_one association automatically saves that object and -# the object being replaced (if there is one), in order to update their foreign -# keys - except if the parent object is unsaved (new_record? == true). -# * If either of these saves fail (due to one of the objects being invalid), an -# ActiveRecord::RecordNotSaved exception is raised and the assignment is -# cancelled. -# * If you wish to assign an object to a #has_one association without saving it, -# use the #build_association method (documented below). The object being -# replaced will still be saved to update its foreign key. -# * Assigning an object to a #belongs_to association does not save the object, since -# the foreign key field belongs on the parent. It does not save the parent either. -# -# === Collections -# -# * Adding an object to a collection (#has_many or #has_and_belongs_to_many) automatically -# saves that object, except if the parent object (the owner of the collection) is not yet -# stored in the database. -# * If saving any of the objects being added to a collection (via push or similar) -# fails, then push returns +false+. -# * If saving fails while replacing the collection (via association=), an -# ActiveRecord::RecordNotSaved exception is raised and the assignment is -# cancelled. -# * You can add an object to a collection without automatically saving it by using the -# collection.build method (documented below). -# * All unsaved (new_record? == true) members of the collection are automatically -# saved when the parent is saved. -# -# == Customizing the query -# -# \Associations are built from Relation objects, and you can use the Relation syntax -# to customize them. For example, to add a condition: -# -# class Blog < ActiveRecord::Base -# has_many :published_posts, -> { where(published: true) }, class_name: 'Post' -# end -# -# Inside the -> { ... } block you can use all of the usual Relation methods. -# -# === Accessing the owner object -# -# Sometimes it is useful to have access to the owner object when building the query. The owner -# is passed as a parameter to the block. For example, the following association would find all -# events that occur on the user's birthday: -# -# class User < ActiveRecord::Base -# has_many :birthday_events, ->(user) { where(starts_on: user.birthday) }, class_name: 'Event' -# end -# -# Note: Joining, eager loading, and preloading of these associations is not possible. -# These operations happen before instance creation and the scope will be called with a +nil+ argument. -# -# == Association callbacks -# -# Similar to the normal callbacks that hook into the life cycle of an Active Record object, -# you can also define callbacks that get triggered when you add an object to or remove an -# object from an association collection. -# -# class Firm < ActiveRecord::Base -# has_many :clients, -# dependent: :destroy, -# after_add: :congratulate_client, -# after_remove: :log_after_remove -# -# def congratulate_client(record) -# # ... -# end -# -# def log_after_remove(record) -# # ... -# end -# -# It's possible to stack callbacks by passing them as an array. Example: -# -# class Firm < ActiveRecord::Base -# has_many :clients, -# dependent: :destroy, -# after_add: [:congratulate_client, -> (firm, record) { firm.log << "after_adding#{record.id}" }], -# after_remove: :log_after_remove -# end -# -# Possible callbacks are: +before_add+, +after_add+, +before_remove+, and +after_remove+. -# -# If any of the +before_add+ callbacks throw an exception, the object will not be -# added to the collection. -# -# Similarly, if any of the +before_remove+ callbacks throw an exception, the object -# will not be removed from the collection. -# -# Note: To trigger remove callbacks, you must use +destroy+ / +destroy_all+ methods. For example: -# -# * firm.clients.destroy(client) -# * firm.clients.destroy(*clients) -# * firm.clients.destroy_all -# -# +delete+ / +delete_all+ methods like the following do *not* trigger remove callbacks: -# -# * firm.clients.delete(client) -# * firm.clients.delete(*clients) -# * firm.clients.delete_all -# -# == Association extensions -# -# The proxy objects that control the access to associations can be extended through anonymous -# modules. This is especially beneficial for adding new finders, creators, and other -# factory-type methods that are only used as part of this association. -# -# class Account < ActiveRecord::Base -# has_many :people do -# def find_or_create_by_name(name) -# first_name, last_name = name.split(" ", 2) -# find_or_create_by(first_name: first_name, last_name: last_name) -# end -# end -# end -# -# person = Account.first.people.find_or_create_by_name("David Heinemeier Hansson") -# person.first_name # => "David" -# person.last_name # => "Heinemeier Hansson" -# -# If you need to share the same extensions between many associations, you can use a named -# extension module. -# -# module FindOrCreateByNameExtension -# def find_or_create_by_name(name) -# first_name, last_name = name.split(" ", 2) -# find_or_create_by(first_name: first_name, last_name: last_name) -# end -# end -# -# class Account < ActiveRecord::Base -# has_many :people, -> { extending FindOrCreateByNameExtension } -# end -# -# class Company < ActiveRecord::Base -# has_many :people, -> { extending FindOrCreateByNameExtension } -# end -# -# Some extensions can only be made to work with knowledge of the association's internals. -# Extensions can access relevant state using the following methods (where +items+ is the -# name of the association): -# -# * record.association(:items).owner - Returns the object the association is part of. -# * record.association(:items).reflection - Returns the reflection object that describes the association. -# * record.association(:items).target - Returns the associated object for #belongs_to and #has_one, or -# the collection of associated objects for #has_many and #has_and_belongs_to_many. -# -# However, inside the actual extension code, you will not have access to the record as -# above. In this case, you can access proxy_association. For example, -# record.association(:items) and record.items.proxy_association will return -# the same object, allowing you to make calls like proxy_association.owner inside -# association extensions. -# -# == Association Join Models -# -# Has Many associations can be configured with the :through option to use an -# explicit join model to retrieve the data. This operates similarly to a -# #has_and_belongs_to_many association. The advantage is that you're able to add validations, -# callbacks, and extra attributes on the join model. Consider the following schema: -# -# class Author < ActiveRecord::Base -# has_many :authorships -# has_many :books, through: :authorships -# end -# -# class Authorship < ActiveRecord::Base -# belongs_to :author -# belongs_to :book -# end -# -# @author = Author.first -# @author.authorships.collect { |a| a.book } # selects all books that the author's authorships belong to -# @author.books # selects all books by using the Authorship join model -# -# You can also go through a #has_many association on the join model: -# -# class Firm < ActiveRecord::Base -# has_many :clients -# has_many :invoices, through: :clients -# end -# -# class Client < ActiveRecord::Base -# belongs_to :firm -# has_many :invoices -# end -# -# class Invoice < ActiveRecord::Base -# belongs_to :client -# end -# -# @firm = Firm.first -# @firm.clients.flat_map { |c| c.invoices } # select all invoices for all clients of the firm -# @firm.invoices # selects all invoices by going through the Client join model -# -# Similarly you can go through a #has_one association on the join model: -# -# class Group < ActiveRecord::Base -# has_many :users -# has_many :avatars, through: :users -# end -# -# class User < ActiveRecord::Base -# belongs_to :group -# has_one :avatar -# end -# -# class Avatar < ActiveRecord::Base -# belongs_to :user -# end -# -# @group = Group.first -# @group.users.collect { |u| u.avatar }.compact # select all avatars for all users in the group -# @group.avatars # selects all avatars by going through the User join model. -# -# An important caveat with going through #has_one or #has_many associations on the -# join model is that these associations are *read-only*. For example, the following -# would not work following the previous example: -# -# @group.avatars << Avatar.new # this would work if User belonged_to Avatar rather than the other way around -# @group.avatars.delete(@group.avatars.last) # so would this -# -# == Setting Inverses -# -# If you are using a #belongs_to on the join model, it is a good idea to set the -# :inverse_of option on the #belongs_to, which will mean that the following example -# works correctly (where tags is a #has_many :through association): -# -# @post = Post.first -# @tag = @post.tags.build name: "ruby" -# @tag.save -# -# The last line ought to save the through record (a Tagging). This will only work if the -# :inverse_of is set: -# -# class Tagging < ActiveRecord::Base -# belongs_to :post -# belongs_to :tag, inverse_of: :taggings -# end -# -# If you do not set the :inverse_of record, the association will -# do its best to match itself up with the correct inverse. Automatic -# inverse detection only works on #has_many, #has_one, and -# #belongs_to associations. -# -# :foreign_key and :through options on the associations -# will also prevent the association's inverse from being found automatically, -# as will a custom scopes in some cases. See further details in the -# {Active Record Associations guide}[https://guides.rubyonrails.org/association_basics.html#bi-directional-associations]. -# -# The automatic guessing of the inverse association uses a heuristic based -# on the name of the class, so it may not work for all associations, -# especially the ones with non-standard names. -# -# You can turn off the automatic detection of inverse associations by setting -# the :inverse_of option to false like so: -# -# class Tagging < ActiveRecord::Base -# belongs_to :tag, inverse_of: false -# end -# -# == Nested \Associations -# -# You can actually specify *any* association with the :through option, including an -# association which has a :through option itself. For example: -# -# class Author < ActiveRecord::Base -# has_many :posts -# has_many :comments, through: :posts -# has_many :commenters, through: :comments -# end -# -# class Post < ActiveRecord::Base -# has_many :comments -# end -# -# class Comment < ActiveRecord::Base -# belongs_to :commenter -# end -# -# @author = Author.first -# @author.commenters # => People who commented on posts written by the author -# -# An equivalent way of setting up this association this would be: -# -# class Author < ActiveRecord::Base -# has_many :posts -# has_many :commenters, through: :posts -# end -# -# class Post < ActiveRecord::Base -# has_many :comments -# has_many :commenters, through: :comments -# end -# -# class Comment < ActiveRecord::Base -# belongs_to :commenter -# end -# -# When using a nested association, you will not be able to modify the association because there -# is not enough information to know what modification to make. For example, if you tried to -# add a Commenter in the example above, there would be no way to tell how to set up the -# intermediate Post and Comment objects. -# -# == Polymorphic \Associations -# -# Polymorphic associations on models are not restricted on what types of models they -# can be associated with. Rather, they specify an interface that a #has_many association -# must adhere to. -# -# class Asset < ActiveRecord::Base -# belongs_to :attachable, polymorphic: true -# end -# -# class Post < ActiveRecord::Base -# has_many :assets, as: :attachable # The :as option specifies the polymorphic interface to use. -# end -# -# @asset.attachable = @post -# -# This works by using a type column in addition to a foreign key to specify the associated -# record. In the Asset example, you'd need an +attachable_id+ integer column and an -# +attachable_type+ string column. -# -# Using polymorphic associations in combination with single table inheritance (STI) is -# a little tricky. In order for the associations to work as expected, ensure that you -# store the base model for the STI models in the type column of the polymorphic -# association. To continue with the asset example above, suppose there are guest posts -# and member posts that use the posts table for STI. In this case, there must be a +type+ -# column in the posts table. -# -# Note: The attachable_type= method is being called when assigning an +attachable+. -# The +class_name+ of the +attachable+ is passed as a String. -# -# class Asset < ActiveRecord::Base -# belongs_to :attachable, polymorphic: true -# -# def attachable_type=(class_name) -# super(class_name.constantize.base_class.to_s) -# end -# end -# -# class Post < ActiveRecord::Base -# # because we store "Post" in attachable_type now dependent: :destroy will work -# has_many :assets, as: :attachable, dependent: :destroy -# end -# -# class GuestPost < Post -# end -# -# class MemberPost < Post -# end -# -# == Caching -# -# All of the methods are built on a simple caching principle that will keep the result -# of the last query around unless specifically instructed not to. The cache is even -# shared across methods to make it even cheaper to use the macro-added methods without -# worrying too much about performance at the first go. -# -# project.milestones # fetches milestones from the database -# project.milestones.size # uses the milestone cache -# project.milestones.empty? # uses the milestone cache -# project.milestones.reload.size # fetches milestones from the database -# project.milestones # uses the milestone cache -# -# == Eager loading of associations -# -# Eager loading is a way to find objects of a certain class and a number of named associations. -# It is one of the easiest ways to prevent the dreaded N+1 problem in which fetching 100 -# posts that each need to display their author triggers 101 database queries. Through the -# use of eager loading, the number of queries will be reduced from 101 to 2. -# -# class Post < ActiveRecord::Base -# belongs_to :author -# has_many :comments -# end -# -# Consider the following loop using the class above: -# -# Post.all.each do |post| -# puts "Post: " + post.title -# puts "Written by: " + post.author.name -# puts "Last comment on: " + post.comments.first.created_on -# end -# -# To iterate over these one hundred posts, we'll generate 201 database queries. Let's -# first just optimize it for retrieving the author: -# -# Post.includes(:author).each do |post| -# -# This references the name of the #belongs_to association that also used the :author -# symbol. After loading the posts, +find+ will collect the +author_id+ from each one and load -# all of the referenced authors with one query. Doing so will cut down the number of queries -# from 201 to 102. -# -# We can improve upon the situation further by referencing both associations in the finder with: -# -# Post.includes(:author, :comments).each do |post| -# -# This will load all comments with a single query. This reduces the total number of queries -# to 3. In general, the number of queries will be 1 plus the number of associations -# named (except if some of the associations are polymorphic #belongs_to - see below). -# -# To include a deep hierarchy of associations, use a hash: -# -# Post.includes(:author, { comments: { author: :gravatar } }).each do |post| -# -# The above code will load all the comments and all of their associated -# authors and gravatars. You can mix and match any combination of symbols, -# arrays, and hashes to retrieve the associations you want to load. -# -# All of this power shouldn't fool you into thinking that you can pull out huge amounts -# of data with no performance penalty just because you've reduced the number of queries. -# The database still needs to send all the data to Active Record and it still needs to -# be processed. So it's no catch-all for performance problems, but it's a great way to -# cut down on the number of queries in a situation as the one described above. -# -# Since only one table is loaded at a time, conditions or orders cannot reference tables -# other than the main one. If this is the case, Active Record falls back to the previously -# used LEFT OUTER JOIN based strategy. For example: -# -# Post.includes([:author, :comments]).where(['comments.approved = ?', true]) -# -# This will result in a single SQL query with joins along the lines of: -# LEFT OUTER JOIN comments ON comments.post_id = posts.id and -# LEFT OUTER JOIN authors ON authors.id = posts.author_id. Note that using conditions -# like this can have unintended consequences. -# In the above example, posts with no approved comments are not returned at all because -# the conditions apply to the SQL statement as a whole and not just to the association. -# -# You must disambiguate column references for this fallback to happen, for example -# order: "author.name DESC" will work but order: "name DESC" will not. -# -# If you want to load all posts (including posts with no approved comments), then write -# your own LEFT OUTER JOIN query using ON: -# -# Post.joins("LEFT OUTER JOIN comments ON comments.post_id = posts.id AND comments.approved = '1'") -# -# In this case, it is usually more natural to include an association which has conditions defined on it: -# -# class Post < ActiveRecord::Base -# has_many :approved_comments, -> { where(approved: true) }, class_name: 'Comment' -# end -# -# Post.includes(:approved_comments) -# -# This will load posts and eager load the +approved_comments+ association, which contains -# only those comments that have been approved. -# -# If you eager load an association with a specified :limit option, it will be ignored, -# returning all the associated objects: -# -# class Picture < ActiveRecord::Base -# has_many :most_recent_comments, -> { order('id DESC').limit(10) }, class_name: 'Comment' -# end -# -# Picture.includes(:most_recent_comments).first.most_recent_comments # => returns all associated comments. -# -# Eager loading is supported with polymorphic associations. -# -# class Address < ActiveRecord::Base -# belongs_to :addressable, polymorphic: true -# end -# -# A call that tries to eager load the addressable model -# -# Address.includes(:addressable) -# -# This will execute one query to load the addresses and load the addressables with one -# query per addressable type. -# For example, if all the addressables are either of class Person or Company, then a total -# of 3 queries will be executed. The list of addressable types to load is determined on -# the back of the addresses loaded. This is not supported if Active Record has to fallback -# to the previous implementation of eager loading and will raise ActiveRecord::EagerLoadPolymorphicError. -# The reason is that the parent model's type is a column value so its corresponding table -# name cannot be put in the +FROM+/+JOIN+ clauses of that query. -# -# == Table Aliasing -# -# Active Record uses table aliasing in the case that a table is referenced multiple times -# in a join. If a table is referenced only once, the standard table name is used. The -# second time, the table is aliased as #{reflection_name}_#{parent_table_name}. -# Indexes are appended for any more successive uses of the table name. -# -# Post.joins(:comments) -# # => SELECT ... FROM posts INNER JOIN comments ON ... -# Post.joins(:special_comments) # STI -# # => 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 -# -# Acts as tree example: -# -# TreeMixin.joins(:children) -# # => SELECT ... FROM mixins INNER JOIN mixins childrens_mixins ... -# TreeMixin.joins(children: :parent) -# # => 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 -# -# 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 ... -# 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 -# 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 -# -# 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 ... -# 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 ... -# -# Table aliases are automatically truncated according to the maximum length of table identifiers -# according to the specific database. -# -# == Modules -# -# By default, associations will look for objects within the current module scope. Consider: -# -# module MyApplication -# module Business -# class Firm < ActiveRecord::Base -# has_many :clients -# end -# -# class Client < ActiveRecord::Base; end -# end -# end -# -# When Firm#clients is called, it will in turn call -# MyApplication::Business::Client.find_all_by_firm_id(firm.id). -# If you want to associate with a class in another module scope, this can be done by -# specifying the complete class name. -# -# module MyApplication -# module Business -# class Firm < ActiveRecord::Base; end -# end -# -# module Billing -# class Account < ActiveRecord::Base -# belongs_to :firm, class_name: "MyApplication::Business::Firm" -# end -# end -# end -# -# == Bi-directional associations -# -# When you specify an association, there is usually an association on the associated model -# that specifies the same relationship in reverse. For example, with the following models: -# -# class Dungeon < ActiveRecord::Base -# has_many :traps -# has_one :evil_wizard -# end -# -# class Trap < ActiveRecord::Base -# belongs_to :dungeon -# end -# -# class EvilWizard < ActiveRecord::Base -# belongs_to :dungeon -# end -# -# The +traps+ association on +Dungeon+ and the +dungeon+ association on +Trap+ are -# the inverse of each other, and the inverse of the +dungeon+ association on +EvilWizard+ -# is the +evil_wizard+ association on +Dungeon+ (and vice-versa). By default, -# Active Record can guess the inverse of the association based on the name -# of the class. The result is the following: -# -# d = Dungeon.first -# t = d.traps.first -# d.object_id == t.dungeon.object_id # => true -# -# The +Dungeon+ instances +d+ and t.dungeon in the above example refer to -# the same in-memory instance since the association matches the name of the class. -# The result would be the same if we added +:inverse_of+ to our model definitions: -# -# class Dungeon < ActiveRecord::Base -# has_many :traps, inverse_of: :dungeon -# has_one :evil_wizard, inverse_of: :dungeon -# end -# -# class Trap < ActiveRecord::Base -# belongs_to :dungeon, inverse_of: :traps -# end -# -# class EvilWizard < ActiveRecord::Base -# belongs_to :dungeon, inverse_of: :evil_wizard -# end -# -# For more information, see the documentation for the +:inverse_of+ option. -# -# == Deleting from associations -# -# === Dependent associations -# -# #has_many, #has_one, and #belongs_to associations support the :dependent option. -# This allows you to specify that associated records should be deleted when the owner is -# deleted. -# -# For example: -# -# class Author -# has_many :posts, dependent: :destroy -# end -# Author.find(1).destroy # => Will destroy all of the author's posts, too -# -# The :dependent option can have different values which specify how the deletion -# is done. For more information, see the documentation for this option on the different -# 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 -# system, which works by processing callbacks in order. Therefore, other -# callbacks declared either before or after the :dependent option -# can affect what it does. -# -# Note that :dependent option is ignored for #has_one :through associations. -# -# === Delete or destroy? -# -# #has_many and #has_and_belongs_to_many associations have the methods destroy, -# delete, destroy_all and delete_all. -# -# For #has_and_belongs_to_many, delete and destroy are the same: they -# cause the records in the join table to be removed. -# -# For #has_many, destroy and destroy_all will always call the destroy method of the -# record(s) being removed so that callbacks are run. However delete and delete_all will either -# do the deletion according to the strategy specified by the :dependent option, or -# if no :dependent option is given, then it will follow the default strategy. -# The default strategy is to do nothing (leave the foreign keys with the parent ids set), except for -# #has_many :through, where the default strategy is delete_all (delete -# the join records, without running their callbacks). -# -# There is also a clear method which is the same as delete_all, except that -# it returns the association rather than the records which have been deleted. -# -# === What gets deleted? -# -# There is a potential pitfall here: #has_and_belongs_to_many and #has_many :through -# associations have records in join tables, as well as the associated records. So when we -# call one of these deletion methods, what exactly should be deleted? -# -# The answer is that it is assumed that deletion on an association is about removing the -# link between the owner and the associated object(s), rather than necessarily the -# associated objects themselves. So with #has_and_belongs_to_many and #has_many -# :through, the join records will be deleted, but the associated records won't. -# -# This makes sense if you think about it: if you were to call post.tags.delete(Tag.find_by(name: 'food')) -# you would want the 'food' tag to be unlinked from the post, rather than for the tag itself -# to be removed from the database. -# -# However, there are examples where this strategy doesn't make sense. For example, suppose -# a person has many projects, and each project has many tasks. If we deleted one of a person's -# tasks, we would probably not want the project to be deleted. In this scenario, the delete method -# won't actually work: it can only be used if the association on the join model is a -# #belongs_to. In other situations you are expected to perform operations directly on -# either the associated records or the :through association. -# -# With a regular #has_many there is no distinction between the "associated records" -# and the "link", so there is only one choice for what gets deleted. -# -# With #has_and_belongs_to_many and #has_many :through, if you want to delete the -# associated records themselves, you can always do something along the lines of -# person.tasks.each(&:destroy). -# -# == Type safety with ActiveRecord::AssociationTypeMismatch -# -# If you attempt to assign an object to an association that doesn't match the inferred -# or specified :class_name, you'll get an ActiveRecord::AssociationTypeMismatch. -# -# == Options -# -# 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#1230 -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, - # then you should use #has_one instead. See also ActiveRecord::Associations::ClassMethods's overview - # on when to use #has_one and when to use #belongs_to. - # - # Methods will be added for retrieval and query for a single associated object, for which - # this object holds an id: - # - # +association+ is a placeholder for the symbol passed as the +name+ argument, so - # belongs_to :author would add among others author.nil?. - # - # [association] - # Returns the associated object. +nil+ is returned if none is found. - # [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 = {})] - # 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 = {})] - # 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 = {})] - # Does the same as create_association, but raises ActiveRecord::RecordInvalid - # if the record is invalid. - # [reload_association] - # Returns the associated object, forcing a database read. - # [association_changed?] - # Returns true if a new associate object has been assigned and the next save will update the foreign key. - # [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. - # - # === Scopes - # - # You can pass a second argument +scope+ as a callable (i.e. proc or - # lambda) to retrieve a specific record or customize the generated query - # when you access the associated object. - # - # Scope examples: - # belongs_to :firm, -> { where(id: 2) } - # belongs_to :user, -> { joins(:friends) } - # belongs_to :level, ->(game) { where("game_level > ?", game.current_level) } - # - # === Options - # - # [:class_name] - # Specify the class name of the association. Use it only if that name can't be inferred - # from the association name. So 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] - # 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] - # 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] - # Specify the method that returns the primary key of associated object used for the association. - # By default this is +id+. - # [: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] - # 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 - # named #{table_name}_count (such as +comments_count+ for a belonging Comment class) - # is used on the associate class (such as a Post class) - that is the migration for - # #{table_name}_count is created on the associate class (such that Post.comments_count will - # return the count cached, see note below). You can also specify a custom counter - # cache column by providing a column name instead of a +true+/+false+ value to this - # 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] - # 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] - # 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] - # 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] - # If true, the associated object will be touched (the updated_at/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/on attribute. - # Please note that with touching no validation is performed and only the +after_touch+, - # +after_commit+ and +after_rollback+ callbacks are executed. - # [: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] - # When set to +true+, the association will not have its presence validated. - # [: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] - # Provide a callable (i.e. proc or lambda) to specify that the association should - # be initialized with a particular record before validation. - # [:strict_loading] - # Enforces strict loading every time the associated record is loaded through this association. - # [: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. - # - # Option examples: - # belongs_to :firm, foreign_key: "client_of" - # belongs_to :person, primary_key: "name", foreign_key: "person_name" - # belongs_to :author, class_name: "Person", foreign_key: "author_id" - # belongs_to :valid_coupon, ->(o) { where "discounts > ?", o.payments_count }, - # class_name: "Coupon", foreign_key: "coupon_id" - # belongs_to :attachable, polymorphic: true - # belongs_to :project, -> { readonly } - # belongs_to :post, counter_cache: true - # belongs_to :comment, touch: true - # belongs_to :company, touch: :employees_last_updated_at - # belongs_to :user, optional: true - # belongs_to :account, default: -> { company.account } - # belongs_to :account, strict_loading: true - # - # source://activerecord//lib/active_record/associations.rb#1790 - 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 - # intermediate join table. Unless the join table is explicitly specified as an option, it is - # guessed using the lexical order of the class names. So a join between Developer and Project - # will give the default join table name of "developers_projects" because "D" precedes "P" alphabetically. - # Note that this precedence is calculated using the < operator for String. This - # means that if the strings are of different lengths, and the strings are equal when compared - # up to the shortest length, then the longer string is considered of higher - # lexical precedence than the shorter one. For example, one would expect the tables "paper_boxes" and "papers" - # to generate a join table name of "papers_paper_boxes" because of the length of the name "paper_boxes", - # but it in fact generates a join table name of "paper_boxes_papers". Be aware of this caveat, and use the - # custom :join_table option if you need to. - # If your tables share a common prefix, it will only appear once at the beginning. For example, - # the tables "catalog_categories" and "catalog_products" generate a join table name of "catalog_categories_products". - # - # 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] - # def change - # create_join_table :developers, :projects - # end - # end - # - # It's also a good idea to add indexes to each of those columns to speed up the joins process. - # However, in MySQL it is advised to add a compound index for both of the columns as MySQL only - # uses one index per table during the lookup. - # - # Adds the following methods for retrieval and query: - # - # +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] - # Returns a Relation of all the associated objects. - # An empty Relation is returned if none are found. - # [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, ...)] - # 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, ...)] - # 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] - # Replaces the collection's content by deleting and adding objects as appropriate. - # [collection_singular_ids] - # Returns an array of the associated objects' ids. - # [collection_singular_ids=ids] - # Replace the collection by the objects identified by the primary keys in +ids+. - # [collection.clear] - # Removes every object from the collection. This does not destroy the objects. - # [collection.empty?] - # Returns +true+ if there are no associated objects. - # [collection.size] - # Returns the number of associated objects. - # [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?(...)] - # Checks whether an associated object with the given conditions exists. - # Uses the same rules as ActiveRecord::FinderMethods#exists?. - # [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 = {})] - # 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] - # 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 - # The declaration may include an +options+ hash to specialize the behavior of the association. - # - # === Scopes - # - # You can pass a second argument +scope+ as a callable (i.e. proc or - # lambda) to retrieve a specific set of records or customize the generated - # query when you access the associated collection. - # - # Scope examples: - # has_and_belongs_to_many :projects, -> { includes(:milestones, :manager) } - # has_and_belongs_to_many :categories, ->(post) { - # where("default_category = ?", post.default_category) - # } - # - # === Extensions - # - # The +extension+ argument allows you to pass a block into a - # has_and_belongs_to_many association. This is useful for adding new - # finders, creators, and other factory-type methods to be used as part of - # the association. - # - # Extension examples: - # has_and_belongs_to_many :contractors do - # def find_or_create_by_name(name) - # first_name, last_name = name.split(" ", 2) - # find_or_create_by(first_name: first_name, last_name: last_name) - # end - # end - # - # === Options - # - # [:class_name] - # Specify the class name of the association. Use it only if that name can't be inferred - # from the association name. So has_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] - # 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] - # 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] - # 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] - # 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] - # 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. - # - # Note that NestedAttributes::ClassMethods#accepts_nested_attributes_for sets - # :autosave to true. - # [:strict_loading] - # Enforces strict loading every time an associated record is loaded through this association. - # - # Option examples: - # has_and_belongs_to_many :projects - # has_and_belongs_to_many :projects, -> { includes(:milestones, :manager) } - # has_and_belongs_to_many :nations, class_name: "Country" - # has_and_belongs_to_many :categories, join_table: "prods_cats" - # has_and_belongs_to_many :categories, -> { readonly } - # has_and_belongs_to_many :categories, strict_loading: true - # - # source://activerecord//lib/active_record/associations.rb#1962 - 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 - # collections of associated objects will be added: - # - # +collection+ is a placeholder for the symbol passed as the +name+ argument, so - # has_many :clients would add among others clients.empty?. - # - # [collection] - # Returns a Relation of all the associated objects. - # An empty Relation is returned if none are found. - # [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, ...)] - # 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. - # - # 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, ...)] - # 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] - # 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] - # Returns an array of the associated objects' 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] - # 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?] - # Returns +true+ if there are no associated objects. - # [collection.size] - # Returns the number of associated objects. - # [collection.find(...)] - # Finds an associated object according to the same rules as ActiveRecord::FinderMethods#find. - # [collection.exists?(...)] - # Checks whether an associated object with the given conditions exists. - # Uses the same rules as ActiveRecord::FinderMethods#exists?. - # [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 = {})] - # 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 = {})] - # Does the same as collection.create, but raises ActiveRecord::RecordInvalid - # if the record is invalid. - # [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 - # The declaration can also include an +options+ hash to specialize the behavior of the association. - # - # === Scopes - # - # You can pass a second argument +scope+ as a callable (i.e. proc or - # lambda) to retrieve a specific set of records or customize the generated - # query when you access the associated collection. - # - # Scope examples: - # has_many :comments, -> { where(author_id: 1) } - # has_many :employees, -> { joins(:address) } - # has_many :posts, ->(blog) { where("max_post_length > ?", blog.max_post_length) } - # - # === Extensions - # - # The +extension+ argument allows you to pass a block into a has_many - # association. This is useful for adding new finders, creators, and other - # factory-type methods to be used as part of the association. - # - # Extension examples: - # has_many :employees do - # def find_or_create_by_name(name) - # first_name, last_name = name.split(" ", 2) - # find_or_create_by(first_name: first_name, last_name: last_name) - # end - # end - # - # === Options - # [:class_name] - # Specify the class name of the association. Use it only if that name can't be inferred - # from the association name. So has_many :products will by default be linked - # to the +Product+ class, but if the real class name is +SpecialProduct+, you'll have to - # specify it with this option. - # [:foreign_key] - # 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] - # 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] - # Specify the name of the column to use as the primary key for the association. By default this is +id+. - # [: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 - # similar callbacks may affect the :dependent behavior, and the - # :dependent behavior may affect other callbacks. - # - # * nil do nothing (default). - # * :destroy causes all the associated objects to also be destroyed. - # * :destroy_async destroys all the associated objects in a background job. WARNING: Do not use - # this option if the association is backed by foreign key constraints in your database. The foreign key - # constraint actions will occur inside the same transaction that deletes its owner. - # * :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_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 - # a #belongs_to, and the records which get deleted are the join records, rather than - # the associated records. - # - # If using dependent: :destroy on a scoped association, only the scoped objects are destroyed. - # For example, if a Post model defines - # 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] - # 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] - # Specifies a polymorphic interface (See #belongs_to). - # [: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 - # source reflection. - # - # If the association on the join model is a #belongs_to, the collection can be modified - # and the records on the :through model will be automatically created and removed - # as appropriate. Otherwise, the collection is read-only, so you should manipulate the - # :through association directly. - # - # 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 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] - # 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] - # 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] - # Specifies type of the source association used by #has_many :through queries where the source - # association is a polymorphic #belongs_to. - # [: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] - # 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 - # +before_save+ callback. Because callbacks are run in the order they are defined, associated objects - # may need to be explicitly saved in any user-defined +before_save+ callbacks. - # - # Note that NestedAttributes::ClassMethods#accepts_nested_attributes_for sets - # :autosave to true. - # [: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] - # 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] - # When set to +true+, enforces strict loading every time the associated record is loaded through this - # association. - # [: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. - # - # Option examples: - # has_many :comments, -> { order("posted_on") } - # has_many :comments, -> { includes(:author) } - # has_many :people, -> { where(deleted: false).order("name") }, class_name: "Person" - # has_many :tracks, -> { order("position") }, dependent: :destroy - # has_many :comments, dependent: :nullify - # has_many :tags, as: :taggable - # has_many :reports, -> { readonly } - # has_many :subscribers, through: :subscriptions, source: :user - # has_many :subscribers, through: :subscriptions, disable_joins: true - # has_many :comments, strict_loading: true - # - # source://activerecord//lib/active_record/associations.rb#1466 - 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 - # if the other class contains the foreign key. If the current class contains the foreign key, - # then you should use #belongs_to instead. See also ActiveRecord::Associations::ClassMethods's overview - # on when to use #has_one and when to use #belongs_to. - # - # The following methods for retrieval and query of a single associated object will be added: - # - # +association+ is a placeholder for the symbol passed as the +name+ argument, so - # has_one :manager would add among others manager.nil?. - # - # [association] - # Returns the associated object. +nil+ is returned if none is found. - # [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 = {})] - # 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 = {})] - # 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 = {})] - # Does the same as create_association, but raises ActiveRecord::RecordInvalid - # if the record is invalid. - # [reload_association] - # Returns the associated object, forcing a database read. - # - # === 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 - # - # === Scopes - # - # You can pass a second argument +scope+ as a callable (i.e. proc or - # lambda) to retrieve a specific record or customize the generated query - # when you access the associated object. - # - # Scope examples: - # has_one :author, -> { where(comment_id: 1) } - # has_one :employer, -> { joins(:company) } - # has_one :latest_post, ->(blog) { where("created_at > ?", blog.enabled_at) } - # - # === Options - # - # The declaration can also include an +options+ hash to specialize the behavior of the association. - # - # Options are: - # [: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] - # Controls what happens to the associated object when - # its owner is destroyed: - # - # * nil do nothing (default). - # * :destroy causes the associated object to also be destroyed - # * :destroy_async causes the associated object to be destroyed in a background job. WARNING: Do not use - # this option if the association is backed by foreign key constraints in your database. The foreign key - # constraint actions will occur inside the same transaction that deletes its owner. - # * :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_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] - # 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] - # 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] - # Specify the method that returns the primary key used for the association. By default this is +id+. - # [:as] - # Specifies a polymorphic interface (See #belongs_to). - # [: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 - # or #belongs_to association on the join model. - # - # If the association on the join model is a #belongs_to, the collection can be modified - # and the records on the :through model will be automatically created and removed - # as appropriate. Otherwise, the collection is read-only, so you should manipulate the - # :through association directly. - # - # 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 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] - # 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] - # 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] - # Specifies type of the source association used by #has_one :through queries where the source - # association is a polymorphic #belongs_to. - # [: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] - # 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. - # [: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] - # 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] - # Enforces strict loading every time the associated record is loaded through this association. - # [: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. - # - # Option examples: - # has_one :credit_card, dependent: :destroy # destroys the associated credit card - # has_one :credit_card, dependent: :nullify # updates the associated records foreign - # # key value to NULL rather than destroying it - # has_one :last_comment, -> { order('posted_on') }, class_name: "Comment" - # has_one :project_manager, -> { where(role: 'project_manager') }, class_name: "Person" - # has_one :attachment, as: :attachable - # has_one :boss, -> { readonly } - # has_one :club, through: :membership - # has_one :club, through: :membership, disable_joins: true - # has_one :primary_address, -> { where(primary: true) }, through: :addressables, source: :addressable - # has_one :credit_card, required: true - # has_one :credit_card, strict_loading: true - # - # source://activerecord//lib/active_record/associations.rb#1630 - def has_one(name, scope = T.unsafe(nil), **options); end -end - -# = Active Record Association Collection -# -# CollectionAssociation is an abstract class that provides common stuff to -# ease the implementation of association proxies that represent -# collections. See the class hierarchy in Association. -# -# CollectionAssociation: -# HasManyAssociation => has_many -# HasManyThroughAssociation + ThroughAssociation => has_many :through -# -# 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. -# -# 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 -# ones created with +build+ are added to the target. So, the target may be -# non-empty and still lack children waiting to be read from the database. -# If you look directly to the database you cannot assume that's the entire -# collection because new records may have been added to the target, etc. -# -# If you need to work on all current children, new and existing records, -# +load_target+ and the +loaded+ flag are your friends. -# -# 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 - 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 - 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 - def concat(*records); end - - # Removes +records+ from this association calling +before_remove+ and - # +after_remove+ callbacks. - # - # This method is abstract in the sense that +delete_records+ has to be - # provided by descendants. Note this method does not imply the records - # 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 - def delete(*records); end - - # Removes all records from the association without calling callbacks - # on the associated records. It honors the +:dependent+ option. However - # if the +:dependent+ value is +:destroy+ then in that case the +:delete_all+ - # deletion strategy for the association is applied. - # - # You can force a particular deletion strategy by passing a parameter. - # - # Example: - # - # @author.books.delete_all(:nullify) - # @author.books.delete_all(:delete_all) - # - # See delete for more info. - # - # source://activerecord//lib/active_record/associations/collection_association.rb#142 - def delete_all(dependent = T.unsafe(nil)); end - - # Deletes the +records+ and removes them from this association calling - # +before_remove+, +after_remove+, +before_destroy+ and +after_destroy+ callbacks. - # - # Note that this method removes records from the database ignoring the - # +:dependent+ option. - # - # source://activerecord//lib/active_record/associations/collection_association.rb#187 - 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 - def destroy_all; end - - # Returns true if the collection is empty. - # - # If the collection has been loaded - # it is equivalent to collection.size.zero?. If the - # collection has not been loaded, it is equivalent to - # !collection.exists?. If the collection has not already been - # loaded and you are going to fetch the records anyway it is better to - # check collection.length.zero?. - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/collection_association.rb#224 - def empty?; end - - # source://activerecord//lib/active_record/associations/collection_association.rb#86 - def find(*args); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/collection_association.rb#298 - def find_from_target?; end - - # Implements the ids reader method, e.g. foo.item_ids for Foo.has_many :items - # - # source://activerecord//lib/active_record/associations/collection_association.rb#49 - def ids_reader; end - - # Implements the ids writer method, e.g. foo.item_ids= for Foo.has_many :items - # - # source://activerecord//lib/active_record/associations/collection_association.rb#60 - def ids_writer(ids); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/collection_association.rb#250 - def include?(record); end - - # source://activerecord//lib/active_record/associations/collection_association.rb#262 - def load_target; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/collection_association.rb#294 - def null_scope?; end - - # Implements the reader method, e.g. foo.items for Foo.has_many :items - # - # source://activerecord//lib/active_record/associations/collection_association.rb#32 - def reader; end - - # 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 - def replace(other_array); end - - # source://activerecord//lib/active_record/associations/collection_association.rb#79 - def reset; end - - # source://activerecord//lib/active_record/associations/collection_association.rb#288 - def scope; end - - # Returns the size of the collection by executing a SELECT COUNT(*) - # query if the collection hasn't been loaded, and calling - # collection.size if it has. - # - # If the collection has been already loaded +size+ and +length+ are - # equivalent. If not and you are going to need the records anyway - # +length+ will take one less query. Otherwise +size+ is more efficient. - # - # 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 - def size; end - - # source://activerecord//lib/active_record/associations/collection_association.rb#275 - def target=(record); end - - # Implements the writer method, e.g. foo.items= for Foo.has_many :items - # - # source://activerecord//lib/active_record/associations/collection_association.rb#44 - def writer(records); end - - private - - # source://activerecord//lib/active_record/associations/collection_association.rb#340 - def _create_record(attributes, raise = T.unsafe(nil), &block); end - - # source://activerecord//lib/active_record/associations/collection_association.rb#478 - def callback(method, record); end - - # source://activerecord//lib/active_record/associations/collection_association.rb#484 - def callbacks_for(callback_name); end - - # @raise [ActiveRecord::Rollback] - # - # source://activerecord//lib/active_record/associations/collection_association.rb#424 - def concat_records(records, raise = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/associations/collection_association.rb#371 - def delete_or_destroy(records, method); end - - # Delete the given records from the association, - # using one of the methods +:destroy+, +:delete_all+ - # or +:nullify+ (or +nil+, in which case a default is used). - # - # @raise [NotImplementedError] - # - # source://activerecord//lib/active_record/associations/collection_association.rb#400 - 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 - def find_by_scan(*args); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/collection_association.rb#493 - 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 - 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 - # in-memory (memory). The same record may be represented in the persisted array - # and in the memory array. - # - # So the task of this method is to merge them according to the following rules: - # - # * The final array must not have duplicates - # * The order of the persisted array is to be preserved - # * 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 - def merge_target_lists(persisted, memory); end - - # source://activerecord//lib/active_record/associations/collection_association.rb#385 - def remove_records(existing_records, records, method); end - - # source://activerecord//lib/active_record/associations/collection_association.rb#416 - def replace_common_records_in_memory(new_target, original_target); end - - # source://activerecord//lib/active_record/associations/collection_association.rb#443 - def replace_on_target(record, skip_callbacks, replace:, inversing: T.unsafe(nil)); end - - # source://activerecord//lib/active_record/associations/collection_association.rb#404 - def replace_records(new_target, original_target); end - - # source://activerecord//lib/active_record/associations/collection_association.rb#307 - def transaction(&block); end -end - -# Collection proxies in Active Record are middlemen between an -# association, and its target result set. -# -# For example, given -# -# class Blog < ActiveRecord::Base -# has_many :posts -# end -# -# blog = Blog.first -# -# The collection proxy returned by blog.posts is built from a -# :has_many association, and delegates to a collection -# of posts as the target. -# -# This class delegates unknown methods to the association's -# relation class via a delegate cache. -# -# The target result set is not loaded until needed. For example, -# -# blog.posts.count -# -# 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 -class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation - # @return [CollectionProxy] a new instance of CollectionProxy - # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#30 - def initialize(klass, association, **_arg2); end - - # Adds one or more +records+ to the collection by setting their foreign keys - # to the association's primary key. Since << flattens its argument list and - # inserts each record, +push+ and +concat+ behave identically. Returns +self+ - # so several appends may be chained together. - # - # class Person < ActiveRecord::Base - # has_many :pets - # end - # - # person.pets.size # => 0 - # person.pets << Pet.new(name: 'Fancy-Fancy') - # person.pets << [Pet.new(name: 'Spook'), Pet.new(name: 'Choo-Choo')] - # person.pets.size # => 3 - # - # person.id # => 1 - # person.pets - # # => [ - # # #, - # # #, - # # # - # # ] - # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1031 - def <<(*records); end - - # Equivalent to Array#==. Returns +true+ if the two arrays - # contain the same number of elements and if each element is equal - # to the corresponding element in the +other+ array, otherwise returns - # +false+. - # - # class Person < ActiveRecord::Base - # has_many :pets - # end - # - # person.pets - # # => [ - # # #, - # # # - # # ] - # - # other = person.pets.to_ary - # - # person.pets == other - # # => true - # - # other = [Pet.new(id: 1), Pet.new(id: 2)] - # - # person.pets == other - # # => false - # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#962 - def ==(other); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def _select!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def and(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def and!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def annotate(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def annotate!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def annotate_values(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def annotate_values=(arg); end - - # Adds one or more +records+ to the collection by setting their foreign keys - # to the association's primary key. Since << flattens its argument list and - # inserts each record, +push+ and +concat+ behave identically. Returns +self+ - # so several appends may be chained together. - # - # class Person < ActiveRecord::Base - # has_many :pets - # end - # - # person.pets.size # => 0 - # person.pets << Pet.new(name: 'Fancy-Fancy') - # person.pets << [Pet.new(name: 'Spook'), Pet.new(name: 'Choo-Choo')] - # person.pets.size # => 3 - # - # person.id # => 1 - # person.pets - # # => [ - # # #, - # # #, - # # # - # # ] - # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1031 - def append(*records); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def arel(*_arg0, **_arg1, &_arg2); end - - # Returns a new object of the collection type that has been instantiated - # with +attributes+ and linked to this object, but have not yet been saved. - # You can pass an array of attributes hashes, this will return an array - # with the new objects. - # - # class Person - # has_many :pets - # end - # - # person.pets.build - # # => # - # - # person.pets.build(name: 'Fancy-Fancy') - # # => # - # - # person.pets.build([{name: 'Spook'}, {name: 'Choo-Choo'}, {name: 'Brain'}]) - # # => [ - # # #, - # # #, - # # # - # # ] - # - # 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 - def build(attributes = T.unsafe(nil), &block); end - - # -- - # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#722 - def calculate(operation, column_name); end - - # Equivalent to +delete_all+. The difference is that returns +self+, instead - # of an array with the deleted objects, so methods can be chained. See - # +delete_all+ for more information. - # Note that because +delete_all+ removes records by directly - # 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 - def clear; end - - # Adds one or more +records+ to the collection by setting their foreign keys - # to the association's primary key. Since << flattens its argument list and - # inserts each record, +push+ and +concat+ behave identically. Returns +self+ - # so several appends may be chained together. - # - # class Person < ActiveRecord::Base - # has_many :pets - # end - # - # person.pets.size # => 0 - # person.pets << Pet.new(name: 'Fancy-Fancy') - # person.pets << [Pet.new(name: 'Spook'), Pet.new(name: 'Choo-Choo')] - # person.pets.size # => 3 - # - # person.id # => 1 - # person.pets - # # => [ - # # #, - # # #, - # # # - # # ] - # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1031 - def concat(*records); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def construct_join_dependency(*_arg0, **_arg1, &_arg2); end - - # Returns a new object of the collection type that has been instantiated with - # attributes, linked to this object and that has already been saved (if it - # passes the validations). - # - # class Person - # has_many :pets - # end - # - # person.pets.create(name: 'Fancy-Fancy') - # # => # - # - # person.pets.create([{name: 'Spook'}, {name: 'Choo-Choo'}]) - # # => [ - # # #, - # # # - # # ] - # - # person.pets.size # => 3 - # person.pets.count # => 3 - # - # person.pets.find(1, 2, 3) - # # => [ - # # #, - # # #, - # # # - # # ] - # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#347 - def create(attributes = T.unsafe(nil), &block); end - - # Like #create, except that if the record is invalid, raises an exception. - # - # class Person - # has_many :pets - # end - # - # class Pet - # validates :name, presence: true - # end - # - # person.pets.create!(name: nil) - # # => ActiveRecord::RecordInvalid: Validation failed: Name can't be blank - # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#363 - def create!(attributes = T.unsafe(nil), &block); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def create_with(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def create_with!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def create_with_value(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def create_with_value=(arg); end - - # Deletes the +records+ supplied from the collection according to the strategy - # specified by the +:dependent+ option. If no +:dependent+ option is given, - # then it will follow the default strategy. Returns an array with the - # deleted records. - # - # For has_many :through associations, the default deletion strategy is - # +:delete_all+. - # - # For +has_many+ associations, the default deletion strategy is +:nullify+. - # This sets the foreign keys to +NULL+. - # - # class Person < ActiveRecord::Base - # has_many :pets # dependent: :nullify option by default - # end - # - # person.pets.size # => 3 - # person.pets - # # => [ - # # #, - # # #, - # # # - # # ] - # - # person.pets.delete(Pet.find(1)) - # # => [#] - # - # person.pets.size # => 2 - # person.pets - # # => [ - # # #, - # # # - # # ] - # - # Pet.find(1) - # # => # - # - # If it is set to :destroy all the +records+ are removed by calling - # their +destroy+ method. See +destroy+ for more information. - # - # class Person < ActiveRecord::Base - # has_many :pets, dependent: :destroy - # end - # - # person.pets.size # => 3 - # person.pets - # # => [ - # # #, - # # #, - # # # - # # ] - # - # person.pets.delete(Pet.find(1), Pet.find(3)) - # # => [ - # # #, - # # # - # # ] - # - # person.pets.size # => 1 - # person.pets - # # => [#] - # - # Pet.find(1, 3) - # # => ActiveRecord::RecordNotFound: Couldn't find all Pets with 'id': (1, 3) - # - # If it is set to :delete_all, all the +records+ are deleted - # *without* calling their +destroy+ method. - # - # class Person < ActiveRecord::Base - # has_many :pets, dependent: :delete_all - # end - # - # person.pets.size # => 3 - # person.pets - # # => [ - # # #, - # # #, - # # # - # # ] - # - # person.pets.delete(Pet.find(1)) - # # => [#] - # - # person.pets.size # => 2 - # person.pets - # # => [ - # # #, - # # # - # # ] - # - # Pet.find(1) - # # => ActiveRecord::RecordNotFound: Couldn't find Pet with 'id'=1 - # - # You can pass +Integer+ or +String+ values, it finds the records - # responding to the +id+ and executes delete on them. - # - # class Person < ActiveRecord::Base - # has_many :pets - # end - # - # person.pets.size # => 3 - # person.pets - # # => [ - # # #, - # # #, - # # # - # # ] - # - # person.pets.delete("1") - # # => [#] - # - # person.pets.delete(2, 3) - # # => [ - # # #, - # # # - # # ] - # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#618 - def delete(*records); end - - # Deletes all the records from the collection according to the strategy - # specified by the +:dependent+ option. If no +:dependent+ option is given, - # then it will follow the default strategy. - # - # For has_many :through associations, the default deletion strategy is - # +:delete_all+. - # - # For +has_many+ associations, the default deletion strategy is +:nullify+. - # This sets the foreign keys to +NULL+. - # - # class Person < ActiveRecord::Base - # has_many :pets # dependent: :nullify option by default - # end - # - # person.pets.size # => 3 - # person.pets - # # => [ - # # #, - # # #, - # # # - # # ] - # - # person.pets.delete_all - # # => [ - # # #, - # # #, - # # # - # # ] - # - # person.pets.size # => 0 - # person.pets # => [] - # - # Pet.find(1, 2, 3) - # # => [ - # # #, - # # #, - # # # - # # ] - # - # Both +has_many+ and has_many :through dependencies default to the - # +:delete_all+ strategy if the +:dependent+ option is set to +:destroy+. - # Records are not instantiated and callbacks will not be fired. - # - # class Person < ActiveRecord::Base - # has_many :pets, dependent: :destroy - # end - # - # person.pets.size # => 3 - # person.pets - # # => [ - # # #, - # # #, - # # # - # # ] - # - # person.pets.delete_all - # - # Pet.find(1, 2, 3) - # # => ActiveRecord::RecordNotFound: Couldn't find all Pets with 'id': (1, 2, 3) - # - # If it is set to :delete_all, all the objects are deleted - # *without* calling their +destroy+ method. - # - # class Person < ActiveRecord::Base - # has_many :pets, dependent: :delete_all - # end - # - # person.pets.size # => 3 - # person.pets - # # => [ - # # #, - # # #, - # # # - # # ] - # - # person.pets.delete_all - # - # 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 - def delete_all(dependent = T.unsafe(nil)); end - - # Destroys the +records+ supplied and removes them from the collection. - # This method will _always_ remove record from the database ignoring - # the +:dependent+ option. Returns an array with the removed records. - # - # class Person < ActiveRecord::Base - # has_many :pets - # end - # - # person.pets.size # => 3 - # person.pets - # # => [ - # # #, - # # #, - # # # - # # ] - # - # person.pets.destroy(Pet.find(1)) - # # => [#] - # - # person.pets.size # => 2 - # person.pets - # # => [ - # # #, - # # # - # # ] - # - # person.pets.destroy(Pet.find(2), Pet.find(3)) - # # => [ - # # #, - # # # - # # ] - # - # person.pets.size # => 0 - # person.pets # => [] - # - # Pet.find(1, 2, 3) # => ActiveRecord::RecordNotFound: Couldn't find all Pets with 'id': (1, 2, 3) - # - # You can pass +Integer+ or +String+ values, it finds the records - # responding to the +id+ and then deletes them from the database. - # - # person.pets.size # => 3 - # person.pets - # # => [ - # # #, - # # #, - # # # - # # ] - # - # person.pets.destroy("4") - # # => # - # - # person.pets.size # => 2 - # person.pets - # # => [ - # # #, - # # # - # # ] - # - # person.pets.destroy(5, 6) - # # => [ - # # #, - # # # - # # ] - # - # person.pets.size # => 0 - # person.pets # => [] - # - # 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 - def destroy(*records); end - - # Deletes the records of the collection directly from the database - # ignoring the +:dependent+ option. Records are instantiated and it - # invokes +before_remove+, +after_remove+, +before_destroy+, and - # +after_destroy+ callbacks. - # - # class Person < ActiveRecord::Base - # has_many :pets - # end - # - # person.pets.size # => 3 - # person.pets - # # => [ - # # #, - # # #, - # # # - # # ] - # - # person.pets.destroy_all - # - # person.pets.size # => 0 - # person.pets # => [] - # - # Pet.find(1) # => Couldn't find Pet with id=1 - # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#499 - def destroy_all; end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def distinct(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def distinct!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def distinct_value(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def distinct_value=(arg); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def eager_load(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def eager_load!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def eager_load_values(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def eager_load_values=(arg); end - - # Returns +true+ if the collection is empty. If the collection has been - # loaded it is equivalent - # to collection.size.zero?. If the collection has not been loaded, - # it is equivalent to !collection.exists?. If the collection has - # not already been loaded and you are going to fetch the records anyway it - # is better to check collection.load.empty?. - # - # class Person < ActiveRecord::Base - # has_many :pets - # end - # - # person.pets.count # => 1 - # person.pets.empty? # => false - # - # person.pets.delete_all - # - # person.pets.count # => 0 - # person.pets.empty? # => true - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#829 - def empty?; end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def except(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def excluding(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def excluding!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def extending(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def extending!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def extending_values(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def extending_values=(arg); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def extensions(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - 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 - # error if the object cannot be found. - # - # class Person < ActiveRecord::Base - # has_many :pets - # end - # - # person.pets - # # => [ - # # #, - # # #, - # # # - # # ] - # - # person.pets.find(1) # => # - # person.pets.find(4) # => ActiveRecord::RecordNotFound: Couldn't find Pet with 'id'=4 - # - # person.pets.find(2) { |pet| pet.name.downcase! } - # # => # - # - # person.pets.find(2, 3) - # # => [ - # # #, - # # # - # # ] - # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#136 - def find(*args); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def from(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def from!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def from_clause(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def from_clause=(arg); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def group(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def group!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def group_values(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def group_values=(arg); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def having(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def having!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def having_clause(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def having_clause=(arg); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def in_order_of(*_arg0, **_arg1, &_arg2); end - - # Returns +true+ if the given +record+ is present in the collection. - # - # class Person < ActiveRecord::Base - # has_many :pets - # end - # - # person.pets # => [#] - # - # person.pets.include?(Pet.find(20)) # => true - # person.pets.include?(Pet.find(21)) # => false - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#925 - def include?(record); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def includes(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def includes!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def includes_values(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def includes_values=(arg); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def insert(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def insert!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def insert_all(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def insert_all!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1100 - def inspect; end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def invert_where(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def invert_where!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def joins(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def joins!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def joins_values(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def joins_values=(arg); end - - # Returns the last record, or the last +n+ records, from the collection. - # If the collection is empty, the first form returns +nil+, and the second - # form returns an empty array. - # - # class Person < ActiveRecord::Base - # has_many :pets - # end - # - # person.pets - # # => [ - # # #, - # # #, - # # # - # # ] - # - # person.pets.last # => # - # - # person.pets.last(2) - # # => [ - # # #, - # # # - # # ] - # - # another_person_without.pets # => [] - # another_person_without.pets.last # => nil - # another_person_without.pets.last(3) # => [] - # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#257 - def last(limit = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def left_joins(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def left_outer_joins(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def left_outer_joins!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def left_outer_joins_values(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def left_outer_joins_values=(arg); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def limit(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def limit!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def limit_value(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def limit_value=(arg); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def load_async(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#42 - def load_target; end - - # Returns +true+ if the association has been loaded, otherwise +false+. - # - # person.pets.loaded? # => false - # person.pets.records - # person.pets.loaded? # => true - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#51 - def loaded; end - - # Returns +true+ if the association has been loaded, otherwise +false+. - # - # person.pets.loaded? # => false - # person.pets.records - # person.pets.loaded? # => true - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#51 - def loaded?; end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def lock(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def lock!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def lock_value(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def lock_value=(arg); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def merge(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def merge!(*_arg0, **_arg1, &_arg2); end - - # Returns a new object of the collection type that has been instantiated - # with +attributes+ and linked to this object, but have not yet been saved. - # You can pass an array of attributes hashes, this will return an array - # with the new objects. - # - # class Person - # has_many :pets - # end - # - # person.pets.build - # # => # - # - # person.pets.build(name: 'Fancy-Fancy') - # # => # - # - # person.pets.build([{name: 'Spook'}, {name: 'Choo-Choo'}, {name: 'Brain'}]) - # # => [ - # # #, - # # #, - # # # - # # ] - # - # 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 - def new(attributes = T.unsafe(nil), &block); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def none(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def none!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def offset(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def offset!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def offset_value(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def offset_value=(arg); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def only(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def optimizer_hints(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def optimizer_hints!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def optimizer_hints_values(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def optimizer_hints_values=(arg); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def or(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def or!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def order(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def order!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def order_values(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def order_values=(arg); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#726 - def pluck(*column_names); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def preload(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def preload!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def preload_values(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def preload_values=(arg); end - - # @raise [NoMethodError] - # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1038 - def prepend(*args); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#929 - def proxy_association; end - - # Adds one or more +records+ to the collection by setting their foreign keys - # to the association's primary key. Since << flattens its argument list and - # inserts each record, +push+ and +concat+ behave identically. Returns +self+ - # so several appends may be chained together. - # - # class Person < ActiveRecord::Base - # has_many :pets - # end - # - # person.pets.size # => 0 - # person.pets << Pet.new(name: 'Fancy-Fancy') - # person.pets << [Pet.new(name: 'Spook'), Pet.new(name: 'Choo-Choo')] - # person.pets.size # => 3 - # - # person.id # => 1 - # person.pets - # # => [ - # # #, - # # #, - # # # - # # ] - # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1031 - def push(*records); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def readonly(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def readonly!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def readonly_value(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def readonly_value=(arg); end - - # :method: to_ary - # - # :call-seq: - # to_ary() - # - # Returns a new array of objects from the collection. If the collection - # hasn't been loaded, it fetches the records from the database. - # - # class Person < ActiveRecord::Base - # has_many :pets - # end - # - # person.pets - # # => [ - # # #, - # # #, - # # # - # # ] - # - # other_pets = person.pets.to_ary - # # => [ - # # #, - # # #, - # # # - # # ] - # - # other_pets.replace([Pet.new(name: 'BooGoo')]) - # - # other_pets - # # => [#] - # - # person.pets - # # This is not affected by replace - # # => [ - # # #, - # # #, - # # # - # # ] - # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1006 - def records; end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def references(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def references!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def references_values(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def references_values=(arg); end - - # Reloads the collection from the database. Returns +self+. - # - # class Person < ActiveRecord::Base - # has_many :pets - # end - # - # person.pets # fetches pets from the database - # # => [#] - # - # person.pets # uses the pets cache - # # => [#] - # - # person.pets.reload # fetches pets from the database - # # => [#] - # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1067 - def reload; end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def reorder(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def reorder!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def reordering_value(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def reordering_value=(arg); end - - # Replaces this collection with +other_array+. This will perform a diff - # and delete/add only records that have changed. - # - # class Person < ActiveRecord::Base - # has_many :pets - # end - # - # person.pets - # # => [#] - # - # other_pets = [Pet.new(name: 'Puff', group: 'celebrities')] - # - # person.pets.replace(other_pets) - # - # person.pets - # # => [#] - # - # If the supplied array has an incorrect association type, it raises - # 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 - def replace(other_array); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def reselect(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def reselect!(*_arg0, **_arg1, &_arg2); end - - # Unloads the association. Returns +self+. - # - # class Person < ActiveRecord::Base - # has_many :pets - # end - # - # person.pets # fetches pets from the database - # # => [#] - # - # person.pets # uses the pets cache - # # => [#] - # - # person.pets.reset # clears the pets cache - # - # person.pets # fetches pets from the database - # # => [#] - # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1088 - def reset; end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1094 - def reset_scope; end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def reverse_order(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def reverse_order!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def reverse_order_value(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def reverse_order_value=(arg); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def rewhere(*_arg0, **_arg1, &_arg2); end - - # Returns a Relation object for the records in this association - # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#934 - def scope; end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def scoping(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def select_values(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def select_values=(arg); end - - # Returns the size of the collection. If the collection hasn't been loaded, - # it executes a SELECT COUNT(*) query. Else it calls collection.size. - # - # If the collection has been already loaded +size+ and +length+ are - # equivalent. If not and you are going to need the records anyway - # +length+ will take one less query. Otherwise +size+ is more efficient. - # - # class Person < ActiveRecord::Base - # has_many :pets - # end - # - # person.pets.size # => 3 - # # executes something like SELECT COUNT(*) FROM "pets" WHERE "pets"."person_id" = 1 - # - # person.pets # This will execute a SELECT * FROM query - # # => [ - # # #, - # # #, - # # # - # # ] - # - # person.pets.size # => 3 - # # 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 - def size; end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def skip_preloading!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def skip_query_cache!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def skip_query_cache_value(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def skip_query_cache_value=(arg); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def spawn(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def strict_loading(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def strict_loading!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def strict_loading_value(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def strict_loading_value=(arg); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - 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. - # - # class Person < ActiveRecord::Base - # has_many :pets - # end - # - # person.pets - # # => [ - # # #, - # # #, - # # # - # # ] - # - # person.pets.take # => # - # - # person.pets.take(2) - # # => [ - # # #, - # # # - # # ] - # - # another_person_without.pets # => [] - # another_person_without.pets.take # => nil - # another_person_without.pets.take(2) # => [] - # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#287 - def take(limit = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#38 - def target; end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def uniq!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def unscope(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def unscope!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def unscope_values(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def unscope_values=(arg); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def upsert(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def upsert_all(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def values(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def where(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def where!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def where_clause(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def where_clause=(arg); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1114 - def without(*_arg0, **_arg1, &_arg2); end - - private - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1135 - def exec_queries; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1131 - def find_from_target?; end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1122 - def find_nth_from_last(index); end - - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1117 - def find_nth_with_limit(index, limit); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/collection_proxy.rb#1127 - def null_scope?; end -end - -# source://activerecord//lib/active_record/associations/disable_joins_association_scope.rb#5 -class ActiveRecord::Associations::DisableJoinsAssociationScope < ::ActiveRecord::Associations::AssociationScope - # source://activerecord//lib/active_record/associations/disable_joins_association_scope.rb#6 - def scope(association); end - - private - - # source://activerecord//lib/active_record/associations/disable_joins_association_scope.rb#33 - def add_constraints(reflection, key, join_ids, owner, ordered); end - - # source://activerecord//lib/active_record/associations/disable_joins_association_scope.rb#18 - def last_scope_chain(reverse_chain, owner); end -end - -# source://activerecord//lib/active_record/associations/foreign_association.rb#4 -module ActiveRecord::Associations::ForeignAssociation - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/foreign_association.rb#5 - def foreign_key_present?; end - - # source://activerecord//lib/active_record/associations/foreign_association.rb#13 - def nullified_owner_attributes; end - - private - - # Sets the owner attributes on the given record - # - # source://activerecord//lib/active_record/associations/foreign_association.rb#22 - def set_owner_attributes(record); end -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 -class ActiveRecord::Associations::HasManyAssociation < ::ActiveRecord::Associations::CollectionAssociation - include ::ActiveRecord::Associations::ForeignAssociation - - # source://activerecord//lib/active_record/associations/has_many_association.rb#13 - def handle_dependency; end - - # source://activerecord//lib/active_record/associations/has_many_association.rb#56 - 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 - def _create_record(attributes, *_arg1); end - - # source://activerecord//lib/active_record/associations/has_many_association.rb#132 - def concat_records(records, *_arg1); end - - # Returns the number of records in this collection. - # - # If the association has a counter cache it gets that value. Otherwise - # it will attempt to do a count via SQL, bounded to :limit if - # there's one. Some configuration options like :group make it impossible - # to do an SQL count, in those cases the array count will be used. - # - # That does not depend on whether the collection has already been loaded - # or not. The +size+ method is the one that takes the loaded flag into - # account and delegates to +count_records+ if needed. - # - # 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 - def count_records; end - - # source://activerecord//lib/active_record/associations/has_many_association.rb#107 - def delete_count(method, scope); end - - # source://activerecord//lib/active_record/associations/has_many_association.rb#115 - 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 - def delete_records(records, method); end - - # source://activerecord//lib/active_record/associations/has_many_association.rb#151 - def difference(a, b); end - - # source://activerecord//lib/active_record/associations/has_many_association.rb#155 - def intersection(a, b); end - - # source://activerecord//lib/active_record/associations/has_many_association.rb#93 - def update_counter(difference, reflection = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/associations/has_many_association.rb#144 - def update_counter_if_success(saved_successfully, difference); end - - # source://activerecord//lib/active_record/associations/has_many_association.rb#99 - def update_counter_in_memory(difference, reflection = T.unsafe(nil)); end -end - -# = Active Record Has Many Through Association -# -# source://activerecord//lib/active_record/associations/has_many_through_association.rb#6 -class ActiveRecord::Associations::HasManyThroughAssociation < ::ActiveRecord::Associations::HasManyAssociation - include ::ActiveRecord::Associations::ThroughAssociation - - # @return [HasManyThroughAssociation] a new instance of HasManyThroughAssociation - # - # source://activerecord//lib/active_record/associations/has_many_through_association.rb#9 - def initialize(owner, reflection); end - - # source://activerecord//lib/active_record/associations/has_many_through_association.rb#14 - def concat(*records); end - - # source://activerecord//lib/active_record/associations/has_many_through_association.rb#24 - def insert_record(record, validate = T.unsafe(nil), raise = T.unsafe(nil)); end - - private - - # source://activerecord//lib/active_record/associations/has_many_through_association.rb#86 - def build_record(attributes); end - - # The through record (built with build_record) is temporarily cached - # so that it may be reused if insert_record is subsequently called. - # - # However, after insert_record has been called, the cache is cleared in - # order to allow multiple instances of the same record in an association. - # - # source://activerecord//lib/active_record/associations/has_many_through_association.rb#56 - def build_through_record(record); end - - # 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 - def delete_or_nullify_all_records(method); end - - # source://activerecord//lib/active_record/associations/has_many_through_association.rb#130 - def delete_records(records, method); end - - # source://activerecord//lib/active_record/associations/has_many_through_association.rb#199 - def delete_through_records(records); end - - # source://activerecord//lib/active_record/associations/has_many_through_association.rb#167 - def difference(a, b); end - - # source://activerecord//lib/active_record/associations/has_many_through_association.rb#183 - def distribution(array); end - - # source://activerecord//lib/active_record/associations/has_many_through_association.rb#215 - def find_target; end - - # source://activerecord//lib/active_record/associations/has_many_through_association.rb#173 - 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 - def invertible_for?(record); end - - # source://activerecord//lib/active_record/associations/has_many_through_association.rb#179 - def mark_occurrence(distribution, record); end - - # source://activerecord//lib/active_record/associations/has_many_through_association.rb#106 - def remove_records(existing_records, records, method); end - - # source://activerecord//lib/active_record/associations/has_many_through_association.rb#77 - def save_through_record(record); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/has_many_through_association.rb#111 - def target_reflection_has_associated_record?; end - - # source://activerecord//lib/active_record/associations/has_many_through_association.rb#189 - 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 - def through_scope; end - - # source://activerecord//lib/active_record/associations/has_many_through_association.rb#70 - def through_scope_attributes; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/has_many_through_association.rb#115 - def update_through_counter?(method); end -end - -# = Active Record Has One Association -# -# source://activerecord//lib/active_record/associations/has_one_association.rb#6 -class ActiveRecord::Associations::HasOneAssociation < ::ActiveRecord::Associations::SingularAssociation - include ::ActiveRecord::Associations::ForeignAssociation - - # source://activerecord//lib/active_record/associations/has_one_association.rb#26 - def delete(method = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/associations/has_one_association.rb#9 - def handle_dependency; end - - private - - # source://activerecord//lib/active_record/associations/has_one_association.rb#126 - def _create_record(attributes, raise_error = T.unsafe(nil), &block); end - - # source://activerecord//lib/active_record/associations/has_one_association.rb#114 - def nullify_owner_attributes(record); end - - # source://activerecord//lib/active_record/associations/has_one_association.rb#90 - def remove_target!(method); end - - # source://activerecord//lib/active_record/associations/has_one_association.rb#54 - def replace(record, save = 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 - def set_new_record(record); end - - # source://activerecord//lib/active_record/associations/has_one_association.rb#118 - def transaction_if(value, &block); end -end - -# = Active Record Has One Through Association -# -# source://activerecord//lib/active_record/associations/has_one_through_association.rb#6 -class ActiveRecord::Associations::HasOneThroughAssociation < ::ActiveRecord::Associations::HasOneAssociation - include ::ActiveRecord::Associations::ThroughAssociation - - private - - # source://activerecord//lib/active_record/associations/has_one_through_association.rb#15 - def create_through_record(record, save); end - - # source://activerecord//lib/active_record/associations/has_one_through_association.rb#10 - def replace(record, save = T.unsafe(nil)); end -end - -# source://activerecord//lib/active_record/associations/join_dependency.rb#5 -class ActiveRecord::Associations::JoinDependency - extend ::ActiveSupport::Autoload - - # @return [JoinDependency] a new instance of JoinDependency - # - # source://activerecord//lib/active_record/associations/join_dependency.rb#71 - def initialize(base, table, associations, join_type); end - - # source://activerecord//lib/active_record/associations/join_dependency.rb#153 - def apply_column_aliases(relation); end - - # source://activerecord//lib/active_record/associations/join_dependency.rb#77 - def base_klass; end - - # source://activerecord//lib/active_record/associations/join_dependency.rb#158 - def each(&block); end - - # source://activerecord//lib/active_record/associations/join_dependency.rb#105 - def instantiate(result_set, strict_loading_value, &block); end - - # source://activerecord//lib/active_record/associations/join_dependency.rb#85 - def join_constraints(joins_to_add, alias_tracker, references); end - - # source://activerecord//lib/active_record/associations/join_dependency.rb#81 - def reflections; end - - protected - - # Returns the value of attribute join_root. - # - # source://activerecord//lib/active_record/associations/join_dependency.rb#163 - def join_root; end - - # Returns the value of attribute join_type. - # - # source://activerecord//lib/active_record/associations/join_dependency.rb#163 - def join_type; end - - private - - # Returns the value of attribute alias_tracker. - # - # source://activerecord//lib/active_record/associations/join_dependency.rb#166 - def alias_tracker; end - - # source://activerecord//lib/active_record/associations/join_dependency.rb#168 - def aliases; end - - # source://activerecord//lib/active_record/associations/join_dependency.rb#228 - def build(associations, base_klass); end - - # 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 - def construct_model(record, node, row, model_cache, id, strict_loading_value); end - - # source://activerecord//lib/active_record/associations/join_dependency.rb#223 - def find_reflection(klass, name); end - - # Returns the value of attribute join_root_alias. - # - # source://activerecord//lib/active_record/associations/join_dependency.rb#166 - def join_root_alias; end - - # source://activerecord//lib/active_record/associations/join_dependency.rb#190 - def make_constraints(parent, child, join_type); end - - # source://activerecord//lib/active_record/associations/join_dependency.rb#184 - def make_join_constraints(join_root, join_type); end - - # source://activerecord//lib/active_record/associations/join_dependency.rb#214 - def walk(left, right, join_type); end - - class << self - # source://activerecord//lib/active_record/associations/join_dependency.rb#47 - def make_tree(associations); end - - # source://activerecord//lib/active_record/associations/join_dependency.rb#53 - def walk_tree(associations, hash); end - end -end - -# source://activerecord//lib/active_record/associations/join_dependency.rb#13 -class ActiveRecord::Associations::JoinDependency::Aliases - # @return [Aliases] a new instance of Aliases - # - # source://activerecord//lib/active_record/associations/join_dependency.rb#14 - def initialize(tables); end - - # source://activerecord//lib/active_record/associations/join_dependency.rb#34 - def column_alias(node, column); end - - # source://activerecord//lib/active_record/associations/join_dependency.rb#30 - def column_aliases(node); end - - # source://activerecord//lib/active_record/associations/join_dependency.rb#26 - def columns; end -end - -# source://activerecord//lib/active_record/associations/join_dependency.rb#44 -class ActiveRecord::Associations::JoinDependency::Aliases::Column < ::Struct - # Returns the value of attribute alias - # - # @return [Object] the current value of alias - def alias; end - - # Sets the attribute alias - # - # @param value [Object] the value to set the attribute alias to. - # @return [Object] the newly set value - def alias=(_); end - - # Returns the value of attribute name - # - # @return [Object] the current value of name - def name; end - - # Sets the attribute name - # - # @param value [Object] the value to set the attribute name to. - # @return [Object] the newly set value - def name=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://activerecord//lib/active_record/associations/join_dependency.rb#38 -class ActiveRecord::Associations::JoinDependency::Aliases::Table < ::Struct - # source://activerecord//lib/active_record/associations/join_dependency.rb#39 - def column_aliases; end - - # Returns the value of attribute columns - # - # @return [Object] the current value of columns - def columns; end - - # Sets the attribute columns - # - # @param value [Object] the value to set the attribute columns to. - # @return [Object] the newly set value - def columns=(_); end - - # Returns the value of attribute node - # - # @return [Object] the current value of node - def node; end - - # Sets the attribute node - # - # @param value [Object] the value to set the attribute node to. - # @return [Object] the newly set value - def node=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://activerecord//lib/active_record/associations/join_dependency/join_association.rb#9 -class ActiveRecord::Associations::JoinDependency::JoinAssociation < ::ActiveRecord::Associations::JoinDependency::JoinPart - # @return [JoinAssociation] a new instance of JoinAssociation - # - # source://activerecord//lib/active_record/associations/join_dependency/join_association.rb#13 - def initialize(reflection, children); end - - # source://activerecord//lib/active_record/associations/join_dependency/join_association.rb#24 - def join_constraints(foreign_table, foreign_klass, join_type, alias_tracker); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/join_dependency/join_association.rb#19 - def match?(other); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/join_dependency/join_association.rb#78 - def readonly?; end - - # Returns the value of attribute reflection. - # - # source://activerecord//lib/active_record/associations/join_dependency/join_association.rb#10 - def reflection; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/join_dependency/join_association.rb#84 - def strict_loading?; end - - # Returns the value of attribute table. - # - # source://activerecord//lib/active_record/associations/join_dependency/join_association.rb#11 - def table; end - - # Sets the attribute table - # - # @param value the value to set the attribute table to. - # - # source://activerecord//lib/active_record/associations/join_dependency/join_association.rb#11 - def table=(_arg0); end - - # Returns the value of attribute tables. - # - # source://activerecord//lib/active_record/associations/join_dependency/join_association.rb#10 - def tables; end - - private - - # source://activerecord//lib/active_record/associations/join_dependency/join_association.rb#91 - def append_constraints(join, constraints); end -end - -# source://activerecord//lib/active_record/associations/join_dependency/join_base.rb#8 -class ActiveRecord::Associations::JoinDependency::JoinBase < ::ActiveRecord::Associations::JoinDependency::JoinPart - # @return [JoinBase] a new instance of JoinBase - # - # source://activerecord//lib/active_record/associations/join_dependency/join_base.rb#11 - def initialize(base_klass, table, children); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/join_dependency/join_base.rb#16 - def match?(other); end - - # Returns the value of attribute table. - # - # source://activerecord//lib/active_record/associations/join_dependency/join_base.rb#9 - def table; end -end - -# A JoinPart represents a part of a JoinDependency. It is inherited -# by JoinBase and JoinAssociation. A JoinBase represents the Active Record which -# everything else is being joined onto. A JoinAssociation represents an association which -# is joining to the base. A JoinAssociation may result in more than one actual join -# operations (for example a has_and_belongs_to_many JoinAssociation would result in -# two; one for the join table and one for the target table). -# -# source://activerecord//lib/active_record/associations/join_dependency/join_part.rb#12 -class ActiveRecord::Associations::JoinDependency::JoinPart - include ::Enumerable - - # @return [JoinPart] a new instance of JoinPart - # - # source://activerecord//lib/active_record/associations/join_dependency/join_part.rb#22 - def initialize(base_klass, children); end - - # source://activerecord//lib/active_record/associations/join_dependency/join_part.rb#20 - def attribute_types(*_arg0, **_arg1, &_arg2); end - - # The Active Record class which this join part is associated 'about'; for a JoinBase - # this is the actual base model, for a JoinAssociation this is the target model of the - # association. - # - # source://activerecord//lib/active_record/associations/join_dependency/join_part.rb#18 - def base_klass; end - - # The Active Record class which this join part is associated 'about'; for a JoinBase - # this is the actual base model, for a JoinAssociation this is the target model of the - # association. - # - # source://activerecord//lib/active_record/associations/join_dependency/join_part.rb#18 - def children; end - - # source://activerecord//lib/active_record/associations/join_dependency/join_part.rb#20 - def column_names(*_arg0, **_arg1, &_arg2); end - - # @yield [_self] - # @yieldparam _self [ActiveRecord::Associations::JoinDependency::JoinPart] the object that the method was called on - # - # source://activerecord//lib/active_record/associations/join_dependency/join_part.rb#31 - def each(&block); end - - # source://activerecord//lib/active_record/associations/join_dependency/join_part.rb#36 - def each_children(&block); end - - # source://activerecord//lib/active_record/associations/join_dependency/join_part.rb#48 - def extract_record(row, column_names_with_alias); end - - # source://activerecord//lib/active_record/associations/join_dependency/join_part.rb#65 - def instantiate(row, aliases, column_types = T.unsafe(nil), &block); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/join_dependency/join_part.rb#27 - def match?(other); end - - # source://activerecord//lib/active_record/associations/join_dependency/join_part.rb#20 - def primary_key(*_arg0, **_arg1, &_arg2); end - - # An Arel::Table for the active_record - # - # @raise [NotImplementedError] - # - # source://activerecord//lib/active_record/associations/join_dependency/join_part.rb#44 - def table; end - - # source://activerecord//lib/active_record/associations/join_dependency/join_part.rb#20 - def table_name(*_arg0, **_arg1, &_arg2); end -end - -# Implements the details of eager loading of Active Record associations. -# -# Suppose that you have the following two Active Record models: -# -# class Author < ActiveRecord::Base -# # columns: name, age -# has_many :books -# end -# -# class Book < ActiveRecord::Base -# # columns: title, sales, author_id -# end -# -# When you load an author with all associated books Active Record will make -# multiple queries like this: -# -# 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) -# -# 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 -# arbitrarily many SQL queries made. -# -# However, if there is a WHERE clause that spans across tables Active -# 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' -# -# 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 -class ActiveRecord::Associations::Preloader - extend ::ActiveSupport::Autoload - - # Eager loads the named associations for the given Active Record record(s). - # - # In this description, 'association name' shall refer to the name passed - # to an association creation method. For example, a model that specifies - # belongs_to :author, has_many :buyers has association - # names +:author+ and +:buyers+. - # - # == Parameters - # +records+ is an array of ActiveRecord::Base. This array needs not be flat, - # i.e. +records+ itself may also contain arrays of records. In any case, - # +preload_associations+ will preload all associations records by - # flattening +records+. - # - # +associations+ specifies one or more associations that you want to - # preload. It may be: - # - a Symbol or a String which specifies a single association name. For - # example, specifying +:books+ allows this method to preload all books - # 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 - # 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: - # - # :books - # [ :books, :author ] - # { author: :avatar } - # [ :books, { author: :avatar } ] - # - # +available_records+ is an array of ActiveRecord::Base. The Preloader - # will try to use the objects in this array to preload the requested - # associations before querying the database. This can save database - # queries by reusing in-memory objects. The optimization is only applied - # to single associations (i.e. :belongs_to, :has_one) with no scopes. - # - # @return [Preloader] a new instance of Preloader - # - # source://activerecord//lib/active_record/associations/preloader.rb#96 - 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 - def associate_by_default; end - - # Returns the value of attribute associations. - # - # source://activerecord//lib/active_record/associations/preloader.rb#54 - def associations; end - - # source://activerecord//lib/active_record/associations/preloader.rb#123 - def branches; end - - # source://activerecord//lib/active_record/associations/preloader.rb#117 - def call; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/preloader.rb#113 - def empty?; end - - # source://activerecord//lib/active_record/associations/preloader.rb#127 - def loaders; end - - # Returns the value of attribute records. - # - # source://activerecord//lib/active_record/associations/preloader.rb#54 - def records; end - - # Returns the value of attribute scope. - # - # source://activerecord//lib/active_record/associations/preloader.rb#54 - def scope; end -end - -# source://activerecord//lib/active_record/associations/preloader/association.rb#6 -class ActiveRecord::Associations::Preloader::Association - # @return [Association] a new instance of Association - # - # source://activerecord//lib/active_record/associations/preloader/association.rb#87 - def initialize(klass, owners, reflection, preload_scope, reflection_scope, associate_by_default); end - - # source://activerecord//lib/active_record/associations/preloader/association.rb#202 - 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 - def association_key_name; end - - # source://activerecord//lib/active_record/associations/preloader/association.rb#102 - def future_classes; end - - # Returns the value of attribute klass. - # - # source://activerecord//lib/active_record/associations/preloader/association.rb#85 - def klass; end - - # source://activerecord//lib/active_record/associations/preloader/association.rb#180 - def load_records(raw_records = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/preloader/association.rb#159 - def loaded?(owner); end - - # source://activerecord//lib/active_record/associations/preloader/association.rb#148 - def loader_query; end - - # source://activerecord//lib/active_record/associations/preloader/association.rb#152 - def owners_by_key; end - - # source://activerecord//lib/active_record/associations/preloader/association.rb#137 - def preloaded_records; end - - # source://activerecord//lib/active_record/associations/preloader/association.rb#131 - def records_by_owner; end - - # source://activerecord//lib/active_record/associations/preloader/association.rb#118 - def run; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/preloader/association.rb#114 - def run?; end - - # source://activerecord//lib/active_record/associations/preloader/association.rb#110 - def runnable_loaders; end - - # source://activerecord//lib/active_record/associations/preloader/association.rb#167 - def scope; end - - # source://activerecord//lib/active_record/associations/preloader/association.rb#171 - def set_inverse(record); end - - # source://activerecord//lib/active_record/associations/preloader/association.rb#98 - def table_name; end - - # source://activerecord//lib/active_record/associations/preloader/association.rb#163 - def target_for(owner); end - - private - - # source://activerecord//lib/active_record/associations/preloader/association.rb#229 - def associate_records_to_owner(owner, records); end - - # source://activerecord//lib/active_record/associations/preloader/association.rb#257 - def association_key_type; end - - # source://activerecord//lib/active_record/associations/preloader/association.rb#269 - def build_scope; end - - # source://activerecord//lib/active_record/associations/preloader/association.rb#285 - def cascade_strict_loading(scope); end - - # source://activerecord//lib/active_record/associations/preloader/association.rb#249 - def convert_key(key); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/preloader/association.rb#241 - def key_conversion_required?; end - - # Returns the value of attribute model. - # - # source://activerecord//lib/active_record/associations/preloader/association.rb#222 - 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 - def owner_key_name; end - - # source://activerecord//lib/active_record/associations/preloader/association.rb#261 - def owner_key_type; end - - # Returns the value of attribute owners. - # - # source://activerecord//lib/active_record/associations/preloader/association.rb#222 - def owners; end - - # Returns the value of attribute preload_scope. - # - # source://activerecord//lib/active_record/associations/preloader/association.rb#222 - def preload_scope; end - - # Returns the value of attribute reflection. - # - # source://activerecord//lib/active_record/associations/preloader/association.rb#222 - def reflection; end - - # source://activerecord//lib/active_record/associations/preloader/association.rb#265 - def reflection_scope; end -end - -# source://activerecord//lib/active_record/associations/preloader/association.rb#7 -class ActiveRecord::Associations::Preloader::Association::LoaderQuery - # @return [LoaderQuery] a new instance of LoaderQuery - # - # source://activerecord//lib/active_record/associations/preloader/association.rb#10 - 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 - def association_key_name; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/preloader/association.rb#15 - def eql?(other); end - - # source://activerecord//lib/active_record/associations/preloader/association.rb#21 - def hash; end - - # source://activerecord//lib/active_record/associations/preloader/association.rb#38 - def load_records_for_keys(keys, &block); end - - # source://activerecord//lib/active_record/associations/preloader/association.rb#29 - def load_records_in_batch(loaders); end - - # source://activerecord//lib/active_record/associations/preloader/association.rb#25 - def records_for(loaders); end - - # Returns the value of attribute scope. - # - # source://activerecord//lib/active_record/associations/preloader/association.rb#8 - def scope; end -end - -# source://activerecord//lib/active_record/associations/preloader/association.rb#43 -class ActiveRecord::Associations::Preloader::Association::LoaderRecords - # @return [LoaderRecords] a new instance of LoaderRecords - # - # source://activerecord//lib/active_record/associations/preloader/association.rb#44 - def initialize(loaders, loader_query); end - - # source://activerecord//lib/active_record/associations/preloader/association.rb#53 - def records; end - - private - - # source://activerecord//lib/active_record/associations/preloader/association.rb#80 - 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 - 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 - def keys_to_load; end - - # source://activerecord//lib/active_record/associations/preloader/association.rb#74 - def load_records; end - - # Returns the value of attribute loader_query. - # - # source://activerecord//lib/active_record/associations/preloader/association.rb#58 - def loader_query; end - - # Returns the value of attribute loaders. - # - # source://activerecord//lib/active_record/associations/preloader/association.rb#58 - def loaders; end - - # source://activerecord//lib/active_record/associations/preloader/association.rb#60 - def populate_keys_to_load_and_already_loaded_records; end -end - -# source://activerecord//lib/active_record/associations/preloader/batch.rb#6 -class ActiveRecord::Associations::Preloader::Batch - # @return [Batch] a new instance of Batch - # - # source://activerecord//lib/active_record/associations/preloader/batch.rb#7 - def initialize(preloaders, available_records:); end - - # source://activerecord//lib/active_record/associations/preloader/batch.rb#12 - def call; end - - private - - # source://activerecord//lib/active_record/associations/preloader/batch.rb#40 - def group_and_load_similar(loaders); end - - # Returns the value of attribute loaders. - # - # source://activerecord//lib/active_record/associations/preloader/batch.rb#38 - def loaders; end -end - -# source://activerecord//lib/active_record/associations/preloader/branch.rb#6 -class ActiveRecord::Associations::Preloader::Branch - # @return [Branch] a new instance of Branch - # - # source://activerecord//lib/active_record/associations/preloader/branch.rb#11 - def initialize(association:, children:, parent:, associate_by_default:, scope:); end - - # Returns the value of attribute associate_by_default. - # - # source://activerecord//lib/active_record/associations/preloader/branch.rb#8 - def associate_by_default; end - - # Returns the value of attribute association. - # - # source://activerecord//lib/active_record/associations/preloader/branch.rb#7 - def association; end - - # Returns the value of attribute children. - # - # source://activerecord//lib/active_record/associations/preloader/branch.rb#7 - def children; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/preloader/branch.rb#66 - def done?; end - - # source://activerecord//lib/active_record/associations/preloader/branch.rb#21 - def future_classes; end - - # source://activerecord//lib/active_record/associations/preloader/branch.rb#74 - def grouped_records; end - - # source://activerecord//lib/active_record/associations/preloader/branch.rb#25 - def immediate_future_classes; end - - # source://activerecord//lib/active_record/associations/preloader/branch.rb#47 - def likely_reflections; end - - # source://activerecord//lib/active_record/associations/preloader/branch.rb#112 - def loaders; end - - # Returns the value of attribute parent. - # - # source://activerecord//lib/active_record/associations/preloader/branch.rb#7 - def parent; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/preloader/branch.rb#102 - def polymorphic?; end - - # source://activerecord//lib/active_record/associations/preloader/branch.rb#62 - def preloaded_records; end - - # Sets the attribute preloaded_records - # - # @param value the value to set the attribute preloaded_records to. - # - # source://activerecord//lib/active_record/associations/preloader/branch.rb#9 - def preloaded_records=(_arg0); end - - # source://activerecord//lib/active_record/associations/preloader/branch.rb#85 - def preloaders_for_reflection(reflection, reflection_records); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/preloader/branch.rb#54 - def root?; end - - # source://activerecord//lib/active_record/associations/preloader/branch.rb#70 - def runnable_loaders; end - - # Returns the value of attribute scope. - # - # source://activerecord//lib/active_record/associations/preloader/branch.rb#8 - def scope; end - - # source://activerecord//lib/active_record/associations/preloader/branch.rb#58 - def source_records; end - - # source://activerecord//lib/active_record/associations/preloader/branch.rb#37 - def target_classes; end - - private - - # source://activerecord//lib/active_record/associations/preloader/branch.rb#120 - def build_children(children); end - - # Returns a class containing the logic needed to load preload the data - # and attach it to a relation. The class returned implements a `run` method - # that accepts a preloader. - # - # source://activerecord//lib/active_record/associations/preloader/branch.rb#137 - def preloader_for(reflection); end -end - -# source://activerecord//lib/active_record/associations/preloader/through_association.rb#6 -class ActiveRecord::Associations::Preloader::ThroughAssociation < ::ActiveRecord::Associations::Preloader::Association - # source://activerecord//lib/active_record/associations/preloader/through_association.rb#51 - def future_classes; end - - # source://activerecord//lib/active_record/associations/preloader/through_association.rb#7 - def preloaded_records; end - - # source://activerecord//lib/active_record/associations/preloader/through_association.rb#11 - def records_by_owner; end - - # source://activerecord//lib/active_record/associations/preloader/through_association.rb#41 - def runnable_loaders; end - - private - - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/preloader/through_association.rb#67 - def data_available?; end - - # source://activerecord//lib/active_record/associations/preloader/through_association.rb#76 - def middle_records; end - - # source://activerecord//lib/active_record/associations/preloader/through_association.rb#100 - def preload_index; end - - # source://activerecord//lib/active_record/associations/preloader/through_association.rb#72 - def source_preloaders; end - - # source://activerecord//lib/active_record/associations/preloader/through_association.rb#92 - def source_records_by_owner; end - - # source://activerecord//lib/active_record/associations/preloader/through_association.rb#88 - def source_reflection; end - - # source://activerecord//lib/active_record/associations/preloader/through_association.rb#80 - def through_preloaders; end - - # source://activerecord//lib/active_record/associations/preloader/through_association.rb#96 - def through_records_by_owner; end - - # source://activerecord//lib/active_record/associations/preloader/through_association.rb#84 - def through_reflection; end - - # source://activerecord//lib/active_record/associations/preloader/through_association.rb#106 - def through_scope; end -end - -# source://activerecord//lib/active_record/associations/singular_association.rb#6 -class ActiveRecord::Associations::SingularAssociation < ::ActiveRecord::Associations::Association - # source://activerecord//lib/active_record/associations/singular_association.rb#22 - def build(attributes = T.unsafe(nil), &block); end - - # Implements the reload reader method, e.g. foo.reload_bar for - # Foo.has_one :bar - # - # source://activerecord//lib/active_record/associations/singular_association.rb#30 - def force_reload_reader; end - - # Implements the reader method, e.g. foo.bar for Foo.has_one :bar - # - # source://activerecord//lib/active_record/associations/singular_association.rb#7 - def reader; end - - # Implements the writer method, e.g. foo.bar= for Foo.belongs_to :bar - # - # source://activerecord//lib/active_record/associations/singular_association.rb#18 - def writer(record); end - - private - - # @raise [RecordInvalid] - # - # source://activerecord//lib/active_record/associations/singular_association.rb#56 - def _create_record(attributes, raise_error = T.unsafe(nil), &block); end - - # source://activerecord//lib/active_record/associations/singular_association.rb#40 - def find_target; end - - # @raise [NotImplementedError] - # - # source://activerecord//lib/active_record/associations/singular_association.rb#48 - def replace(record); end - - # source://activerecord//lib/active_record/associations/singular_association.rb#36 - def scope_for_create; end - - # source://activerecord//lib/active_record/associations/singular_association.rb#52 - def set_new_record(record); end -end - -# = Active Record Through Association -# -# source://activerecord//lib/active_record/associations/through_association.rb#6 -module ActiveRecord::Associations::ThroughAssociation - # source://activerecord//lib/active_record/associations/through_association.rb#7 - def source_reflection(*_arg0, **_arg1, &_arg2); end - - private - - # source://activerecord//lib/active_record/associations/through_association.rb#109 - def build_record(attributes); end - - # Construct attributes for :through pointing to owner and associate. This is used by the - # methods which create and delete records on the association. - # - # We only support indirectly modifying through associations which have a belongs_to source. - # This is the "has_many :tags, through: :taggings" situation, where the join model - # typically has a belongs_to on both side. In other words, associations which could also - # be represented as has_and_belongs_to_many associations. - # - # We do not support creating/deleting records on the association where the source has - # some other type, because this opens up a whole can of worms, and in basically any - # 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 - def construct_join_attributes(*records); end - - # source://activerecord//lib/active_record/associations/through_association.rb#89 - def ensure_mutable; end - - # source://activerecord//lib/active_record/associations/through_association.rb#99 - def ensure_not_nested; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/associations/through_association.rb#85 - 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 - def stale_state; end - - # We merge in these scopes for two reasons: - # - # 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 - def target_scope; end - - # source://activerecord//lib/active_record/associations/through_association.rb#22 - def through_association; end - - # source://activerecord//lib/active_record/associations/through_association.rb#10 - def through_reflection; end -end - -# source://activerecord//lib/active_record/asynchronous_queries_tracker.rb#4 -class ActiveRecord::AsynchronousQueriesTracker - # @return [AsynchronousQueriesTracker] a new instance of AsynchronousQueriesTracker - # - # source://activerecord//lib/active_record/asynchronous_queries_tracker.rb#46 - def initialize; end - - # Returns the value of attribute current_session. - # - # source://activerecord//lib/active_record/asynchronous_queries_tracker.rb#44 - def current_session; end - - # source://activerecord//lib/active_record/asynchronous_queries_tracker.rb#55 - def finalize_session; end - - # source://activerecord//lib/active_record/asynchronous_queries_tracker.rb#50 - def start_session; end - - class << self - # source://activerecord//lib/active_record/asynchronous_queries_tracker.rb#39 - def complete(asynchronous_queries_tracker); end - - # source://activerecord//lib/active_record/asynchronous_queries_tracker.rb#31 - def install_executor_hooks(executor = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/asynchronous_queries_tracker.rb#35 - def run; end - end -end - -# source://activerecord//lib/active_record/asynchronous_queries_tracker.rb#5 -module ActiveRecord::AsynchronousQueriesTracker::NullSession - class << self - # @return [Boolean] - # - # source://activerecord//lib/active_record/asynchronous_queries_tracker.rb#7 - def active?; end - - # source://activerecord//lib/active_record/asynchronous_queries_tracker.rb#11 - def finalize; end - end -end - -# source://activerecord//lib/active_record/asynchronous_queries_tracker.rb#16 -class ActiveRecord::AsynchronousQueriesTracker::Session - # @return [Session] a new instance of Session - # - # source://activerecord//lib/active_record/asynchronous_queries_tracker.rb#17 - def initialize; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/asynchronous_queries_tracker.rb#21 - def active?; end - - # source://activerecord//lib/active_record/asynchronous_queries_tracker.rb#25 - def finalize; end -end - -# AsynchronousQueryInsideTransactionError will be raised when attempting -# to perform an asynchronous query from inside a transaction -# -# source://activerecord//lib/active_record/errors.rb#426 -class ActiveRecord::AsynchronousQueryInsideTransactionError < ::ActiveRecord::ActiveRecordError; end - -# source://activerecord//lib/active_record/attribute_assignment.rb#6 -module ActiveRecord::AttributeAssignment - include ::ActiveModel::ForbiddenAttributesProtection - include ::ActiveModel::AttributeAssignment - - private - - # source://activerecord//lib/active_record/attribute_assignment.rb#10 - def _assign_attributes(attributes); end - - # Instantiates objects for all attribute classes that needs more than one constructor parameter. This is done - # by calling new on the column type or aggregation type (through composed_of) object with these parameters. - # So having the pairs written_on(1) = "2004", written_on(2) = "6", written_on(3) = "24", will instantiate - # written_on (a date type) with Date.new("2004", "6", "24"). You can also specify a typecast character in the - # 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 - 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 - def assign_nested_parameter_attributes(pairs); end - - # source://activerecord//lib/active_record/attribute_assignment.rb#46 - def execute_callstack_for_multiparameter_attributes(callstack); end - - # source://activerecord//lib/active_record/attribute_assignment.rb#64 - def extract_callstack_for_multiparameter_attributes(pairs); end - - # source://activerecord//lib/active_record/attribute_assignment.rb#82 - def find_parameter_position(multiparameter_name); end - - # source://activerecord//lib/active_record/attribute_assignment.rb#78 - def type_cast_attribute_value(multiparameter_name, value); end -end - -# Raised when an error occurred while doing a mass assignment to an attribute through the -# {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 -class ActiveRecord::AttributeAssignmentError < ::ActiveRecord::ActiveRecordError - # @return [AttributeAssignmentError] a new instance of AttributeAssignmentError - # - # source://activerecord//lib/active_record/errors.rb#355 - 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 - def attribute; end - - # Returns the value of attribute exception. - # - # source://activerecord//lib/active_record/errors.rb#353 - def exception; end -end - -# = Active Record Attribute Methods -# -# source://activerecord//lib/active_record/attribute_methods.rb#8 -module ActiveRecord::AttributeMethods - extend ::ActiveSupport::Concern - extend ::ActiveSupport::Autoload - include GeneratedInstanceMethods - include ::ActiveModel::AttributeMethods - include ::ActiveRecord::AttributeMethods::Read - include ::ActiveRecord::AttributeMethods::Write - include ::ActiveRecord::AttributeMethods::BeforeTypeCast - include ::ActiveRecord::AttributeMethods::Query - include ::ActiveRecord::AttributeMethods::PrimaryKey - include ::ActiveRecord::AttributeMethods::TimeZoneConversion - include ::ActiveModel::Dirty - include ::ActiveRecord::AttributeMethods::Dirty - include ::ActiveRecord::AttributeMethods::Serialization - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveModel::AttributeMethods::ClassMethods - mixes_in_class_methods ::ActiveRecord::AttributeMethods::ClassMethods - mixes_in_class_methods ::ActiveRecord::AttributeMethods::Read::ClassMethods - 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. - # - # class Person < ActiveRecord::Base - # belongs_to :organization - # end - # - # person = Person.new(name: 'Francesco', age: '22') - # person[:name] # => "Francesco" - # person[:age] # => 22 - # - # person = Person.select('id').first - # person[:name] # => ActiveModel::MissingAttributeError: missing attribute: name - # person[:organization_id] # => ActiveModel::MissingAttributeError: missing attribute: organization_id - # - # source://activerecord//lib/active_record/attribute_methods.rb#329 - def [](attr_name); end - - # Updates the attribute identified by attr_name with the specified +value+. - # (Alias for the protected #write_attribute method). - # - # class Person < ActiveRecord::Base - # end - # - # person = Person.new - # person[:age] = '22' - # person[:age] # => 22 - # person[:age].class # => Integer - # - # source://activerecord//lib/active_record/attribute_methods.rb#343 - def []=(attr_name, value); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/attribute_methods.rb#240 - def _has_attribute?(attr_name); end - - # Returns the name of all database fields which have been read from this - # model. This can be useful in development mode to determine which fields - # need to be selected. For performance critical pages, selecting only the - # required fields can be an easy performance win (assuming you aren't using - # all of the fields on the model). - # - # For example: - # - # class PostsController < ActionController::Base - # after_action :print_accessed_fields, only: :index - # - # def index - # @posts = Post.all - # end - # - # private - # - # def print_accessed_fields - # p @posts.first.accessed_fields - # end - # end - # - # Which allows you to quickly change your code to: - # - # class PostsController < ActionController::Base - # def index - # @posts = Post.select(:id, :title, :author_id, :updated_at) - # end - # end - # - # source://activerecord//lib/active_record/attribute_methods.rb#376 - def accessed_fields; end - - # Returns an #inspect-like string for the value of the - # attribute +attr_name+. String attributes are truncated up to 50 - # characters. Other attributes return the value of #inspect - # without modification. - # - # person = Person.create!(name: 'David Heinemeier Hansson ' * 3) - # - # person.attribute_for_inspect(:name) - # # => "\"David Heinemeier Hansson David Heinemeier Hansson ...\"" - # - # person.attribute_for_inspect(:created_at) - # # => "\"2012-10-22 00:15:07.000000000 +0000\"" - # - # 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 - def attribute_for_inspect(attr_name); end - - # Returns an array of names for the attributes available on this object. - # - # class Person < ActiveRecord::Base - # end - # - # person = Person.new - # person.attribute_names - # # => ["id", "created_at", "updated_at", "name", "age"] - # - # source://activerecord//lib/active_record/attribute_methods.rb#252 - def attribute_names; end - - # Returns +true+ if the specified +attribute+ has been set by the user or by a - # database load and is neither +nil+ nor empty? (the latter only applies - # to objects that respond to empty?, most notably Strings). Otherwise, +false+. - # Note that it always returns +true+ with boolean attributes. - # - # class Task < ActiveRecord::Base - # end - # - # task = Task.new(title: '', is_done: false) - # task.attribute_present?(:title) # => false - # task.attribute_present?(:is_done) # => true - # task.title = 'Buy milk' - # task.is_done = true - # task.attribute_present?(:title) # => true - # task.attribute_present?(:is_done) # => true - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/attribute_methods.rb#305 - 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. - # - # class Person < ActiveRecord::Base - # end - # - # person = Person.create(name: 'Francesco', age: 22) - # 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 - def attributes; end - - # Returns +true+ if the given attribute is in the attributes hash, otherwise +false+. - # - # class Person < ActiveRecord::Base - # alias_attribute :new_name, :name - # end - # - # person = Person.new - # person.has_attribute?(:name) # => true - # person.has_attribute?(:new_name) # => true - # person.has_attribute?('age') # => true - # person.has_attribute?(:nothing) # => false - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/attribute_methods.rb#234 - def has_attribute?(attr_name); end - - # A Person object with a name attribute can ask person.respond_to?(:name), - # person.respond_to?(:name=), and person.respond_to?(:name?) - # which will all return +true+. It also defines the attribute methods if they have - # not been generated. - # - # class Person < ActiveRecord::Base - # end - # - # person = Person.new - # person.respond_to?(:name) # => true - # person.respond_to?(:name=) # => true - # person.respond_to?(:name?) # => true - # person.respond_to?('age') # => true - # person.respond_to?('age=') # => true - # person.respond_to?('age?') # => true - # person.respond_to?(:nothing) # => false - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/attribute_methods.rb#207 - def respond_to?(name, include_private = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://activerecord//lib/active_record/attribute_methods.rb#381 - 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#401 - 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#391 - def attributes_for_update(attribute_names); end - - # source://activerecord//lib/active_record/attribute_methods.rb#386 - def attributes_with_values(attribute_names); end - - # source://activerecord//lib/active_record/attribute_methods.rb#409 - def format_for_inspect(name, value); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/attribute_methods.rb#425 - def pk_attribute?(name); end - - class << self - # source://activerecord//lib/active_record/attribute_methods.rb#31 - def dangerous_attribute_methods; end - 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 partial_inserts; end - def partial_inserts=(value); end - def partial_inserts?; end - def partial_updates; end - def partial_updates=(value); end - def partial_updates?; end - def skip_time_zone_conversion_for_attributes; end - def skip_time_zone_conversion_for_attributes=(value); end - def skip_time_zone_conversion_for_attributes?; end - def time_zone_aware_attributes; end - def time_zone_aware_attributes=(value); end - def time_zone_aware_attributes?; end - def time_zone_aware_types; end - def time_zone_aware_types=(value); end - def time_zone_aware_types?; end - end - - module GeneratedInstanceMethods - def attribute_aliases; end - def attribute_aliases?; end - def attribute_method_matchers; end - def attribute_method_matchers?; end - def partial_inserts; end - def partial_inserts?; end - def partial_updates; end - def partial_updates?; end - def skip_time_zone_conversion_for_attributes; end - def skip_time_zone_conversion_for_attributes?; end - def time_zone_aware_attributes; end - def time_zone_aware_attributes?; end - def time_zone_aware_types; end - def time_zone_aware_types?; end - end -end - -# = Active Record Attribute Methods Before Type Cast -# -# ActiveRecord::AttributeMethods::BeforeTypeCast provides a way to -# read the value of the attributes before typecasting and deserialization. -# -# class Task < ActiveRecord::Base -# end -# -# task = Task.new(id: '1', completed_on: '2012-10-21') -# task.id # => 1 -# task.completed_on # => Sun, 21 Oct 2012 -# -# task.attributes_before_type_cast -# # => {"id"=>"1", "completed_on"=>"2012-10-21", ... } -# task.read_attribute_before_type_cast('id') # => "1" -# task.read_attribute_before_type_cast('completed_on') # => "2012-10-21" -# -# In addition to #read_attribute_before_type_cast and #attributes_before_type_cast, -# it declares a method for all attributes with the *_before_type_cast -# suffix. -# -# task.id_before_type_cast # => "1" -# task.completed_on_before_type_cast # => "2012-10-21" -# -# source://activerecord//lib/active_record/attribute_methods/before_type_cast.rb#28 -module ActiveRecord::AttributeMethods::BeforeTypeCast - extend ::ActiveSupport::Concern - - # Returns a hash of attributes before typecasting and deserialization. - # - # class Task < ActiveRecord::Base - # end - # - # task = Task.new(title: nil, is_done: true, completed_on: '2012-10-21') - # task.attributes - # # => {"id"=>nil, "title"=>nil, "is_done"=>true, "completed_on"=>Sun, 21 Oct 2012, "created_at"=>nil, "updated_at"=>nil} - # 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 - 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 - def attributes_for_database; end - - # Returns the value of the attribute identified by +attr_name+ before - # typecasting and deserialization. - # - # class Task < ActiveRecord::Base - # end - # - # task = Task.new(id: '1', completed_on: '2012-10-21') - # task.read_attribute('id') # => 1 - # task.read_attribute_before_type_cast('id') # => '1' - # task.read_attribute('completed_on') # => Sun, 21 Oct 2012 - # task.read_attribute_before_type_cast('completed_on') # => "2012-10-21" - # task.read_attribute_before_type_cast(:completed_on) # => "2012-10-21" - # - # source://activerecord//lib/active_record/attribute_methods/before_type_cast.rb#48 - def read_attribute_before_type_cast(attr_name); end - - private - - # Dispatch target for *_before_type_cast attribute methods. - # - # source://activerecord//lib/active_record/attribute_methods/before_type_cast.rb#76 - def attribute_before_type_cast(attr_name); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/attribute_methods/before_type_cast.rb#84 - def attribute_came_from_user?(attr_name); end - - # source://activerecord//lib/active_record/attribute_methods/before_type_cast.rb#80 - def attribute_for_database(attr_name); end -end - -# source://activerecord//lib/active_record/attribute_methods.rb#41 -module ActiveRecord::AttributeMethods::ClassMethods - # @return [Boolean] - # - # source://activerecord//lib/active_record/attribute_methods.rb#186 - def _has_attribute?(attr_name); end - - # Returns +true+ if +attribute+ is an attribute method and table exists, - # +false+ otherwise. - # - # class Person < ActiveRecord::Base - # end - # - # Person.attribute_method?('name') # => true - # Person.attribute_method?(:age=) # => true - # Person.attribute_method?(:nothing) # => false - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/attribute_methods.rb#150 - def attribute_method?(attribute); end - - # Returns an array of column names as strings if it's not an abstract class and - # table exists. Otherwise it returns an empty array. - # - # class Person < ActiveRecord::Base - # end - # - # Person.attribute_names - # # => ["id", "created_at", "updated_at", "name", "age"] - # - # source://activerecord//lib/active_record/attribute_methods.rb#162 - def attribute_names; end - - # A method name is 'dangerous' if it is already (re)defined by Active Record, but - # not by any ancestors. (So 'puts' is not dangerous but 'save' is.) - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/attribute_methods.rb#109 - def dangerous_attribute_method?(name); end - - # A class method is 'dangerous' if it is already (re)defined by Active Record, but - # not by any ancestors. (So 'puts' is not dangerous but 'new' is.) - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/attribute_methods.rb#127 - 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 - def define_attribute_methods; end - - # Returns true if the given attribute exists, otherwise false. - # - # class Person < ActiveRecord::Base - # alias_attribute :new_name, :name - # end - # - # Person.has_attribute?('name') # => true - # Person.has_attribute?('new_name') # => true - # Person.has_attribute?(:age) # => true - # Person.has_attribute?(:nothing) # => false - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/attribute_methods.rb#180 - 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 - def initialize_generated_modules; end - - # Raises an ActiveRecord::DangerousAttributeError exception when an - # \Active \Record method is defined in the model, otherwise +false+. - # - # class Person < ActiveRecord::Base - # def save - # 'already defined by Active Record' - # end - # end - # - # Person.instance_method_already_implemented?(:save) - # # => ActiveRecord::DangerousAttributeError: save is defined by Active Record. Check to make sure that you don't have an attribute or method with the same name. - # - # Person.instance_method_already_implemented?(:name) - # # => false - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/attribute_methods.rb#91 - def instance_method_already_implemented?(method_name); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/attribute_methods.rb#113 - def method_defined_within?(name, klass, superklass = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/attribute_methods.rb#70 - def undefine_attribute_methods; end -end - -# source://activerecord//lib/active_record/attribute_methods/dirty.rb#7 -module ActiveRecord::AttributeMethods::Dirty - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - include ::ActiveModel::AttributeMethods - include ::ActiveModel::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. - # - # This method is useful in after callbacks to get the original value of an - # attribute before the save that triggered the callbacks to run. It can be - # invoked as +name_before_last_save+ instead of - # attribute_before_last_save("name"). - # - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#100 - def attribute_before_last_save(attr_name); end - - # Returns the change to an attribute that will be persisted during the - # next save. - # - # This method is useful in validations and before callbacks, to see the - # change to an attribute that will occur when the record is saved. It can - # be invoked as +name_change_to_be_saved+ instead of - # attribute_change_to_be_saved("name"). - # - # 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 - def attribute_change_to_be_saved(attr_name); end - - # Returns the value of an attribute in the database, as opposed to the - # in-memory value that will be persisted the next time the record is - # saved. - # - # This method is useful in validations and before callbacks, to see the - # original value of an attribute prior to any changes about to be - # 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 - def attribute_in_database(attr_name); end - - # Returns a hash of the attributes that will change when the record is - # next saved. - # - # The hash keys are the attribute names, and the hash values are the - # 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 - 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 - 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 - 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 - def has_changes_to_save?; end - - # reload the record and clears changed attributes. - # - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#57 - def reload(*_arg0); end - - # Returns the change to an attribute during the last save. If the - # attribute was changed, the result will be an array containing the - # original value and the saved value. - # - # This method is useful in after callbacks, to see the change in an - # attribute during the save that triggered the callbacks to run. It can be - # invoked as +saved_change_to_name+ instead of - # saved_change_to_attribute("name"). - # - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#90 - def saved_change_to_attribute(attr_name); end - - # Did this attribute change when we last saved? - # - # This method is useful in after callbacks to determine if an attribute - # was changed during the save that triggered the callbacks to run. It can - # be invoked as +saved_change_to_name?+ instead of - # saved_change_to_attribute?("name"). - # - # ==== Options - # - # +from+ When passed, this method will return false unless the original - # value is equal to the given option - # - # +to+ When passed, this method will return false unless the value was - # changed to the given value - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#78 - 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 - 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 - def saved_changes?; end - - # Will this attribute change the next time we save? - # - # This method is useful in validations and before callbacks to determine - # if the next call to +save+ will change a particular attribute. It can be - # invoked as +will_save_change_to_name?+ instead of - # will_save_change_to_attribute?("name"). - # - # ==== Options - # - # +from+ When passed, this method will return false unless the original - # value is equal to the given option - # - # +to+ When passed, this method will return false unless the value will be - # changed to the given value - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#128 - def will_save_change_to_attribute?(attr_name, **options); end - - private - - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#221 - def _create_record(attribute_names = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#186 - def _touch_row(attribute_names, time); end - - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#215 - def _update_record(attribute_names = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#231 - def attribute_names_for_partial_inserts; end - - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#227 - def attribute_names_for_partial_updates; 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 partial_inserts; end - def partial_inserts=(value); end - def partial_inserts?; end - def partial_updates; end - def partial_updates=(value); end - def partial_updates?; end - end - - module GeneratedInstanceMethods - def attribute_aliases; end - def attribute_aliases?; end - def attribute_method_matchers; end - def attribute_method_matchers?; end - def partial_inserts; end - def partial_inserts?; end - def partial_updates; end - def partial_updates?; end - end -end - -# source://activerecord//lib/active_record/attribute_methods/dirty.rb#30 -module ActiveRecord::AttributeMethods::Dirty::ClassMethods - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#31 - def partial_writes; end - - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#47 - def partial_writes=(value); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#39 - def partial_writes?; end -end - -# source://activerecord//lib/active_record/attribute_methods.rb#26 -class ActiveRecord::AttributeMethods::GeneratedAttributeMethods < ::Module - include ::Mutex_m - - # source://mutex_m/0.1.1/mutex_m.rb#93 - def lock; end - - # source://mutex_m/0.1.1/mutex_m.rb#83 - def locked?; end - - # source://mutex_m/0.1.1/mutex_m.rb#78 - def synchronize(&block); end - - # source://mutex_m/0.1.1/mutex_m.rb#88 - def try_lock; end - - # source://mutex_m/0.1.1/mutex_m.rb#98 - def unlock; end -end - -# source://activerecord//lib/active_record/attribute_methods/primary_key.rb#7 -module ActiveRecord::AttributeMethods::PrimaryKey - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActiveRecord::AttributeMethods::PrimaryKey::ClassMethods - - # Returns the primary key column's value. - # - # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#18 - def id; end - - # Sets the primary key column's value. - # - # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#23 - def id=(value); end - - # Queries the primary key column's value. - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#28 - def id?; end - - # Returns the primary key column's value before type cast. - # - # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#33 - def id_before_type_cast; end - - # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#47 - def id_for_database; end - - # Returns the primary key column's value from the database. - # - # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#43 - def id_in_database; end - - # Returns the primary key column's previous value. - # - # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#38 - def id_was; 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 - def to_key; end - - private - - # @return [Boolean] - # - # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#52 - def attribute_method?(attr_name); end -end - -# source://activerecord//lib/active_record/attribute_methods/primary_key.rb#56 -module ActiveRecord::AttributeMethods::PrimaryKey::ClassMethods - # @return [Boolean] - # - # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#63 - def dangerous_attribute_method?(method_name); end - - # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#89 - def get_primary_key(base_name); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#59 - 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 - def primary_key; end - - # Sets the name of the primary key column. - # - # class Project < ActiveRecord::Base - # self.primary_key = 'sysid' - # end - # - # You can also define the #primary_key method yourself: - # - # class Project < ActiveRecord::Base - # def self.primary_key - # 'foo_' + super - # end - # end - # - # Project.primary_key # => "foo_id" - # - # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#119 - 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 - def quoted_primary_key; end - - # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#81 - def reset_primary_key; end - - private - - # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#126 - def suppress_composite_primary_key(pk); end -end - -# source://activerecord//lib/active_record/attribute_methods/primary_key.rb#57 -ActiveRecord::AttributeMethods::PrimaryKey::ClassMethods::ID_ATTRIBUTE_METHODS = T.let(T.unsafe(nil), Set) - -# source://activerecord//lib/active_record/attribute_methods/query.rb#5 -module ActiveRecord::AttributeMethods::Query - extend ::ActiveSupport::Concern - - # source://activerecord//lib/active_record/attribute_methods/query.rb#12 - def query_attribute(attr_name); end - - private - - # source://activerecord//lib/active_record/attribute_methods/query.rb#12 - def attribute?(attr_name); 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 -module ActiveRecord::AttributeMethods::Read - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActiveRecord::AttributeMethods::Read::ClassMethods - - # 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 - 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)). - # - # source://activerecord//lib/active_record/attribute_methods/read.rb#27 - def read_attribute(attr_name, &block); end - - private - - # 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 - def attribute(attr_name, &block); end -end - -# source://activerecord//lib/active_record/attribute_methods/read.rb#8 -module ActiveRecord::AttributeMethods::Read::ClassMethods - private - - # source://activerecord//lib/active_record/attribute_methods/read.rb#10 - def define_method_attribute(name, owner:); end -end - -# source://activerecord//lib/active_record/attribute_methods/serialization.rb#5 -module ActiveRecord::AttributeMethods::Serialization - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActiveRecord::AttributeMethods::Serialization::ClassMethods -end - -# source://activerecord//lib/active_record/attribute_methods/serialization.rb#18 -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, - # then specify the name of that attribute using this method and serialization - # will be handled automatically. - # - # The serialization format may be YAML, JSON, or any custom format using a - # custom coder class. - # - # Keep in mind that database adapters handle certain serialization tasks - # for you. For instance: +json+ and +jsonb+ types in PostgreSQL will be - # converted between JSON object/array syntax and Ruby +Hash+ or +Array+ - # objects transparently. There is no need to use #serialize in this - # case. - # - # For more complex cases, such as conversion to or from your application - # domain objects, consider using the ActiveRecord::Attributes API. - # - # ==== 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 - # 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+. - # - # ==== Options - # - # * +:default+ - The default value to use when no value is provided. If - # this option is not passed, the previous default value (if any) will - # be used. Otherwise, the default will be +nil+. - # - # ==== Examples - # - # ===== Serialize the +preferences+ attribute using YAML - # - # class User < ActiveRecord::Base - # serialize :preferences - # end - # - # ===== Serialize the +preferences+ attribute using JSON - # - # class User < ActiveRecord::Base - # serialize :preferences, JSON - # end - # - # ===== Serialize the +preferences+ +Hash+ using YAML - # - # class User < ActiveRecord::Base - # serialize :preferences, Hash - # end - # - # ===== Serialize the +preferences+ attribute using a custom coder - # - # class Rot13JSON - # def self.rot13(string) - # string.tr("a-zA-Z", "n-za-mN-ZA-M") - # end - # - # # Serializes an attribute value to a string that will be stored in the database. - # def self.dump(value) - # rot13(ActiveSupport::JSON.dump(value)) - # end - # - # # Deserializes a string from the database to an attribute value. - # def self.load(string) - # ActiveSupport::JSON.load(rot13(string)) - # end - # end - # - # class User < ActiveRecord::Base - # serialize :preferences, 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 - - private - - # @return [Boolean] - # - # source://activerecord//lib/active_record/attribute_methods/serialization.rb#126 - def type_incompatible_with_serialize?(type, class_name); end -end - -# source://activerecord//lib/active_record/attribute_methods/serialization.rb#8 -class ActiveRecord::AttributeMethods::Serialization::ColumnNotSerializableError < ::StandardError - # @return [ColumnNotSerializableError] a new instance of ColumnNotSerializableError - # - # source://activerecord//lib/active_record/attribute_methods/serialization.rb#9 - def initialize(name, type); end -end - -# source://activerecord//lib/active_record/attribute_methods/time_zone_conversion.rb#7 -module ActiveRecord::AttributeMethods::TimeZoneConversion - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveRecord::AttributeMethods::TimeZoneConversion::ClassMethods - - module GeneratedClassMethods - def skip_time_zone_conversion_for_attributes; end - def skip_time_zone_conversion_for_attributes=(value); end - def skip_time_zone_conversion_for_attributes?; end - def time_zone_aware_attributes; end - def time_zone_aware_attributes=(value); end - def time_zone_aware_attributes?; end - def time_zone_aware_types; end - def time_zone_aware_types=(value); end - def time_zone_aware_types?; end - end - - module GeneratedInstanceMethods - def skip_time_zone_conversion_for_attributes; end - def skip_time_zone_conversion_for_attributes?; end - def time_zone_aware_attributes; end - def time_zone_aware_attributes?; end - def time_zone_aware_types; end - def time_zone_aware_types?; end - end -end - -# source://activerecord//lib/active_record/attribute_methods/time_zone_conversion.rb#75 -module ActiveRecord::AttributeMethods::TimeZoneConversion::ClassMethods - # source://activerecord//lib/active_record/attribute_methods/time_zone_conversion.rb#76 - def define_attribute(name, cast_type, **_arg2); end - - private - - # @return [Boolean] - # - # source://activerecord//lib/active_record/attribute_methods/time_zone_conversion.rb#84 - def create_time_zone_conversion_attribute?(name, cast_type); end -end - -# source://activerecord//lib/active_record/attribute_methods/time_zone_conversion.rb#8 -class ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter - # source://activerecord//lib/active_record/attribute_methods/time_zone_conversion.rb#17 - def cast(value); end - - # source://activerecord//lib/active_record/attribute_methods/time_zone_conversion.rb#13 - def deserialize(value); end - - private - - # source://activerecord//lib/active_record/attribute_methods/time_zone_conversion.rb#38 - def convert_time_to_time_zone(value); end - - # source://activerecord//lib/active_record/attribute_methods/time_zone_conversion.rb#56 - def map_avoiding_infinite_recursion(value); end - - # source://activerecord//lib/active_record/attribute_methods/time_zone_conversion.rb#52 - def set_time_zone_without_conversion(value); end - - class << self - # source://activerecord//lib/active_record/attribute_methods/time_zone_conversion.rb#9 - def new(subtype); end - end -end - -# source://activerecord//lib/active_record/attribute_methods/write.rb#5 -module ActiveRecord::AttributeMethods::Write - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActiveRecord::AttributeMethods::Write::ClassMethods - - # This method exists to avoid the expensive primary_key check internally, without - # breaking compatibility with the write_attribute API - # - # 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+. - # - # source://activerecord//lib/active_record/attribute_methods/write.rb#31 - def write_attribute(attr_name, value); end - - private - - # This method exists to avoid the expensive primary_key check internally, without - # breaking compatibility with the write_attribute API - # - # source://activerecord//lib/active_record/attribute_methods/write.rb#41 - def attribute=(attr_name, value); end -end - -# source://activerecord//lib/active_record/attribute_methods/write.rb#12 -module ActiveRecord::AttributeMethods::Write::ClassMethods - private - - # source://activerecord//lib/active_record/attribute_methods/write.rb#14 - def define_method_attribute=(name, owner:); end -end - -# See ActiveRecord::Attributes::ClassMethods for documentation -# -# source://activerecord//lib/active_record/attributes.rb#7 -module ActiveRecord::Attributes - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveRecord::Attributes::ClassMethods - - module GeneratedClassMethods - def attributes_to_define_after_schema_loads; end - def attributes_to_define_after_schema_loads=(value); end - def attributes_to_define_after_schema_loads?; end - end - - module GeneratedInstanceMethods; end -end - -# 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 - # type of existing attributes if needed. This allows control over how - # values are converted to and from SQL when assigned to a model. It also - # changes the behavior of values passed to - # {ActiveRecord::Base.where}[rdoc-ref:QueryMethods#where]. This will let you use - # your domain objects across much of Active Record, without having to - # rely on implementation details or monkey patching. - # - # +name+ The name of the methods to define attribute methods for, and the - # column which this will persist to. - # - # +cast_type+ A symbol such as +:string+ or +:integer+, or a type object - # to be used for this attribute. See the examples below for more - # information about providing custom type objects. - # - # ==== Options - # - # The following options are accepted: - # - # +default+ The default value to use when no value is provided. If this option - # is not passed, the previous default value (if any) will be used. - # Otherwise, the default will be +nil+. - # - # +array+ (PostgreSQL only) specifies that the type should be an array (see the - # examples below). - # - # +range+ (PostgreSQL only) specifies that the type should be a range (see the - # examples below). - # - # When using a symbol for +cast_type+, extra options are forwarded to the - # constructor of the type object. - # - # ==== Examples - # - # The type detected by Active Record can be overridden. - # - # # db/schema.rb - # create_table :store_listings, force: true do |t| - # t.decimal :price_in_cents - # end - # - # # app/models/store_listing.rb - # class StoreListing < ActiveRecord::Base - # end - # - # store_listing = StoreListing.new(price_in_cents: '10.1') - # - # # before - # store_listing.price_in_cents # => BigDecimal(10.1) - # - # class StoreListing < ActiveRecord::Base - # attribute :price_in_cents, :integer - # end - # - # # after - # store_listing.price_in_cents # => 10 - # - # A default can also be provided. - # - # # db/schema.rb - # create_table :store_listings, force: true do |t| - # t.string :my_string, default: "original default" - # end - # - # StoreListing.new.my_string # => "original default" - # - # # app/models/store_listing.rb - # class StoreListing < ActiveRecord::Base - # attribute :my_string, :string, default: "new default" - # end - # - # StoreListing.new.my_string # => "new default" - # - # class Product < ActiveRecord::Base - # attribute :my_default_proc, :datetime, default: -> { Time.now } - # end - # - # Product.new.my_default_proc # => 2015-05-30 11:04:48 -0600 - # sleep 1 - # Product.new.my_default_proc # => 2015-05-30 11:04:49 -0600 - # - # \Attributes do not need to be backed by a database column. - # - # # app/models/my_model.rb - # class MyModel < ActiveRecord::Base - # attribute :my_string, :string - # attribute :my_int_array, :integer, array: true - # attribute :my_float_range, :float, range: true - # end - # - # model = MyModel.new( - # my_string: "string", - # my_int_array: ["1", "2", "3"], - # my_float_range: "[1,3.5]", - # ) - # model.attributes - # # => - # { - # my_string: "string", - # my_int_array: [1, 2, 3], - # my_float_range: 1.0..3.5 - # } - # - # Passing options to the type constructor - # - # # app/models/my_model.rb - # class MyModel < ActiveRecord::Base - # attribute :small_int, :integer, limit: 2 - # end - # - # MyModel.create(small_int: 65537) - # # => Error: 65537 is out of range for the limit of two bytes - # - # ==== Creating Custom Types - # - # Users may also define their own custom types, as long as they respond - # to the methods defined on the value type. The method +deserialize+ or - # +cast+ will be called on your type object, with raw input from the - # database or from your controllers. See ActiveModel::Type::Value for the - # expected API. It is recommended that your type objects inherit from an - # existing type, or from ActiveRecord::Type::Value - # - # class MoneyType < ActiveRecord::Type::Integer - # def cast(value) - # if !value.kind_of?(Numeric) && value.include?('$') - # price_in_dollars = value.gsub(/\$/, '').to_f - # super(price_in_dollars * 100) - # else - # super - # end - # end - # end - # - # # config/initializers/types.rb - # ActiveRecord::Type.register(:money, MoneyType) - # - # # app/models/store_listing.rb - # class StoreListing < ActiveRecord::Base - # attribute :price_in_cents, :money - # end - # - # store_listing = StoreListing.new(price_in_cents: '$10.00') - # store_listing.price_in_cents # => 1000 - # - # For more details on creating custom types, see the documentation for - # ActiveModel::Type::Value. For more details on registering your types - # to be referenced by a symbol, see ActiveRecord::Type.register. You can - # also pass a type object directly, in place of a symbol. - # - # ==== \Querying - # - # When {ActiveRecord::Base.where}[rdoc-ref:QueryMethods#where] is called, it will - # use the type defined by the model class to convert the value to SQL, - # calling +serialize+ on your type object. For example: - # - # class Money < Struct.new(:amount, :currency) - # end - # - # class MoneyType < ActiveRecord::Type::Value - # def initialize(currency_converter:) - # @currency_converter = currency_converter - # end - # - # # value will be the result of +deserialize+ or - # # +cast+. Assumed to be an instance of +Money+ in - # # this case. - # def serialize(value) - # value_in_bitcoins = @currency_converter.convert_to_bitcoins(value) - # value_in_bitcoins.amount - # end - # end - # - # # config/initializers/types.rb - # ActiveRecord::Type.register(:money, MoneyType) - # - # # app/models/product.rb - # class Product < ActiveRecord::Base - # currency_converter = ConversionRatesFromTheInternet.new - # attribute :price_in_bitcoins, :money, currency_converter: currency_converter - # end - # - # Product.where(price_in_bitcoins: Money.new(5, "USD")) - # # => 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 - # - # ==== Dirty Tracking - # - # The type of an attribute is given the opportunity to change how dirty - # tracking is performed. The methods +changed?+ and +changed_in_place?+ - # will be called from ActiveModel::Dirty. See the documentation for those - # methods in ActiveModel::Type::Value for more details. - # - # source://activerecord//lib/active_record/attributes.rb#208 - def attribute(name, cast_type = T.unsafe(nil), default: T.unsafe(nil), **options); end - - # This is the low level API which sits beneath +attribute+. It only - # accepts type objects, and will do its work immediately instead of - # waiting for the schema to load. Automatic schema detection and - # ClassMethods#attribute both call this under the hood. While this method - # is provided so it can be used by plugin authors, application code - # should probably use ClassMethods#attribute. - # - # +name+ The name of the attribute being defined. Expected to be a +String+. - # - # +cast_type+ The type object to use for this attribute. - # - # +default+ The default value to use when no value is provided. If this option - # is not passed, the previous default value (if any) will be used. - # Otherwise, the default will be +nil+. A proc can also be passed, and - # will be called once each time a new value is needed. - # - # +user_provided_default+ Whether the default value should be cast using - # +cast+ or +deserialize+. - # - # source://activerecord//lib/active_record/attributes.rb#253 - def define_attribute(name, cast_type, default: T.unsafe(nil), user_provided_default: T.unsafe(nil)); end - - # source://activerecord//lib/active_record/attributes.rb#263 - def load_schema!; end - - private - - # source://activerecord//lib/active_record/attributes.rb#275 - def define_default_attribute(name, value, type, from_user:); end -end - -# source://activerecord//lib/active_record/attributes.rb#272 -ActiveRecord::Attributes::ClassMethods::NO_DEFAULT_PROVIDED = T.let(T.unsafe(nil), Object) - -# = Active Record Autosave Association -# -# AutosaveAssociation is a module that takes care of automatically saving -# associated records when their parent is saved. In addition to saving, it -# also destroys any associated records that were marked for destruction. -# (See #mark_for_destruction and #marked_for_destruction?). -# -# Saving of the parent, its associations, and the destruction of marked -# associations, all happen inside a transaction. This should never leave the -# database in an inconsistent state. -# -# If validations for any of the associations fail, their error messages will -# be applied to the parent. -# -# Note that it also means that associations marked for destruction won't -# be destroyed directly. They will however still be marked for destruction. -# -# Note that autosave: false is not same as not declaring :autosave. -# When the :autosave option is not present then new association records are -# saved but the updated association records are not saved. -# -# == Validation -# -# Child records are validated unless :validate is +false+. -# -# == Callbacks -# -# Association with autosave option defines several callbacks on your -# model (around_save, before_save, after_create, after_update). Please note that -# callbacks are executed in the order they were defined in -# model. You should avoid modifying the association content before -# autosave callbacks are executed. Placing your callbacks after -# associations is usually a good practice. -# -# === One-to-one Example -# -# class Post < ActiveRecord::Base -# has_one :author, autosave: true -# end -# -# Saving changes to the parent and its associated model can now be performed -# automatically _and_ atomically: -# -# post = Post.find(1) -# post.title # => "The current global position of migrating ducks" -# post.author.name # => "alloy" -# -# post.title = "On the migration of ducks" -# post.author.name = "Eloy Duran" -# -# post.save -# post.reload -# post.title # => "On the migration of ducks" -# post.author.name # => "Eloy Duran" -# -# Destroying an associated model, as part of the parent's save action, is as -# simple as marking it for destruction: -# -# post.author.mark_for_destruction -# post.author.marked_for_destruction? # => true -# -# Note that the model is _not_ yet removed from the database: -# -# id = post.author.id -# Author.find_by(id: id).nil? # => false -# -# post.save -# post.reload.author # => nil -# -# Now it _is_ removed from the database: -# -# Author.find_by(id: id).nil? # => true -# -# === One-to-many Example -# -# When :autosave is not declared new children are saved when their parent is saved: -# -# class Post < ActiveRecord::Base -# has_many :comments # :autosave option is not declared -# end -# -# post = Post.new(title: 'ruby rocks') -# post.comments.build(body: 'hello world') -# post.save # => saves both post and comment -# -# post = Post.create(title: 'ruby rocks') -# post.comments.build(body: 'hello world') -# post.save # => saves both post and comment -# -# post = Post.create(title: 'ruby rocks') -# comment = post.comments.create(body: 'hello world') -# comment.body = 'hi everyone' -# post.save # => saves post, but not comment -# -# When :autosave is true all children are saved, no matter whether they -# are new records or not: -# -# class Post < ActiveRecord::Base -# has_many :comments, autosave: true -# end -# -# post = Post.create(title: 'ruby rocks') -# comment = post.comments.create(body: 'hello world') -# comment.body = 'hi everyone' -# post.comments.build(body: "good morning.") -# post.save # => saves post and both comments. -# -# Destroying one of the associated models as part of the parent's save action -# is as simple as marking it for destruction: -# -# post.comments # => [#, # -# post.comments[1].mark_for_destruction -# post.comments[1].marked_for_destruction? # => true -# post.comments.length # => 2 -# -# Note that the model is _not_ yet removed from the database: -# -# id = post.comments.last.id -# Comment.find_by(id: id).nil? # => false -# -# post.save -# post.reload.comments.length # => 1 -# -# Now it _is_ removed from the database: -# -# Comment.find_by(id: id).nil? # => true -# -# === Caveats -# -# Note that autosave will only trigger for already-persisted association records -# if the records themselves have been changed. This is to protect against -# SystemStackError caused by circular association validations. The one -# exception is if a custom validation context is used, in which case the validations -# will always fire on the associated records. -# -# source://activerecord//lib/active_record/autosave_association.rb#138 -module ActiveRecord::AutosaveAssociation - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActiveRecord::AutosaveAssociation::ClassMethods - - # Returns whether or not this record has been changed in any way (including whether - # any of its nested autosave associations are likewise changed) - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/autosave_association.rb#271 - def changed_for_autosave?; end - - # Returns the association for the parent being destroyed. - # - # Used to avoid updating the counter cache unnecessarily. - # - # source://activerecord//lib/active_record/autosave_association.rb#265 - def destroyed_by_association; end - - # Records the association that is being destroyed and destroying this - # record in the process. - # - # source://activerecord//lib/active_record/autosave_association.rb#258 - def destroyed_by_association=(reflection); end - - # Marks this record to be destroyed as part of the parent's save transaction. - # This does _not_ actually destroy the record instantly, rather child record will be destroyed - # when parent.save is called. - # - # Only useful if the :autosave option on the parent is enabled for this associated model. - # - # source://activerecord//lib/active_record/autosave_association.rb#245 - def mark_for_destruction; end - - # Returns whether or not this record will be destroyed as part of the parent's save transaction. - # - # Only useful if the :autosave option on the parent is enabled for this associated model. - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/autosave_association.rb#252 - def marked_for_destruction?; end - - # Reloads the attributes of the object as usual and clears marked_for_destruction flag. - # - # source://activerecord//lib/active_record/autosave_association.rb#234 - def reload(options = T.unsafe(nil)); end - - private - - # source://activerecord//lib/active_record/autosave_association.rb#508 - 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#464 - 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#366 - 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 - def associated_records_to_validate_or_save(association, new_record, autosave); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/autosave_association.rb#470 - def association_foreign_key_changed?(reflection, record, key); end - - # Returns whether or not the association is valid and applies any errors to - # the parent, self, if it wasn't. Skips any :autosave - # enabled records if they're marked_for_destruction? or destroyed. - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/autosave_association.rb#330 - def association_valid?(reflection, record, index = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/autosave_association.rb#504 - def custom_validation_context?; 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 - def nested_records_changed_for_autosave?; end - - # source://activerecord//lib/active_record/autosave_association.rb#356 - 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#479 - def save_belongs_to_association(reflection); end - - # Saves any new associated records, or all loaded autosave associations if - # :autosave is enabled on the association. - # - # In addition, it destroys all children that were marked for destruction - # with #mark_for_destruction. - # - # 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#383 - def save_collection_association(reflection); end - - # Saves the associated record if it's new or :autosave is enabled - # on the association. - # - # In addition, it will destroy the association if it was marked for - # destruction with #mark_for_destruction. - # - # 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#437 - 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 - 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 - def validate_single_association(reflection); end -end - -# source://activerecord//lib/active_record/autosave_association.rb#141 -module ActiveRecord::AutosaveAssociation::AssociationBuilderExtension - class << self - # source://activerecord//lib/active_record/autosave_association.rb#142 - def build(model, reflection); end - - # source://activerecord//lib/active_record/autosave_association.rb#146 - def valid_options; end - end -end - -# source://activerecord//lib/active_record/autosave_association.rb#155 -module ActiveRecord::AutosaveAssociation::ClassMethods - private - - # Adds validation and save callbacks for the association as specified by - # the +reflection+. - # - # For performance reasons, we don't check whether to validate at runtime. - # However the validation and callback methods are lazy and those methods - # get created when they are invoked for the very first time. However, - # this can change, for instance, when using nested attributes, which is - # called _after_ the association has been defined. Since we don't want - # the callbacks to get defined multiple times, there are guards that - # check if the save or validation methods have already been defined - # before actually defining them. - # - # source://activerecord//lib/active_record/autosave_association.rb#187 - def add_autosave_association_callbacks(reflection); end - - # source://activerecord//lib/active_record/autosave_association.rb#217 - def define_autosave_validation_callbacks(reflection); end - - # source://activerecord//lib/active_record/autosave_association.rb#157 - def define_non_cyclic_method(name, &block); end -end - -# = Active Record -# -# Active Record objects don't specify their attributes directly, but rather infer them from -# the table definition with which they're linked. Adding, removing, and changing attributes -# and their type is done directly in the database. Any change is instantly reflected in the -# Active Record objects. The mapping that binds a given Active Record class to a certain -# database table will happen automatically in most common cases, but can be overwritten for the uncommon ones. -# -# See the mapping rules in table_name and the full example in link:files/activerecord/README_rdoc.html for more insight. -# -# == Creation -# -# Active Records accept constructor parameters either in a hash or as a block. The hash -# method is especially useful when you're receiving the data from somewhere else, like an -# HTTP request. It works like this: -# -# user = User::User.new(name: "David", occupation: "Code Artist") -# user.name # => "David" -# -# You can also use block initialization: -# -# user = User::User.new do |u| -# u.name = "David" -# u.occupation = "Code Artist" -# end -# -# And of course you can just create a bare object and specify the attributes after the fact: -# -# user = User::User.new -# user.name = "David" -# user.occupation = "Code Artist" -# -# == Conditions -# -# Conditions can either be specified as a string, array, or hash representing the WHERE-part of an SQL statement. -# The array form is to be used when the condition input is tainted and requires sanitization. The string form can -# be used for statements that don't involve tainted data. The hash form works much like the array form, except -# only equality and range is possible. Examples: -# -# class User < ActiveRecord::Base -# def self.authenticate_unsafely(user_name, password) -# where("user_name = '#{user_name}' AND password = '#{password}'").first -# end -# -# def self.authenticate_safely(user_name, password) -# where("user_name = ? AND password = ?", user_name, password).first -# end -# -# def self.authenticate_safely_simply(user_name, password) -# where(user_name: user_name, password: password).first -# end -# end -# -# The authenticate_unsafely method inserts the parameters directly into the query -# and is thus susceptible to SQL-injection attacks if the user_name and +password+ -# parameters come directly from an HTTP request. The authenticate_safely and -# authenticate_safely_simply both will sanitize the user_name and +password+ -# before inserting them in the query, which will ensure that an attacker can't escape the -# query and fake the login (or worse). -# -# When using multiple parameters in the conditions, it can easily become hard to read exactly -# what the fourth or fifth question mark is supposed to represent. In those cases, you can -# resort to named bind variables instead. That's done by replacing the question marks with -# symbols and supplying a hash with values for the matching symbol keys: -# -# Company.where( -# "id = :id AND name = :name AND division = :division AND created_at > :accounting_date", -# { id: 3, name: "37signals", division: "First", accounting_date: '2005-01-01' } -# ).first -# -# Similarly, a simple hash without a statement will generate conditions based on equality with the SQL AND -# operator. For instance: -# -# Student.where(first_name: "Harvey", status: 1) -# Student.where(params[:student]) -# -# A range may be used in the hash to use the SQL BETWEEN operator: -# -# Student.where(grade: 9..12) -# -# An array may be used in the hash to use the SQL IN operator: -# -# Student.where(grade: [9,11,12]) -# -# When joining tables, nested hashes or keys written in the form 'table_name.column_name' -# can be used to qualify the table name of a particular condition. For instance: -# -# Student.joins(:schools).where(schools: { category: 'public' }) -# Student.joins(:schools).where('schools.category' => 'public' ) -# -# == Overwriting default accessors -# -# All column values are automatically available through basic accessors on the Active Record -# object, but sometimes you want to specialize this behavior. This can be done by overwriting -# the default accessors (using the same name as the attribute) and calling -# +super+ to actually change things. -# -# class Song < ActiveRecord::Base -# # Uses an integer of seconds to hold the length of the song -# -# def length=(minutes) -# super(minutes.to_i * 60) -# end -# -# def length -# super / 60 -# end -# end -# -# == Attribute query methods -# -# In addition to the basic accessors, query methods are also automatically available on the Active Record object. -# Query methods allow you to test whether an attribute value is present. -# Additionally, when dealing with numeric values, a query method will return false if the value is zero. -# -# For example, an Active Record User with the name attribute has a name? method that you can call -# to determine whether the user has a name: -# -# user = User::User.new(name: "David") -# user.name? # => true -# -# anonymous = User::User.new(name: "") -# anonymous.name? # => false -# -# Query methods will also respect any overrides of default accessors: -# -# class User -# # Has admin boolean column -# def admin -# false -# end -# end -# -# user.update(admin: true) -# -# user.read_attribute(:admin) # => true, gets the column value -# user[:admin] # => true, also gets the column value -# -# user.admin # => false, due to the getter override -# user.admin? # => false, due to the getter override -# -# == Accessing attributes before they have been typecasted -# -# Sometimes you want to be able to read the raw attribute data without having the column-determined -# typecast run its course first. That can be done by using the _before_type_cast -# accessors that all attributes have. For example, if your Account model has a balance attribute, -# you can call account.balance_before_type_cast or account.id_before_type_cast. -# -# This is especially useful in validation situations where the user might supply a string for an -# integer field and you want to display the original string back in an error message. Accessing the -# attribute normally would typecast the string to 0, which isn't what you want. -# -# == Dynamic attribute-based finders -# -# Dynamic attribute-based finders are a mildly deprecated way of getting (and/or creating) objects -# by simple queries without turning to SQL. They work by appending the name of an attribute -# to find_by_ like Person.find_by_user_name. -# Instead of writing Person.find_by(user_name: user_name), you can use -# Person.find_by_user_name(user_name). -# -# It's possible to add an exclamation point (!) on the end of the dynamic finders to get them to raise an -# ActiveRecord::RecordNotFound error if they do not return any records, -# like Person.find_by_last_name!. -# -# It's also possible to use multiple attributes in the same find_by_ by separating them with -# "_and_". -# -# Person.find_by(user_name: user_name, password: password) -# Person.find_by_user_name_and_password(user_name, password) # with dynamic finder -# -# It's even possible to call these dynamic finder methods on relations and named scopes. -# -# Payment.order("created_on").find_by_amount(50) -# -# == Saving arrays, hashes, and other non-mappable objects in text columns -# -# Active Record can serialize any object in text columns using YAML. To do so, you must -# specify this with a call to the class method -# {serialize}[rdoc-ref:AttributeMethods::Serialization::ClassMethods#serialize]. -# This makes it possible to store arrays, hashes, and other non-mappable objects without doing -# any additional work. -# -# class User < ActiveRecord::Base -# serialize :preferences -# end -# -# user = User::User.create(preferences: { "background" => "black", "display" => large }) -# User::User.find(user.id).preferences # => { "background" => "black", "display" => large } -# -# You can also specify a class option as the second parameter that'll raise an exception -# if a serialized object is retrieved as a descendant of a class not in the hierarchy. -# -# class User < ActiveRecord::Base -# serialize :preferences, Hash -# end -# -# user = User::User.create(preferences: %w( one two three )) -# User::User.find(user.id).preferences # raises SerializationTypeMismatch -# -# When you specify a class option, the default value for that attribute will be a new -# instance of that class. -# -# class User < ActiveRecord::Base -# serialize :preferences, OpenStruct -# end -# -# user = User::User.new -# user.preferences.theme_color = "red" -# -# -# == Single table inheritance -# -# Active Record allows inheritance by storing the name of the class in a -# column that is named "type" by default. See ActiveRecord::Inheritance for -# more details. -# -# == Connection to multiple databases in different models -# -# Connections are usually created through -# {ActiveRecord::Base.establish_connection}[rdoc-ref:ConnectionHandling#establish_connection] and retrieved -# by ActiveRecord::Base.connection. All classes inheriting from ActiveRecord::Base will use this -# connection. But you can also set a class-specific connection. For example, if Course is an -# ActiveRecord::Base, but resides in a different database, you can just say Course.establish_connection -# and Course and all of its subclasses will use this connection instead. -# -# This feature is implemented by keeping a connection pool in ActiveRecord::Base that is -# a hash indexed by the class. If a connection is requested, the -# {ActiveRecord::Base.retrieve_connection}[rdoc-ref:ConnectionHandling#retrieve_connection] method -# will go up the class-hierarchy until a connection is found in the connection pool. -# -# == Exceptions -# -# * ActiveRecordError - Generic error class and superclass of all other errors raised by Active Record. -# * AdapterNotSpecified - The configuration hash used in -# {ActiveRecord::Base.establish_connection}[rdoc-ref:ConnectionHandling#establish_connection] -# didn't include an :adapter key. -# * AdapterNotFound - The :adapter key used in -# {ActiveRecord::Base.establish_connection}[rdoc-ref:ConnectionHandling#establish_connection] -# specified a non-existent adapter -# (or a bad spelling of an existing one). -# * AssociationTypeMismatch - The object assigned to the association wasn't of the type -# specified in the association definition. -# * AttributeAssignmentError - An error occurred while doing a mass assignment through the -# {ActiveRecord::Base#attributes=}[rdoc-ref:AttributeAssignment#attributes=] method. -# You can inspect the +attribute+ property of the exception object to determine which attribute -# triggered the error. -# * ConnectionNotEstablished - No connection has been established. -# Use {ActiveRecord::Base.establish_connection}[rdoc-ref:ConnectionHandling#establish_connection] before querying. -# * MultiparameterAssignmentErrors - Collection of errors that occurred during a mass assignment using the -# {ActiveRecord::Base#attributes=}[rdoc-ref:AttributeAssignment#attributes=] method. -# The +errors+ property of this exception contains an array of -# AttributeAssignmentError -# objects that should be inspected to determine which attributes triggered the errors. -# * RecordInvalid - raised by {ActiveRecord::Base#save!}[rdoc-ref:Persistence#save!] and -# {ActiveRecord::Base.create!}[rdoc-ref:Persistence::ClassMethods#create!] -# when the record is invalid. -# * RecordNotFound - No record responded to the {ActiveRecord::Base.find}[rdoc-ref:FinderMethods#find] method. -# Either the row with the given ID doesn't exist or the row didn't meet the additional restrictions. -# Some {ActiveRecord::Base.find}[rdoc-ref:FinderMethods#find] calls do not raise this exception to signal -# nothing was found, please check its documentation for further details. -# * SerializationTypeMismatch - The serialized object wasn't of the class specified as the second parameter. -# * StatementInvalid - The database server rejected the SQL statement. The precise error is added in the message. -# -# *Note*: The attributes listed are class-level attributes (accessible from both the class and instance level). -# So it's possible to assign a logger to the class through Base.logger= which will then be used by all -# instances in the current object space. -# -# source://activerecord//lib/active_record/base.rb#282 -class ActiveRecord::Base - include ::ActionText::Encryption - include ::ActiveRecord::Core - include ::ActiveRecord::Persistence - include ::ActiveRecord::ReadonlyAttributes - include ::ActiveRecord::ModelSchema - include ::ActiveRecord::Inheritance - include ::ActiveRecord::Scoping - include ::ActiveRecord::Scoping::Default - include ::ActiveRecord::Scoping::Named - include ::ActiveRecord::Sanitization - include ::ActiveModel::ForbiddenAttributesProtection - include ::ActiveModel::AttributeAssignment - include ::ActiveRecord::AttributeAssignment - include ::ActiveModel::Conversion - include ::ActiveRecord::Integration - include ::ActiveModel::Validations - include ::ActiveSupport::Callbacks - include ::ActiveModel::Validations::HelperMethods - include ::ActiveRecord::Validations - include ::ActiveRecord::CounterCache - include ::ActiveRecord::Attributes - include ::ActiveRecord::Locking::Optimistic - include ::ActiveRecord::Locking::Pessimistic - include ::ActiveModel::AttributeMethods - include ::ActiveRecord::AttributeMethods - include ::ActiveRecord::Base::GeneratedAttributeMethods - include ::ActiveRecord::Base::GeneratedAssociationMethods - include ::ActiveRecord::AttributeMethods::Read - include ::ActiveRecord::AttributeMethods::Write - include ::ActiveRecord::AttributeMethods::BeforeTypeCast - include ::ActiveRecord::AttributeMethods::Query - include ::ActiveRecord::AttributeMethods::PrimaryKey - include ::ActiveRecord::AttributeMethods::TimeZoneConversion - include ::ActiveModel::Dirty - include ::ActiveRecord::AttributeMethods::Dirty - include ::ActiveRecord::AttributeMethods::Serialization - include ::ActiveRecord::Callbacks - include ::ActiveModel::Validations::Callbacks - include ::ActiveRecord::Timestamp - include ::ActiveRecord::Associations - include ::ActiveModel::SecurePassword - include ::ActiveRecord::AutosaveAssociation - include ::ActiveRecord::NestedAttributes - include ::ActiveRecord::Transactions - include ::ActiveRecord::TouchLater - include ::ActiveRecord::NoTouching - include ::ActiveRecord::Reflection - include ::ActiveModel::Serialization - include ::ActiveModel::Serializers::JSON - include ::ActiveRecord::Serialization - include ::ActiveRecord::Store - include ::ActiveRecord::SecureToken - include ::ActiveRecord::SignedId - include ::ActiveRecord::Suppressor - include ::ActiveRecord::Encryption::EncryptableRecord - include ::ActiveStorage::Attached::Model - include ::ActiveStorage::Reflection::ActiveRecordExtensions - include ::ActionText::Attribute - include ::Turbo::Broadcastable - extend ::ActiveModel::Naming - extend ::ActiveSupport::Benchmarkable - extend ::ActiveSupport::DescendantsTracker - extend ::ActiveRecord::ConnectionHandling - extend ::ActiveRecord::QueryCache::ClassMethods - extend ::ActiveRecord::Querying - extend ::ActiveModel::Translation - extend ::ActiveRecord::Translation - extend ::ActiveRecord::DynamicMatchers - extend ::ActiveRecord::DelegatedType - extend ::ActiveRecord::Explain - extend ::ActiveRecord::Enum - extend ::ActiveRecord::Delegation::DelegateCache - extend ::ActiveRecord::Aggregations::ClassMethods - extend ::ActiveRecord::Core::ClassMethods - extend ::ActiveRecord::Persistence::ClassMethods - extend ::ActiveRecord::ReadonlyAttributes::ClassMethods - extend ::ActiveRecord::ModelSchema::ClassMethods - extend ::ActiveRecord::Inheritance::ClassMethods - extend ::ActiveRecord::Scoping::ClassMethods - extend ::ActiveRecord::Scoping::Default::ClassMethods - extend ::ActiveRecord::Scoping::Named::ClassMethods - extend ::ActiveRecord::Sanitization::ClassMethods - extend ::ActiveModel::Conversion::ClassMethods - extend ::ActiveRecord::Integration::ClassMethods - extend ::ActiveModel::Validations::ClassMethods - extend ::ActiveModel::Callbacks - extend ::ActiveSupport::Callbacks::ClassMethods - extend ::ActiveModel::Validations::HelperMethods - extend ::ActiveRecord::Validations::ClassMethods - extend ::ActiveRecord::CounterCache::ClassMethods - extend ::ActiveRecord::Attributes::ClassMethods - extend ::ActiveRecord::Locking::Optimistic::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::AutosaveAssociation::ClassMethods - extend ::ActiveRecord::NestedAttributes::ClassMethods - extend ::ActiveRecord::Transactions::ClassMethods - extend ::ActiveRecord::NoTouching::ClassMethods - extend ::ActiveRecord::Reflection::ClassMethods - extend ::ActiveRecord::Store::ClassMethods - extend ::ActiveRecord::SecureToken::ClassMethods - extend ::ActiveRecord::SignedId::ClassMethods - extend ::ActiveRecord::Suppressor::ClassMethods - extend ::ActiveRecord::Encryption::EncryptableRecord::ClassMethods - extend ::ActiveStorage::Attached::Model::ClassMethods - extend ::ActiveStorage::Reflection::ActiveRecordExtensions::ClassMethods - extend ::ActionText::Attribute::ClassMethods - extend ::Turbo::Broadcastable::ClassMethods - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#940 - def _before_commit_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#940 - def _commit_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#940 - def _create_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#940 - def _destroy_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#940 - def _find_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#940 - def _initialize_callbacks; end - - # source://activerecord//lib/active_record/reflection.rb#11 - def _reflections; end - - # source://activerecord//lib/active_record/reflection.rb#11 - def _reflections?; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#940 - def _rollback_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#928 - def _run_before_commit_callbacks(&block); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#928 - def _run_commit_callbacks(&block); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#928 - def _run_create_callbacks(&block); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#928 - def _run_destroy_callbacks(&block); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#928 - def _run_find_callbacks(&block); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#928 - def _run_initialize_callbacks(&block); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#928 - def _run_rollback_callbacks(&block); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#928 - def _run_save_callbacks(&block); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#928 - def _run_touch_callbacks(&block); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#928 - def _run_update_callbacks(&block); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#928 - def _run_validate_callbacks(&block); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#928 - def _run_validation_callbacks(&block); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#940 - def _save_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#940 - def _touch_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#940 - def _update_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#940 - def _validate_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#940 - def _validation_callbacks; end - - # source://activemodel/7.0.4.2/lib/active_model/validations.rb#52 - def _validators; end - - # source://activemodel/7.0.4.2/lib/active_model/validations.rb#52 - def _validators?; end - - # source://activerecord//lib/active_record/reflection.rb#12 - def aggregate_reflections; end - - # source://activerecord//lib/active_record/reflection.rb#12 - def aggregate_reflections?; end - - # source://activestorage/7.0.4.2/lib/active_storage/reflection.rb#53 - def attachment_reflections; end - - # source://activestorage/7.0.4.2/lib/active_storage/reflection.rb#53 - def attachment_reflections?; end - - # source://activemodel/7.0.4.2/lib/active_model/attribute_methods.rb#73 - def attribute_aliases; end - - # source://activemodel/7.0.4.2/lib/active_model/attribute_methods.rb#73 - def attribute_aliases?; end - - # source://activemodel/7.0.4.2/lib/active_model/attribute_methods.rb#74 - def attribute_method_matchers; end - - # source://activemodel/7.0.4.2/lib/active_model/attribute_methods.rb#74 - def attribute_method_matchers?; end - - # source://activerecord//lib/active_record/reflection.rb#13 - def automatic_scope_inversing; end - - # source://activerecord//lib/active_record/reflection.rb#13 - def automatic_scope_inversing?; end - - # source://activerecord//lib/active_record/integration.rb#16 - def cache_timestamp_format; end - - # source://activerecord//lib/active_record/integration.rb#16 - def cache_timestamp_format?; end - - # source://activerecord//lib/active_record/integration.rb#24 - def cache_versioning; end - - # source://activerecord//lib/active_record/integration.rb#24 - def cache_versioning?; end - - # source://activerecord//lib/active_record/integration.rb#32 - def collection_cache_versioning; end - - # 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/core.rb#74 - def default_connection_handler; end - - # source://activerecord//lib/active_record/core.rb#74 - def default_connection_handler?; end - - # source://activerecord//lib/active_record/core.rb#76 - def default_role; end - - # source://activerecord//lib/active_record/core.rb#76 - def default_role?; end - - # source://activerecord//lib/active_record/scoping/default.rb#20 - def default_scope_override; end - - # source://activerecord//lib/active_record/scoping/default.rb#19 - def default_scopes; end - - # source://activerecord//lib/active_record/core.rb#78 - def default_shard; end - - # source://activerecord//lib/active_record/core.rb#78 - def default_shard?; end - - # source://activerecord//lib/active_record/enum.rb#116 - def defined_enums; end - - # source://activerecord//lib/active_record/enum.rb#116 - def defined_enums?; end - - # source://activerecord//lib/active_record/core.rb#26 - def destroy_association_async_job; end - - # source://activerecord//lib/active_record/encryption/encryptable_record.rb#11 - def encrypted_attributes; end - - # source://activerecord//lib/active_record/encryption/encryptable_record.rb#11 - def encrypted_attributes=(_arg0); end - - # source://activerecord//lib/active_record/encryption/encryptable_record.rb#11 - def encrypted_attributes?; end - - # source://activemodel/7.0.4.2/lib/active_model/serializers/json.rb#15 - def include_root_in_json; end - - # source://activemodel/7.0.4.2/lib/active_model/serializers/json.rb#15 - def include_root_in_json?; end - - # source://activerecord//lib/active_record/locking/optimistic.rb#56 - def lock_optimistically; end - - # source://activerecord//lib/active_record/locking/optimistic.rb#56 - def lock_optimistically?; end - - # source://activerecord//lib/active_record/core.rb#20 - def logger; end - - # source://activerecord//lib/active_record/core.rb#20 - def logger?; end - - # source://activemodel/7.0.4.2/lib/active_model/naming.rb#244 - def model_name(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/nested_attributes.rb#15 - def nested_attributes_options; end - - # source://activerecord//lib/active_record/nested_attributes.rb#15 - def nested_attributes_options?; end - - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#18 - def partial_inserts; end - - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#18 - def partial_inserts?; end - - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#17 - def partial_updates; end - - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#17 - def partial_updates?; end - - # source://activerecord//lib/active_record/model_schema.rb#156 - def pluralize_table_names; end - - # source://activerecord//lib/active_record/model_schema.rb#156 - def pluralize_table_names?; end - - # source://activerecord//lib/active_record/model_schema.rb#151 - def primary_key_prefix_type; end - - # source://activerecord//lib/active_record/model_schema.rb#151 - def primary_key_prefix_type?; end - - # source://activerecord//lib/active_record/timestamp.rb#47 - def record_timestamps; end - - # source://activerecord//lib/active_record/timestamp.rb#47 - def record_timestamps=(_arg0); end - - # source://activerecord//lib/active_record/timestamp.rb#47 - def record_timestamps?; end - - # source://activerecord//lib/active_record/signed_id.rb#13 - def signed_id_verifier_secret; end - - # source://activerecord//lib/active_record/signed_id.rb#13 - def signed_id_verifier_secret?; end - - # source://activerecord//lib/active_record/attribute_methods/time_zone_conversion.rb#71 - def skip_time_zone_conversion_for_attributes; end - - # source://activerecord//lib/active_record/attribute_methods/time_zone_conversion.rb#71 - def skip_time_zone_conversion_for_attributes?; end - - # source://activerecord//lib/active_record/inheritance.rb#42 - def store_full_class_name; end - - # source://activerecord//lib/active_record/inheritance.rb#42 - def store_full_class_name?; end - - # source://activerecord//lib/active_record/inheritance.rb#46 - def store_full_sti_class; end - - # source://activerecord//lib/active_record/inheritance.rb#46 - def store_full_sti_class?; end - - # source://activerecord//lib/active_record/model_schema.rb#152 - def table_name_prefix; end - - # source://activerecord//lib/active_record/model_schema.rb#152 - def table_name_prefix?; end - - # source://activerecord//lib/active_record/model_schema.rb#153 - def table_name_suffix; end - - # source://activerecord//lib/active_record/model_schema.rb#153 - def table_name_suffix?; end - - # source://activerecord//lib/active_record/attribute_methods/time_zone_conversion.rb#70 - def time_zone_aware_attributes; end - - # source://activerecord//lib/active_record/attribute_methods/time_zone_conversion.rb#70 - def time_zone_aware_attributes?; end - - # source://activerecord//lib/active_record/attribute_methods/time_zone_conversion.rb#72 - def time_zone_aware_types; end - - # source://activerecord//lib/active_record/attribute_methods/time_zone_conversion.rb#72 - def time_zone_aware_types?; end - - # source://activerecord//lib/active_record/model_schema.rb#171 - def type_for_attribute(*_arg0, **_arg1, &_arg2); end - - # source://activemodel/7.0.4.2/lib/active_model/validations.rb#48 - def validation_context; end - - private - - # source://activemodel/7.0.4.2/lib/active_model/validations.rb#48 - def validation_context=(_arg0); end - - class << self - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://activerecord//lib/active_record/readonly_attributes.rb#8 - def _attr_readonly; end - - # source://activerecord//lib/active_record/readonly_attributes.rb#8 - def _attr_readonly=(value); end - - # source://activerecord//lib/active_record/readonly_attributes.rb#8 - def _attr_readonly?; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#932 - def _before_commit_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#936 - def _before_commit_callbacks=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#932 - def _commit_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#936 - def _commit_callbacks=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#932 - def _create_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#936 - def _create_callbacks=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#932 - def _destroy_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#936 - def _destroy_callbacks=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#932 - def _find_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#936 - def _find_callbacks=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#932 - def _initialize_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#936 - def _initialize_callbacks=(value); end - - # source://activerecord//lib/active_record/reflection.rb#11 - def _reflections; end - - # source://activerecord//lib/active_record/reflection.rb#11 - def _reflections=(value); end - - # source://activerecord//lib/active_record/reflection.rb#11 - def _reflections?; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#932 - def _rollback_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#936 - def _rollback_callbacks=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#932 - def _save_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#936 - def _save_callbacks=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#932 - def _touch_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#936 - def _touch_callbacks=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#932 - def _update_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#936 - def _update_callbacks=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#932 - def _validate_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#936 - def _validate_callbacks=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#932 - def _validation_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#936 - def _validation_callbacks=(value); end - - # source://activemodel/7.0.4.2/lib/active_model/validations.rb#52 - def _validators; end - - # source://activemodel/7.0.4.2/lib/active_model/validations.rb#52 - def _validators=(value); end - - # source://activemodel/7.0.4.2/lib/active_model/validations.rb#52 - def _validators?; end - - # source://activemodel/7.0.4.2/lib/active_model/callbacks.rb#144 - def after_create(*args, **options, &block); end - - # source://activemodel/7.0.4.2/lib/active_model/callbacks.rb#144 - def after_destroy(*args, **options, &block); end - - # source://activemodel/7.0.4.2/lib/active_model/callbacks.rb#144 - def after_find(*args, **options, &block); end - - # source://activemodel/7.0.4.2/lib/active_model/callbacks.rb#144 - def after_initialize(*args, **options, &block); end - - # source://activemodel/7.0.4.2/lib/active_model/callbacks.rb#144 - def after_save(*args, **options, &block); end - - # source://activemodel/7.0.4.2/lib/active_model/callbacks.rb#144 - def after_touch(*args, **options, &block); end - - # source://activemodel/7.0.4.2/lib/active_model/callbacks.rb#144 - def after_update(*args, **options, &block); end - - # source://activerecord//lib/active_record/reflection.rb#12 - def aggregate_reflections; end - - # source://activerecord//lib/active_record/reflection.rb#12 - def aggregate_reflections=(value); end - - # source://activerecord//lib/active_record/reflection.rb#12 - def aggregate_reflections?; end - - # source://activerecord//lib/active_record/core.rb#82 - def application_record_class?; end - - # source://activemodel/7.0.4.2/lib/active_model/callbacks.rb#137 - def around_create(*args, **options, &block); end - - # source://activemodel/7.0.4.2/lib/active_model/callbacks.rb#137 - def around_destroy(*args, **options, &block); end - - # source://activemodel/7.0.4.2/lib/active_model/callbacks.rb#137 - def around_save(*args, **options, &block); end - - # source://activemodel/7.0.4.2/lib/active_model/callbacks.rb#137 - def around_update(*args, **options, &block); end - - # source://activerecord//lib/active_record/core.rb#129 - def asynchronous_queries_session; end - - # source://activerecord//lib/active_record/core.rb#133 - def asynchronous_queries_tracker; end - - # source://activestorage/7.0.4.2/lib/active_storage/reflection.rb#53 - def attachment_reflections; end - - # source://activestorage/7.0.4.2/lib/active_storage/reflection.rb#53 - def attachment_reflections=(value); end - - # source://activestorage/7.0.4.2/lib/active_storage/reflection.rb#53 - def attachment_reflections?; end - - # source://activemodel/7.0.4.2/lib/active_model/attribute_methods.rb#73 - def attribute_aliases; end - - # source://activemodel/7.0.4.2/lib/active_model/attribute_methods.rb#73 - def attribute_aliases=(value); end - - # source://activemodel/7.0.4.2/lib/active_model/attribute_methods.rb#73 - def attribute_aliases?; end - - # source://activemodel/7.0.4.2/lib/active_model/attribute_methods.rb#74 - def attribute_method_matchers; end - - # source://activemodel/7.0.4.2/lib/active_model/attribute_methods.rb#74 - def attribute_method_matchers=(value); end - - # source://activemodel/7.0.4.2/lib/active_model/attribute_methods.rb#74 - def attribute_method_matchers?; end - - # source://activerecord//lib/active_record/attributes.rb#11 - def attributes_to_define_after_schema_loads; end - - # source://activerecord//lib/active_record/attributes.rb#11 - def attributes_to_define_after_schema_loads=(value); end - - # source://activerecord//lib/active_record/attributes.rb#11 - def attributes_to_define_after_schema_loads?; end - - # source://activerecord//lib/active_record/reflection.rb#13 - def automatic_scope_inversing; end - - # source://activerecord//lib/active_record/reflection.rb#13 - def automatic_scope_inversing=(value); end - - # source://activerecord//lib/active_record/reflection.rb#13 - def automatic_scope_inversing?; end - - # source://activemodel/7.0.4.2/lib/active_model/callbacks.rb#130 - def before_create(*args, **options, &block); end - - # source://activemodel/7.0.4.2/lib/active_model/callbacks.rb#130 - def before_destroy(*args, **options, &block); end - - # source://activemodel/7.0.4.2/lib/active_model/callbacks.rb#130 - def before_save(*args, **options, &block); end - - # source://activemodel/7.0.4.2/lib/active_model/callbacks.rb#130 - def before_update(*args, **options, &block); end - - # source://activerecord//lib/active_record/core.rb#68 - def belongs_to_required_by_default; end - - # source://activerecord//lib/active_record/core.rb#68 - def belongs_to_required_by_default=(value); end - - # source://activerecord//lib/active_record/core.rb#68 - def belongs_to_required_by_default?; end - - # source://activerecord//lib/active_record/integration.rb#16 - def cache_timestamp_format; end - - # source://activerecord//lib/active_record/integration.rb#16 - def cache_timestamp_format=(value); end - - # source://activerecord//lib/active_record/integration.rb#16 - def cache_timestamp_format?; end - - # source://activerecord//lib/active_record/integration.rb#24 - def cache_versioning; end - - # source://activerecord//lib/active_record/integration.rb#24 - def cache_versioning=(value); end - - # source://activerecord//lib/active_record/integration.rb#24 - def cache_versioning?; end - - # source://activerecord//lib/active_record/integration.rb#32 - def collection_cache_versioning; end - - # source://activerecord//lib/active_record/integration.rb#32 - def collection_cache_versioning=(value); end - - # source://activerecord//lib/active_record/integration.rb#32 - def collection_cache_versioning?; end - - # source://activerecord//lib/active_record/core.rb#56 - def configurations; end - - # source://activerecord//lib/active_record/core.rb#50 - def configurations=(config); end - - # source://activerecord//lib/active_record/core.rb#201 - def connected_to_stack; end - - # source://activerecord//lib/active_record/core.rb#215 - def connection_class; end - - # source://activerecord//lib/active_record/core.rb#211 - def connection_class=(b); end - - # source://activerecord//lib/active_record/core.rb#219 - def connection_class?; end - - # source://activerecord//lib/active_record/core.rb#223 - def connection_class_for_self; end - - # source://activerecord//lib/active_record/core.rb#94 - def connection_handler; end - - # source://activerecord//lib/active_record/core.rb#98 - 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 - def current_preventing_writes; end - - # source://activerecord//lib/active_record/core.rb#147 - def current_role; end - - # source://activerecord//lib/active_record/core.rb#169 - def current_shard; end - - # source://activerecord//lib/active_record/core.rb#74 - def default_connection_handler; end - - # source://activerecord//lib/active_record/core.rb#74 - def default_connection_handler=(value); end - - # source://activerecord//lib/active_record/core.rb#74 - def default_connection_handler?; end - - # source://activerecord//lib/active_record/core.rb#76 - def default_role; end - - # source://activerecord//lib/active_record/core.rb#76 - def default_role=(value); end - - # source://activerecord//lib/active_record/core.rb#76 - def default_role?; end - - # source://activerecord//lib/active_record/scoping/default.rb#20 - def default_scope_override; end - - # source://activerecord//lib/active_record/scoping/default.rb#20 - def default_scope_override=(value); end - - # source://activerecord//lib/active_record/scoping/default.rb#19 - def default_scopes; end - - # source://activerecord//lib/active_record/scoping/default.rb#19 - def default_scopes=(value); end - - # source://activerecord//lib/active_record/core.rb#78 - def default_shard; end - - # source://activerecord//lib/active_record/core.rb#78 - def default_shard=(value); end - - # source://activerecord//lib/active_record/core.rb#78 - def default_shard?; end - - # source://activerecord//lib/active_record/enum.rb#116 - def defined_enums; end - - # source://activerecord//lib/active_record/enum.rb#116 - def defined_enums=(value); end - - # source://activerecord//lib/active_record/enum.rb#116 - 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#26 - def destroy_association_async_job=(value); end - - # source://activerecord//lib/active_record/encryption/encryptable_record.rb#11 - def encrypted_attributes; end - - # source://activerecord//lib/active_record/encryption/encryptable_record.rb#11 - def encrypted_attributes=(value); end - - # source://activerecord//lib/active_record/encryption/encryptable_record.rb#11 - def encrypted_attributes?; end - - # source://activerecord//lib/active_record/core.rb#66 - def enumerate_columns_in_select_statements; end - - # source://activerecord//lib/active_record/core.rb#66 - def enumerate_columns_in_select_statements=(value); end - - # source://activerecord//lib/active_record/core.rb#66 - def enumerate_columns_in_select_statements?; end - - # source://activerecord//lib/active_record/core.rb#72 - def has_many_inversing; end - - # source://activerecord//lib/active_record/core.rb#72 - def has_many_inversing=(value); end - - # source://activerecord//lib/active_record/core.rb#72 - def has_many_inversing?; end - - # source://activerecord//lib/active_record/model_schema.rb#158 - def immutable_strings_by_default; end - - # source://activerecord//lib/active_record/model_schema.rb#158 - def immutable_strings_by_default=(value); end - - # source://activerecord//lib/active_record/model_schema.rb#158 - def immutable_strings_by_default?; end - - # source://activerecord//lib/active_record/model_schema.rb#157 - def implicit_order_column; end - - # source://activerecord//lib/active_record/model_schema.rb#157 - def implicit_order_column=(value); end - - # source://activerecord//lib/active_record/model_schema.rb#157 - def implicit_order_column?; end - - # source://activemodel/7.0.4.2/lib/active_model/serializers/json.rb#15 - def include_root_in_json; end - - # source://activemodel/7.0.4.2/lib/active_model/serializers/json.rb#15 - def include_root_in_json=(value); end - - # source://activemodel/7.0.4.2/lib/active_model/serializers/json.rb#15 - def include_root_in_json?; end - - # source://activerecord//lib/active_record/model_schema.rb#160 - def inheritance_column; end - - # source://activerecord//lib/active_record/model_schema.rb#311 - def inheritance_column=(value); end - - # source://activerecord//lib/active_record/model_schema.rb#160 - def inheritance_column?; end - - # source://activerecord//lib/active_record/model_schema.rb#155 - def internal_metadata_table_name; end - - # source://activerecord//lib/active_record/model_schema.rb#155 - def internal_metadata_table_name=(value); end - - # source://activerecord//lib/active_record/model_schema.rb#155 - def internal_metadata_table_name?; end - - # source://activerecord//lib/active_record/store.rb#99 - def local_stored_attributes; end - - # source://activerecord//lib/active_record/store.rb#99 - def local_stored_attributes=(_arg0); end - - # source://activerecord//lib/active_record/locking/optimistic.rb#56 - def lock_optimistically; end - - # source://activerecord//lib/active_record/locking/optimistic.rb#56 - def lock_optimistically=(value); end - - # source://activerecord//lib/active_record/locking/optimistic.rb#56 - def lock_optimistically?; end - - # source://activerecord//lib/active_record/core.rb#20 - def logger; end - - # source://activerecord//lib/active_record/core.rb#20 - def logger=(value); end - - # source://activerecord//lib/active_record/core.rb#20 - def logger?; end - - # source://activerecord//lib/active_record/nested_attributes.rb#15 - def nested_attributes_options; end - - # source://activerecord//lib/active_record/nested_attributes.rb#15 - def nested_attributes_options=(value); end - - # source://activerecord//lib/active_record/nested_attributes.rb#15 - def nested_attributes_options?; end - - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#18 - def partial_inserts; end - - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#18 - def partial_inserts=(value); end - - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#18 - def partial_inserts?; end - - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#17 - def partial_updates; end - - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#17 - def partial_updates=(value); end - - # source://activerecord//lib/active_record/attribute_methods/dirty.rb#17 - def partial_updates?; end - - # source://activerecord//lib/active_record/model_schema.rb#156 - def pluralize_table_names; end - - # source://activerecord//lib/active_record/model_schema.rb#156 - def pluralize_table_names=(value); end - - # source://activerecord//lib/active_record/model_schema.rb#156 - def pluralize_table_names?; end - - # source://activerecord//lib/active_record/model_schema.rb#151 - def primary_key_prefix_type; end - - # source://activerecord//lib/active_record/model_schema.rb#151 - def primary_key_prefix_type=(value); end - - # source://activerecord//lib/active_record/model_schema.rb#151 - def primary_key_prefix_type?; end - - # source://activerecord//lib/active_record/timestamp.rb#47 - def record_timestamps; end - - # source://activerecord//lib/active_record/timestamp.rb#47 - def record_timestamps=(value); end - - # source://activerecord//lib/active_record/timestamp.rb#47 - def record_timestamps?; end - - # source://activerecord//lib/active_record/model_schema.rb#154 - def schema_migrations_table_name; end - - # source://activerecord//lib/active_record/model_schema.rb#154 - def schema_migrations_table_name=(value); end - - # source://activerecord//lib/active_record/model_schema.rb#154 - def schema_migrations_table_name?; end - - # source://activerecord//lib/active_record/core.rb#80 - def shard_selector; end - - # source://activerecord//lib/active_record/core.rb#80 - def shard_selector=(value); end - - # source://activerecord//lib/active_record/core.rb#80 - def shard_selector?; end - - # source://activerecord//lib/active_record/signed_id.rb#13 - def signed_id_verifier_secret; end - - # source://activerecord//lib/active_record/signed_id.rb#13 - def signed_id_verifier_secret=(value); end - - # source://activerecord//lib/active_record/signed_id.rb#13 - def signed_id_verifier_secret?; end - - # source://activerecord//lib/active_record/attribute_methods/time_zone_conversion.rb#71 - def skip_time_zone_conversion_for_attributes; end - - # source://activerecord//lib/active_record/attribute_methods/time_zone_conversion.rb#71 - def skip_time_zone_conversion_for_attributes=(value); end - - # source://activerecord//lib/active_record/attribute_methods/time_zone_conversion.rb#71 - def skip_time_zone_conversion_for_attributes?; end - - # source://activerecord//lib/active_record/inheritance.rb#42 - def store_full_class_name; end - - # source://activerecord//lib/active_record/inheritance.rb#42 - def store_full_class_name=(value); end - - # source://activerecord//lib/active_record/inheritance.rb#42 - def store_full_class_name?; end - - # source://activerecord//lib/active_record/inheritance.rb#46 - def store_full_sti_class; end - - # source://activerecord//lib/active_record/inheritance.rb#46 - def store_full_sti_class=(value); end - - # source://activerecord//lib/active_record/inheritance.rb#46 - def store_full_sti_class?; end - - # source://activerecord//lib/active_record/core.rb#70 - def strict_loading_by_default; end - - # source://activerecord//lib/active_record/core.rb#70 - def strict_loading_by_default=(value); end - - # source://activerecord//lib/active_record/core.rb#70 - def strict_loading_by_default?; end - - # source://activerecord//lib/active_record/core.rb#238 - def strict_loading_violation!(owner:, reflection:); end - - # source://activerecord//lib/active_record/model_schema.rb#152 - def table_name_prefix; end - - # source://activerecord//lib/active_record/model_schema.rb#152 - def table_name_prefix=(value); end - - # source://activerecord//lib/active_record/model_schema.rb#152 - def table_name_prefix?; end - - # source://activerecord//lib/active_record/model_schema.rb#153 - def table_name_suffix; end - - # source://activerecord//lib/active_record/model_schema.rb#153 - def table_name_suffix=(value); end - - # source://activerecord//lib/active_record/model_schema.rb#153 - def table_name_suffix?; end - - # source://activerecord//lib/active_record/attribute_methods/time_zone_conversion.rb#70 - def time_zone_aware_attributes; end - - # source://activerecord//lib/active_record/attribute_methods/time_zone_conversion.rb#70 - def time_zone_aware_attributes=(value); end - - # source://activerecord//lib/active_record/attribute_methods/time_zone_conversion.rb#70 - def time_zone_aware_attributes?; end - - # source://activerecord//lib/active_record/attribute_methods/time_zone_conversion.rb#72 - def time_zone_aware_types; end - - # source://activerecord//lib/active_record/attribute_methods/time_zone_conversion.rb#72 - def time_zone_aware_types=(value); end - - # source://activerecord//lib/active_record/attribute_methods/time_zone_conversion.rb#72 - def time_zone_aware_types?; end - - private - - # source://activerecord//lib/active_record/model_schema.rb#160 - def _inheritance_column=(value); end - end -end - -# source://activerecord//lib/active_record/base.rb#0 -module ActiveRecord::Base::GeneratedAssociationMethods; end - -# source://activerecord//lib/active_record/base.rb#0 -module ActiveRecord::Base::GeneratedAttributeMethods; end - -# source://activerecord//lib/active_record/relation/batches/batch_enumerator.rb#4 -module ActiveRecord::Batches - # Looping through a collection of records from the database - # (using the Scoping::Named::ClassMethods.all method, for example) - # is very inefficient since it will try to instantiate all the objects at once. - # - # In that case, batch processing methods allow you to work - # with the records in batches, thereby greatly reducing memory consumption. - # - # The #find_each method uses #find_in_batches with a batch size of 1000 (or as - # specified by the +:batch_size+ option). - # - # Person.find_each do |person| - # person.do_awesome_stuff - # end - # - # Person.where("age > 21").find_each do |person| - # person.party_all_night! - # end - # - # If you do not provide a block to #find_each, it will return an Enumerator - # for chaining with other methods: - # - # Person.find_each.with_index do |person, index| - # person.award_trophy(index + 1) - # end - # - # ==== Options - # * :batch_size - Specifies the size of the batch. Defaults to 1000. - # * :start - Specifies the primary key value to start from, inclusive of the value. - # * :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+. - # - # 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. - # - # The options +start+ and +finish+ are especially useful if you want - # multiple workers dealing with the same processing queue. You can make - # worker 1 handle all the records between id 1 and 9999 and worker 2 - # handle from 10000 and beyond by setting the +:start+ and +:finish+ - # option on each worker. - # - # # In worker 1, let's process until 9999 records. - # Person.find_each(finish: 9_999) do |person| - # person.party_all_night! - # end - # - # # In worker 2, let's process from record 10_000 and onwards. - # Person.find_each(start: 10_000) do |person| - # person.party_all_night! - # end - # - # NOTE: Order can be ascending (:asc) or descending (:desc). It is automatically set to - # ascending on the primary key ("id ASC"). - # This also means that this method only works when the primary key is - # orderable (e.g. an integer or string). - # - # 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 - 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 - # an array. - # - # Person.where("age > 21").find_in_batches do |group| - # sleep(50) # Make sure it doesn't get too crowded in there! - # group.each { |person| person.party_all_night! } - # end - # - # If you do not provide a block to #find_in_batches, it will return an Enumerator - # for chaining with other methods: - # - # Person.find_in_batches.with_index do |group, batch| - # puts "Processing group ##{batch}" - # group.each(&:recover_from_last_night!) - # end - # - # To be yielded each record one by one, use #find_each instead. - # - # ==== Options - # * :batch_size - Specifies the size of the batch. Defaults to 1000. - # * :start - Specifies the primary key value to start from, inclusive of the value. - # * :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+. - # - # 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. - # - # The options +start+ and +finish+ are especially useful if you want - # multiple workers dealing with the same processing queue. You can make - # worker 1 handle all the records between id 1 and 9999 and worker 2 - # handle from 10000 and beyond by setting the +:start+ and +:finish+ - # option on each worker. - # - # # Let's process from record 10_000 on. - # Person.find_in_batches(start: 10_000) do |group| - # group.each { |person| person.party_all_night! } - # end - # - # NOTE: Order can be ascending (:asc) or descending (:desc). It is automatically set to - # ascending on the primary key ("id ASC"). - # This also means that this method only works when the primary key is - # orderable (e.g. an integer or string). - # - # 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 - 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. - # - # Person.where("age > 21").in_batches do |relation| - # relation.delete_all - # sleep(10) # Throttle the delete queries - # end - # - # If you do not provide a block to #in_batches, it will return a - # BatchEnumerator which is enumerable. - # - # Person.in_batches.each_with_index do |relation, batch_index| - # puts "Processing relation ##{batch_index}" - # relation.delete_all - # end - # - # Examples of calling methods on the returned BatchEnumerator object: - # - # Person.in_batches.delete_all - # Person.in_batches.update_all(awesome: true) - # Person.in_batches.each_record(&:party_all_night!) - # - # ==== Options - # * :of - Specifies the size of the batch. Defaults to 1000. - # * :load - Specifies if the relation should be loaded. Defaults to false. - # * :start - Specifies the primary key value to start from, inclusive of the value. - # * :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+. - # - # 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. - # - # The options +start+ and +finish+ are especially useful if you want - # multiple workers dealing with the same processing queue. You can make - # worker 1 handle all the records between id 1 and 9999 and worker 2 - # handle from 10000 and beyond by setting the +:start+ and +:finish+ - # option on each worker. - # - # # Let's process from record 10_000 on. - # Person.in_batches(start: 10_000).update_all(awesome: true) - # - # An example of calling where query method on the relation: - # - # Person.in_batches.each do |relation| - # relation.update_all('age = age + 1') - # relation.where('age > 21').update_all(should_party: true) - # relation.where('age <= 21').delete_all - # end - # - # NOTE: If you are going to iterate through each record, you should call - # #each_record on the yielded BatchEnumerator: - # - # Person.in_batches.each_record(&:party_all_night!) - # - # NOTE: Order can be ascending (:asc) or descending (:desc). It is automatically set to - # ascending on the primary key ("id ASC"). - # This also means that this method only works when the primary key is - # orderable (e.g. an integer or string). - # - # 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 - - private - - # source://activerecord//lib/active_record/relation/batches.rb#286 - 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#268 - def apply_limits(relation, start, finish, order); 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#282 - def batch_order(order); end -end - -# source://activerecord//lib/active_record/relation/batches/batch_enumerator.rb#5 -class ActiveRecord::Batches::BatchEnumerator - include ::Enumerable - - # @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 - - # The size of the batches yielded by the BatchEnumerator. - # - # source://activerecord//lib/active_record/relation/batches/batch_enumerator.rb#25 - def batch_size; end - - # Deletes records in batches. Returns the total number of rows affected. - # - # Person.in_batches.delete_all - # - # See Relation#delete_all for details of how each batch is deleted. - # - # source://activerecord//lib/active_record/relation/batches/batch_enumerator.rb#63 - def delete_all; end - - # Destroys records in batches. - # - # Person.where("age < 10").in_batches.destroy_all - # - # See Relation#destroy_all for details of how each batch is destroyed. - # - # source://activerecord//lib/active_record/relation/batches/batch_enumerator.rb#83 - def destroy_all; end - - # Yields an ActiveRecord::Relation object for each batch of records. - # - # Person.in_batches.each do |relation| - # relation.update_all(awesome: true) - # end - # - # source://activerecord//lib/active_record/relation/batches/batch_enumerator.rb#92 - def each(&block); end - - # Looping through a collection of records from the database (using the - # +all+ method, for example) is very inefficient since it will try to - # instantiate all the objects at once. - # - # In that case, batch processing methods allow you to work with the - # records in batches, thereby greatly reducing memory consumption. - # - # Person.in_batches.each_record do |person| - # person.do_awesome_stuff - # end - # - # Person.where("age > 21").in_batches(of: 10).each_record do |person| - # person.party_all_night! - # end - # - # If you do not provide a block to #each_record, it will return an Enumerator - # for chaining with other methods: - # - # Person.in_batches.each_record.with_index do |person, index| - # person.award_trophy(index + 1) - # end - # - # source://activerecord//lib/active_record/relation/batches/batch_enumerator.rb#50 - 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 - def finish; end - - # The relation from which the BatchEnumerator yields batches. - # - # source://activerecord//lib/active_record/relation/batches/batch_enumerator.rb#22 - 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 - def start; end - - # Updates records in batches. Returns the total number of rows affected. - # - # Person.in_batches.update_all("age = age + 1") - # - # See Relation#update_all for details of how each batch is updated. - # - # source://activerecord//lib/active_record/relation/batches/batch_enumerator.rb#72 - def update_all(updates); end -end - -# source://activerecord//lib/active_record/relation/batches.rb#7 -ActiveRecord::Batches::ORDER_IGNORE_MESSAGE = T.let(T.unsafe(nil), String) - -# source://activerecord//lib/active_record/relation/calculations.rb#6 -module ActiveRecord::Calculations - # 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#59 - def average(column_name); end - - # This calculates aggregate values in the given column. Methods for #count, #sum, #average, - # #minimum, and #maximum have been added as shortcuts. - # - # Person.calculate(:count, :all) # The same as Person.count - # Person.average(:age) # SELECT AVG(age) FROM people... - # - # # Selects the minimum age for any family without any minors - # Person.group(:last_name).having("min(age) > 17").minimum(:age) - # - # Person.sum("2 * age") - # - # There are two basic forms of output: - # - # * Single aggregate value: The single value is type cast to Integer for COUNT, Float - # for AVG, and the given column's type for everything else. - # - # * Grouped values: This returns an ordered hash of the values and groups them. It - # takes either a column name, or the name of a belongs_to association. - # - # values = Person.group('last_name').maximum(:age) - # puts values["Drake"] - # # => 43 - # - # drake = Family.find_by(last_name: 'Drake') - # values = Person.group(:family).maximum(:age) # Person belongs_to :family - # puts values[drake] - # # => 43 - # - # values.each do |family, max_age| - # ... - # end - # - # source://activerecord//lib/active_record/relation/calculations.rb#138 - def calculate(operation, column_name); end - - # Count the records. - # - # Person.count - # # => the total count of all people - # - # Person.count(:age) - # # => returns the total count of all people whose age is present in database - # - # Person.count(:all) - # # => performs a COUNT(*) (:all is an alias for '*') - # - # Person.distinct.count(:age) - # # => counts the number of different age values - # - # If #count is used with {Relation#group}[rdoc-ref:QueryMethods#group], - # it returns a Hash whose keys represent the aggregated column, - # and the values are the respective amounts: - # - # Person.group(:city).count - # # => { 'Rome' => 5, 'Paris' => 3 } - # - # If #count is used with {Relation#group}[rdoc-ref:QueryMethods#group] for multiple columns, it returns a Hash whose - # keys are an array containing the individual values of each column and the value - # of each key would be the #count. - # - # Article.group(:status, :category).count - # # => {["draft", "business"]=>10, ["draft", "technology"]=>4, - # # ["published", "business"]=>0, ["published", "technology"]=>2} - # - # If #count is used with {Relation#select}[rdoc-ref:QueryMethods#select], it will count the selected columns: - # - # Person.select(:age).count - # # => counts the number of different age values - # - # Note: not all valid {Relation#select}[rdoc-ref:QueryMethods#select] expressions are valid #count expressions. The specifics differ - # between databases. In invalid cases, an error from the database is thrown. - # - # source://activerecord//lib/active_record/relation/calculations.rb#43 - def count(column_name = T.unsafe(nil)); end - - # Pluck all the 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 - # - # source://activerecord//lib/active_record/relation/calculations.rb#242 - def ids; end - - # Calculates the maximum value on a given column. The value is returned - # with the same data type of the column, or +nil+ if there's no row. See - # #calculate for examples with options. - # - # Person.maximum(:age) # => 93 - # - # source://activerecord//lib/active_record/relation/calculations.rb#77 - def maximum(column_name); end - - # Calculates the minimum value on a given column. The value is returned - # with the same data type of the column, or +nil+ if there's no row. See - # #calculate for examples with options. - # - # Person.minimum(:age) # => 7 - # - # source://activerecord//lib/active_record/relation/calculations.rb#68 - def minimum(column_name); end - - # Pick the value(s) from the named column(s) in the current relation. - # This is short-hand for relation.limit(1).pluck(*column_names).first, and is primarily useful - # when you have a relation that's already narrowed down to a single row. - # - # Just like #pluck, #pick will only load the actual value, not the entire record object, so it's also - # more efficient. The value is, again like with pluck, typecast by the column type. - # - # Person.where(id: 1).pick(:name) - # # SELECT people.name FROM people WHERE id = 1 LIMIT 1 - # # => 'David' - # - # Person.where(id: 1).pick(:name, :email_address) - # # 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#230 - def pick(*column_names); end - - # Use #pluck as a shortcut to select one or more attributes without - # loading an entire record object per row. - # - # Person.pluck(:name) - # - # instead of - # - # Person.all.map(&:name) - # - # Pluck returns an Array of attribute values type-casted to match - # the plucked column names, if they can be deduced. Plucking an SQL fragment - # returns String values by default. - # - # Person.pluck(:name) - # # SELECT people.name FROM people - # # => ['David', 'Jeremy', 'Jose'] - # - # Person.pluck(:id, :name) - # # SELECT people.id, people.name FROM people - # # => [[1, 'David'], [2, 'Jeremy'], [3, 'Jose']] - # - # Person.distinct.pluck(:role) - # # SELECT DISTINCT role FROM people - # # => ['admin', 'member', 'guest'] - # - # Person.where(age: 21).limit(5).pluck(:id) - # # SELECT people.id FROM people WHERE people.age = 21 LIMIT 5 - # # => [2, 3] - # - # Person.pluck(Arel.sql('DATEDIFF(updated_at, created_at)')) - # # SELECT DATEDIFF(updated_at, created_at) FROM people - # # => ['0', '27761', '173'] - # - # See also #ids. - # - # source://activerecord//lib/active_record/relation/calculations.rb#192 - def pluck(*column_names); end - - # Calculates the sum of values on a given column. The value is returned - # with the same data type of the column, +0+ if there's no row. See - # #calculate for examples with options. - # - # Person.sum(:age) # => 4562 - # - # source://activerecord//lib/active_record/relation/calculations.rb#86 - def sum(identity_or_column = T.unsafe(nil), &block); end - - private - - # source://activerecord//lib/active_record/relation/calculations.rb#286 - def aggregate_column(column_name); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/relation/calculations.rb#247 - def all_attributes?(column_names); end - - # source://activerecord//lib/active_record/relation/calculations.rb#475 - def build_count_subquery(relation, column_name, distinct); end - - # Converts the given field to the value that the database adapter returns as - # a usable column name: - # - # column_alias_for("users.id") # => "users_id" - # column_alias_for("sum(id)") # => "sum_id" - # 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#408 - def column_alias_for(field); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/relation/calculations.rb#282 - def distinct_select?(column_name); end - - # source://activerecord//lib/active_record/relation/calculations.rb#328 - def execute_grouped_calculation(operation, column_name, distinct); end - - # source://activerecord//lib/active_record/relation/calculations.rb#298 - def execute_simple_calculation(operation, column_name, distinct); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/relation/calculations.rb#251 - def has_include?(column_name); end - - # source://activerecord//lib/active_record/relation/calculations.rb#423 - def lookup_cast_type_from_join_dependencies(name, join_dependencies = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/relation/calculations.rb#294 - def operation_over_aggregate_column(column, operation, distinct); end - - # source://activerecord//lib/active_record/relation/calculations.rb#255 - def perform_calculation(operation, column_name); end - - # source://activerecord//lib/active_record/relation/calculations.rb#466 - def select_for_count; end - - # source://activerecord//lib/active_record/relation/calculations.rb#448 - def type_cast_calculated_value(value, operation, type); end - - # source://activerecord//lib/active_record/relation/calculations.rb#431 - def type_cast_pluck_values(result, columns); end - - # source://activerecord//lib/active_record/relation/calculations.rb#418 - def type_for(field, &block); end -end - -# = Active Record \Callbacks -# -# \Callbacks are hooks into the life cycle of an Active Record object that allow you to trigger logic -# before or after a change in the object state. This can be used to make sure that associated and -# dependent objects are deleted when {ActiveRecord::Base#destroy}[rdoc-ref:Persistence#destroy] is called (by overwriting +before_destroy+) or -# to massage attributes before they're validated (by overwriting +before_validation+). -# As an example of the callbacks initiated, consider the {ActiveRecord::Base#save}[rdoc-ref:Persistence#save] call for a new record: -# -# * (-) save -# * (-) valid -# * (1) before_validation -# * (-) validate -# * (2) after_validation -# * (3) before_save -# * (4) before_create -# * (-) create -# * (5) after_create -# * (6) after_save -# * (7) after_commit -# -# Also, an after_rollback callback can be configured to be triggered whenever a rollback is issued. -# Check out ActiveRecord::Transactions for more details about after_commit and -# after_rollback. -# -# Additionally, an after_touch callback is triggered whenever an -# object is touched. -# -# Lastly an after_find and after_initialize callback is triggered for each object that -# is found and instantiated by a finder, with after_initialize being triggered after new objects -# are instantiated as well. -# -# There are nineteen callbacks in total, which give a lot of control over how to react and prepare for each state in the -# Active Record life cycle. The sequence for calling {ActiveRecord::Base#save}[rdoc-ref:Persistence#save] for an existing record is similar, -# except that each _create callback is replaced by the corresponding _update callback. -# -# Examples: -# class CreditCard < ActiveRecord::Base -# # Strip everything but digits, so the user can specify "555 234 34" or -# # "5552-3434" and both will mean "55523434" -# before_validation(on: :create) do -# self.number = number.gsub(/[^0-9]/, "") if attribute_present?("number") -# end -# end -# -# class Subscription < ActiveRecord::Base -# before_create :record_signup -# -# private -# def record_signup -# self.signed_up_on = Date.today -# end -# end -# -# class Firm < ActiveRecord::Base -# # Disables access to the system, for associated clients and people when the firm is destroyed -# before_destroy { |record| Person.where(firm_id: record.id).update_all(access: 'disabled') } -# before_destroy { |record| Client.where(client_of: record.id).update_all(access: 'disabled') } -# end -# -# == Inheritable callback queues -# -# Besides the overwritable callback methods, it's also possible to register callbacks through the -# use of the callback macros. Their main advantage is that the macros add behavior into a callback -# queue that is kept intact through an inheritance hierarchy. -# -# class Topic < ActiveRecord::Base -# before_destroy :destroy_author -# end -# -# class Reply < Topic -# before_destroy :destroy_readers -# end -# -# When Topic#destroy is run only +destroy_author+ is called. When Reply#destroy is -# run, both +destroy_author+ and +destroy_readers+ are called. -# -# *IMPORTANT:* In order for inheritance to work for the callback queues, you must specify the -# callbacks before specifying the associations. Otherwise, you might trigger the loading of a -# child before the parent has registered the callbacks and they won't be inherited. -# -# == 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 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: -# -# class Topic < ActiveRecord::Base -# before_destroy :delete_parents -# -# private -# def delete_parents -# self.class.delete_by(parent_id: id) -# end -# end -# -# The callback objects have methods named after the callback called with the record as the only parameter, such as: -# -# class BankAccount < ActiveRecord::Base -# before_save EncryptionWrapper.new -# after_save EncryptionWrapper.new -# after_initialize EncryptionWrapper.new -# end -# -# class EncryptionWrapper -# def before_save(record) -# record.credit_card_number = encrypt(record.credit_card_number) -# end -# -# def after_save(record) -# record.credit_card_number = decrypt(record.credit_card_number) -# end -# -# alias_method :after_initialize, :after_save -# -# private -# def encrypt(value) -# # Secrecy is committed -# end -# -# def decrypt(value) -# # Secrecy is unveiled -# end -# end -# -# So you specify the object you want to be messaged on a given callback. When that callback is triggered, the object has -# a method by the name of the callback messaged. You can make these callbacks more flexible by passing in other -# initialization data such as the name of the attribute to work with: -# -# class BankAccount < ActiveRecord::Base -# before_save EncryptionWrapper.new("credit_card_number") -# after_save EncryptionWrapper.new("credit_card_number") -# after_initialize EncryptionWrapper.new("credit_card_number") -# end -# -# class EncryptionWrapper -# def initialize(attribute) -# @attribute = attribute -# end -# -# def before_save(record) -# record.send("#{@attribute}=", encrypt(record.send("#{@attribute}"))) -# end -# -# def after_save(record) -# record.send("#{@attribute}=", decrypt(record.send("#{@attribute}"))) -# end -# -# alias_method :after_initialize, :after_save -# -# private -# def encrypt(value) -# # Secrecy is committed -# end -# -# def decrypt(value) -# # Secrecy is unveiled -# end -# end -# -# == before_validation* returning statements -# -# If the +before_validation+ callback throws +:abort+, the process will be -# aborted and {ActiveRecord::Base#save}[rdoc-ref:Persistence#save] will return +false+. -# If {ActiveRecord::Base#save!}[rdoc-ref:Persistence#save!] is called it will raise an ActiveRecord::RecordInvalid exception. -# Nothing will be appended to the errors object. -# -# == Canceling callbacks -# -# 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 -# methods on the model, which are called last. -# -# == Ordering callbacks -# -# Sometimes application code requires that callbacks execute in a specific order. For example, a +before_destroy+ -# callback (+log_children+ in this case) should be executed before records in the +children+ association are destroyed by the -# dependent: :destroy option. -# -# Let's look at the code below: -# -# class Topic < ActiveRecord::Base -# has_many :children, dependent: :destroy -# -# before_destroy :log_children -# -# private -# def log_children -# # Child processing -# end -# end -# -# In this case, the problem is that when the +before_destroy+ callback is executed, records in the +children+ association no -# longer exist because the {ActiveRecord::Base#destroy}[rdoc-ref:Persistence#destroy] callback was executed first. -# You can use the +prepend+ option on the +before_destroy+ callback to avoid this. -# -# class Topic < ActiveRecord::Base -# has_many :children, dependent: :destroy -# -# before_destroy :log_children, prepend: true -# -# private -# def log_children -# # Child processing -# end -# end -# -# This way, the +before_destroy+ is executed before the dependent: :destroy is called, and the data is still available. -# -# Also, there are cases when you want several callbacks of the same type to -# be executed in order. -# -# For example: -# -# class Topic < ActiveRecord::Base -# has_many :children -# -# after_save :log_children -# after_save :do_something_else -# -# private -# -# def log_children -# # Child processing -# end -# -# def do_something_else -# # Something else -# 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. -# -# For example: -# -# class Topic < ActiveRecord::Base -# has_many :children -# -# 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+. -# -# == \Transactions -# -# The entire callback chain of a {#save}[rdoc-ref:Persistence#save], {#save!}[rdoc-ref:Persistence#save!], -# or {#destroy}[rdoc-ref:Persistence#destroy] call runs within a transaction. That includes after_* hooks. -# If everything goes fine a +COMMIT+ is executed once the chain has been completed. -# -# If a before_* callback cancels the action a +ROLLBACK+ is issued. You -# can also trigger a +ROLLBACK+ raising an exception in any of the callbacks, -# including after_* hooks. Note, however, that in that case the client -# needs to be aware of it because an ordinary {#save}[rdoc-ref:Persistence#save] will raise such exception -# instead of quietly returning +false+. -# -# == Debugging callbacks -# -# The callback chain is accessible via the _*_callbacks method on an object. Active Model \Callbacks support -# :before, :after and :around as values for the kind property. The kind property -# defines what part of the chain the callback runs in. -# -# To find all callbacks in the +before_save+ callback chain: -# -# Topic._save_callbacks.select { |cb| cb.kind.eql?(:before) } -# -# Returns an array of callback objects that form the +before_save+ chain. -# -# To further check if the before_save chain contains a proc defined as rest_when_dead use the filter property of the callback object: -# -# Topic._save_callbacks.select { |cb| cb.kind.eql?(:before) }.collect(&:filter).include?(:rest_when_dead) -# -# 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#294 -module ActiveRecord::Callbacks - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - include ::ActiveSupport::Callbacks - include ::ActiveModel::Validations::Callbacks - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveRecord::Callbacks::ClassMethods - mixes_in_class_methods ::ActiveModel::Validations::Callbacks::ClassMethods - mixes_in_class_methods ::ActiveSupport::Callbacks::ClassMethods - mixes_in_class_methods ::ActiveSupport::DescendantsTracker - - # source://activerecord//lib/active_record/callbacks.rb#435 - def destroy; end - - # source://activerecord//lib/active_record/callbacks.rb#451 - def increment!(attribute, by = T.unsafe(nil), touch: T.unsafe(nil)); end - - # source://activerecord//lib/active_record/callbacks.rb#447 - def touch(*_arg0, **_arg1); end - - private - - # source://activerecord//lib/active_record/callbacks.rb#460 - def _create_record; end - - # source://activerecord//lib/active_record/callbacks.rb#464 - def _update_record; end - - # source://activerecord//lib/active_record/callbacks.rb#456 - def create_or_update(**_arg0); end - - module GeneratedClassMethods - def __callbacks; end - def __callbacks=(value); end - def __callbacks?; end - end - - module GeneratedInstanceMethods - def __callbacks; end - def __callbacks?; end - end -end - -# source://activerecord//lib/active_record/callbacks.rb#297 -ActiveRecord::Callbacks::CALLBACKS = T.let(T.unsafe(nil), Array) - -# source://activerecord//lib/active_record/callbacks.rb#304 -module ActiveRecord::Callbacks::ClassMethods - include ::ActiveModel::Callbacks -end - -# source://activerecord//lib/active_record.rb#114 -module ActiveRecord::Coders; end - -# source://activerecord//lib/active_record/coders/json.rb#5 -class ActiveRecord::Coders::JSON - class << self - # source://activerecord//lib/active_record/coders/json.rb#6 - def dump(obj); end - - # source://activerecord//lib/active_record/coders/json.rb#10 - def load(json); end - end -end - -# source://activerecord//lib/active_record/coders/yaml_column.rb#7 -class ActiveRecord::Coders::YAMLColumn - # @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#34 - def assert_valid_value(obj, action:); end - - # source://activerecord//lib/active_record/coders/yaml_column.rb#16 - def dump(obj); end - - # source://activerecord//lib/active_record/coders/yaml_column.rb#23 - def load(yaml); end - - # Returns the value of attribute object_class. - # - # source://activerecord//lib/active_record/coders/yaml_column.rb#8 - def object_class; 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 - def object_class=(_arg0); end - - private - - # 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#49 - def yaml_load(payload); end -end - -# source://activerecord//lib/active_record/migration.rb#168 -class ActiveRecord::ConcurrentMigrationError < ::ActiveRecord::MigrationError - # @return [ConcurrentMigrationError] a new instance of ConcurrentMigrationError - # - # source://activerecord//lib/active_record/migration.rb#172 - def initialize(message = T.unsafe(nil)); end -end - -# source://activerecord//lib/active_record/migration.rb#169 -ActiveRecord::ConcurrentMigrationError::DEFAULT_MESSAGE = T.let(T.unsafe(nil), String) - -# source://activerecord//lib/active_record/migration.rb#170 -ActiveRecord::ConcurrentMigrationError::RELEASE_LOCK_FAILED_MESSAGE = T.let(T.unsafe(nil), String) - -# Raised when association is being configured improperly or user tries to use -# offset and limit together with -# {ActiveRecord::Base.has_many}[rdoc-ref:Associations::ClassMethods#has_many] or -# {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 -class ActiveRecord::ConfigurationError < ::ActiveRecord::ActiveRecordError; end - -# source://activerecord//lib/active_record/connection_adapters.rb#4 -module ActiveRecord::ConnectionAdapters - extend ::ActiveSupport::Autoload -end - -# 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 -# abstract interface for database-specific functionality such as establishing -# a connection, escaping values, building the right SQL fragments for +:offset+ -# and +:limit+ options, etc. -# -# All the concrete database adapters follow the interface laid down in this class. -# {ActiveRecord::Base.connection}[rdoc-ref:ConnectionHandling#connection] returns an AbstractAdapter object, which -# you can use. -# -# 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 -class ActiveRecord::ConnectionAdapters::AbstractAdapter - include ::ActiveSupport::Callbacks - include ::ActiveRecord::Migration::JoinTable - include ::ActiveRecord::ConnectionAdapters::SchemaStatements - include ::ActiveRecord::ConnectionAdapters::DatabaseStatements - include ::ActiveRecord::ConnectionAdapters::Quoting - include ::ActiveRecord::ConnectionAdapters::DatabaseLimits - include ::ActiveRecord::ConnectionAdapters::QueryCache - include ::ActiveRecord::ConnectionAdapters::Savepoints - extend ::ActiveSupport::Callbacks::ClassMethods - extend ::ActiveSupport::DescendantsTracker - - # @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://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#940 - def _checkin_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#940 - def _checkout_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#928 - def _run_checkin_callbacks(&block); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#928 - def _run_checkout_callbacks(&block); end - - # Checks whether the connection to the database is still active. This includes - # checking whether the database is actually capable of responding, i.e. whether - # the connection isn't stale. - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#523 - 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 - def adapter_name; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#478 - 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 - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#461 - def async_enabled?; end - - # Called by ActiveRecord::InsertAll, - # Passed an instance of ActiveRecord::InsertAll::Builder, - # This method implements standard bulk inserts for all databases, but - # 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#638 - def build_insert_sql(insert); end - - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#609 - def case_insensitive_comparison(attribute, value); end - - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#605 - def case_sensitive_comparison(attribute, value); end - - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#118 - def check_if_write_query(sql); end - - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#653 - def check_version; 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 - - # Check the connection back in to the connection pool - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#625 - def close; end - - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#223 - def connection_class; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#20 - def create(*_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#475 - def create_enum(*_arg0); end - - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#649 - def database_version; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#629 - def default_index_type?(index); end - - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#601 - def default_uniqueness_comparison(attribute, value); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#20 - def delete(*_arg0); 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 - - # Override to turn off referential integrity while executing &block. - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#509 - def disable_referential_integrity; end - - # Immediately forget this connection ever existed. Unlike disconnect!, - # this will not communicate with the server. - # - # After calling this method, the behavior of all other methods becomes - # 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 - 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 - def disconnect!; 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/query_cache.rb#20 - def exec_insert_all(*_arg0); end - - # this method must only be called while holding connection pool's mutex - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#249 - 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 - def extensions; end - - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#664 - 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 - def get_advisory_lock(lock_id); end - - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#646 - def get_database_version; end - - # Returns the value of attribute owner. - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#42 - 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 - def index_algorithms; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#20 - def insert(*_arg0); end - - # this method must only be called while holding connection pool's mutex - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#208 - def lease; end - - # Returns the value of attribute lock. - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#42 - def lock; end - - # Returns the value of attribute logger. - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#42 - def logger; end - - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#153 - def migration_context; end - - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#149 - def migrations_paths; end - - # Returns the value of attribute owner. - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#42 - def owner; end - - # Returns the value of attribute pool. - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#41 - 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 - - # Should primary key values be selected from their corresponding - # sequence before the insert statement? If true, next_sequence_value - # is called before each insert to set the record's primary key. - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#324 - def prefetch_primary_key?(table_name = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#175 - def prepared_statements; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#175 - def prepared_statements?; end - - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#180 - 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+. - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#141 - def preventing_writes?; end - - # Provides access to the underlying database driver for this adapter. For - # example, this method returns a Mysql2::Client object in case of Mysql2Adapter, - # and a PG::Connection object in case of PostgreSQLAdapter. - # - # This is useful for when you need to call a proprietary method such as - # PostgreSQL's lo_* methods. - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#596 - 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. - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#529 - def reconnect!; 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 - def release_advisory_lock(lock_id); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#124 - 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 - 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. - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#563 - def reset!; 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 - 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#20 - def rollback_to_savepoint(*_arg0); end - - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#239 - def schema_cache; 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#157 - def schema_migration; end - - # Returns the version identifier of the schema currently available in - # the database. This is generally equal to the number of the highest- - # 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#660 - def schema_version; end - - # Seconds since this connection was returned to the pool - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#278 - 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 - 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 - def steal!; end - - # Does this adapter support application-enforced advisory locking? - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#317 - def supports_advisory_locks?; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#307 - 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 - 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 - 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 - def supports_comments_in_create?; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#433 - def supports_common_table_expressions?; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#457 - 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 - def supports_datetime_with_precision?; end - - # Does this adapter support DDL rollbacks in transactions? That is, would - # CREATE TABLE or ALTER TABLE get rolled back by a transaction? - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#303 - 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 - def supports_deferrable_constraints?; end - - # Does this adapter support explain? - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#348 - def supports_explain?; end - - # Does this adapter support expression indices? - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#343 - def supports_expression_index?; end - - # Does this adapter support database extensions? - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#358 - 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 - 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 - def supports_foreign_tables?; end - - # Does this adapter support index sort order? - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#333 - def supports_index_sort_order?; end - - # Does this adapter support creating indexes in the same statement as - # creating the table? - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#364 - def supports_indexes_in_create?; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#453 - def supports_insert_conflict_target?; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#445 - def supports_insert_on_duplicate_skip?; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#449 - def supports_insert_on_duplicate_update?; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#441 - def supports_insert_returning?; end - - # Does this adapter support json data type? - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#404 - def supports_json?; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#437 - def supports_lazy_transactions?; end - - # Does this adapter support materialized views? - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#394 - def supports_materialized_views?; end - - # Does this adapter support optimizer hints? - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#429 - def supports_optimizer_hints?; end - - # Does this adapter support partial indices? - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#338 - def supports_partial_index?; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#328 - def supports_partitioned_indexes?; end - - # Does this adapter support savepoints? - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#312 - 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 - def supports_transaction_isolation?; end - - # Does this adapter support creating invalid constraints? - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#374 - def supports_validate_constraints?; end - - # Does this adapter support views? - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#389 - def supports_views?; end - - # Does this adapter support virtual columns? - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#419 - 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 - 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#20 - def truncate_tables(*_arg0); end - - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#283 - def unprepared_statement; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#20 - def update(*_arg0); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#128 - def use_metadata_table?; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#203 - 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 - def verify!; end - - # Returns the value of attribute visitor. - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#42 - def visitor; end - - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#108 - def with_instrumenter(instrumenter, &block); end - - private - - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#817 - def arel_visitor; 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#828 - def build_result(columns:, rows:, column_types: T.unsafe(nil)); end - - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#821 - def build_statement_pool; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#619 - def can_perform_case_insensitive_comparison_for?(column); end - - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#803 - def collector; end - - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#792 - def column_for(table_name, column_name); end - - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#798 - def column_for_attribute(attribute); end - - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#755 - 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#771 - def transform_query(sql); end - - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#778 - def translate_exception(exception, message:, sql:, binds:); end - - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#745 - def translate_exception_class(e, sql, binds); end - - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#741 - def type_map; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#788 - def without_prepared_statement?(binds); end - - class << self - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#932 - def _checkin_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#936 - def _checkin_callbacks=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#932 - def _checkout_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#936 - def _checkout_callbacks=(value); end - - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#68 - 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 - def database_exists?(config); end - - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#74 - def quoted_column_names; 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#57 - def type_cast_config_to_boolean(config); end - - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#47 - def type_cast_config_to_integer(config); end - - private - - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#733 - def extract_limit(sql_type); end - - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#729 - def extract_precision(sql_type); end - - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#722 - def extract_scale(sql_type); end - - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#675 - def initialize_type_map(m); end - - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#708 - def register_class_with_limit(mapping, key, klass); end - - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#715 - def register_class_with_precision(mapping, key, klass); end - end -end - -# source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#29 -ActiveRecord::ConnectionAdapters::AbstractAdapter::ADAPTER_NAME = T.let(T.unsafe(nil), String) - -# source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#39 -ActiveRecord::ConnectionAdapters::AbstractAdapter::COMMENT_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#65 -ActiveRecord::ConnectionAdapters::AbstractAdapter::DEFAULT_READ_QUERY = T.let(T.unsafe(nil), Array) - -# source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#106 -ActiveRecord::ConnectionAdapters::AbstractAdapter::EXCEPTION_IMMEDIATE = T.let(T.unsafe(nil), Hash) - -# source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#105 -ActiveRecord::ConnectionAdapters::AbstractAdapter::EXCEPTION_NEVER = T.let(T.unsafe(nil), Hash) - -# source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#38 -ActiveRecord::ConnectionAdapters::AbstractAdapter::SIMPLE_INT = T.let(T.unsafe(nil), Regexp) - -# source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#738 -ActiveRecord::ConnectionAdapters::AbstractAdapter::TYPE_MAP = T.let(T.unsafe(nil), ActiveRecord::Type::TypeMap) - -# source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#184 -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 - def initialize(version_string, full_version_string = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#194 - def <=>(version_string); end - - # Returns the value of attribute full_version_string. - # - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#187 - def full_version_string; end - - # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#198 - 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 - - # 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 -class ActiveRecord::ConnectionAdapters::AddColumnDefinition < ::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 - - 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#530 -class ActiveRecord::ConnectionAdapters::AlterTable - # @return [AlterTable] a new instance of AlterTable - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#535 - def initialize(td); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#554 - def add_check_constraint(expression, options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#562 - def add_column(name, type, **options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#546 - 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#531 - def adds; end - - # Returns the value of attribute check_constraint_adds. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#533 - def check_constraint_adds; end - - # Returns the value of attribute check_constraint_drops. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#533 - def check_constraint_drops; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#558 - def drop_check_constraint(constraint_name); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#550 - 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#532 - def foreign_key_adds; end - - # Returns the value of attribute foreign_key_drops. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#532 - def foreign_key_drops; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#544 - def name; end -end - -# source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#82 -class ActiveRecord::ConnectionAdapters::ChangeColumnDefinition < ::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 name - # - # @return [Object] the current value of name - def name; end - - # Sets the attribute name - # - # @param value [Object] the value to set the attribute name to. - # @return [Object] the newly set value - def name=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#138 -class ActiveRecord::ConnectionAdapters::CheckConstraintDefinition < ::Struct - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#148 - 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/abstract/schema_definitions.rb#139 - 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 - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#143 - def validate?; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#143 - def validated?; end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# An abstract definition of a column in a table. -# -# source://activerecord//lib/active_record/connection_adapters/column.rb#7 -class ActiveRecord::ConnectionAdapters::Column - include ::ActiveRecord::ConnectionAdapters::Deduplicable - extend ::ActiveRecord::ConnectionAdapters::Deduplicable::ClassMethods - - # Instantiates a new column in the table. - # - # +name+ is the column's name, such as supplier_id in supplier_id bigint. - # +default+ is the type-casted default value, such as +new+ in sales_stage varchar(20) default 'new'. - # +sql_type_metadata+ is various information about the type of the column - # +null+ determines if this column allows +NULL+ values. - # - # @return [Column] a new instance of 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 - def ==(other); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/column.rb#34 - def bigint?; end - - # Returns the value of attribute collation. - # - # source://activerecord//lib/active_record/connection_adapters/column.rb#10 - def collation; end - - # Returns the value of attribute comment. - # - # source://activerecord//lib/active_record/connection_adapters/column.rb#10 - def comment; end - - # Returns the value of attribute default. - # - # source://activerecord//lib/active_record/connection_adapters/column.rb#10 - def default; end - - # Returns the value of attribute default_function. - # - # source://activerecord//lib/active_record/connection_adapters/column.rb#10 - def default_function; end - - # 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 - def eql?(other); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/column.rb#30 - def has_default?; end - - # source://activerecord//lib/active_record/connection_adapters/column.rb#78 - def hash; end - - # Returns the human name of the column name. - # - # ===== Examples - # Column.new('sales_stage', ...).human_name # => 'Sales stage' - # - # source://activerecord//lib/active_record/connection_adapters/column.rb#42 - def human_name; end - - # source://activerecord//lib/active_record/connection_adapters/column.rb#46 - def init_with(coder); end - - # source://activerecord//lib/active_record/connection_adapters/column.rb#12 - def limit(*_arg0, **_arg1, &_arg2); end - - # Returns the value of attribute name. - # - # source://activerecord//lib/active_record/connection_adapters/column.rb#10 - def name; end - - # Returns the value of attribute null. - # - # source://activerecord//lib/active_record/connection_adapters/column.rb#10 - def null; end - - # source://activerecord//lib/active_record/connection_adapters/column.rb#12 - def precision(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/connection_adapters/column.rb#12 - def scale(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/connection_adapters/column.rb#12 - def sql_type(*_arg0, **_arg1, &_arg2); end - - # Returns the value of attribute sql_type_metadata. - # - # source://activerecord//lib/active_record/connection_adapters/column.rb#10 - def sql_type_metadata; end - - # source://activerecord//lib/active_record/connection_adapters/column.rb#12 - def type(*_arg0, **_arg1, &_arg2); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/column.rb#90 - def virtual?; end - - private - - # source://activerecord//lib/active_record/connection_adapters/column.rb#95 - def deduplicated; end -end - -# Abstract representation of a column definition. Instances of this type -# are typically created by methods in TableDefinition, and added to the -# +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 -class ActiveRecord::ConnectionAdapters::ColumnDefinition < ::Struct - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#75 - def aliased_types(name, fallback); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#65 - def collation; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#69 - def collation=(value); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#65 - def comment; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#69 - def comment=(value); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#65 - def default; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#69 - def default=(value); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#65 - def limit; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#69 - def limit=(value); end - - # Returns the value of attribute name - # - # @return [Object] the current value of name - def name; end - - # Sets the attribute name - # - # @param value [Object] the value to set the attribute name to. - # @return [Object] the newly set value - def name=(_); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#65 - def null; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#69 - def null=(value); 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 - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#65 - def precision; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#69 - def precision=(value); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#59 - def primary_key?; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#65 - def scale; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#69 - def scale=(value); end - - # Returns the value of attribute sql_type - # - # @return [Object] the current value of sql_type - def sql_type; end - - # Sets the attribute sql_type - # - # @param value [Object] the value to set the attribute sql_type to. - # @return [Object] the newly set value - def sql_type=(_); end - - # Returns the value of attribute type - # - # @return [Object] the current value of type - def type; end - - # Sets the attribute type - # - # @param value [Object] the value to set the attribute type to. - # @return [Object] the newly set value - def type=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#240 -module ActiveRecord::ConnectionAdapters::ColumnMethods - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActiveRecord::ConnectionAdapters::ColumnMethods::ClassMethods - - # 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 - def primary_key(name, type = T.unsafe(nil), **options); end -end - -# source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#0 -module ActiveRecord::ConnectionAdapters::ColumnMethods::ClassMethods - private - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#269 - def define_column_methods(*column_types); end -end - -# ConnectionHandler is a collection of ConnectionPool objects. It is used -# for keeping separate connection pools that connect to different databases. -# -# For example, suppose that you have 5 models, with the following hierarchy: -# -# class Author < ActiveRecord::Base -# end -# -# class BankAccount < ActiveRecord::Base -# end -# -# class Book < ActiveRecord::Base -# establish_connection :library_db -# end -# -# class ScaryBook < Book -# end -# -# class GoodBook < Book -# end -# -# And a database.yml that looked like this: -# -# development: -# database: my_application -# host: localhost -# -# library_db: -# database: library -# host: some.library.org -# -# Your primary database in the development environment is "my_application" -# but the Book model connects to a separate database called "library_db" -# (this can even be a database on a different machine). -# -# Book, ScaryBook, and GoodBook will all use the same connection pool to -# "library_db" while Author, BankAccount, and any other models you create -# will use the default connection pool to "my_application". -# -# The various connection pools are managed by a single instance of -# ConnectionHandler accessible via ActiveRecord::Base.connection_handler. -# All Active Record models use this handler to determine the connection pool that they -# should use. -# -# The ConnectionHandler class is not coupled with the Active models, as it has no knowledge -# 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 -class ActiveRecord::ConnectionAdapters::ConnectionHandler - # @return [ConnectionHandler] a new instance of ConnectionHandler - # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#75 - def initialize; end - - # Returns true if there are any active connections among the connection - # pools that the ConnectionHandler is managing. - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#161 - def active_connections?(role = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#117 - 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 - def clear_active_connections!(role = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#179 - 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 - def clear_reloadable_connections!(role = T.unsafe(nil)); end - - # Returns true if a connection that's accessible to this class has - # already been opened. - # - # @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#121 - def connection_pool_list(role = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#113 - def connection_pool_names; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#121 - 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 - - # Disconnects all currently idle connections. - # - # See ConnectionPool#flush! for details. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#186 - def flush_idle_connections!(role = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#83 - def prevent_writes; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#87 - 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 - - # 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 - - # Retrieving the connection pool happens a lot, so we cache it in @owner_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 - - private - - # Returns the pool manager for an owner. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#244 - def get_pool_manager(owner); end - - # Returns the value of attribute owner_to_pool_manager. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#241 - def owner_to_pool_manager; end - - # Returns an instance of PoolConfig for a given adapter. - # Accepts a hash one layer deep that contains all connection information. - # - # == Example - # - # config = { "production" => { "host" => "localhost", "database" => "foo", "adapter" => "sqlite3" } } - # pool_config = Base.configurations.resolve_pool_config(:production) - # pool_config.db_config.configuration_hash - # # => { host: "localhost", database: "foo", adapter: "sqlite3" } - # - # @raise [AdapterNotSpecified] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#258 - def resolve_pool_config(config, owner_name, role, shard); end -end - -# source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#56 -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#62 - def initialize(name); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#70 - def current_preventing_writes; end - - # Returns the value of attribute name. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#60 - def name; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#66 - def primary_class?; end -end - -# Connection pool base class for managing Active Record database -# connections. -# -# == Introduction -# -# A connection pool synchronizes thread access to a limited number of -# database connections. The basic idea is that each thread checks out a -# database connection from the pool, uses that connection, and checks the -# connection back in. ConnectionPool is completely thread-safe, and will -# ensure that a connection cannot be used by two threads at the same time, -# as long as ConnectionPool's contract is correctly followed. It will also -# 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. -# -# == Obtaining (checking out) a connection -# -# Connections can be obtained and used from a connection pool in several -# ways: -# -# 1. Simply use {ActiveRecord::Base.connection}[rdoc-ref:ConnectionHandling.connection] -# as with Active Record 2.1 and -# earlier (pre-connection-pooling). Eventually, when you're done with -# the connection(s) and wish it to be returned to the pool, you call -# {ActiveRecord::Base.clear_active_connections!}[rdoc-ref:ConnectionAdapters::ConnectionHandler#clear_active_connections!]. -# This will be the default behavior for Active Record when used in conjunction with -# Action Pack's request handling cycle. -# 2. Manually check out a connection from the pool with -# {ActiveRecord::Base.connection_pool.checkout}[rdoc-ref:#checkout]. You are responsible for -# returning this connection to the pool when finished by calling -# {ActiveRecord::Base.connection_pool.checkin(connection)}[rdoc-ref:#checkin]. -# 3. Use {ActiveRecord::Base.connection_pool.with_connection(&block)}[rdoc-ref:#with_connection], which -# obtains a connection, yields it as the sole argument to the block, -# and returns it to the pool after the block completes. -# -# Connections in the pool are actually AbstractAdapter objects (or objects -# compatible with AbstractAdapter's interface). -# -# == Options -# -# There are several connection-pooling-related options that you can add to -# your database connection configuration: -# -# * +pool+: maximum number of connections the pool may manage (default 5). -# * +idle_timeout+: number of seconds that a connection will be kept -# unused in the pool before it is automatically disconnected (default -# 300 seconds). Set this to zero to keep connections forever. -# * +checkout_timeout+: number of seconds to wait for a connection to -# become available before giving up and raising a timeout error (default -# 5 seconds). -# -# -- -# Synchronization policy: -# * all public methods can be called outside +synchronize+ -# * access to these instance variables needs to be in +synchronize+: -# * @connections -# * @now_connecting -# * private methods that require being called in a +synchronize+ blocks -# are now explicitly documented -# -# source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#8 -class ActiveRecord::ConnectionAdapters::ConnectionPool - include ::MonitorMixin - include ::ActiveRecord::ConnectionAdapters::QueryCache::ConnectionPoolConfiguration - include ::ActiveRecord::ConnectionAdapters::AbstractPool - - # Creates a new ConnectionPool object. +pool_config+ is a PoolConfig - # object which describes database connection information (e.g. adapter, - # host name, username, password, etc), as well as the maximum size for - # this ConnectionPool. - # - # The default ConnectionPool maximum size is 5. - # - # @return [ConnectionPool] a new instance of ConnectionPool - # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#120 - def initialize(pool_config); end - - # Returns true if there is an open connection being used for the current thread. - # - # This method only works for connections that have been obtained through - # #connection or #with_connection methods. Connections obtained through - # #checkout will not be detected by #active_connection? - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#189 - def active_connection?; end - - # Returns the value of attribute async_executor. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#108 - def async_executor; end - - # Returns the value of attribute automatic_reconnect. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#107 - 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 - def automatic_reconnect=(_arg0); end - - # Check-in a database connection back into the pool, indicating that you - # no longer need this connection. - # - # +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 - def checkin(conn); end - - # Check-out a database connection from the pool, indicating that you want - # to use it. You should call #checkin when you no longer need this. - # - # This is done by either returning and leasing existing connection, or by - # creating a new connection and leasing it. - # - # If all connections are leased and the pool is at capacity (meaning the - # number of currently leased connections is greater than or equal to the - # size limit set), an ActiveRecord::ConnectionTimeoutError exception will be raised. - # - # Returns: an AbstractAdapter object. - # - # Raises: - # - ActiveRecord::ConnectionTimeoutError no connection can be obtained from the pool. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#340 - 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 - 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 - def checkout_timeout=(_arg0); end - - # Clears the cache which maps classes and re-connects connections that - # require reloading. - # - # Raises: - # - ActiveRecord::ExclusiveConnectionTimeoutError if unable to gain ownership of all - # 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 - def clear_reloadable_connections(raise_on_acquisition_timeout = T.unsafe(nil)); end - - # Clears the cache which maps classes and re-connects connections that - # require reloading. - # - # The pool first tries to gain ownership of all connections. If unable to - # do so within a timeout interval (default duration is - # spec.db_config.checkout_timeout * 2 seconds), then the pool forcefully - # 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 - 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 - def connected?; end - - # Retrieve the connection associated with the current thread, or call - # #checkout to obtain one if necessary. - # - # #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 - def connection; end - - # Returns the value of attribute connection_class. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#108 - def connection_class; end - - # Returns the value of attribute connection_class. - # - # source://activesupport/7.0.4.2/lib/active_support/deprecation/method_wrappers.rb#63 - def connection_klass(*args, **_arg1, &block); end - - # Returns an array containing the connections currently in the pool. - # Access to the array does not require synchronization on the pool because - # the array is newly created and not retained by the pool. - # - # However; this method bypasses the ConnectionPool's thread-safe connection - # access pattern. A returned connection may be owned by another thread, - # unowned, or by happen-stance owned by the calling thread. - # - # Calling methods on a connection without ownership is subject to the - # 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 - def connections; end - - # Returns the value of attribute db_config. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#108 - def db_config; end - - # Discards all connections in the pool (even if they're currently - # leased!), along with the pool itself. Any further interaction with the - # pool (except #spec and #schema_cache) is undefined. - # - # See AbstractAdapter#discard! - # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#277 - def discard!; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#287 - def discarded?; end - - # Disconnects all connections in the pool, and clears the pool. - # - # Raises: - # - ActiveRecord::ExclusiveConnectionTimeoutError if unable to gain ownership of all - # 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 - def disconnect(raise_on_acquisition_timeout = T.unsafe(nil)); end - - # Disconnects all connections in the pool, and clears the pool. - # - # The pool first tries to gain ownership of all connections. If unable to - # do so within a timeout interval (default duration is - # 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 - 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 - 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 - def flush!; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#167 - def lock_thread=(lock_thread); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#447 - 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 - 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 - def reap; end - - # Returns the value of attribute reaper. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#108 - def reaper; end - - # Signal that the thread is finished with the current connection. - # #release_connection releases the connection-thread association - # and returns the connection to the pool. - # - # This method only works for connections that have been obtained through - # #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 - 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 - def remove(conn); end - - # Returns the value of attribute role. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#108 - def role; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#469 - 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#112 - def schema_cache=(arg); end - - # Returns the value of attribute shard. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#108 - def shard; end - - # Returns the value of attribute size. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#108 - def size; end - - # Return connection pool's usage statistic - # Example: - # - # 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 - 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 - def with_connection; end - - private - - # Acquire a connection by one of 1) immediately removing one - # from the queue of available connections, 2) creating a new - # connection if the pool is not at capacity, 3) waiting on the - # queue for a connection to become available. - # - # Raises: - # - ActiveRecord::ConnectionTimeoutError if a connection could not be acquired - # - # -- - # 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 - def acquire_connection(checkout_timeout); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#693 - def adopt_connection(conn); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#527 - 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 - def build_async_executor; end - - # -- - # this is unfortunately not concurrent - # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#493 - def bulk_make_new_connections(num_new_conns_needed); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#703 - 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 - def checkout_for_exclusive_access(checkout_timeout); end - - # @raise [ConnectionNotEstablished] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#698 - def checkout_new_connection; end - - # -- - # From the discussion on GitHub: - # https://github.com/rails/rails/pull/14938#commitcomment-6601951 - # 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 - def connection_cache_key(thread); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#512 - def current_thread; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#655 - 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 - 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 - 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 - # to the DB is done outside main synchronized section. - # -- - # 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 - def try_to_checkout_new_connection; end - - # Take control of all existing connections so a "group" action such as - # reload/disconnect can be performed safely. It is no longer enough to - # 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 - 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 - 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 -module ActiveRecord::ConnectionAdapters::ConnectionPool::BiasableQueue - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#176 - def with_a_bias_for(thread); end -end - -# source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#137 -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 - def initialize(lock, other_cond, preferred_thread); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#147 - def broadcast; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#152 - def broadcast_on_biased; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#157 - def signal; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#166 - def wait(timeout); end -end - -# Connections must be leased while holding the main pool mutex. This is -# an internal subclass that also +.leases+ returned connections while -# still in queue's critical section (queue synchronizes with the same -# @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 -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 - def internal_poll(timeout); end -end - -# 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 -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 - 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 - 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 - def any_waiting?; end - - # Remove all elements from the queue. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#50 - 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 - 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 - def num_waiting; end - - # Remove the head of the queue. - # - # If +timeout+ is not given, remove and return the head of the - # queue if the number of available elements is strictly - # greater than the number of threads currently waiting (that - # is, don't jump ahead in line). Otherwise, return +nil+. - # - # If +timeout+ is given, block if there is no element - # available, waiting up to +timeout+ seconds for an element to - # become available. - # - # Raises: - # - 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 - def poll(timeout = T.unsafe(nil)); end - - private - - # Test if the queue currently contains any elements. - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#84 - def any?; end - - # A thread can remove an element from the queue without - # waiting if and only if the number of currently available - # connections is strictly greater than the number of waiting - # threads. - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#92 - def can_remove_no_wait?; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#75 - 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 - 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 - def remove; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#79 - 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 - def wait_poll(timeout); end -end - -# 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). -# -# source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb#15 -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 - def initialize(pool, frequency); end - - # Returns the value of attribute frequency. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb#16 - def frequency; end - - # Returns the value of attribute pool. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb#16 - def pool; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb#69 - def run; end - - class << self - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb#28 - def register_pool(pool, frequency); end - - private - - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb#39 - def spawn_thread(frequency); end - end -end - -# source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#84 -class ActiveRecord::ConnectionAdapters::CreateIndexDefinition < ::Struct - # Returns the value of attribute algorithm - # - # @return [Object] the current value of algorithm - def algorithm; end - - # Sets the attribute algorithm - # - # @param value [Object] the value to set the attribute algorithm to. - # @return [Object] the newly set value - def algorithm=(_); end - - # Returns the value of attribute if_not_exists - # - # @return [Object] the current value of if_not_exists - def if_not_exists; end - - # Sets the attribute if_not_exists - # - # @param value [Object] the value to set the attribute if_not_exists to. - # @return [Object] the newly set value - def if_not_exists=(_); end - - # Returns the value of attribute index - # - # @return [Object] the current value of index - def index; end - - # Sets the attribute index - # - # @param value [Object] the value to set the attribute index to. - # @return [Object] the newly set value - def 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/abstract/database_limits.rb#5 -module ActiveRecord::ConnectionAdapters::DatabaseLimits - # Returns the maximum length of an index name. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_limits.rb#16 - def index_name_length; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/database_limits.rb#6 - def max_identifier_length; end - - # Returns the maximum length of a table alias. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_limits.rb#11 - def table_alias_length; end - - private - - # source://activerecord//lib/active_record/connection_adapters/abstract/database_limits.rb#21 - def bind_params_length; end -end - -# source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#5 -module ActiveRecord::ConnectionAdapters::DatabaseStatements - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#6 - def initialize; end - - # 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 - 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 - def begin_db_transaction; end - - # Begins the transaction with the isolation level set. Raises an error by - # default; adapters that support setting the isolation level should implement - # this method. - # - # @raise [ActiveRecord::TransactionIsolationError] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#364 - def begin_isolated_db_transaction(isolation); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#324 - 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 - 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 - def commit_db_transaction; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#324 - def commit_transaction(*_arg0, **_arg1, &_arg2); end - - # Executes an INSERT query and returns the new record's ID - # - # +id_value+ will be returned unless the value is +nil+, in - # which case the database will attempt to calculate the last inserted - # id and return that value. - # - # If the next id was calculated in advance (as in Oracle), it should be - # passed in as +id_value+. - # - # 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#324 - def current_transaction(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#383 - 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 - def delete(arel, name = T.unsafe(nil), binds = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#324 - def disable_lazy_transactions!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#415 - def empty_insert_statement_value(primary_key = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#324 - 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 - 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. - # - # 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#149 - 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] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#123 - 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 - 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 - 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. - # Note: depending on your database connector, the result returned by this - # method may be manually memory managed. Consider using the 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 - - # @raise [NotImplementedError] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#153 - def explain(arel, binds = T.unsafe(nil)); end - - # Returns an Arel SQL literal for the CURRENT_TIMESTAMP for usage with - # arbitrary precision date/time columns. - # - # 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 - def high_precision_current_timestamp; end - - # Executes an INSERT query and returns the new record's ID - # - # +id_value+ will be returned unless the value is +nil+, in - # which case the database will attempt to calculate the last inserted - # id and return that value. - # - # If the next id was calculated in advance (as in Oracle), it should be - # passed in as +id_value+. - # - # 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 - - # 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. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#397 - def insert_fixture(fixture, table_name); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#401 - 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 - def mark_transaction_written_if_write(sql); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#324 - def materialize_transactions(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#324 - def open_transactions(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#102 - def query(sql, name = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#94 - def query_value(sql, name = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#98 - 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 - 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 - - # 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 - def rollback_db_transaction; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#379 - def rollback_to_savepoint(name = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#324 - def rollback_transaction(*_arg0, **_arg1, &_arg2); end - - # Sanitizes the given LIMIT parameter in order to prevent SQL injection. - # - # The +limit+ may be anything that can evaluate to a string via #to_s. It - # should look like an integer, or an Arel SQL literal. - # - # Returns Integer and Arel::Nodes::SqlLiteral limits as is. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#425 - def sanitize_limit(limit); end - - # Returns an ActiveRecord::Result instance. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#62 - 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 - - # 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 - - # 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 - - # 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 - def select_values(arel, name = T.unsafe(nil), binds = T.unsafe(nil)); end - - # Converts an arel AST to SQL - # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#12 - def to_sql(arel_or_sql_string, binds = T.unsafe(nil)); end - - # Runs the given block in a database transaction, and returns the result - # of the block. - # - # == Nested transactions support - # - # #transaction calls can be nested. By default, this makes all database - # statements in the nested transaction block become part of the parent - # transaction. For example, the following behavior may be surprising: - # - # ActiveRecord::Base.transaction do - # Post.create(title: 'first') - # ActiveRecord::Base.transaction do - # Post.create(title: 'second') - # raise ActiveRecord::Rollback - # end - # end - # - # This creates both "first" and "second" posts. Reason is the - # ActiveRecord::Rollback exception in the nested block does not issue a - # ROLLBACK. Since these exceptions are captured in transaction blocks, - # the parent block does not see it and the real transaction is committed. - # - # Most databases don't support true nested transactions. At the time of - # writing, the only database that supports true nested transactions that - # we're aware of, is MS-SQL. - # - # In order to get around this problem, #transaction will emulate the effect - # of nested transactions, by using savepoints: - # https://dev.mysql.com/doc/refman/en/savepoint.html. - # - # It is safe to call this method if a database transaction is already open, - # i.e. if #transaction is called within another #transaction block. In case - # of a nested call, #transaction will behave as follows: - # - # - The block will be run without doing anything. All database statements - # that happen within the block are effectively appended to the already - # open database transaction. - # - However, if +:requires_new+ is set, the block will be wrapped in a - # database savepoint acting as a sub-transaction. - # - # In order to get a ROLLBACK for the nested transaction you may ask for a - # real sub-transaction by passing requires_new: true. - # If anything goes wrong, the database rolls back to the beginning of - # the sub-transaction without rolling back the parent transaction. - # If we add it to the previous example: - # - # ActiveRecord::Base.transaction do - # Post.create(title: 'first') - # ActiveRecord::Base.transaction(requires_new: true) do - # Post.create(title: 'second') - # raise ActiveRecord::Rollback - # end - # end - # - # only post with title "first" is created. - # - # See ActiveRecord::Transactions to learn more. - # - # === Caveats - # - # MySQL doesn't support DDL transactions. If you perform a DDL operation, - # then any created savepoints will be automatically released. For example, - # if you've created a savepoint, then you execute a CREATE TABLE statement, - # then the savepoint that was created will be automatically released. - # - # This means that, on MySQL, you shouldn't execute DDL operations inside - # a #transaction call that you know might create a savepoint. Otherwise, - # #transaction will raise exceptions when it tries to release the - # already-automatically-released savepoints: - # - # Model.connection.transaction do # BEGIN - # Model.connection.transaction(requires_new: true) do # CREATE SAVEPOINT active_record_1 - # Model.connection.create_table(...) - # # active_record_1 now automatically released - # end # RELEASE SAVEPOINT active_record_1 <--- BOOM! database error! - # end - # - # == Transaction isolation - # - # If your database supports setting the isolation level for a transaction, you can set - # it like so: - # - # Post.transaction(isolation: :serializable) do - # # ... - # end - # - # Valid isolation levels are: - # - # * :read_uncommitted - # * :read_committed - # * :repeatable_read - # * :serializable - # - # You should consult the documentation for your database to understand the - # semantics of these different levels: - # - # * https://www.postgresql.org/docs/current/static/transaction-iso.html - # * https://dev.mysql.com/doc/refman/en/set-transaction.html - # - # An ActiveRecord::TransactionIsolationError will be raised if: - # - # * The adapter does not support setting the isolation level - # * 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. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#309 - 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 - def transaction_isolation_levels; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#322 - def transaction_manager; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#335 - def transaction_open?; end - - # Executes the truncate statement. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#185 - def truncate(table_name, name = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#189 - 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 - 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 - def with_yaml_fallback(value); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#324 - def within_new_transaction(*_arg0, **_arg1, &_arg2); end - - # Determines whether the SQL statement is a write query. - # - # @raise [NotImplementedError] - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#107 - def write_query?(sql); end - - private - - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#576 - def arel_from_relation(relation); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#471 - def build_fixture_sql(fixtures, table_name); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#513 - def build_fixture_statements(fixture_set); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#520 - def build_truncate_statement(table_name); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#524 - def build_truncate_statements(table_names); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#534 - def combine_multi_statements(total_sql); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#467 - def default_insert_value(column); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#458 - def execute_batch(statements, name = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#567 - def last_inserted_id(result); end - - # Returns an ActiveRecord::Result instance. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#539 - 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 - 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#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 - def with_multi_statements; end -end - -# source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#464 -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 -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 -module ActiveRecord::ConnectionAdapters::Deduplicable - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActiveRecord::ConnectionAdapters::Deduplicable::ClassMethods - - # source://activerecord//lib/active_record/connection_adapters/deduplicable.rb#18 - def -@; end - - # source://activerecord//lib/active_record/connection_adapters/deduplicable.rb#18 - def deduplicate; end - - private - - # source://activerecord//lib/active_record/connection_adapters/deduplicable.rb#24 - def deduplicated; end -end - -# source://activerecord//lib/active_record/connection_adapters/deduplicable.rb#8 -module ActiveRecord::ConnectionAdapters::Deduplicable::ClassMethods - # source://activerecord//lib/active_record/connection_adapters/deduplicable.rb#13 - def new(*_arg0, **_arg1); end - - # source://activerecord//lib/active_record/connection_adapters/deduplicable.rb#9 - def registry; end -end - -# source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#88 -class ActiveRecord::ConnectionAdapters::ForeignKeyDefinition < ::Struct - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#93 - def column; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#113 - def custom_primary_key?; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#109 - def deferrable; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#126 - 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 - def export_name_on_schema_dump?; end - - # Returns the value of attribute from_table - # - # @return [Object] the current value of from_table - def from_table; end - - # Sets the attribute from_table - # - # @param value [Object] the value to set the attribute from_table to. - # @return [Object] the newly set value - def from_table=(_); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#89 - def name; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#101 - def on_delete; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#105 - def on_update; 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 - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#97 - def primary_key; end - - # Returns the value of attribute to_table - # - # @return [Object] the current value of to_table - def to_table; end - - # Sets the attribute to_table - # - # @param value [Object] the value to set the attribute to_table to. - # @return [Object] the newly set value - def to_table=(_); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#117 - def validate?; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#117 - def validated?; end - - private - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#133 - def default_primary_key; end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# Abstract representation of an index definition on a table. Instances of -# 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 -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#36 - def column_options; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#9 - def columns; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#9 - def comment; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#9 - def lengths; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#9 - def name; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#9 - def opclasses; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#9 - def orders; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#9 - def table; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#9 - def type; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#9 - def unique; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#9 - 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/legacy_pool_manager.rb#5 -class ActiveRecord::ConnectionAdapters::LegacyPoolManager - # @return [LegacyPoolManager] a new instance of LegacyPoolManager - # - # 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/legacy_pool_manager.rb#18 - def remove_pool_config(_, shard); end - - # source://activerecord//lib/active_record/connection_adapters/legacy_pool_manager.rb#26 - def set_pool_config(role, shard, pool_config); end - - # source://activerecord//lib/active_record/connection_adapters/legacy_pool_manager.rb#10 - def shard_names; end -end - -# source://activerecord//lib/active_record/connection_adapters/column.rb#106 -class ActiveRecord::ConnectionAdapters::NullColumn < ::ActiveRecord::ConnectionAdapters::Column - # @return [NullColumn] a new instance of NullColumn - # - # source://activerecord//lib/active_record/connection_adapters/column.rb#107 - def initialize(name, **_arg1); end -end - -# source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#31 -class ActiveRecord::ConnectionAdapters::NullPool - include ::ActiveRecord::ConnectionAdapters::AbstractPool - - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#39 - def async_executor; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#37 - def checkin(_); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#36 - def connection_class; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#38 - 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 - - # 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 -end - -# source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#76 -class ActiveRecord::ConnectionAdapters::NullTransaction - # @return [NullTransaction] a new instance of NullTransaction - # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#77 - def initialize; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#82 - def add_record(record, _ = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#79 - def closed?; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#81 - def joinable?; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#80 - def open?; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#78 - def state; end -end - -# source://activerecord//lib/active_record/connection_adapters/pool_config.rb#5 -class ActiveRecord::ConnectionAdapters::PoolConfig - include ::Mutex_m - - # @return [PoolConfig] a new instance of PoolConfig - # - # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#20 - 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 - def connection_class; end - - # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#30 - def connection_specification_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 - def discard_pool!; end - - # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#38 - def disconnect!; end - - # source://mutex_m/0.1.1/mutex_m.rb#93 - def lock; end - - # source://mutex_m/0.1.1/mutex_m.rb#83 - def locked?; end - - # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#53 - def pool; end - - # Returns the value of attribute role. - # - # 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 - - # Sets the attribute schema_cache - # - # @param value the value to set the attribute schema_cache to. - # - # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#9 - def schema_cache=(_arg0); end - - # Returns the value of attribute shard. - # - # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#8 - def shard; end - - # source://mutex_m/0.1.1/mutex_m.rb#78 - def synchronize(&block); end - - # source://mutex_m/0.1.1/mutex_m.rb#88 - def try_lock; end - - # source://mutex_m/0.1.1/mutex_m.rb#98 - def unlock; end - - class << self - # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#15 - def discard_pools!; end - end -end - -# source://activerecord//lib/active_record/connection_adapters/pool_config.rb#11 -ActiveRecord::ConnectionAdapters::PoolConfig::INSTANCES = T.let(T.unsafe(nil), ObjectSpace::WeakMap) - -# source://activerecord//lib/active_record/connection_adapters/pool_manager.rb#5 -class ActiveRecord::ConnectionAdapters::PoolManager - # @return [PoolManager] a new instance of 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 - 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 - def remove_pool_config(role, shard); end - - # source://activerecord//lib/active_record/connection_adapters/pool_manager.rb#26 - 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 - def set_pool_config(role, shard, pool_config); end - - # source://activerecord//lib/active_record/connection_adapters/pool_manager.rb#10 - def shard_names; end -end - -# source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#86 -class ActiveRecord::ConnectionAdapters::PrimaryKeyDefinition < ::Struct - # Returns the value of attribute name - # - # @return [Object] the current value of name - def name; end - - # Sets the attribute name - # - # @param value [Object] the value to set the attribute name to. - # @return [Object] the newly set value - def name=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://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 - def initialize(*_arg0); end - - # Enable the query cache within the block. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#59 - def cache; end - - # Clears the query cache. - # - # One reason you may wish to call this method explicitly is between queries - # that ask the database to randomize results. Otherwise the cache would see - # 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 - def clear_query_cache; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#71 - def disable_query_cache!; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#67 - def enable_query_cache!; end - - # Returns the value of attribute query_cache. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#50 - def query_cache; end - - # Returns the value of attribute query_cache_enabled. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#50 - def query_cache_enabled; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#96 - 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 - def uncached; end - - private - - # Database adapters can override this method to - # provide custom cache information. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#145 - def cache_notification_info(sql, name, binds); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#127 - def cache_sql(sql, name, binds); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#156 - def configure_query_cache!; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#115 - def lookup_sql_cache(sql, name, binds); end - - class << self - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#17 - def dirties_query_cache(base, *method_names); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#9 - def included(base); end - end -end - -# source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#29 -module ActiveRecord::ConnectionAdapters::QueryCache::ConnectionPoolConfiguration - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#30 - def initialize(*_arg0); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#40 - def disable_query_cache!; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#35 - def enable_query_cache!; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#45 - def query_cache_enabled; end -end - -# source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#8 -module ActiveRecord::ConnectionAdapters::Quoting - # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#161 - def column_name_matcher; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#165 - def column_name_with_order_matcher; end - - # If you are having to call this function, you are likely doing something - # wrong. The column does not have sufficient type information if the user - # provided a custom type on the class level either explicitly (via - # Attributes::ClassMethods#attribute) or implicitly (via - # AttributeMethods::Serialization::ClassMethods#serialize, +time_zone_aware_attributes+). - # In almost all cases, the sql type should only be used to change quoting behavior, when the primitive to - # represent the type doesn't sufficiently reflect the differences - # (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 - 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 - 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 - 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 - def quote_column_name(column_name); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#95 - 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 - 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 - 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 - # 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 - def quote_table_name_for_assignment(table, attr); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#144 - 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 - def quoted_date(value); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#112 - def quoted_false; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#139 - def quoted_time(value); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#104 - def quoted_true; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#148 - 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 - def type_cast(value); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#116 - def unquoted_false; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#108 - def unquoted_true; end - - private - - # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#225 - def lookup_cast_type(sql_type); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#215 - def type_casted_binds(binds); end -end - -# Regexp for column names (with or without a table name prefix). -# Matches the following: -# -# "#{table_name}.#{column_name}" -# "#{column_name}" -# -# source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#174 -ActiveRecord::ConnectionAdapters::Quoting::COLUMN_NAME = T.let(T.unsafe(nil), Regexp) - -# Regexp for column names with order (with or without a table name prefix, -# with or without various order modifiers). Matches the following: -# -# "#{table_name}.#{column_name}" -# "#{table_name}.#{column_name} #{direction}" -# "#{table_name}.#{column_name} #{direction} NULLS FIRST" -# "#{table_name}.#{column_name} NULLS LAST" -# "#{column_name}" -# "#{column_name} #{direction}" -# "#{column_name} #{direction} NULLS FIRST" -# "#{column_name} NULLS LAST" -# -# source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#198 -ActiveRecord::ConnectionAdapters::Quoting::COLUMN_NAME_WITH_ORDER = T.let(T.unsafe(nil), Regexp) - -# source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#202 -class ActiveRecord::ConnectionAdapters::RealTransaction < ::ActiveRecord::ConnectionAdapters::Transaction - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#218 - def commit; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#203 - def materialize!; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#213 - def rollback; end -end - -# source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#153 -class ActiveRecord::ConnectionAdapters::ReferenceDefinition - # @return [ReferenceDefinition] a new instance of ReferenceDefinition - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#154 - 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 - def add_to(table); end - - private - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#191 - def as_options(value); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#225 - def column_name; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#229 - def column_names; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#217 - def columns; end - - # Returns the value of attribute foreign_key. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#189 - def foreign_key; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#213 - def foreign_key_options; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#233 - def foreign_table_name; end - - # Returns the value of attribute index. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#189 - def index; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#203 - def index_options(table_name); end - - # Returns the value of attribute name. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#189 - def name; end - - # Returns the value of attribute options. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#189 - def options; end - - # Returns the value of attribute polymorphic. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#189 - def polymorphic; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#199 - def polymorphic_index_name(table_name); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#195 - def polymorphic_options; end - - # Returns the value of attribute type. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#189 - def type; end -end - -# source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#171 -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 - def initialize(connection, savepoint_name, parent_transaction, **options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#194 - def commit; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#199 - def full_rollback?; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#184 - def materialize!; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#189 - def rollback; end -end - -# source://activerecord//lib/active_record/connection_adapters/abstract/savepoints.rb#5 -module ActiveRecord::ConnectionAdapters::Savepoints - # source://activerecord//lib/active_record/connection_adapters/abstract/savepoints.rb#10 - def create_savepoint(name = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/savepoints.rb#6 - def current_savepoint_name; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/savepoints.rb#14 - def exec_rollback_to_savepoint(name = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/savepoints.rb#18 - def release_savepoint(name = T.unsafe(nil)); end -end - -# source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#7 -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 - - # Add internal cache for table with +table_name+. - # - # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#97 - def add(table_name); end - - # Clears out internal caches - # - # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#149 - def clear!; 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 - - # Get the columns for a table - # - # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#111 - def columns(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 - - # 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 - - # 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#106 - def data_sources(name); 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#172 - def dump_to(filename); end - - # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#57 - 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#68 - def init_with(coder); end - - # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#184 - def marshal_dump; end - - # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#190 - 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#159 - def size; end - - # Returns the value of attribute version. - # - # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#35 - def version; end - - private - - # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#222 - def deep_deduplicate(value); end - - # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#214 - def derive_columns_hash_and_deduplicate_values; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#204 - def ignored_table?(table_name); end - - # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#48 - def initialize_dup(other); end - - # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#241 - 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#198 - def tables_to_cache; end - - class << self - # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#8 - def load_from(filename); end - - private - - # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#24 - def read(filename, &block); end - end -end - -# source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#5 -class ActiveRecord::ConnectionAdapters::SchemaCreation - # @return [SchemaCreation] a new instance of SchemaCreation - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#6 - def initialize(conn); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#11 - def accept(o); end - - private - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#162 - def action_sql(action, dependency); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#137 - def add_column_options!(sql, options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#128 - def add_table_options!(create_sql, o); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#133 - def column_options(o); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#16 - def options_include_default?(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#16 - def quote_column_name(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#16 - def quote_default_expression(*_arg0, **_arg1, &_arg2); end - - # 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 - def quoted_columns(o); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#16 - def quoted_columns_for_index(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#16 - 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 - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#124 - 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_partial_index?(*_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 - def table_modifier_in_create(o); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#152 - 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 - def visit_AddCheckConstraint(o); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#38 - def visit_AddColumnDefinition(o); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#83 - def visit_AddForeignKey(o); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#22 - def visit_AlterTable(o); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#108 - def visit_CheckConstraintDefinition(o); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#31 - def visit_ColumnDefinition(o); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#91 - def visit_CreateIndexDefinition(o); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#116 - def visit_DropCheckConstraint(name); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#87 - def visit_DropForeignKey(name); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#72 - def visit_ForeignKeyDefinition(o); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#68 - def visit_PrimaryKeyDefinition(o); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#42 - def visit_TableDefinition(o); end -end - -# source://activerecord//lib/active_record/connection_adapters/abstract/schema_dumper.rb#5 -class ActiveRecord::ConnectionAdapters::SchemaDumper < ::ActiveRecord::SchemaDumper - private - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_dumper.rb#13 - def column_spec(column); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_dumper.rb#17 - def column_spec_for_primary_key(column); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_dumper.rb#38 - def default_primary_key?(column); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_dumper.rb#42 - def explicit_primary_key_default?(column); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_dumper.rb#25 - def prepare_column_options(column); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_dumper.rb#101 - def schema_collation(column); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_dumper.rb#86 - def schema_default(column); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_dumper.rb#97 - def schema_expression(column); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_dumper.rb#62 - def schema_limit(column); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_dumper.rb#67 - def schema_precision(column); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_dumper.rb#82 - def schema_scale(column); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_dumper.rb#54 - def schema_type(column); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_dumper.rb#46 - def schema_type_with_virtual(column); end - - class << self - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_dumper.rb#8 - def create(connection, options); end - end -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/abstract/schema_statements.rb#8 -module ActiveRecord::ConnectionAdapters::SchemaStatements - include ::ActiveRecord::Migration::JoinTable - - # 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] - # The reference column type. Defaults to +:bigint+. - # [:index] - # Add an appropriate index. Defaults to true. - # See #add_index for usage of this option. - # [:foreign_key] - # Add an appropriate foreign key constraint. Defaults to false, pass true - # to add. In case the join table can't be inferred from the association - # pass :to_table with the appropriate table name. - # [:polymorphic] - # Whether an additional +_type+ column should be added. Defaults to false. - # [:null] - # Whether the column allows nulls. Defaults to true. - # - # ====== Create a user_id bigint column without an index - # - # add_reference(:products, :user, index: false) - # - # ====== Create a user_id string column - # - # add_reference(:products, :user, type: :string) - # - # ====== Create supplier_id, supplier_type columns - # - # add_reference(:products, :supplier, polymorphic: true) - # - # ====== Create a supplier_id column with a unique index - # - # add_reference(:products, :supplier, index: { unique: true }) - # - # ====== Create a supplier_id column with a named index - # - # add_reference(:products, :supplier, index: { name: "my_supplier_index" }) - # - # ====== Create a supplier_id column and appropriate foreign key - # - # add_reference(:products, :supplier, foreign_key: true) - # - # ====== Create a supplier_id column and a foreign key to the firms table - # - # add_reference(:products, :supplier, foreign_key: { to_table: :firms }) - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#988 - def add_belongs_to(table_name, ref_name, **options); end - - # Adds a new check constraint to the table. +expression+ is a String - # representation of verifiable boolean condition. - # - # add_check_constraint :products, "price > 0", name: "price_check" - # - # generates: - # - # ALTER TABLE "products" ADD CONSTRAINT price_check CHECK (price > 0) - # - # The +options+ hash can include the following keys: - # [:name] - # The constraint name. Defaults to chk_rails_. - # [: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#1185 - def add_check_constraint(table_name, expression, **options); end - - # Add a new +type+ column named +column_name+ to +table_name+. - # - # See {ActiveRecord::ConnectionAdapters::TableDefinition.column}[rdoc-ref:ActiveRecord::ConnectionAdapters::TableDefinition#column]. - # - # The +type+ parameter is normally one of the migrations native types, - # which is one of the following: - # :primary_key, :string, :text, - # :integer, :bigint, :float, :decimal, :numeric, - # :datetime, :time, :date, - # :binary, :blob, :boolean. - # - # You may use a type not in this list as long as it is supported by your - # database (for example, "polygon" in MySQL), but this will not be database - # agnostic and should usually be avoided. - # - # Available options are (none of these exists by default): - # * :comment - - # Specifies the comment for the column. This option is ignored by some backends. - # * :collation - - # Specifies the collation for a :string or :text column. - # If not specified, the column will have the same collation as the table. - # * :default - - # The column's default value. Use +nil+ for +NULL+. - # * :limit - - # Requests a maximum column length. This is the number of characters for a :string column - # and number of bytes for :text, :binary, :blob, and :integer columns. - # This option is ignored by some backends. - # * :null - - # Allows or disallows +NULL+ values in the column. - # * :precision - - # Specifies the precision for the :decimal, :numeric, - # :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. - # - # Note: The precision is the total number of significant digits, - # and the scale is the number of digits that can be stored following - # the decimal point. For example, the number 123.45 has a precision of 5 - # and a scale of 2. A decimal with a precision of 5 and a scale of 2 can - # range from -999.99 to 999.99. - # - # Please be aware of different RDBMS implementations behavior with - # :decimal columns: - # * 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]. - # Default is (10,0). - # * PostgreSQL: :precision [1..infinity], - # :scale [0..infinity]. No default. - # * SQLite3: No restrictions on :precision and :scale, - # but the maximum supported :precision is 16. No default. - # * Oracle: :precision [1..38], :scale [-84..127]. - # Default is (38,0). - # * SqlServer: :precision [1..38], :scale [0..38]. - # Default (38,0). - # - # == Examples - # - # add_column(:users, :picture, :binary, limit: 2.megabytes) - # # ALTER TABLE "users" ADD "picture" blob(2097152) - # - # add_column(:articles, :status, :string, limit: 20, default: 'draft', null: false) - # # ALTER TABLE "articles" ADD "status" varchar(20) DEFAULT 'draft' NOT NULL - # - # add_column(:answers, :bill_gates_money, :decimal, precision: 15, scale: 2) - # # ALTER TABLE "answers" ADD "bill_gates_money" decimal(15,2) - # - # add_column(:measurements, :sensor_reading, :decimal, precision: 30, scale: 20) - # # ALTER TABLE "measurements" ADD "sensor_reading" decimal(30,20) - # - # # While :scale defaults to zero on most databases, it - # # probably wouldn't hurt to include it. - # add_column(:measurements, :huge_integer, :decimal, precision: 30) - # # ALTER TABLE "measurements" ADD "huge_integer" decimal(30) - # - # # Defines a column that stores an array of a type. - # add_column(:users, :skills, :text, array: true) - # # ALTER TABLE "users" ADD "skills" text[] - # - # # Defines a column with a database-specific type. - # add_column(:shapes, :triangle, 'polygon') - # # ALTER TABLE "shapes" ADD "triangle" polygon - # - # # 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#616 - def add_column(table_name, column_name, type, **options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#630 - def add_columns(table_name, *column_names, type:, **options); end - - # Adds a new foreign key. +from_table+ is the table with the key column, - # +to_table+ contains the referenced primary key. - # - # The foreign key will be named after the following pattern: fk_rails_. - # +identifier+ is a 10 character long string which is deterministically generated from the - # +from_table+ and +column+. A custom name can be specified with the :name option. - # - # ====== Creating a simple foreign key - # - # add_foreign_key :articles, :authors - # - # generates: - # - # ALTER TABLE "articles" ADD CONSTRAINT fk_rails_e74ce85cbc FOREIGN KEY ("author_id") REFERENCES "authors" ("id") - # - # ====== Creating a foreign key, ignoring method call if the foreign key exists - # - # add_foreign_key(:articles, :authors, if_not_exists: true) - # - # ====== Creating a foreign key on a specific column - # - # add_foreign_key :articles, :users, column: :author_id, primary_key: "lng_id" - # - # generates: - # - # ALTER TABLE "articles" ADD CONSTRAINT fk_rails_58ca3d3a82 FOREIGN KEY ("author_id") REFERENCES "users" ("lng_id") - # - # ====== Creating a cascading foreign key - # - # add_foreign_key :articles, :authors, on_delete: :cascade - # - # generates: - # - # ALTER TABLE "articles" ADD CONSTRAINT fk_rails_e74ce85cbc FOREIGN KEY ("author_id") REFERENCES "authors" ("id") ON DELETE CASCADE - # - # The +options+ hash can include the following keys: - # [:column] - # The foreign key column name on +from_table+. Defaults to to_table.singularize + "_id" - # [:primary_key] - # The primary key column name on +to_table+. Defaults to +id+. - # [:name] - # The constraint name. Defaults to fk_rails_. - # [:on_delete] - # Action that happens ON DELETE. Valid values are +:nullify+, +:cascade+, and +:restrict+ - # [:on_update] - # Action that happens ON UPDATE. Valid values are +:nullify+, +:cascade+, and +:restrict+ - # [:if_not_exists] - # Specifies if the foreign key already exists to not try to re-add it. This will avoid - # duplicate column errors. - # [:validate] - # (PostgreSQL only) Specify whether or not the constraint should be validated. Defaults to +true+. - # [:deferrable] - # (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#1085 - 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 - # an Array of Symbols. - # - # The index will be named after the table and the column name(s), unless - # you pass :name as an option. - # - # ====== Creating a simple index - # - # add_index(:suppliers, :name) - # - # generates: - # - # CREATE INDEX index_suppliers_on_name ON suppliers(name) - # - # ====== Creating a index which already exists - # - # add_index(:suppliers, :name, if_not_exists: true) - # - # generates: - # - # CREATE INDEX IF NOT EXISTS index_suppliers_on_name ON suppliers(name) - # - # Note: Not supported by MySQL. - # - # ====== Creating a unique index - # - # add_index(:accounts, [:branch_id, :party_id], unique: true) - # - # generates: - # - # CREATE UNIQUE INDEX index_accounts_on_branch_id_and_party_id ON accounts(branch_id, party_id) - # - # ====== Creating a named index - # - # add_index(:accounts, [:branch_id, :party_id], unique: true, name: 'by_branch_party') - # - # generates: - # - # CREATE UNIQUE INDEX by_branch_party ON accounts(branch_id, party_id) - # - # ====== Creating an index with specific key length - # - # add_index(:accounts, :name, name: 'by_name', length: 10) - # - # generates: - # - # CREATE INDEX by_name ON accounts(name(10)) - # - # ====== Creating an index with specific key lengths for multiple keys - # - # add_index(:accounts, [:name, :surname], name: 'by_name_surname', length: {name: 10, surname: 15}) - # - # generates: - # - # CREATE INDEX by_name_surname ON accounts(name(10), surname(15)) - # - # Note: only supported by MySQL - # - # ====== Creating an index with a sort order (desc or asc, asc is the default) - # - # add_index(:accounts, [:branch_id, :party_id, :surname], name: 'by_branch_desc_party', order: {branch_id: :desc, party_id: :asc}) - # - # generates: - # - # CREATE INDEX by_branch_desc_party ON accounts(branch_id DESC, party_id ASC, surname) - # - # Note: MySQL only supports index order from 8.0.1 onwards (earlier versions accepted the syntax but ignored it). - # - # ====== Creating a partial index - # - # add_index(:accounts, [:branch_id, :party_id], unique: true, where: "active") - # - # generates: - # - # CREATE UNIQUE INDEX index_accounts_on_branch_id_and_party_id ON accounts(branch_id, party_id) WHERE active - # - # Note: Partial indexes are only supported for PostgreSQL and SQLite. - # - # ====== Creating an index with a specific method - # - # add_index(:developers, :name, using: 'btree') - # - # generates: - # - # CREATE INDEX index_developers_on_name ON developers USING btree (name) -- PostgreSQL - # CREATE INDEX index_developers_on_name USING btree ON developers (name) -- MySQL - # - # Note: only supported by PostgreSQL and MySQL - # - # ====== Creating an index with a specific operator class - # - # add_index(:developers, :name, using: 'gist', opclass: :gist_trgm_ops) - # # CREATE INDEX developers_on_name ON developers USING gist (name gist_trgm_ops) -- PostgreSQL - # - # add_index(:developers, [:name, :city], using: 'gist', opclass: { city: :gist_trgm_ops }) - # # CREATE INDEX developers_on_name_and_city ON developers USING gist (name, city gist_trgm_ops) -- PostgreSQL - # - # add_index(:developers, [:name, :city], using: 'gist', opclass: :gist_trgm_ops) - # # CREATE INDEX developers_on_name_and_city ON developers USING gist (name gist_trgm_ops, city gist_trgm_ops) -- PostgreSQL - # - # Note: only supported by PostgreSQL - # - # ====== Creating an index with a specific type - # - # add_index(:developers, :name, type: :fulltext) - # - # generates: - # - # CREATE FULLTEXT INDEX index_developers_on_name ON developers (name) -- MySQL - # - # Note: only supported by MySQL. - # - # ====== Creating an index with a specific algorithm - # - # add_index(:developers, :name, algorithm: :concurrently) - # # CREATE INDEX CONCURRENTLY developers_on_name on developers (name) - # - # Note: only supported by PostgreSQL. - # - # Concurrently adding an index is not supported in a transaction. - # - # For more information see the {"Transactional Migrations" section}[rdoc-ref:Migration]. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#851 - def add_index(table_name, column_name, **options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1339 - 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] - # The reference column type. Defaults to +:bigint+. - # [:index] - # Add an appropriate index. Defaults to true. - # See #add_index for usage of this option. - # [:foreign_key] - # Add an appropriate foreign key constraint. Defaults to false, pass true - # to add. In case the join table can't be inferred from the association - # pass :to_table with the appropriate table name. - # [:polymorphic] - # Whether an additional +_type+ column should be added. Defaults to false. - # [:null] - # Whether the column allows nulls. Defaults to true. - # - # ====== Create a user_id bigint column without an index - # - # add_reference(:products, :user, index: false) - # - # ====== Create a user_id string column - # - # add_reference(:products, :user, type: :string) - # - # ====== Create supplier_id, supplier_type columns - # - # add_reference(:products, :supplier, polymorphic: true) - # - # ====== Create a supplier_id column with a unique index - # - # add_reference(:products, :supplier, index: { unique: true }) - # - # ====== Create a supplier_id column with a named index - # - # add_reference(:products, :supplier, index: { name: "my_supplier_index" }) - # - # ====== Create a supplier_id column and appropriate foreign key - # - # add_reference(:products, :supplier, foreign_key: true) - # - # ====== Create a supplier_id column and a foreign key to the firms table - # - # add_reference(:products, :supplier, foreign_key: { to_table: :firms }) - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#988 - def add_reference(table_name, ref_name, **options); end - - # Adds timestamps (+created_at+ and +updated_at+) columns to +table_name+. - # Additional options (like +:null+) are forwarded to #add_column. - # - # add_timestamps(:suppliers, null: true) - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1316 - def add_timestamps(table_name, **options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1228 - def assume_migrated_upto_version(version); end - - # Changes the column's definition according to the new options. - # See TableDefinition#column for details of the options you can use. - # - # change_column(:suppliers, :name, :string, limit: 80) - # change_column(:accounts, :description, :text) - # - # @raise [NotImplementedError] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#679 - def change_column(table_name, column_name, type, **options); end - - # Changes the comment for a column or removes it if +nil+. - # - # Passing a hash containing +:from+ and +:to+ will make this change - # reversible in migration: - # - # change_column_comment(:posts, :state, from: "old_comment", to: "new_comment") - # - # @raise [NotImplementedError] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1398 - def change_column_comment(table_name, column_name, comment_or_changes); end - - # Sets a new default value for a column: - # - # change_column_default(:suppliers, :qualification, 'new') - # change_column_default(:accounts, :authorized, 1) - # - # Setting the default to +nil+ effectively drops the default: - # - # change_column_default(:users, :email, nil) - # - # Passing a hash containing +:from+ and +:to+ will make this change - # reversible in migration: - # - # change_column_default(:posts, :state, from: nil, to: "draft") - # - # @raise [NotImplementedError] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#697 - 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 - # indicates whether the value can be +NULL+. For example - # - # change_column_null(:users, :nickname, false) - # - # says nicknames cannot be +NULL+ (adds the constraint), whereas - # - # change_column_null(:users, :nickname, true) - # - # allows them to be +NULL+ (drops the constraint). - # - # The method accepts an optional fourth argument to replace existing - # NULLs with some other value. Use that one when enabling the - # constraint if needed, since otherwise those rows would not be valid. - # - # Please note the fourth argument does not set a column's default. - # - # @raise [NotImplementedError] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#717 - def change_column_null(table_name, column_name, null, default = T.unsafe(nil)); end - - # A block for changing columns in +table+. - # - # # change_table() yields a Table instance - # change_table(:suppliers) do |t| - # t.column :name, :string, limit: 60 - # # Other column alterations here - # end - # - # The +options+ hash can include the following keys: - # [:bulk] - # Set this to true to make this a bulk alter query, such as - # - # ALTER TABLE `users` ADD COLUMN age INT, ADD COLUMN birthdate DATETIME ... - # - # Defaults to false. - # - # Only supported on the MySQL and PostgreSQL adapter, ignored elsewhere. - # - # ====== Add a column - # - # change_table(:suppliers) do |t| - # t.column :name, :string, limit: 60 - # end - # - # ====== Change type of a column - # - # change_table(:suppliers) do |t| - # t.change :metadata, :json - # end - # - # ====== Add 2 integer columns - # - # change_table(:suppliers) do |t| - # t.integer :width, :height, null: false, default: 0 - # end - # - # ====== Add created_at/updated_at columns - # - # change_table(:suppliers) do |t| - # t.timestamps - # end - # - # ====== Add a foreign key column - # - # change_table(:suppliers) do |t| - # t.references :company - # end - # - # Creates a company_id(bigint) column. - # - # ====== Add a polymorphic foreign key column - # - # change_table(:suppliers) do |t| - # t.belongs_to :company, polymorphic: true - # end - # - # Creates company_type(varchar) and company_id(bigint) columns. - # - # ====== Remove a column - # - # change_table(:suppliers) do |t| - # t.remove :company - # end - # - # ====== Remove several columns - # - # change_table(:suppliers) do |t| - # t.remove :company_id - # t.remove :width, :height - # end - # - # ====== Remove an index - # - # change_table(:suppliers) do |t| - # t.remove_index :company_id - # end - # - # See also Table for details on all of the various column transformations. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#487 - def change_table(table_name, **options); end - - # Changes the comment for a table or removes it if +nil+. - # - # Passing a hash containing +:from+ and +:to+ will make this change - # reversible in migration: - # - # change_table_comment(:posts, from: "old_comment", to: "new_comment") - # - # @raise [NotImplementedError] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1388 - def change_table_comment(table_name, comment_or_changes); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1195 - def check_constraint_options(table_name, expression, options); end - - # Returns an array of check constraints for the given table. - # The check constraints are represented as CheckConstraintDefinition objects. - # - # @raise [NotImplementedError] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1167 - def check_constraints(table_name); end - - # Checks to see if a column exists in a given table. - # - # # Check a column exists - # column_exists?(:suppliers, :name) - # - # # Check a column exists of a particular type - # # - # # This works for standard non-casted types (eg. string) but is unreliable - # # for types that may get cast to something else (eg. char, bigint). - # column_exists?(:suppliers, :name, :string) - # - # # Check a column exists with a specific definition - # column_exists?(:suppliers, :name, :string, limit: 100) - # column_exists?(:suppliers, :name, :string, default: 'default') - # column_exists?(:suppliers, :name, :string, null: false) - # column_exists?(:suppliers, :tax, :decimal, precision: 8, scale: 2) - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#138 - 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#114 - def columns(table_name); end - - # Given a set of columns and an ORDER BY clause, returns the columns for a SELECT DISTINCT. - # PostgreSQL, MySQL, and Oracle override this for custom DISTINCT syntax - they - # require the order columns appear in the SELECT. - # - # columns_for_distinct("posts.id", ["posts.created_at desc"]) - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1288 - def columns_for_distinct(columns, orders); end - - # Creates a new join table with the name created using the lexical order of the first two - # arguments. These arguments can be a String or a Symbol. - # - # # Creates a table called 'assemblies_parts' with no id. - # create_join_table(:assemblies, :parts) - # - # You can pass an +options+ hash which can include the following keys: - # [:table_name] - # Sets the table name, overriding the default. - # [:column_options] - # Any extra options you want appended to the columns definition. - # [:options] - # Any extra options you want appended to the table definition. - # [:temporary] - # Make a temporary table. - # [:force] - # Set to true to drop the table before creating it. - # Defaults to false. - # - # Note that #create_join_table does not create any indices by default; you can use - # its block form to do so yourself: - # - # create_join_table :products, :categories do |t| - # t.index :product_id - # t.index :category_id - # end - # - # ====== Add a backend specific option to the generated SQL (MySQL) - # - # create_join_table(:assemblies, :parts, options: 'ENGINE=InnoDB DEFAULT CHARSET=utf8') - # - # generates: - # - # CREATE TABLE assemblies_parts ( - # assembly_id bigint NOT NULL, - # part_id bigint NOT NULL, - # ) ENGINE=InnoDB DEFAULT CHARSET=utf8 - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#384 - 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#1402 - def create_schema_dumper(options); end - - # Creates a new table with the name +table_name+. +table_name+ may either - # be a String or a Symbol. - # - # There are two ways to work with #create_table. You can use the block - # form or the regular form, like this: - # - # === Block form - # - # # create_table() passes a TableDefinition object to the block. - # # This form will not only create the table, but also columns for the - # # table. - # - # create_table(:suppliers) do |t| - # t.column :name, :string, limit: 60 - # # Other fields here - # end - # - # === Block form, with shorthand - # - # # You can also use the column types as method calls, rather than calling the column method. - # create_table(:suppliers) do |t| - # t.string :name, limit: 60 - # # Other fields here - # end - # - # === Regular form - # - # # Creates a table called 'suppliers' with no columns. - # create_table(:suppliers) - # # Add a column to 'suppliers'. - # add_column(:suppliers, :name, :string, {limit: 60}) - # - # The +options+ hash can include the following keys: - # [:id] - # Whether to automatically add a primary key column. Defaults to true. - # Join tables for {ActiveRecord::Base.has_and_belongs_to_many}[rdoc-ref:Associations::ClassMethods#has_and_belongs_to_many] should set it to false. - # - # A Symbol can be used to specify the type of the generated primary key column. - # [:primary_key] - # The name of the primary key, if one is to be added automatically. - # Defaults to +id+. If :id is false, then this option is ignored. - # - # If an array is passed, a composite primary key will be created. - # - # Note that Active Record models will automatically detect their - # primary key. This can be avoided by using - # {self.primary_key=}[rdoc-ref:AttributeMethods::PrimaryKey::ClassMethods#primary_key=] on the model - # to define the key explicitly. - # - # [:options] - # Any extra options you want appended to the table definition. - # [:temporary] - # Make a temporary table. - # [:force] - # Set to true to drop the table before creating it. - # Set to +:cascade+ to drop dependent objects as well. - # Defaults to false. - # [:if_not_exists] - # Set to true to avoid raising an error when the table already exists. - # Defaults to false. - # [:as] - # SQL to use to generate the table. When this option is used, the block is - # ignored, as are the :id and :primary_key options. - # - # ====== Add a backend specific option to the generated SQL (MySQL) - # - # create_table(:suppliers, options: 'ENGINE=InnoDB DEFAULT CHARSET=utf8mb4') - # - # generates: - # - # CREATE TABLE suppliers ( - # id bigint auto_increment PRIMARY KEY - # ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 - # - # ====== Rename the primary key column - # - # create_table(:objects, primary_key: 'guid') do |t| - # t.column :name, :string, limit: 80 - # end - # - # generates: - # - # CREATE TABLE objects ( - # guid bigint auto_increment PRIMARY KEY, - # name varchar(80) - # ) - # - # ====== Change the primary key column type - # - # create_table(:tags, id: :string) do |t| - # t.column :label, :string - # end - # - # generates: - # - # CREATE TABLE tags ( - # id varchar PRIMARY KEY, - # label varchar - # ) - # - # ====== Create a composite primary key - # - # create_table(:orders, primary_key: [:product_id, :client_id]) do |t| - # t.belongs_to :product - # t.belongs_to :client - # end - # - # generates: - # - # CREATE TABLE order ( - # product_id bigint NOT NULL, - # client_id bigint NOT NULL - # ); - # - # ALTER TABLE ONLY "orders" - # ADD CONSTRAINT orders_pkey PRIMARY KEY (product_id, client_id); - # - # ====== Do not add a primary key column - # - # create_table(:categories_suppliers, id: false) do |t| - # t.column :category_id, :bigint - # t.column :supplier_id, :bigint - # end - # - # generates: - # - # CREATE TABLE categories_suppliers ( - # category_id bigint, - # supplier_id bigint - # ) - # - # ====== Create a temporary table based on a query - # - # create_table(:long_query, temporary: true, - # as: "SELECT * FROM orders INNER JOIN line_items ON order_id=orders.id") - # - # generates: - # - # CREATE TEMPORARY TABLE long_query AS - # SELECT * FROM orders INNER JOIN line_items ON order_id=orders.id - # - # See also TableDefinition#column for details on how to create columns. - # - # @yield [td] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#299 - def create_table(table_name, id: T.unsafe(nil), primary_key: T.unsafe(nil), force: T.unsafe(nil), **options); end - - # Checks to see if the data source +name+ exists on the database. - # - # data_source_exists?(:ebooks) - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#44 - def data_source_exists?(name); end - - # Returns the relation names usable to back Active Record models. - # For most adapters this means all #tables and #views. - # - # 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#1292 - def distinct_relation_for_primary_key(relation); end - - # Drops the join table specified by the given arguments. - # See #create_join_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#404 - def drop_join_table(table_1, table_2, **options); end - - # Drops a table from the database. - # - # [:force] - # Set to +:cascade+ to drop dependent objects as well. - # Defaults to false. - # [:if_exists] - # Set to +true+ to only drop the table if it exists. - # Defaults to false. - # - # Although this command ignores most +options+ and the block if one is given, - # 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#517 - def drop_table(table_name, **options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1219 - def dump_schema_information; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1153 - def foreign_key_column_for(table_name); end - - # Checks to see if a foreign key exists on a table for a given foreign key definition. - # - # # Checks to see if a foreign key exists. - # foreign_key_exists?(:accounts, :branches) - # - # # Checks to see if a foreign key on a specified column exists. - # foreign_key_exists?(:accounts, column: :owner_id) - # - # # Checks to see if a foreign key with a custom name exists. - # foreign_key_exists?(:accounts, name: "special_fk_name") - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1149 - def foreign_key_exists?(from_table, to_table = T.unsafe(nil), **options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1158 - def foreign_key_options(from_table, to_table, options); end - - # Returns an array of foreign keys for the given table. - # The foreign keys are represented as ForeignKeyDefinition objects. - # - # @raise [NotImplementedError] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1027 - def foreign_keys(table_name); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1365 - def index_algorithm(algorithm); end - - # Checks to see if an index exists on a table for a given index definition. - # - # # Check an index exists - # index_exists?(:suppliers, :company_id) - # - # # Check an index on multiple columns exists - # index_exists?(:suppliers, [:company_id, :company_type]) - # - # # Check a unique index exists - # index_exists?(:suppliers, :company_id, unique: true) - # - # # Check an index with a custom name exists - # index_exists?(:suppliers, :company_id, name: "idx_company_id") - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#99 - def index_exists?(table_name, column_name, **options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#920 - 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#935 - def index_name_exists?(table_name, index_name); end - - # Returns an array of indexes for the given table. - # - # @raise [NotImplementedError] - # - # 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#1224 - def internal_string_options_for_primary_key; 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. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#14 - def native_database_types; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1378 - def options_include_default?(options); end - - # Returns just a table's primary key - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#151 - def primary_key(table_name); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1371 - 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 - # - # remove_reference(:products, :user, index: false) - # - # ====== Remove polymorphic reference - # - # remove_reference(:products, :supplier, polymorphic: true) - # - # ====== Remove the reference with a foreign key - # - # remove_reference(:products, :user, foreign_key: true) - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1008 - 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. - # - # remove_check_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_check_constraint. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1208 - def remove_check_constraint(table_name, expression = T.unsafe(nil), **options); end - - # Removes the column from the table definition. - # - # remove_column(:suppliers, :qualification) - # - # The +type+ and +options+ parameters will be ignored if present. It can be helpful - # to provide these in a migration's +change+ method so it can be reverted. - # In that case, +type+ and +options+ will be used by #add_column. - # Depending on the database you're using, indexes using this column may be - # automatically removed or modified to remove this column from the index. - # - # If the options provided include an +if_exists+ key, it will be used to check if the - # column does not exist. This will silently ignore the migration rather than raising - # if the column was already used. - # - # remove_column(:suppliers, :qualification, if_exists: true) - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#667 - def remove_column(table_name, column_name, type = T.unsafe(nil), **options); end - - # Removes the given columns from the table definition. - # - # remove_columns(:suppliers, :qualification, :experience) - # - # +type+ and other column options can be passed to make migration reversible. - # - # remove_columns(:suppliers, :qualification, :experience, type: :string, null: false) - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#643 - 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 - # will be used to re-add the foreign key in case of a migration rollback. - # It is recommended that you provide any options used when creating the foreign - # key so that the migration can be reverted properly. - # - # Removes the foreign key on +accounts.branch_id+. - # - # remove_foreign_key :accounts, :branches - # - # Removes the foreign key on +accounts.owner_id+. - # - # remove_foreign_key :accounts, column: :owner_id - # - # Removes the foreign key on +accounts.owner_id+. - # - # remove_foreign_key :accounts, to_table: :owners - # - # Removes the foreign key named +special_fk_name+ on the +accounts+ table. - # - # remove_foreign_key :accounts, name: :special_fk_name - # - # Checks if the foreign key exists before trying to remove it. Will silently ignore indexes that - # don't exist. - # - # remove_foreign_key :accounts, :branches, if_exists: true - # - # The +options+ hash accepts the same keys as SchemaStatements#add_foreign_key - # with an addition of - # [:to_table] - # The name of the table that contains the referenced primary key. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1126 - def remove_foreign_key(from_table, to_table = T.unsafe(nil), **options); end - - # Removes the given index from the table. - # - # Removes the index on +branch_id+ in the +accounts+ table if exactly one such index exists. - # - # remove_index :accounts, :branch_id - # - # Removes the index on +branch_id+ in the +accounts+ table if exactly one such index exists. - # - # remove_index :accounts, column: :branch_id - # - # Removes the index on +branch_id+ and +party_id+ in the +accounts+ table if exactly one such index exists. - # - # remove_index :accounts, column: [:branch_id, :party_id] - # - # Removes the index named +by_branch_party+ in the +accounts+ table. - # - # remove_index :accounts, name: :by_branch_party - # - # Removes the index on +branch_id+ named +by_branch_party+ in the +accounts+ table. - # - # remove_index :accounts, :branch_id, name: :by_branch_party - # - # Checks if the index exists before trying to remove it. Will silently ignore indexes that - # don't exist. - # - # remove_index :accounts, if_exists: true - # - # Removes the index named +by_branch_party+ in the +accounts+ table +concurrently+. - # - # remove_index :accounts, name: :by_branch_party, algorithm: :concurrently - # - # Note: only supported by PostgreSQL. - # - # Concurrently removing an index is not supported in a transaction. - # - # For more information see the {"Transactional Migrations" section}[rdoc-ref:Migration]. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#894 - 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 - # - # remove_reference(:products, :user, index: false) - # - # ====== Remove polymorphic reference - # - # remove_reference(:products, :supplier, polymorphic: true) - # - # ====== Remove the reference with a foreign key - # - # remove_reference(:products, :user, foreign_key: true) - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1008 - 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#1331 - def remove_timestamps(table_name, **options); end - - # Renames a column. - # - # rename_column(:suppliers, :description, :name) - # - # @raise [NotImplementedError] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#725 - def rename_column(table_name, column_name, new_column_name); end - - # Renames an index. - # - # Rename the +index_people_on_last_name+ index to +index_users_on_last_name+: - # - # rename_index :people, 'index_people_on_last_name', 'index_users_on_last_name' - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#908 - def rename_index(table_name, old_name, new_name); end - - # Renames a table. - # - # rename_table('octopuses', 'octopi') - # - # @raise [NotImplementedError] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#501 - def rename_table(table_name, new_name); end - - # Truncates a table alias according to the limits of the current adapter. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#28 - def table_alias_for(table_name); end - - # Returns the table comment that's stored in database metadata. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#23 - def table_comment(table_name); end - - # Checks to see if the table +table_name+ exists on the database. - # - # table_exists?(:developers) - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#59 - def table_exists?(table_name); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#18 - def table_options(table_name); end - - # Returns an array of table names defined in the database. - # - # 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#1248 - 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#1335 - def update_table_definition(table_name, base); end - - # Checks to see if the view +view_name+ exists on the database. - # - # view_exists?(:ebooks) - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#74 - def view_exists?(view_name); end - - # Returns an array of view names defined in the database. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#66 - def views; end - - private - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1636 - def add_column_for_alter(table_name, column_name, type, **options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1411 - 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#1428 - def add_options_for_index_columns(quoted_columns, **options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1654 - def add_timestamps_for_alter(table_name, **options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1611 - def bulk_change_table(table_name, operations); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1607 - def can_remove_index_by_name?(column_name, options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1581 - def check_constraint_for(table_name, **options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1587 - def check_constraint_for!(table_name, expression: T.unsafe(nil), **options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1571 - def check_constraint_name(table_name, **options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1407 - def column_options_keys; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1498 - def create_alter_table(name); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1494 - def create_table_definition(name, **options); end - - # @raise [NotImplementedError] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1684 - 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#1534 - def expression_column_name?(column_name); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1563 - def extract_foreign_key_action(specifier); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1598 - def extract_new_comment_value(default_or_changes); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1598 - def extract_new_default_value(default_or_changes); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1502 - def extract_table_options!(options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1506 - def fetch_type_metadata(sql_type); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1553 - def foreign_key_for(from_table, **options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1558 - def foreign_key_for!(from_table, to_table: T.unsafe(nil), **options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1544 - def foreign_key_name(table_name, options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1517 - def index_column_names(column_names); end - - # @raise [ArgumentError] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1436 - def index_name_for_remove(table_name, column_name, options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1525 - def index_name_options(column_names); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1671 - def insert_versions_sql(versions); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1418 - def options_for_index_columns(options); end - - # @raise [NotImplementedError] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1688 - def quoted_scope(name = T.unsafe(nil), type: T.unsafe(nil)); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1646 - 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#1650 - def remove_columns_for_alter(table_name, *column_names, **options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1667 - def remove_timestamps_for_alter(table_name, **options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1477 - def rename_column_indexes(table_name, column_name, new_column_name); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1642 - def rename_column_sql(table_name, column_name, new_column_name); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1468 - def rename_table_indexes(table_name, new_name); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1490 - def schema_creation; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1538 - def strip_table_name_prefix_and_suffix(table_name); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1592 - def validate_index_length!(table_name, new_name, internal = T.unsafe(nil)); end -end - -# source://activerecord//lib/active_record/connection_adapters/sql_type_metadata.rb#6 -class ActiveRecord::ConnectionAdapters::SqlTypeMetadata - include ::ActiveRecord::ConnectionAdapters::Deduplicable - extend ::ActiveRecord::ConnectionAdapters::Deduplicable::ClassMethods - - # @return [SqlTypeMetadata] a new instance of SqlTypeMetadata - # - # source://activerecord//lib/active_record/connection_adapters/sql_type_metadata.rb#11 - def initialize(sql_type: T.unsafe(nil), type: T.unsafe(nil), limit: T.unsafe(nil), precision: T.unsafe(nil), scale: T.unsafe(nil)); end - - # source://activerecord//lib/active_record/connection_adapters/sql_type_metadata.rb#19 - def ==(other); end - - # source://activerecord//lib/active_record/connection_adapters/sql_type_metadata.rb#19 - def eql?(other); end - - # source://activerecord//lib/active_record/connection_adapters/sql_type_metadata.rb#29 - def hash; end - - # Returns the value of attribute limit. - # - # source://activerecord//lib/active_record/connection_adapters/sql_type_metadata.rb#9 - def limit; end - - # Returns the value of attribute precision. - # - # source://activerecord//lib/active_record/connection_adapters/sql_type_metadata.rb#9 - def precision; end - - # Returns the value of attribute scale. - # - # source://activerecord//lib/active_record/connection_adapters/sql_type_metadata.rb#9 - def scale; end - - # Returns the value of attribute sql_type. - # - # source://activerecord//lib/active_record/connection_adapters/sql_type_metadata.rb#9 - def sql_type; end - - # Returns the value of attribute type. - # - # source://activerecord//lib/active_record/connection_adapters/sql_type_metadata.rb#9 - def type; end - - private - - # source://activerecord//lib/active_record/connection_adapters/sql_type_metadata.rb#39 - def deduplicated; end -end - -# Represents an SQL table in an abstract way for updating a table. -# Also see TableDefinition and {connection.create_table}[rdoc-ref:SchemaStatements#create_table] -# -# Available transformations are: -# -# change_table :table do |t| -# t.primary_key -# t.column -# t.index -# t.rename_index -# t.timestamps -# t.change -# t.change_default -# t.change_null -# t.rename -# t.references -# t.belongs_to -# t.check_constraint -# t.string -# t.text -# t.integer -# t.bigint -# t.float -# t.decimal -# t.numeric -# t.datetime -# t.timestamp -# t.time -# t.date -# t.binary -# t.blob -# t.boolean -# t.foreign_key -# t.json -# t.virtual -# t.remove -# t.remove_foreign_key -# t.remove_references -# t.remove_belongs_to -# t.remove_index -# t.remove_check_constraint -# t.remove_timestamps -# end -# -# source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#613 -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#618 - def initialize(table_name, base); end - - # Adds a reference. - # - # t.references(:user) - # t.belongs_to(:supplier, foreign_key: true) - # - # 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#763 - def belongs_to(*args, **options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 - def bigint(*names, **options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 - def binary(*names, **options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 - def blob(*names, **options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 - def boolean(*names, **options); end - - # Changes the column's definition according to the new options. - # - # t.change(:name, :string, limit: 80) - # t.change(:description, :text) - # - # See TableDefinition#column for details of the options you can use. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#692 - def change(column_name, type, **options); end - - # Sets a new default value for a column. - # - # t.change_default(:qualification, 'new') - # t.change_default(:authorized, 1) - # t.change_default(:status, from: nil, to: "draft") - # - # See {connection.change_column_default}[rdoc-ref:SchemaStatements#change_column_default] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#703 - def change_default(column_name, default_or_changes); end - - # Sets or removes a NOT NULL constraint on a column. - # - # t.change_null(:qualification, true) - # t.change_null(:qualification, false, 0) - # - # See {connection.change_column_null}[rdoc-ref:SchemaStatements#change_column_null] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#713 - def change_null(column_name, null, default = T.unsafe(nil)); end - - # Adds a check constraint. - # - # t.check_constraint("price > 0", name: "price_check") - # - # See {connection.add_check_constraint}[rdoc-ref:SchemaStatements#add_check_constraint] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#817 - def check_constraint(*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#628 - def column(column_name, type, index: T.unsafe(nil), **options); end - - # Checks to see if a column exists. - # - # t.string(:name) unless t.column_exists?(:name, :string) - # - # See {connection.column_exists?}[rdoc-ref:SchemaStatements#column_exists?] - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#641 - def column_exists?(column_name, type = T.unsafe(nil), **options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 - def date(*names, **options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 - def datetime(*names, **options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 - def decimal(*names, **options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 - def float(*names, **options); end - - # Adds a foreign key to the table using a supplied table name. - # - # t.foreign_key(:authors) - # t.foreign_key(:authors, column: :author_id, primary_key: "id") - # - # See {connection.add_foreign_key}[rdoc-ref:SchemaStatements#add_foreign_key] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#789 - def foreign_key(*args, **options); end - - # Checks to see if a foreign key exists. - # - # t.foreign_key(:authors) unless t.foreign_key_exists?(:authors) - # - # See {connection.foreign_key_exists?}[rdoc-ref:SchemaStatements#foreign_key_exists?] - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#808 - def foreign_key_exists?(*args, **options); end - - # Adds a new index to the table. +column_name+ can be a single Symbol, or - # an Array of Symbols. - # - # t.index(:name) - # t.index([:branch_id, :party_id], unique: true) - # t.index([:branch_id, :party_id], unique: true, name: 'by_branch_party') - # - # 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#653 - def index(column_name, **options); end - - # Checks to see if an index exists. - # - # unless t.index_exists?(:branch_id) - # t.index(:branch_id) - # end - # - # See {connection.index_exists?}[rdoc-ref:SchemaStatements#index_exists?] - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#664 - def index_exists?(column_name, options = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 - def integer(*names, **options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 - def json(*names, **options); end - - # Returns the value of attribute name. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#616 - def name; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 - def numeric(*names, **options); end - - # Adds a reference. - # - # t.references(:user) - # t.belongs_to(:supplier, foreign_key: true) - # - # 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#763 - def references(*args, **options); end - - # Removes the column(s) from the table definition. - # - # t.remove(:qualification) - # t.remove(:qualification, :experience) - # - # See {connection.remove_columns}[rdoc-ref:SchemaStatements#remove_columns] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#723 - def remove(*column_names, **options); end - - # Removes a reference. Optionally removes a +type+ column. - # - # t.remove_references(:user) - # t.remove_belongs_to(:supplier, polymorphic: true) - # - # See {connection.remove_reference}[rdoc-ref:SchemaStatements#remove_reference] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#776 - def remove_belongs_to(*args, **options); end - - # Removes the given check constraint from the table. - # - # t.remove_check_constraint(name: "price_check") - # - # See {connection.remove_check_constraint}[rdoc-ref:SchemaStatements#remove_check_constraint] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#826 - def remove_check_constraint(*args, **options); end - - # Removes the given foreign key from the table. - # - # t.remove_foreign_key(:authors) - # t.remove_foreign_key(column: :author_id) - # - # See {connection.remove_foreign_key}[rdoc-ref:SchemaStatements#remove_foreign_key] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#799 - def remove_foreign_key(*args, **options); end - - # Removes the given index from the table. - # - # t.remove_index(:branch_id) - # t.remove_index(column: [:branch_id, :party_id]) - # t.remove_index(name: :by_branch_party) - # t.remove_index(:branch_id, name: :by_branch_party) - # - # See {connection.remove_index}[rdoc-ref:SchemaStatements#remove_index] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#735 - def remove_index(column_name = T.unsafe(nil), **options); end - - # Removes a reference. Optionally removes a +type+ column. - # - # t.remove_references(:user) - # t.remove_belongs_to(:supplier, polymorphic: true) - # - # See {connection.remove_reference}[rdoc-ref:SchemaStatements#remove_reference] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#776 - def remove_references(*args, **options); end - - # Removes the timestamp columns (+created_at+ and +updated_at+) from the table. - # - # t.remove_timestamps - # - # See {connection.remove_timestamps}[rdoc-ref:SchemaStatements#remove_timestamps] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#744 - def remove_timestamps(**options); end - - # Renames a column. - # - # t.rename(:description, :name) - # - # See {connection.rename_column}[rdoc-ref:SchemaStatements#rename_column] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#753 - def rename(column_name, new_column_name); end - - # Renames the given index on the table. - # - # t.rename_index(:user_id, :account_id) - # - # See {connection.rename_index}[rdoc-ref:SchemaStatements#rename_index] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#673 - def rename_index(index_name, new_index_name); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 - def string(*names, **options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 - def text(*names, **options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 - def time(*names, **options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 - def timestamp(*names, **options); end - - # Adds timestamps (+created_at+ and +updated_at+) columns to the table. - # - # t.timestamps(null: false) - # - # See {connection.add_timestamps}[rdoc-ref:SchemaStatements#add_timestamps] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#682 - def timestamps(**options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 - def virtual(*names, **options); end -end - -# 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] -# def up -# create_table :foo do |t| -# puts t.class # => "ActiveRecord::ConnectionAdapters::TableDefinition" -# end -# end -# -# def down -# ... -# end -# end -# -# source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#301 -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 - 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 - def [](name); end - - # Returns the value of attribute as. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#304 - def as; end - - # Adds a reference. - # - # t.references(:user) - # t.belongs_to(:supplier, foreign_key: true) - # t.belongs_to(:supplier, foreign_key: true, type: :integer) - # - # 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#482 - def belongs_to(*args, **options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 - def bigint(*names, **options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 - def binary(*names, **options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 - def blob(*names, **options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 - def boolean(*names, **options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#456 - 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 - def check_constraints; end - - # Instantiates a new column for the table. - # See {connection.add_column}[rdoc-ref:ConnectionAdapters::SchemaStatements#add_column] - # for available options. - # - # Additional options are: - # * :index - - # Create an index for the column. Can be either true or an options hash. - # - # This method returns self. - # - # == Examples - # - # # Assuming +td+ is an instance of TableDefinition - # td.column(:granted, :boolean, index: true) - # - # == Short-hand examples - # - # Instead of calling #column directly, you can also work with the short-hand definitions for the default types. - # They use the type as the method name instead of as a parameter and allow for multiple columns to be defined - # in a single statement. - # - # What can be written like this with the regular calls to column: - # - # create_table :products do |t| - # t.column :shop_id, :integer - # t.column :creator_id, :integer - # t.column :item_number, :string - # t.column :name, :string, default: "Untitled" - # t.column :value, :string, default: "Untitled" - # t.column :created_at, :datetime - # t.column :updated_at, :datetime - # end - # add_index :products, :item_number - # - # can also be written as follows using the short-hand: - # - # create_table :products do |t| - # t.integer :shop_id, :creator_id - # t.string :item_number, index: true - # t.string :name, :value, default: "Untitled" - # t.timestamps null: false - # end - # - # There's a short-hand method for each of the type values declared at the top. And then there's - # TableDefinition#timestamps that'll add +created_at+ and +updated_at+ as datetimes. - # - # TableDefinition#references will add an appropriately-named _id column, plus a corresponding _type - # column if the :polymorphic option is supplied. If :polymorphic is a hash of - # options, these will be used when creating the _type column. The :index option - # will also create an index, similar to calling {add_index}[rdoc-ref:ConnectionAdapters::SchemaStatements#add_index]. - # So what can be written like this: - # - # create_table :taggings do |t| - # t.integer :tag_id, :tagger_id, :taggable_id - # t.string :tagger_type - # t.string :taggable_type, default: 'Photo' - # end - # add_index :taggings, :tag_id, name: 'index_taggings_on_tag_id' - # add_index :taggings, [:tagger_id, :tagger_type] - # - # Can also be written as follows using references: - # - # create_table :taggings do |t| - # t.references :tag, index: { name: 'index_taggings_on_tag_id' } - # t.references :tagger, polymorphic: true - # t.references :taggable, polymorphic: { default: 'Photo' }, index: false - # end - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#410 - 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 - def columns; end - - # Returns the value of attribute comment. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#304 - def comment; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 - def date(*names, **options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 - def datetime(*names, **options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 - def decimal(*names, **options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 - def float(*names, **options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#452 - 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 - def foreign_keys; end - - # Returns the value of attribute if_not_exists. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#304 - def if_not_exists; end - - # Adds index options to the indexes hash, keyed by column name - # This is primarily used to track indexes that need to be created after the table - # - # index(:account_id, name: 'index_projects_on_account_id') - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#448 - def index(column_name, **options); end - - # Returns the value of attribute indexes. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#304 - def indexes; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 - def integer(*names, **options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 - def json(*names, **options); end - - # Returns the value of attribute name. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#304 - def name; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#507 - def new_check_constraint_definition(expression, options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#489 - def new_column_definition(name, type, **options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#499 - def new_foreign_key_definition(to_table, options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 - def numeric(*names, **options); end - - # Returns the value of attribute options. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#304 - def options; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#330 - def primary_keys(name = T.unsafe(nil)); end - - # Adds a reference. - # - # t.references(:user) - # t.belongs_to(:supplier, foreign_key: true) - # t.belongs_to(:supplier, foreign_key: true, type: :integer) - # - # 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#482 - 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#440 - def remove_column(name); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 - def string(*names, **options); end - - # Returns the value of attribute temporary. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#304 - def temporary; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 - def text(*names, **options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 - def time(*names, **options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 - def timestamp(*names, **options); end - - # Appends :datetime columns :created_at and - # :updated_at to the table. See {connection.add_timestamps}[rdoc-ref:SchemaStatements#add_timestamps] - # - # t.timestamps null: false - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#464 - def timestamps(**options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#272 - def virtual(*names, **options); end - - private - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#517 - def aliased_types(name, fallback); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#513 - def create_column_definition(name, type, options); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#521 - def integer_like_primary_key?(type, options); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#525 - def integer_like_primary_key_type(type, options); end -end - -# source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#85 -class ActiveRecord::ConnectionAdapters::Transaction - # @return [Transaction] a new instance of Transaction - # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#89 - 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 - def add_record(record, ensure_finalize = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#142 - def before_commit_records; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#167 - def closed?; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#146 - def commit_records; end - - # Returns the value of attribute connection. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#86 - def connection; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#165 - def full_rollback?; end - - # Returns the value of attribute isolation_level. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#86 - def isolation_level; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#166 - def joinable?; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#118 - def materialize!; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#122 - def materialized?; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#168 - def open?; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#110 - def records; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#126 - def rollback_records; end - - # Returns the value of attribute savepoint_name. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#86 - def savepoint_name; end - - # Returns the value of attribute state. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#86 - def state; end - - # Returns the value of attribute written. - # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#87 - 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 - def written=(_arg0); end -end - -# source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#224 -class ActiveRecord::ConnectionAdapters::TransactionManager - # @return [TransactionManager] a new instance of TransactionManager - # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#225 - def initialize(connection); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#233 - 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 - def commit_transaction; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#359 - def current_transaction; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#265 - def disable_lazy_transactions!; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#270 - def enable_lazy_transactions!; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#274 - def lazy_transactions_enabled?; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#278 - def materialize_transactions; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#355 - def open_transactions; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#308 - def rollback_transaction(transaction = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#316 - 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 - def after_failure_actions(transaction, error); end -end - -# source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#364 -ActiveRecord::ConnectionAdapters::TransactionManager::NULL_TRANSACTION = T.let(T.unsafe(nil), ActiveRecord::ConnectionAdapters::NullTransaction) - -# source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#5 -class ActiveRecord::ConnectionAdapters::TransactionState - # @return [TransactionState] a new instance of TransactionState - # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#6 - def initialize(state = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#11 - def add_child(state); end - - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#63 - def commit!; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#20 - def committed?; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#44 - def completed?; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#16 - def finalized?; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#67 - def full_commit!; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#53 - def full_rollback!; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#24 - def fully_committed?; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#40 - def fully_completed?; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#32 - def fully_rolledback?; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#58 - def invalidate!; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#36 - def invalidated?; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#71 - def nullify!; end - - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#48 - def rollback!; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#28 - def rolledback?; end -end - -# source://activerecord//lib/active_record/connection_handling.rb#4 -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#337 - def clear_all_connections!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/connection_handling.rb#333 - 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 - 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 - - # Returns +true+ if Active Record is connected. - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_handling.rb#317 - def connected?; end - - # Connects to a role (e.g. writing, reading, or a custom role) and/or - # shard for the duration of the block. At the end of the block the - # connection will be returned to the original role / shard. - # - # If only a role is passed, Active Record will look up the connection - # based on the requested role. If a non-established role is requested - # an +ActiveRecord::ConnectionNotEstablished+ error will be raised: - # - # ActiveRecord::Base.connected_to(role: :writing) do - # Dog.create! # creates dog using dog writing connection - # end - # - # ActiveRecord::Base.connected_to(role: :reading) do - # Dog.create! # throws exception because we're on a replica - # end - # - # When swapping to a shard, the role must be passed as well. If a non-existent - # shard is passed, an +ActiveRecord::ConnectionNotEstablished+ error will be - # raised. - # - # When a shard and role is passed, Active Record will first lookup the role, - # and then look up the connection by shard key. - # - # ActiveRecord::Base.connected_to(role: :reading, shard: :shard_one_replica) do - # Dog.first # finds first Dog record stored on the shard one replica - # end - # - # source://activerecord//lib/active_record/connection_handling.rb#137 - 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. - # - # ActiveRecord::Base.connected_to(role: :writing) do - # ActiveRecord::Base.connected_to?(role: :writing) #=> true - # ActiveRecord::Base.connected_to?(role: :reading) #=> false - # end - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_handling.rb#252 - def connected_to?(role:, shard: T.unsafe(nil)); end - - # Connects a role and/or shard to the provided connection names. Optionally +prevent_writes+ - # can be passed to block writes on a connection. +reading+ will automatically set - # +prevent_writes+ to true. - # - # +connected_to_many+ is an alternative to deeply nested +connected_to+ blocks. - # - # Usage: - # - # ActiveRecord::Base.connected_to_many(AnimalsRecord, MealsRecord, role: :reading) do - # Dog.first # Read from animals replica - # Dinner.first # Read from meals replica - # Person.first # Read from primary writer - # end - # - # source://activerecord//lib/active_record/connection_handling.rb#172 - def connected_to_many(*classes, role:, shard: T.unsafe(nil), prevent_writes: T.unsafe(nil)); end - - # Use a specified connection. - # - # This method is useful for ensuring that a specific connection is - # being used. For example, when booting a console in readonly mode. - # - # 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 - 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 - def connection; end - - # Returns the db_config object from the associated connection: - # - # ActiveRecord::Base.connection_db_config - # # - # - # Use only for reading. - # - # source://activerecord//lib/active_record/connection_handling.rb#304 - def connection_db_config; end - - # source://activerecord//lib/active_record/connection_handling.rb#308 - 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 - 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 - 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. - # - # class AnimalsModel < ApplicationRecord - # self.abstract_class = true - # - # connects_to database: { writing: :primary, reading: :primary_replica } - # 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: - # - # class AnimalsModel < ApplicationRecord - # self.abstract_class = true - # - # connects_to shards: { - # default: { writing: :primary, reading: :primary_replica }, - # shard_two: { writing: :primary_shard_two, reading: :primary_shard_replica_two } - # } - # end - # - # Returns an array of database connections. - # - # @raise [NotImplementedError] - # - # source://activerecord//lib/active_record/connection_handling.rb#81 - def connects_to(database: T.unsafe(nil), shards: T.unsafe(nil)); end - - # Establishes the connection to the database. Accepts a hash as input where - # the :adapter key must be specified with the name of a database adapter (in lower-case) - # example for regular databases (MySQL, PostgreSQL, etc): - # - # ActiveRecord::Base.establish_connection( - # adapter: "mysql2", - # host: "localhost", - # username: "myuser", - # password: "mypass", - # database: "somedatabase" - # ) - # - # Example for SQLite database: - # - # ActiveRecord::Base.establish_connection( - # adapter: "sqlite3", - # database: "path/to/dbfile" - # ) - # - # Also accepts keys as strings (for parsing from YAML for example): - # - # ActiveRecord::Base.establish_connection( - # "adapter" => "sqlite3", - # "database" => "path/to/dbfile" - # ) - # - # Or a URL: - # - # ActiveRecord::Base.establish_connection( - # "postgres://myuser:mypass@localhost/somedatabase" - # ) - # - # In case {ActiveRecord::Base.configurations}[rdoc-ref:Core.configurations] - # 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: - # - # ActiveRecord::Base.establish_connection(:production) - # - # The exceptions AdapterNotSpecified, AdapterNotFound, and +ArgumentError+ - # may be returned on an error. - # - # source://activerecord//lib/active_record/connection_handling.rb#49 - def establish_connection(config_or_env = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/connection_handling.rb#337 - def flush_idle_connections!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/connection_handling.rb#256 - def lookup_connection_handler(handler_key); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_handling.rb#293 - def primary_class?; end - - # Prohibit swapping shards while inside of the passed block. - # - # In some cases you may want to be able to swap shards but not allow a - # nested call to connected_to or connected_to_many to swap again. This - # is useful in cases you're using sharding to provide per-request - # database isolation. - # - # source://activerecord//lib/active_record/connection_handling.rb#214 - def prohibit_shard_swapping(enabled = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/connection_handling.rb#321 - def remove_connection(name = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/connection_handling.rb#312 - def retrieve_connection; end - - # Determine whether or not shard swapping is currently prohibited - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/connection_handling.rb#223 - def shard_swapping_prohibited?; 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_handling.rb#238 - def while_preventing_writes(enabled = T.unsafe(nil), &block); end - - private - - # source://activerecord//lib/active_record/connection_handling.rb#382 - 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#347 - 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 -ActiveRecord::ConnectionHandling::DEFAULT_ENV = T.let(T.unsafe(nil), Proc) - -# source://activerecord//lib/active_record/connection_handling.rb#5 -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 - -# 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 -class ActiveRecord::ConnectionTimeoutError < ::ActiveRecord::ConnectionNotEstablished; end - -# source://activerecord//lib/active_record/core.rb#10 -module ActiveRecord::Core - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveRecord::Core::ClassMethods - - # New objects can be instantiated as either empty (pass no construction parameter) or pre-set with - # attributes but not yet saved (pass a hash with key names matching the associated table column names). - # 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: - # # Instantiates a single new object - # User::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 - def initialize(attributes = T.unsafe(nil)); end - - # Allows sort on objects - # - # source://activerecord//lib/active_record/core.rb#614 - def <=>(other_object); end - - # Returns true if +comparison_object+ is the same exact object, or +comparison_object+ - # is of the same type and +self+ has an ID and it is equal to +comparison_object.id+. - # - # Note that new records are different from any other record by definition, unless the - # other record is the receiver itself. Besides, if you fetch existing records with - # +select+ and leave the ID out, you're on your own, this predicate will return false. - # - # 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 - def ==(comparison_object); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/core.rb#626 - def blank?; end - - # source://activerecord//lib/active_record/core.rb#682 - def connection_handler; end - - # Populate +coder+ with attributes about this record that should be - # serialized. The structure of +coder+ defined in this method is - # guaranteed to match the structure of +coder+ passed to the #init_with - # method. - # - # Example: - # - # class Post < ActiveRecord::Base - # end - # coder = {} - # Post.new.encode_with(coder) - # coder # => {"attributes" => {"id" => nil, ... }} - # - # source://activerecord//lib/active_record/core.rb#565 - def encode_with(coder); end - - # Returns true if +comparison_object+ is the same exact object, or +comparison_object+ - # is of the same type and +self+ has an ID and it is equal to +comparison_object.id+. - # - # Note that new records are different from any other record by definition, unless the - # other record is the receiver itself. Besides, if you fetch existing records with - # +select+ and leave the ID out, you're on your own, this predicate will return false. - # - # 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 - 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 - def freeze; end - - # Returns +true+ if the attributes hash has been frozen. - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/core.rb#609 - 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 - def hash; end - - # Initialize an empty model object from +coder+. +coder+ should be - # the result of previously encoding an Active Record model, using - # #encode_with. - # - # class Post < ActiveRecord::Base - # end - # - # old_post = Post.new(title: "hello world") - # coder = {} - # old_post.encode_with(coder) - # - # post = Post.allocate - # post.init_with(coder) - # post.title # => 'hello world' - # - # source://activerecord//lib/active_record/core.rb#488 - def init_with(coder, &block); end - - # Initialize an empty model object from +attributes+. - # +attributes+ should be an attributes object, and unlike the - # `initialize` method, no assignment calls are made per attribute. - # - # @yield [_self] - # @yieldparam _self [ActiveRecord::Core] the object that the method was called on - # - # source://activerecord//lib/active_record/core.rb#498 - 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 - def inspect; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/core.rb#622 - 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 - def pretty_print(pp); end - - # Marks this record as read only. - # - # source://activerecord//lib/active_record/core.rb#678 - def readonly!; end - - # Returns +true+ if the record is read only. - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/core.rb#631 - 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::User.first - # user.strict_loading! # => true - # user.comments - # => ActiveRecord::StrictLoadingViolationError - # - # === 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. - # - # === Example: - # - # user = User::User.first - # user.strict_loading!(false) # => false - # user.comments - # => # - # - # source://activerecord//lib/active_record/core.rb#661 - 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 - def strict_loading?; end - - # Returns the value of attribute strict_loading_mode. - # - # source://activerecord//lib/active_record/core.rb#670 - 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 - 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 - def custom_inspect_method_defined?; end - - # source://activerecord//lib/active_record/core.rb#751 - def init_internals; end - - # source://activerecord//lib/active_record/core.rb#539 - def initialize_dup(other); end - - # source://activerecord//lib/active_record/core.rb#768 - def initialize_internals_callback; end - - # source://activerecord//lib/active_record/core.rb#782 - def inspection_filter; end - - # +Array#flatten+ will call +#to_ary+ (recursively) on each of the elements of - # the array, and then rescues from the possible +NoMethodError+. If those elements are - # +ActiveRecord::Base+'s, then this triggers the various +method_missing+'s that we have, - # which significantly impacts upon performance. - # - # So we can avoid the +method_missing+ hit by explicitly defining +#to_ary+ as +nil+ here. - # - # 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 - def to_ary; end - - module GeneratedClassMethods - def belongs_to_required_by_default; end - def belongs_to_required_by_default=(value); end - def belongs_to_required_by_default?; end - def default_connection_handler; end - def default_connection_handler=(value); end - def default_connection_handler?; end - def default_role; end - def default_role=(value); end - def default_role?; end - 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 enumerate_columns_in_select_statements; end - def enumerate_columns_in_select_statements=(value); end - def enumerate_columns_in_select_statements?; end - def has_many_inversing; end - def has_many_inversing=(value); end - def has_many_inversing?; end - def logger; end - def logger=(value); end - def logger?; end - def shard_selector; end - def shard_selector=(value); end - def shard_selector?; end - def strict_loading_by_default; end - def strict_loading_by_default=(value); end - def strict_loading_by_default?; end - end - - module GeneratedInstanceMethods - def default_connection_handler; end - def default_connection_handler?; end - def default_role; end - def default_role?; end - def default_shard; end - def default_shard?; end - def destroy_association_async_job; end - def logger; end - def logger?; end - end -end - -# source://activerecord//lib/active_record/core.rb#250 -module ActiveRecord::Core::ClassMethods - # Override the default class equality method to provide support for decorated models. - # - # 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 - 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 - def filter_attributes; end - - # Specifies columns which shouldn't be exposed while calling +#inspect+. - # - # source://activerecord//lib/active_record/core.rb#382 - def filter_attributes=(filter_attributes); end - - # source://activerecord//lib/active_record/core.rb#268 - def find(*ids); end - - # source://activerecord//lib/active_record/core.rb#287 - def find_by(*args); end - - # source://activerecord//lib/active_record/core.rb#329 - def find_by!(*args); end - - # source://activerecord//lib/active_record/core.rb#362 - 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 - def initialize_find_by_cache; end - - # source://activerecord//lib/active_record/core.rb#358 - def initialize_generated_modules; end - - # Returns a string like 'Post(id:integer, title:string, body:text)' - # - # source://activerecord//lib/active_record/core.rb#399 - def inspect; end - - # source://activerecord//lib/active_record/core.rb#387 - 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 - 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 - 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 - - # source://activerecord//lib/active_record/core.rb#348 - def writing_role=(value); end - - private - - # source://activerecord//lib/active_record/core.rb#438 - def relation; end - - # source://activerecord//lib/active_record/core.rb#448 - def table_metadata; end -end - -# source://activerecord//lib/active_record/core.rb#775 -class ActiveRecord::Core::InspectionMask - # source://activerecord//lib/active_record/core.rb#776 - def pretty_print(pp); end -end - -# = Active Record Counter Cache -# -# source://activerecord//lib/active_record/counter_cache.rb#5 -module ActiveRecord::CounterCache - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActiveRecord::CounterCache::ClassMethods - - private - - # source://activerecord//lib/active_record/counter_cache.rb#165 - def _create_record(attribute_names = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/counter_cache.rb#175 - def destroy_row; end - - # source://activerecord//lib/active_record/counter_cache.rb#190 - def each_counter_cached_associations; end -end - -# source://activerecord//lib/active_record/counter_cache.rb#8 -module ActiveRecord::CounterCache::ClassMethods - # Decrement a numeric field by one, via a direct SQL update. - # - # This works the same as #increment_counter but reduces the column value by - # 1 instead of increasing it. - # - # ==== Parameters - # - # * +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. - # * :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. - # - # ==== Examples - # - # # Decrement the posts_count column for the record with an id of 5 - # DiscussionBoard.decrement_counter(:posts_count, 5) - # - # # 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 - - # Increment a numeric field by one, via a direct SQL update. - # - # This method is used primarily for maintaining counter_cache columns that are - # used to store aggregate values. For example, a +DiscussionBoard+ may cache - # posts_count and comments_count to avoid running an SQL query to calculate the - # number of posts and comments there are, each time it is displayed. - # - # ==== Parameters - # - # * +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. - # * :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. - # - # ==== Examples - # - # # Increment the posts_count column for the record with an id of 5 - # DiscussionBoard.increment_counter(:posts_count, 5) - # - # # 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 - - # 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 - # counter has been corrupted or modified directly by SQL. - # - # ==== Parameters - # - # * +id+ - The id of the object you wish to reset a counter on. - # * +counters+ - One or more association counters to reset. Association name or counter name can be given. - # * :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. - # - # ==== Examples - # - # # For the Post with id #1, reset the comments_count - # Post.reset_counters(1, :comments) - # - # # Like above, but also touch the +updated_at+ and/or +updated_on+ - # # attributes. - # Post.reset_counters(1, :comments, touch: true) - # - # source://activerecord//lib/active_record/counter_cache.rb#29 - def reset_counters(id, *counters, touch: T.unsafe(nil)); end - - # A generic "counter updater" implementation, intended primarily to be - # used by #increment_counter and #decrement_counter, but which may also - # be useful on its own. It simply does a direct SQL update for the record - # with the given ID, altering the given hash of counters by the amount - # given by the corresponding value: - # - # ==== Parameters - # - # * +id+ - The id of the object you wish to update a counter on or an array of ids. - # * +counters+ - A Hash containing the names of the fields - # to update as keys and the amount to update the field by as values. - # * :touch option - Touch timestamp columns when updating. - # If attribute names are passed, they are updated along with updated_at/on - # attributes. - # - # ==== 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 - # # Executes the following SQL: - # # UPDATE posts - # # SET comment_count = COALESCE(comment_count, 0) - 1, - # # action_count = COALESCE(action_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 - # # Executes the following SQL: - # # UPDATE posts - # # SET comment_count = COALESCE(comment_count, 0) + 1 - # # WHERE id IN (10, 15) - # - # # For the Posts with id of 10 and 15, increment the comment_count by 1 - # # and update the updated_at value for each counter. - # Post.update_counters [10, 15], comment_count: 1, touch: true - # # Executes the following SQL: - # # UPDATE posts - # # SET comment_count = COALESCE(comment_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 - 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 -class ActiveRecord::DangerousAttributeError < ::ActiveRecord::ActiveRecordError; end - -# Raised when creating a database if it exists. -# -# source://activerecord//lib/active_record/errors.rb#266 -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. -# -# 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 - def initialize(configurations = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/database_configurations.rb#17 - 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 - 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 - # returned that corresponds with the environment and type requested. - # - # ==== Options - # - # * env_name: The environment name. Defaults to +nil+ which will collect - # configs for all environments. - # * 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+. - # * 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 - # 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 - - # Returns the value of attribute configurations. - # - # source://activerecord//lib/active_record/database_configurations.rb#16 - 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 - def empty?; end - - # 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. - # - # source://activerecord//lib/active_record/database_configurations.rb#73 - def find_db_config(env); end - - # A primary configuration is one that is named primary or if there is - # no primary, the first configuration for an environment will be treated - # as primary. This is used as the "default" configuration and is used - # when the application needs to treat one configuration differently. For - # example, when Rails dumps the schema, the primary configuration's schema - # file will be named `schema.rb` instead of `primary_schema.rb`. - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/database_configurations.rb#88 - def primary?(name); end - - # Returns fully resolved connection, accepts hash, string or symbol. - # Always returns a DatabaseConfiguration::DatabaseConfig - # - # == Examples - # - # Symbol representing current environment. - # - # DatabaseConfigurations.new("production" => {}).resolve(:production) - # # => DatabaseConfigurations::HashConfig.new(env_name: "production", config: {}) - # - # One layer deep hash of connection values. - # - # DatabaseConfigurations.new({}).resolve("adapter" => "sqlite3") - # # => DatabaseConfigurations::HashConfig.new(config: {"adapter" => "sqlite3"}) - # - # Connection URL. - # - # 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 - def resolve(config); end - - private - - # source://activerecord//lib/active_record/database_configurations.rb#148 - def build_configs(configs); end - - # source://activerecord//lib/active_record/database_configurations.rb#187 - def build_configuration_sentence; end - - # source://activerecord//lib/active_record/database_configurations.rb#221 - def build_db_config_from_hash(env_name, name, config); end - - # source://activerecord//lib/active_record/database_configurations.rb#200 - def build_db_config_from_raw_config(env_name, name, config); end - - # source://activerecord//lib/active_record/database_configurations.rb#211 - def build_db_config_from_string(env_name, name, config); end - - # source://activerecord//lib/active_record/database_configurations.rb#136 - def default_env; end - - # source://activerecord//lib/active_record/database_configurations.rb#140 - def env_with_configs(env = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/database_configurations.rb#242 - def environment_url_config(env, name, config); end - - # source://activerecord//lib/active_record/database_configurations.rb#249 - def environment_value_for(name); end - - # source://activerecord//lib/active_record/database_configurations.rb#233 - def merge_db_environment_variables(current_env, configs); end - - # source://activerecord//lib/active_record/database_configurations.rb#173 - def resolve_symbol_connection(name); end - - # source://activerecord//lib/active_record/database_configurations.rb#167 - def walk_configs(env_name, config); end -end - -# Expands a connection string into a hash. -# -# source://activerecord//lib/active_record/database_configurations/connection_url_resolver.rb#10 -class ActiveRecord::DatabaseConfigurations::ConnectionUrlResolver - # == Example - # - # url = "postgresql://foo:bar@localhost:9000/foo_test?pool=5&timeout=3000" - # ConnectionUrlResolver.new(url).to_hash - # # => { - # adapter: "postgresql", - # host: "localhost", - # port: 9000, - # database: "foo_test", - # username: "foo", - # password: "bar", - # pool: "5", - # timeout: "3000" - # } - # - # @return [ConnectionUrlResolver] a new instance of ConnectionUrlResolver - # - # source://activerecord//lib/active_record/database_configurations/connection_url_resolver.rb#25 - def initialize(url); end - - # Converts the given URL to a full connection hash. - # - # source://activerecord//lib/active_record/database_configurations/connection_url_resolver.rb#39 - def to_hash; end - - private - - # Returns name of the database. - # - # source://activerecord//lib/active_record/database_configurations/connection_url_resolver.rb#84 - def database_from_path; end - - # Converts the query parameters of the URI into a hash. - # - # "localhost?pool=5&reaping_frequency=2" - # # => { pool: "5", reaping_frequency: "2" } - # - # returns empty hash if no query present. - # - # "localhost" - # # => {} - # - # source://activerecord//lib/active_record/database_configurations/connection_url_resolver.rb#61 - def query_hash; end - - # source://activerecord//lib/active_record/database_configurations/connection_url_resolver.rb#65 - def raw_config; end - - # Returns the value of attribute uri. - # - # source://activerecord//lib/active_record/database_configurations/connection_url_resolver.rb#46 - def uri; end - - # source://activerecord//lib/active_record/database_configurations/connection_url_resolver.rb#48 - def uri_parser; end -end - -# ActiveRecord::Base.configurations will return either a HashConfig or -# 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 - def initialize(env_name, name); end - - # @raise [NotImplementedError] - # - # source://activerecord//lib/active_record/database_configurations/database_config.rb#30 - def _database=(database); end - - # @raise [NotImplementedError] - # - # source://activerecord//lib/active_record/database_configurations/database_config.rb#34 - def adapter; end - - # source://activerecord//lib/active_record/database_configurations/database_config.rb#18 - def adapter_method; end - - # @raise [NotImplementedError] - # - # source://activerecord//lib/active_record/database_configurations/database_config.rb#54 - def checkout_timeout; end - - # @raise [NotImplementedError] - # - # source://activerecord//lib/active_record/database_configurations/database_config.rb#26 - def database; end - - # source://activerecord//lib/active_record/database_configurations/database_config.rb#9 - def env_name; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/database_configurations/database_config.rb#74 - def for_current_env?; end - - # @raise [NotImplementedError] - # - # source://activerecord//lib/active_record/database_configurations/database_config.rb#22 - def host; end - - # @raise [NotImplementedError] - # - # source://activerecord//lib/active_record/database_configurations/database_config.rb#62 - def idle_timeout; end - - # @raise [NotImplementedError] - # - # source://activerecord//lib/active_record/database_configurations/database_config.rb#50 - def max_queue; end - - # @raise [NotImplementedError] - # - # source://activerecord//lib/active_record/database_configurations/database_config.rb#46 - def max_threads; end - - # @raise [NotImplementedError] - # - # source://activerecord//lib/active_record/database_configurations/database_config.rb#70 - def migrations_paths; end - - # @raise [NotImplementedError] - # - # source://activerecord//lib/active_record/database_configurations/database_config.rb#42 - 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. - # - # source://activerecord//lib/active_record/database_configurations/database_config.rb#11 - def owner_name=(_arg0); end - - # @raise [NotImplementedError] - # - # source://activerecord//lib/active_record/database_configurations/database_config.rb#38 - def pool; end - - # @raise [NotImplementedError] - # - # source://activerecord//lib/active_record/database_configurations/database_config.rb#58 - def reaping_frequency; end - - # @raise [NotImplementedError] - # @return [Boolean] - # - # source://activerecord//lib/active_record/database_configurations/database_config.rb#66 - def replica?; end - - # @raise [NotImplementedError] - # - # source://activerecord//lib/active_record/database_configurations/database_config.rb#78 - def schema_cache_path; end -end - -# A HashConfig object is created for each database configuration entry that -# is created from a hash. -# -# A hash config: -# -# { "development" => { "database" => "db_name" } } -# -# Becomes: -# -# # -# -# ==== 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. -# -# source://activerecord//lib/active_record/database_configurations/hash_config.rb#27 -class ActiveRecord::DatabaseConfigurations::HashConfig < ::ActiveRecord::DatabaseConfigurations::DatabaseConfig - # @return [HashConfig] a new instance of HashConfig - # - # source://activerecord//lib/active_record/database_configurations/hash_config.rb#30 - def initialize(env_name, name, configuration_hash); end - - # source://activerecord//lib/active_record/database_configurations/hash_config.rb#61 - def _database=(database); end - - # source://activerecord//lib/active_record/database_configurations/hash_config.rb#96 - def adapter; end - - # source://activerecord//lib/active_record/database_configurations/hash_config.rb#81 - def checkout_timeout; end - - # Returns the value of attribute configuration_hash. - # - # source://activerecord//lib/active_record/database_configurations/hash_config.rb#28 - def configuration_hash; end - - # source://activerecord//lib/active_record/database_configurations/hash_config.rb#57 - def database; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/database_configurations/hash_config.rb#139 - def database_tasks?; end - - # source://activerecord//lib/active_record/database_configurations/hash_config.rb#107 - def default_schema_cache_path; end - - # source://activerecord//lib/active_record/database_configurations/hash_config.rb#49 - def host; end - - # source://activerecord//lib/active_record/database_configurations/hash_config.rb#91 - def idle_timeout; end - - # source://activerecord//lib/active_record/database_configurations/hash_config.rb#111 - def lazy_schema_cache_path; end - - # source://activerecord//lib/active_record/database_configurations/hash_config.rb#77 - def max_queue; end - - # source://activerecord//lib/active_record/database_configurations/hash_config.rb#73 - 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 - def migrations_paths; end - - # source://activerecord//lib/active_record/database_configurations/hash_config.rb#69 - def min_threads; end - - # source://activerecord//lib/active_record/database_configurations/hash_config.rb#65 - def pool; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/database_configurations/hash_config.rb#115 - def primary?; 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 - def reaping_frequency; end - - # Determines whether a database configuration is for a replica / readonly - # connection. If the +replica+ key is present in the config, +replica?+ will - # return +true+. - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/database_configurations/hash_config.rb#38 - 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 - def schema_cache_path; end - - # Determines whether to dump the schema/structure files and the - # filename that should be used. - # - # 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 - # will generate the filename from the database config name. - # - # source://activerecord//lib/active_record/database_configurations/hash_config.rb#127 - def schema_dump(format = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/database_configurations/hash_config.rb#53 - def socket; end - - private - - # source://activerecord//lib/active_record/database_configurations/hash_config.rb#144 - def schema_file_type(format); end -end - -# source://activerecord//lib/active_record/database_configurations.rb#14 -class ActiveRecord::DatabaseConfigurations::InvalidConfigurationError < ::StandardError; end - -# 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. -# -# A URL config: -# -# postgres://localhost/foo -# -# Becomes: -# -# # -# -# ==== 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. -# -# source://activerecord//lib/active_record/database_configurations/url_config.rb#31 -class ActiveRecord::DatabaseConfigurations::UrlConfig < ::ActiveRecord::DatabaseConfigurations::HashConfig - # @return [UrlConfig] a new instance of UrlConfig - # - # source://activerecord//lib/active_record/database_configurations/url_config.rb#34 - 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 - def url; end - - private - - # 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 - 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 -class ActiveRecord::DatabaseConnectionError < ::ActiveRecord::ConnectionNotEstablished - # @return [DatabaseConnectionError] a new instance of DatabaseConnectionError - # - # source://activerecord//lib/active_record/errors.rb#69 - def initialize(message = T.unsafe(nil)); end - - class << self - # source://activerecord//lib/active_record/errors.rb#74 - def hostname_error(hostname); end - - # source://activerecord//lib/active_record/errors.rb#81 - def username_error(username); end - end -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 -class ActiveRecord::Deadlocked < ::ActiveRecord::TransactionRollbackError; end - -# == 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, -# where all attributes from all levels of the hierarchy are represented in a single table. Both have their -# places, but neither are without their drawbacks. -# -# The problem with purely abstract classes is that all concrete subclasses must persist all the shared -# attributes themselves in their own tables (also known as class-table inheritance). This makes it hard to -# do queries across the hierarchy. For example, imagine you have the following hierarchy: -# -# Entry < ApplicationRecord -# Message < Entry -# Comment < Entry -# -# How do you show a feed that has both +Message+ and +Comment+ records, which can be easily paginated? -# Well, you can't! Messages are backed by a messages table and comments by a comments table. You can't -# pull from both tables at once and use a consistent OFFSET/LIMIT scheme. -# -# You can get around the pagination problem by using single-table inheritance, but now you're forced into -# a single mega table with all the attributes from all subclasses. No matter how divergent. If a Message -# has a subject, but the comment does not, well, now the comment does anyway! So STI works best when there's -# little divergence between the subclasses and their attributes. -# -# But there's a third way: Delegated types. With this approach, the "superclass" is a concrete class -# that is represented by its own table, where all the superclass attributes that are shared amongst all the -# "subclasses" are stored. And then each of the subclasses have their own individual tables for additional -# attributes that are particular to their implementation. This is similar to what's called multi-table -# inheritance in Django, but instead of actual inheritance, this approach uses delegation to form the -# hierarchy and share responsibilities. -# -# Let's look at that entry/message/comment example using delegated types: -# -# # Schema: entries[ id, account_id, creator_id, created_at, updated_at, entryable_type, entryable_id ] -# class Entry < ApplicationRecord -# belongs_to :account -# belongs_to :creator -# delegated_type :entryable, types: %w[ Message Comment ] -# end -# -# module Entryable -# extend ActiveSupport::Concern -# -# included do -# has_one :entry, as: :entryable, touch: true -# end -# end -# -# # Schema: messages[ id, subject, body ] -# class Message < ApplicationRecord -# include Entryable -# end -# -# # Schema: comments[ id, content ] -# class Comment < ApplicationRecord -# include Entryable -# end -# -# As you can see, neither +Message+ nor +Comment+ are meant to stand alone. Crucial metadata for both classes -# resides in the +Entry+ "superclass". But the +Entry+ absolutely can stand alone in terms of querying capacity -# in particular. You can now easily do things like: -# -# Account.find(1).entries.order(created_at: :desc).limit(50) -# -# Which is exactly what you want when displaying both comments and messages together. The entry itself can -# be rendered as its delegated type easily, like so: -# -# # entries/_entry.html.erb -# <%= render "entries/entryables/#{entry.entryable_name}", entry: entry %> -# -# # entries/entryables/_message.html.erb -#
    -#
    <%= entry.message.subject %>
    -#

    <%= entry.message.body %>

    -# Posted on <%= entry.created_at %> by <%= entry.creator.name %> -#
    -# -# # entries/entryables/_comment.html.erb -#
    -# <%= entry.creator.name %> said: <%= entry.comment.content %> -#
    -# -# == Sharing behavior with concerns and controllers -# -# The entry "superclass" also serves as a perfect place to put all that shared logic that applies to both -# messages and comments, and which acts primarily on the shared attributes. Imagine: -# -# class Entry < ApplicationRecord -# include Eventable, Forwardable, Redeliverable -# end -# -# Which allows you to have controllers for things like +ForwardsController+ and +RedeliverableController+ -# that both act on entries, and thus provide the shared functionality to both messages and comments. -# -# == Creating new records -# -# You create a new record that uses delegated typing by creating the delegator and delegatee at the same time, -# like so: -# -# Entry.create! entryable: Comment.new(content: "Hello!"), creator: Current.user -# -# If you need more complicated composition, or you need to perform dependent validation, you should build a factory -# method or class to take care of the complicated needs. This could be as simple as: -# -# class Entry < ApplicationRecord -# def self.create_with_comment(content, creator: Current.user) -# create! entryable: Comment.new(content: content), creator: creator -# end -# end -# -# == Adding further delegation -# -# The delegated type shouldn't just answer the question of what the underlying class is called. In fact, that's -# an anti-pattern most of the time. The reason you're building this hierarchy is to take advantage of polymorphism. -# So here's a simple example of that: -# -# class Entry < ApplicationRecord -# delegated_type :entryable, types: %w[ Message Comment ] -# delegate :title, to: :entryable -# end -# -# class Message < ApplicationRecord -# def title -# subject -# end -# end -# -# class Comment < ApplicationRecord -# def title -# content.truncate(20) -# end -# end -# -# Now you can list a bunch of entries, call Entry#title, and polymorphism will provide you with the answer. -# -# == Nested Attributes -# -# Enabling nested attributes on a delegated_type association allows you to -# create the entry and message in one go: -# -# class Entry < ApplicationRecord -# delegated_type :entryable, types: %w[ Message Comment ] -# accepts_nested_attributes_for :entryable -# end -# -# params = { entry: { entryable_type: 'Message', entryable_attributes: { subject: 'Smiling' } } } -# entry = Entry.create(params[:entry]) -# entry.entryable.id # => 2 -# entry.entryable.subject # => 'Smiling' -# -# source://activerecord//lib/active_record/delegated_type.rb#155 -module ActiveRecord::DelegatedType - # Defines this as a class that'll delegate its type for the passed +role+ to the class references in +types+. - # That'll create a polymorphic +belongs_to+ relationship to that +role+, and it'll add all the delegated - # type convenience methods: - # - # class Entry < ApplicationRecord - # delegated_type :entryable, types: %w[ Message Comment ], dependent: :destroy - # end - # - # Entry#entryable_class # => +Message+ or +Comment+ - # Entry#entryable_name # => "message" or "comment" - # Entry.messages # => Entry.where(entryable_type: "Message") - # Entry#message? # => true when entryable_type == "Message" - # Entry#message # => returns the message record, when entryable_type == "Message", otherwise nil - # Entry#message_id # => returns entryable_id, when entryable_type == "Message", otherwise nil - # Entry.comments # => Entry.where(entryable_type: "Comment") - # Entry#comment? # => true when entryable_type == "Comment" - # Entry#comment # => returns the comment record, when entryable_type == "Comment", otherwise nil - # Entry#comment_id # => returns entryable_id, when entryable_type == "Comment", otherwise nil - # - # You can also declare namespaced types: - # - # class Entry < ApplicationRecord - # delegated_type :entryable, types: %w[ Message Comment Access::NoticeMessage ], dependent: :destroy - # end - # - # Entry.access_notice_messages - # entry.access_notice_message - # entry.access_notice_message? - # - # === Options - # - # The +options+ are passed directly to the +belongs_to+ call, so this is where you declare +dependent+ etc. - # The following options can be included to specialize the behavior of the delegated type convenience methods. - # - # [:foreign_key] - # Specify the foreign key used for the convenience methods. By default this is guessed to be the passed - # +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. - # [:primary_key] - # Specify the method that returns the primary key of associated object used for the convenience methods. - # By default this is +id+. - # - # Option examples: - # class Entry < ApplicationRecord - # delegated_type :entryable, types: %w[ Message Comment ], primary_key: :uuid, foreign_key: :entryable_uuid - # end - # - # 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 - def delegated_type(role, types:, **options); end - - private - - # source://activerecord//lib/active_record/delegated_type.rb#212 - def define_delegated_type_methods(role, types:, options:); end -end - -# source://activerecord//lib/active_record/relation/delegation.rb#7 -module ActiveRecord::Delegation - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActiveRecord::Delegation::ClassMethods - - # source://activerecord//lib/active_record/relation/delegation.rb#88 - def &(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/relation/delegation.rb#88 - def +(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/relation/delegation.rb#88 - def -(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/relation/delegation.rb#88 - def [](*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/relation/delegation.rb#88 - def as_json(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/relation/delegation.rb#88 - def compact(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/relation/delegation.rb#93 - def connection(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/relation/delegation.rb#88 - def each(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/relation/delegation.rb#88 - def encode_with(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/relation/delegation.rb#88 - def in_groups(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/relation/delegation.rb#88 - def in_groups_of(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/relation/delegation.rb#88 - def index(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/relation/delegation.rb#88 - def join(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/relation/delegation.rb#88 - def length(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/relation/delegation.rb#93 - def primary_key(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/relation/delegation.rb#88 - def reverse(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/relation/delegation.rb#88 - def rindex(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/relation/delegation.rb#88 - def rotate(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/relation/delegation.rb#88 - def sample(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/relation/delegation.rb#88 - def shuffle(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/relation/delegation.rb#88 - def slice(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/relation/delegation.rb#88 - def split(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/relation/delegation.rb#88 - def to_formatted_s(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/relation/delegation.rb#88 - def to_fs(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/relation/delegation.rb#88 - def to_sentence(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/relation/delegation.rb#88 - def to_xml(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/relation/delegation.rb#88 - def |(*_arg0, **_arg1, &_arg2); end - - private - - # @return [Boolean] - # - # source://activerecord//lib/active_record/relation/delegation.rb#128 - def respond_to_missing?(method, _); end -end - -# source://activerecord//lib/active_record/relation/delegation.rb#116 -module ActiveRecord::Delegation::ClassMethods - # source://activerecord//lib/active_record/relation/delegation.rb#117 - def create(klass, *args, **kwargs); end - - private - - # source://activerecord//lib/active_record/relation/delegation.rb#122 - def relation_class_for(klass); end -end - -# source://activerecord//lib/active_record/relation/delegation.rb#95 -module ActiveRecord::Delegation::ClassSpecificRelation - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActiveRecord::Delegation::ClassSpecificRelation::ClassMethods - - private - - # source://activerecord//lib/active_record/relation/delegation.rb#105 - def method_missing(method, *args, **_arg2, &block); end -end - -# source://activerecord//lib/active_record/relation/delegation.rb#98 -module ActiveRecord::Delegation::ClassSpecificRelation::ClassMethods - # source://activerecord//lib/active_record/relation/delegation.rb#99 - def name; end -end - -# source://activerecord//lib/active_record/relation/delegation.rb#8 -module ActiveRecord::Delegation::DelegateCache - # source://activerecord//lib/active_record/relation/delegation.rb#38 - def generate_relation_method(method); end - - # source://activerecord//lib/active_record/relation/delegation.rb#33 - def inherited(child_class); end - - # source://activerecord//lib/active_record/relation/delegation.rb#13 - def initialize_relation_delegate_cache; end - - # source://activerecord//lib/active_record/relation/delegation.rb#9 - def relation_delegate_class(klass); end - - protected - - # source://activerecord//lib/active_record/relation/delegation.rb#43 - def include_relation_methods(delegate); end - - private - - # source://activerecord//lib/active_record/relation/delegation.rb#49 - def generated_relation_methods; end -end - -# source://activerecord//lib/active_record/relation/delegation.rb#57 -class ActiveRecord::Delegation::GeneratedRelationMethods < ::Module - include ::Mutex_m - - # source://activerecord//lib/active_record/relation/delegation.rb#60 - def generate_method(method); end - - # source://mutex_m/0.1.1/mutex_m.rb#93 - def lock; end - - # source://mutex_m/0.1.1/mutex_m.rb#83 - def locked?; end - - # source://mutex_m/0.1.1/mutex_m.rb#78 - def synchronize(&block); end - - # source://mutex_m/0.1.1/mutex_m.rb#88 - def try_lock; end - - # source://mutex_m/0.1.1/mutex_m.rb#98 - def unlock; end -end - -# This error is raised when trying to destroy a parent instance in N:1 or 1:1 associations -# (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 -class ActiveRecord::DeleteRestrictionError < ::ActiveRecord::ActiveRecordError - # @return [DeleteRestrictionError] a new instance of DeleteRestrictionError - # - # source://activerecord//lib/active_record/associations.rb#241 - def initialize(name = T.unsafe(nil)); end -end - -# source://activerecord//lib/active_record/destroy_association_async_job.rb#4 -class ActiveRecord::DestroyAssociationAsyncError < ::StandardError; end - -# Job to destroy the records associated with a destroyed record in background. -# -# source://activerecord//lib/active_record/destroy_association_async_job.rb#8 -class ActiveRecord::DestroyAssociationAsyncJob < ::ActiveJob::Base - # source://activerecord//lib/active_record/destroy_association_async_job.rb#13 - 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 - def owner_destroyed?(owner, ensuring_owner_was_method); end - - class << self - # source://activejob/7.0.4.2/lib/active_job/queue_name.rb#56 - def queue_name; end - - # source://activesupport/7.0.4.2/lib/active_support/rescuable.rb#13 - def rescue_handlers; end - end -end - -# source://activerecord//lib/active_record/disable_joins_association_relation.rb#4 -class ActiveRecord::DisableJoinsAssociationRelation < ::ActiveRecord::Relation - # @return [DisableJoinsAssociationRelation] a new instance of DisableJoinsAssociationRelation - # - # source://activerecord//lib/active_record/disable_joins_association_relation.rb#7 - def initialize(klass, key, ids); end - - # source://activerecord//lib/active_record/disable_joins_association_relation.rb#17 - def first(limit = T.unsafe(nil)); end - - # Returns the value of attribute ids. - # - # source://activerecord//lib/active_record/disable_joins_association_relation.rb#5 - def ids; end - - # Returns the value of attribute key. - # - # source://activerecord//lib/active_record/disable_joins_association_relation.rb#5 - def key; end - - # source://activerecord//lib/active_record/disable_joins_association_relation.rb#13 - def limit(value); end - - # source://activerecord//lib/active_record/disable_joins_association_relation.rb#25 - def load; end -end - -# source://activerecord//lib/active_record/migration.rb#103 -class ActiveRecord::DuplicateMigrationNameError < ::ActiveRecord::MigrationError - # @return [DuplicateMigrationNameError] a new instance of DuplicateMigrationNameError - # - # source://activerecord//lib/active_record/migration.rb#104 - def initialize(name = T.unsafe(nil)); end -end - -# source://activerecord//lib/active_record/migration.rb#93 -class ActiveRecord::DuplicateMigrationVersionError < ::ActiveRecord::MigrationError - # @return [DuplicateMigrationVersionError] a new instance of DuplicateMigrationVersionError - # - # source://activerecord//lib/active_record/migration.rb#94 - def initialize(version = T.unsafe(nil)); end -end - -# source://activerecord//lib/active_record/dynamic_matchers.rb#4 -module ActiveRecord::DynamicMatchers - private - - # source://activerecord//lib/active_record/dynamic_matchers.rb#15 - def method_missing(name, *arguments, &block); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/dynamic_matchers.rb#6 - def respond_to_missing?(name, _); end -end - -# source://activerecord//lib/active_record/dynamic_matchers.rb#93 -class ActiveRecord::DynamicMatchers::FindBy < ::ActiveRecord::DynamicMatchers::Method - # source://activerecord//lib/active_record/dynamic_matchers.rb#100 - def finder; end - - class << self - # source://activerecord//lib/active_record/dynamic_matchers.rb#96 - def prefix; end - end -end - -# source://activerecord//lib/active_record/dynamic_matchers.rb#105 -class ActiveRecord::DynamicMatchers::FindByBang < ::ActiveRecord::DynamicMatchers::Method - # source://activerecord//lib/active_record/dynamic_matchers.rb#116 - def finder; end - - class << self - # source://activerecord//lib/active_record/dynamic_matchers.rb#108 - def prefix; end - - # source://activerecord//lib/active_record/dynamic_matchers.rb#112 - def suffix; end - end -end - -# source://activerecord//lib/active_record/dynamic_matchers.rb#26 -class ActiveRecord::DynamicMatchers::Method - # @return [Method] a new instance of Method - # - # source://activerecord//lib/active_record/dynamic_matchers.rb#52 - def initialize(model, method_name); end - - # Returns the value of attribute attribute_names. - # - # source://activerecord//lib/active_record/dynamic_matchers.rb#50 - def attribute_names; end - - # source://activerecord//lib/active_record/dynamic_matchers.rb#63 - def define; end - - # Returns the value of attribute model. - # - # source://activerecord//lib/active_record/dynamic_matchers.rb#50 - def model; end - - # Returns the value of attribute name. - # - # source://activerecord//lib/active_record/dynamic_matchers.rb#50 - def name; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/dynamic_matchers.rb#59 - def valid?; end - - private - - # Given that the parameters starts with `_`, the finder needs to use the - # same parameter name. - # - # source://activerecord//lib/active_record/dynamic_matchers.rb#84 - def attributes_hash; end - - # source://activerecord//lib/active_record/dynamic_matchers.rb#72 - def body; end - - # @raise [NotImplementedError] - # - # source://activerecord//lib/active_record/dynamic_matchers.rb#88 - def finder; end - - # The parameters in the signature may have reserved Ruby words, in order - # to prevent errors, we start each param name with `_`. - # - # source://activerecord//lib/active_record/dynamic_matchers.rb#78 - def signature; end - - class << self - # source://activerecord//lib/active_record/dynamic_matchers.rb#32 - def match(model, name); end - - # Returns the value of attribute matchers. - # - # source://activerecord//lib/active_record/dynamic_matchers.rb#30 - def matchers; end - - # source://activerecord//lib/active_record/dynamic_matchers.rb#37 - def pattern; end - - # @raise [NotImplementedError] - # - # source://activerecord//lib/active_record/dynamic_matchers.rb#41 - def prefix; end - - # source://activerecord//lib/active_record/dynamic_matchers.rb#45 - def suffix; end - end -end - -# This error is raised when trying to eager load a polymorphic association using a JOIN. -# Eager loading polymorphic associations is only possible with -# {ActiveRecord::Relation#preload}[rdoc-ref:QueryMethods#preload]. -# -# source://activerecord//lib/active_record/associations.rb#227 -class ActiveRecord::EagerLoadPolymorphicError < ::ActiveRecord::ActiveRecordError - # @return [EagerLoadPolymorphicError] a new instance of EagerLoadPolymorphicError - # - # source://activerecord//lib/active_record/associations.rb#228 - def initialize(reflection = T.unsafe(nil)); end -end - -# source://activerecord//lib/active_record/encryption.rb#7 -module ActiveRecord::Encryption - include ::ActiveRecord::Encryption::Configurable - include ::ActiveRecord::Encryption::Contexts - extend ::ActiveSupport::Autoload - extend ::ActiveRecord::Encryption::Configurable::ClassMethods - extend ::ActiveRecord::Encryption::Contexts::ClassMethods - - # source://activerecord//lib/active_record/encryption/configurable.rb#10 - def config; end - - # source://activesupport/7.0.4.2/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#56 - def custom_contexts; end - - # source://activesupport/7.0.4.2/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#100 - def custom_contexts=(obj); end - - # source://activerecord//lib/active_record/encryption/contexts.rb#17 - def default_context; end - - # source://activerecord//lib/active_record/encryption/configurable.rb#11 - def encrypted_attribute_declaration_listeners; end - - # source://activerecord//lib/active_record/encryption/configurable.rb#11 - def encrypted_attribute_declaration_listeners=(val); end - - class << self - # source://activerecord//lib/active_record/encryption/configurable.rb#10 - def config; end - - # source://activesupport/7.0.4.2/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#48 - def custom_contexts; end - - # source://activesupport/7.0.4.2/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#92 - 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 - def eager_load!; end - - # source://activerecord//lib/active_record/encryption/configurable.rb#11 - def encrypted_attribute_declaration_listeners; end - - # source://activerecord//lib/active_record/encryption/configurable.rb#11 - def encrypted_attribute_declaration_listeners=(val); end - 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) -# or derive an initialization vector from the encrypted content for deterministic encryption. -# -# See +Cipher::Aes256Gcm+. -# -# source://activerecord//lib/active_record/encryption/cipher.rb#11 -class ActiveRecord::Encryption::Cipher - extend ::ActiveSupport::Autoload - - # Decrypt the provided +Message+. - # - # When +key+ is an Array, it will try all the keys raising a - # +ActiveRecord::Encryption::Errors::Decryption+ if none works. - # - # source://activerecord//lib/active_record/encryption/cipher.rb#25 - def decrypt(encrypted_message, key:); end - - # Encrypts the provided text and return an encrypted +Message+. - # - # source://activerecord//lib/active_record/encryption/cipher.rb#15 - def encrypt(clean_text, key:, deterministic: T.unsafe(nil)); end - - # source://activerecord//lib/active_record/encryption/cipher.rb#35 - def iv_length; end - - # source://activerecord//lib/active_record/encryption/cipher.rb#31 - def key_length; end - - private - - # source://activerecord//lib/active_record/encryption/cipher.rb#48 - def cipher_for(secret, deterministic: T.unsafe(nil)); end - - # source://activerecord//lib/active_record/encryption/cipher.rb#40 - def try_to_decrypt_with_each(encrypted_text, keys:); end -end - -# A 256-GCM cipher. -# -# By default it will use random initialization vectors. For deterministic encryption, it will use a SHA-256 hash of -# the text to encrypt and the secret. -# -# See +Encryptor+ -# -# source://activerecord//lib/active_record/encryption/cipher/aes256_gcm.rb#15 -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 - def initialize(secret, deterministic: T.unsafe(nil)); end - - # source://activerecord//lib/active_record/encryption/cipher/aes256_gcm.rb#56 - def decrypt(encrypted_message); end - - # source://activerecord//lib/active_record/encryption/cipher/aes256_gcm.rb#35 - def encrypt(clear_text); end - - private - - # source://activerecord//lib/active_record/encryption/cipher/aes256_gcm.rb#92 - def generate_deterministic_iv(clear_text); end - - # source://activerecord//lib/active_record/encryption/cipher/aes256_gcm.rb#84 - def generate_iv(cipher, clear_text); end - - class << self - # source://activerecord//lib/active_record/encryption/cipher/aes256_gcm.rb#23 - def iv_length; end - - # source://activerecord//lib/active_record/encryption/cipher/aes256_gcm.rb#19 - def key_length; end - end -end - -# source://activerecord//lib/active_record/encryption/cipher/aes256_gcm.rb#16 -ActiveRecord::Encryption::Cipher::Aes256Gcm::CIPHER_TYPE = T.let(T.unsafe(nil), String) - -# source://activerecord//lib/active_record/encryption/cipher.rb#12 -ActiveRecord::Encryption::Cipher::DEFAULT_ENCODING = T.let(T.unsafe(nil), Encoding) - -# Container of configuration options -# -# source://activerecord//lib/active_record/encryption/config.rb#6 -class ActiveRecord::Encryption::Config - # @return [Config] a new instance of Config - # - # source://activerecord//lib/active_record/encryption/config.rb#11 - def initialize; end - - # Returns the value of attribute add_to_filter_parameters. - # - # source://activerecord//lib/active_record/encryption/config.rb#7 - 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 - def add_to_filter_parameters=(_arg0); end - - # Returns the value of attribute deterministic_key. - # - # source://activerecord//lib/active_record/encryption/config.rb#7 - 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 - def deterministic_key=(_arg0); end - - # Returns the value of attribute encrypt_fixtures. - # - # source://activerecord//lib/active_record/encryption/config.rb#7 - 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 - def encrypt_fixtures=(_arg0); end - - # Returns the value of attribute excluded_from_filter_parameters. - # - # source://activerecord//lib/active_record/encryption/config.rb#7 - 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 - def excluded_from_filter_parameters=(_arg0); end - - # Returns the value of attribute extend_queries. - # - # source://activerecord//lib/active_record/encryption/config.rb#7 - 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 - def extend_queries=(_arg0); end - - # Returns the value of attribute forced_encoding_for_deterministic_encryption. - # - # source://activerecord//lib/active_record/encryption/config.rb#7 - 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 - def forced_encoding_for_deterministic_encryption=(_arg0); end - - # Returns the value of attribute key_derivation_salt. - # - # source://activerecord//lib/active_record/encryption/config.rb#7 - 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 - 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 - def previous=(previous_schemes_properties); end - - # Returns the value of attribute previous_schemes. - # - # source://activerecord//lib/active_record/encryption/config.rb#7 - 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 - def previous_schemes=(_arg0); end - - # Returns the value of attribute primary_key. - # - # source://activerecord//lib/active_record/encryption/config.rb#7 - 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 - def primary_key=(_arg0); end - - # Returns the value of attribute store_key_references. - # - # source://activerecord//lib/active_record/encryption/config.rb#7 - 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 - def store_key_references=(_arg0); end - - # Returns the value of attribute support_unencrypted_data. - # - # source://activerecord//lib/active_record/encryption/config.rb#7 - 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 - def support_unencrypted_data=(_arg0); end - - # Returns the value of attribute validate_column_size. - # - # source://activerecord//lib/active_record/encryption/config.rb#7 - 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 - def validate_column_size=(_arg0); end - - private - - # source://activerecord//lib/active_record/encryption/config.rb#39 - def add_previous_scheme(**properties); end - - # source://activerecord//lib/active_record/encryption/config.rb#25 - def set_defaults; end -end - -# Configuration API for ActiveRecord::Encryption -# -# source://activerecord//lib/active_record/encryption/configurable.rb#6 -module ActiveRecord::Encryption::Configurable - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActiveRecord::Encryption::Configurable::ClassMethods -end - -# source://activerecord//lib/active_record/encryption/configurable.rb#0 -module ActiveRecord::Encryption::Configurable::ClassMethods - # source://activerecord//lib/active_record/encryption/configurable.rb#17 - 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 - - # source://activerecord//lib/active_record/encryption/configurable.rb#47 - def encrypted_attribute_was_declared(klass, name); end - - # source://activerecord//lib/active_record/encryption/configurable.rb#17 - def encryptor(*_arg0, **_arg1, &_arg2); end - - # 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 - - # source://activerecord//lib/active_record/encryption/configurable.rb#17 - def key_provider(*_arg0, **_arg1, &_arg2); end - - # 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 - 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: -# -# * A key provider -# * A key generator -# * An encryptor, the facade to encrypt data -# * A cipher, the encryption algorithm -# * A message serializer -# -# source://activerecord//lib/active_record/encryption/context.rb#12 -class ActiveRecord::Encryption::Context - # @return [Context] a new instance of Context - # - # source://activerecord//lib/active_record/encryption/context.rb#19 - def initialize; end - - # source://activerecord//lib/active_record/encryption/context.rb#16 - def cipher; end - - # source://activerecord//lib/active_record/encryption/context.rb#16 - def cipher=(_arg0); end - - # source://activerecord//lib/active_record/encryption/context.rb#16 - def encryptor; end - - # source://activerecord//lib/active_record/encryption/context.rb#16 - def encryptor=(_arg0); end - - # source://activerecord//lib/active_record/encryption/context.rb#16 - def frozen_encryption; end - - # source://activerecord//lib/active_record/encryption/context.rb#16 - def frozen_encryption=(_arg0); end - - # source://activerecord//lib/active_record/encryption/context.rb#16 - def frozen_encryption?; end - - # source://activerecord//lib/active_record/encryption/context.rb#16 - def key_generator; end - - # source://activerecord//lib/active_record/encryption/context.rb#16 - def key_generator=(_arg0); end - - # source://activerecord//lib/active_record/encryption/context.rb#16 - def key_provider; end - - # source://activerecord//lib/active_record/encryption/context.rb#16 - def key_provider=(_arg0); end - - # source://activerecord//lib/active_record/encryption/context.rb#16 - def message_serializer; end - - # source://activerecord//lib/active_record/encryption/context.rb#16 - def message_serializer=(_arg0); end - - private - - # source://activerecord//lib/active_record/encryption/context.rb#26 - def set_defaults; end -end - -# source://activerecord//lib/active_record/encryption/context.rb#13 -ActiveRecord::Encryption::Context::PROPERTIES = T.let(T.unsafe(nil), Array) - -# ActiveRecord::Encryption uses encryption contexts to configure the different entities used to -# encrypt/decrypt at a given moment in time. -# -# By default, the library uses a default encryption context. This is the Context that gets configured -# initially via +config.active_record.encryption+ options. Library users can define nested encryption contexts -# when running blocks of code. -# -# See Context. -# -# source://activerecord//lib/active_record/encryption/contexts.rb#13 -module ActiveRecord::Encryption::Contexts - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActiveRecord::Encryption::Contexts::ClassMethods -end - -# source://activerecord//lib/active_record/encryption/contexts.rb#0 -module ActiveRecord::Encryption::Contexts::ClassMethods - # source://activerecord//lib/active_record/encryption/contexts.rb#62 - def context; end - - # source://activerecord//lib/active_record/encryption/contexts.rb#66 - def current_custom_context; end - - # source://activerecord//lib/active_record/encryption/contexts.rb#57 - def protecting_encrypted_data(&block); end - - # source://activerecord//lib/active_record/encryption/contexts.rb#33 - def with_encryption_context(properties); end - - # source://activerecord//lib/active_record/encryption/contexts.rb#49 - def without_encryption(&block); end -end - -# A KeyProvider that derives keys from passwords. -# -# source://activerecord//lib/active_record/encryption/derived_secret_key_provider.rb#6 -class ActiveRecord::Encryption::DerivedSecretKeyProvider < ::ActiveRecord::Encryption::KeyProvider - # @return [DerivedSecretKeyProvider] a new instance of DerivedSecretKeyProvider - # - # source://activerecord//lib/active_record/encryption/derived_secret_key_provider.rb#7 - def initialize(passwords); end -end - -# A KeyProvider that derives keys from passwords. -# -# source://activerecord//lib/active_record/encryption/deterministic_key_provider.rb#6 -class ActiveRecord::Encryption::DeterministicKeyProvider < ::ActiveRecord::Encryption::DerivedSecretKeyProvider - # @raise [ActiveRecord::Encryption::Errors::Configuration] - # @return [DeterministicKeyProvider] a new instance of DeterministicKeyProvider - # - # source://activerecord//lib/active_record/encryption/deterministic_key_provider.rb#7 - def initialize(password); end -end - -# This is the concern mixed in Active Record models to make them encryptable. It adds the +encrypts+ -# attribute declaration, as well as the API to encrypt and decrypt records. -# -# source://activerecord//lib/active_record/encryption/encryptable_record.rb#7 -module ActiveRecord::Encryption::EncryptableRecord - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveRecord::Encryption::EncryptableRecord::ClassMethods - - # Returns the ciphertext for +attribute_name+. - # - # source://activerecord//lib/active_record/encryption/encryptable_record.rb#146 - 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 - def decrypt; end - - # Encrypts all the encryptable attributes and saves the changes. - # - # source://activerecord//lib/active_record/encryption/encryptable_record.rb#151 - def encrypt; end - - # Returns whether a given attribute is encrypted or not. - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/encryption/encryptable_record.rb#141 - def encrypted_attribute?(attribute_name); end - - private - - # source://activerecord//lib/active_record/encryption/encryptable_record.rb#190 - def build_decrypt_attribute_assignments; end - - # source://activerecord//lib/active_record/encryption/encryptable_record.rb#184 - def build_encrypt_attribute_assignments; end - - # source://activerecord//lib/active_record/encryption/encryptable_record.rb#199 - def cant_modify_encrypted_attributes_when_frozen; end - - # source://activerecord//lib/active_record/encryption/encryptable_record.rb#169 - def decrypt_attributes; end - - # source://activerecord//lib/active_record/encryption/encryptable_record.rb#163 - def encrypt_attributes; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/encryption/encryptable_record.rb#180 - def has_encrypted_attributes?; end - - # @raise [ActiveRecord::Encryption::Errors::Configuration] - # - # source://activerecord//lib/active_record/encryption/encryptable_record.rb#176 - def validate_encryption_allowed; end - - module GeneratedClassMethods - def encrypted_attributes; end - def encrypted_attributes=(value); end - def encrypted_attributes?; end - end - - module GeneratedInstanceMethods - def encrypted_attributes; end - def encrypted_attributes=(value); end - def encrypted_attributes?; end - end -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 - 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#63 - def source_attribute_from_preserved_attribute(attribute_name); end - - private - - # source://activerecord//lib/active_record/encryption/encryptable_record.rb#127 - 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#76 - def global_previous_schemes_for(scheme); end - - # source://activerecord//lib/active_record/encryption/encryptable_record.rb#121 - def load_schema!; end - - # source://activerecord//lib/active_record/encryption/encryptable_record.rb#104 - def override_accessors_to_preserve_original(name, original_attribute_name); end - - # source://activerecord//lib/active_record/encryption/encryptable_record.rb#93 - 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#133 - def validate_column_size(attribute_name); end -end - -# source://activerecord//lib/active_record/encryption/encryptable_record.rb#161 -ActiveRecord::Encryption::EncryptableRecord::ORIGINAL_ATTRIBUTE_PREFIX = T.let(T.unsafe(nil), String) - -# An ActiveModel::Type::Value that encrypts/decrypts strings of text. -# -# This is the central piece that connects the encryption system with +encrypts+ declarations in the -# model classes. Whenever you declare an attribute as encrypted, it configures an +EncryptedAttributeType+ -# for that attribute. -# -# source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#10 -class ActiveRecord::Encryption::EncryptedAttributeType < ::ActiveRecord::Type::Text - include ::ActiveModel::Type::Helpers::Mutable - - # === Options - # - # * :scheme - A +Scheme+ with the encryption properties for this attribute. - # * :cast_type - A type that will be used to serialize (before encrypting) and deserialize - # (after decrypting). ActiveModel::Type::String by default. - # - # @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 - - # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#16 - def accessor(*_arg0, **_arg1, &_arg2); end - - # Returns the value of attribute cast_type. - # - # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#13 - def cast_type; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#42 - def changed_in_place?(raw_old_value, new_value); end - - # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#30 - def deserialize(value); end - - # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#15 - def deterministic?(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#15 - def downcase?(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#15 - def fixed?(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#15 - def key_provider(*_arg0, **_arg1, &_arg2); end - - # 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 - def previous_types; end - - # Returns the value of attribute scheme. - # - # 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 - def serialize(value); 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 - def build_previous_types_for(schemes); end - - # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#135 - def clean_text_scheme; end - - # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#71 - def decrypt(value); end - - # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#131 - def decryption_options; end - - # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#113 - def encrypt(value); end - - # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#127 - def encryption_options; end - - # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#119 - def encryptor; end - - # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#91 - def handle_deserialize_error(error, value); end - - # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#53 - def previous_schemes_including_clean_text; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#67 - def previous_type?; end - - # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#57 - def previous_types_without_clean_text; end - - # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#107 - def serialize_with_current(value); end - - # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#103 - def serialize_with_oldest(value); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#99 - 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 - def try_to_deserialize_with_previous_encrypted_types(value); end -end - -# source://activerecord//lib/active_record/encryption/encrypted_fixtures.rb#5 -module ActiveRecord::Encryption::EncryptedFixtures - # source://activerecord//lib/active_record/encryption/encrypted_fixtures.rb#6 - def initialize(fixture, model_class); end - - private - - # source://activerecord//lib/active_record/encryption/encrypted_fixtures.rb#14 - def encrypt_fixture_data(fixture, model_class); end - - # source://activerecord//lib/active_record/encryption/encrypted_fixtures.rb#26 - def process_preserved_original_columns(fixture, model_class); end -end - -# An encryptor that can encrypt data but can't decrypt it. -# -# source://activerecord//lib/active_record/encryption/encrypting_only_encryptor.rb#6 -class ActiveRecord::Encryption::EncryptingOnlyEncryptor < ::ActiveRecord::Encryption::Encryptor - # source://activerecord//lib/active_record/encryption/encrypting_only_encryptor.rb#7 - def decrypt(encrypted_text, key_provider: T.unsafe(nil), cipher_options: T.unsafe(nil)); end -end - -# An encryptor exposes the encryption API that ActiveRecord::Encryption::EncryptedAttributeType -# uses for encrypting and decrypting attribute values. -# -# It interacts with a KeyProvider for getting the keys, and delegate to -# ActiveRecord::Encryption::Cipher the actual encryption algorithm. -# -# source://activerecord//lib/active_record/encryption/encryptor.rb#14 -class ActiveRecord::Encryption::Encryptor - # Decrypts a +clean_text+ and returns the result as clean text - # - # === Options - # - # [:key_provider] - # Key provider to use for the encryption operation. It will default to - # +ActiveRecord::Encryption.key_provider+ when not provided - # - # [:cipher_options] - # Cipher-specific options that will be passed to the Cipher configured in - # +ActiveRecord::Encryption.cipher+ - # - # source://activerecord//lib/active_record/encryption/encryptor.rb#52 - def decrypt(encrypted_text, key_provider: T.unsafe(nil), cipher_options: T.unsafe(nil)); end - - # Encrypts +clean_text+ and returns the encrypted result - # - # Internally, it will: - # - # 1. Create a new ActiveRecord::Encryption::Message - # 2. Compress and encrypt +clean_text+ as the message payload - # 3. Serialize it with +ActiveRecord::Encryption.message_serializer+ (+ActiveRecord::Encryption::SafeMarshal+ - # by default) - # 4. Encode the result with Base 64 - # - # === Options - # - # [:key_provider] - # Key provider to use for the encryption operation. It will default to - # +ActiveRecord::Encryption.key_provider+ when not provided. - # - # [:cipher_options] - # Cipher-specific options that will be passed to the Cipher configured in - # +ActiveRecord::Encryption.cipher+ - # - # source://activerecord//lib/active_record/encryption/encryptor.rb#34 - def encrypt(clear_text, key_provider: T.unsafe(nil), cipher_options: T.unsafe(nil)); end - - # Returns whether the text is encrypted or not - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/encryption/encryptor.rb#62 - def encrypted?(text); end - - private - - # source://activerecord//lib/active_record/encryption/encryptor.rb#88 - def build_encrypted_message(clear_text, key_provider:, cipher_options:); end - - # source://activerecord//lib/active_record/encryption/encryptor.rb#84 - def cipher; end - - # source://activerecord//lib/active_record/encryption/encryptor.rb#122 - def compress(data); end - - # Under certain threshold, ZIP compression is actually worse that not compressing - # - # source://activerecord//lib/active_record/encryption/encryptor.rb#114 - def compress_if_worth_it(string); end - - # source://activerecord//lib/active_record/encryption/encryptor.rb#74 - def default_key_provider; end - - # source://activerecord//lib/active_record/encryption/encryptor.rb#102 - def deserialize_message(message); end - - # source://activerecord//lib/active_record/encryption/encryptor.rb#142 - def force_encoding_if_needed(value); end - - # source://activerecord//lib/active_record/encryption/encryptor.rb#150 - def forced_encoding_for_deterministic_encryption; end - - # source://activerecord//lib/active_record/encryption/encryptor.rb#98 - def serialize_message(message); end - - # source://activerecord//lib/active_record/encryption/encryptor.rb#109 - def serializer; end - - # source://activerecord//lib/active_record/encryption/encryptor.rb#136 - def uncompress(data); end - - # source://activerecord//lib/active_record/encryption/encryptor.rb#128 - def uncompress_if_needed(data, compressed); end - - # source://activerecord//lib/active_record/encryption/encryptor.rb#78 - def validate_payload_type(clear_text); end -end - -# source://activerecord//lib/active_record/encryption/encryptor.rb#70 -ActiveRecord::Encryption::Encryptor::DECRYPT_ERRORS = T.let(T.unsafe(nil), Array) - -# source://activerecord//lib/active_record/encryption/encryptor.rb#71 -ActiveRecord::Encryption::Encryptor::ENCODING_ERRORS = T.let(T.unsafe(nil), Array) - -# source://activerecord//lib/active_record/encryption/encryptor.rb#72 -ActiveRecord::Encryption::Encryptor::THRESHOLD_TO_JUSTIFY_COMPRESSION = T.let(T.unsafe(nil), Integer) - -# Implements a simple envelope encryption approach where: -# -# * It generates a random data-encryption key for each encryption operation. -# * It stores the generated key along with the encrypted payload. It encrypts this key -# with the master key provided in the +active_record_encryption.primary_key+ credential. -# -# This provider can work with multiple master keys. It will use the last one for encrypting. -# -# When +config.active_record.encryption.store_key_references+ is true, it will also store a reference to -# the specific master key that was used to encrypt the data-encryption key. When not set, -# it will try all the configured master keys looking for the right one, in order to -# return the right decryption key. -# -# source://activerecord//lib/active_record/encryption/envelope_encryption_key_provider.rb#17 -class ActiveRecord::Encryption::EnvelopeEncryptionKeyProvider - # source://activerecord//lib/active_record/encryption/envelope_encryption_key_provider.rb#31 - def active_primary_key; end - - # source://activerecord//lib/active_record/encryption/envelope_encryption_key_provider.rb#26 - def decryption_keys(encrypted_message); end - - # source://activerecord//lib/active_record/encryption/envelope_encryption_key_provider.rb#18 - def encryption_key; end - - private - - # source://activerecord//lib/active_record/encryption/envelope_encryption_key_provider.rb#40 - def decrypt_data_key(encrypted_message); end - - # source://activerecord//lib/active_record/encryption/envelope_encryption_key_provider.rb#36 - def encrypt_data_key(random_secret); end - - # source://activerecord//lib/active_record/encryption/envelope_encryption_key_provider.rb#50 - def generate_random_secret; end - - # source://activerecord//lib/active_record/encryption/envelope_encryption_key_provider.rb#46 - def primary_key_provider; end -end - -# source://activerecord//lib/active_record/encryption/errors.rb#5 -module ActiveRecord::Encryption::Errors; end - -# source://activerecord//lib/active_record/encryption/errors.rb#6 -class ActiveRecord::Encryption::Errors::Base < ::StandardError; end - -# source://activerecord//lib/active_record/encryption/errors.rb#10 -class ActiveRecord::Encryption::Errors::Configuration < ::ActiveRecord::Encryption::Errors::Base; end - -# source://activerecord//lib/active_record/encryption/errors.rb#8 -class ActiveRecord::Encryption::Errors::Decryption < ::ActiveRecord::Encryption::Errors::Base; end - -# source://activerecord//lib/active_record/encryption/errors.rb#7 -class ActiveRecord::Encryption::Errors::Encoding < ::ActiveRecord::Encryption::Errors::Base; end - -# source://activerecord//lib/active_record/encryption/errors.rb#12 -class ActiveRecord::Encryption::Errors::EncryptedContentIntegrity < ::ActiveRecord::Encryption::Errors::Base; end - -# source://activerecord//lib/active_record/encryption/errors.rb#9 -class ActiveRecord::Encryption::Errors::Encryption < ::ActiveRecord::Encryption::Errors::Base; end - -# source://activerecord//lib/active_record/encryption/errors.rb#11 -class ActiveRecord::Encryption::Errors::ForbiddenClass < ::ActiveRecord::Encryption::Errors::Base; end - -# Automatically expand encrypted arguments to support querying both encrypted and unencrypted data -# -# Active Record \Encryption supports querying the db using deterministic attributes. For example: -# -# Contact.find_by(email_address: "jorge@hey.com") -# -# The value "jorge@hey.com" will get encrypted automatically to perform the query. But there is -# a problem while the data is being encrypted. This won't work. During that time, you need these -# queries to be: -# -# Contact.find_by(email_address: [ "jorge@hey.com", "" ]) -# -# This patches ActiveRecord to support this automatically. It addresses both: -# -# * ActiveRecord::Base - Used in Contact.find_by_email_address(...) -# * ActiveRecord::Relation - Used in Contact.internal.find_by_email_address(...) -# -# ActiveRecord::Base relies on ActiveRecord::Relation (ActiveRecord::QueryMethods) but it does -# some prepared statements caching. That's why we need to intercept +ActiveRecord::Base+ as soon -# as it's invoked (so that the proper prepared statement is cached). -# -# When modifying this file run performance tests in +test/performance/extended_deterministic_queries_performance_test.rb+ to -# make sure performance overhead is acceptable. -# -# We will extend this to support previous "encryption context" versions in future iterations -# -# source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#33 -module ActiveRecord::Encryption::ExtendedDeterministicQueries - class << self - # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#34 - def install_support; end - end -end - -# source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#121 -class ActiveRecord::Encryption::ExtendedDeterministicQueries::AdditionalValue - # @return [AdditionalValue] a new instance of AdditionalValue - # - # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#124 - def initialize(value, type); end - - # Returns the value of attribute type. - # - # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#122 - def type; end - - # Returns the value of attribute value. - # - # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#122 - def value; end - - private - - # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#130 - def process(value); end -end - -# source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#108 -module ActiveRecord::Encryption::ExtendedDeterministicQueries::CoreQueries - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActiveRecord::Encryption::ExtendedDeterministicQueries::CoreQueries::ClassMethods -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 - 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 - - # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#74 - def additional_values_for(value, type); end - - # 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#45 - def process_encrypted_query_arguments(args, check_for_additional_values); end -end - -# source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#135 -module ActiveRecord::Encryption::ExtendedDeterministicQueries::ExtendedEncryptableType - # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#136 - def serialize(data); end -end - -# source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#145 -module ActiveRecord::Encryption::ExtendedDeterministicQueries::InWithAdditionalValues - # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#150 - def encryption_aware_type_caster; end - - # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#146 - def proc_for_binds; end -end - -# source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#81 -module ActiveRecord::Encryption::ExtendedDeterministicQueries::RelationQueries - include ::ActiveRecord::Encryption::ExtendedDeterministicQueries::EncryptedQueryArgumentProcessor - - # @return [Boolean] - # - # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#89 - 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#84 - 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 -module ActiveRecord::Encryption::ExtendedDeterministicUniquenessValidator - class << self - # source://activerecord//lib/active_record/encryption/extended_deterministic_uniqueness_validator.rb#6 - def install_support; end - end -end - -# source://activerecord//lib/active_record/encryption/extended_deterministic_uniqueness_validator.rb#10 -module ActiveRecord::Encryption::ExtendedDeterministicUniquenessValidator::EncryptedUniquenessValidator - # source://activerecord//lib/active_record/encryption/extended_deterministic_uniqueness_validator.rb#11 - def validate_each(record, attribute, value); end -end - -# A key is a container for a given +secret+ -# -# Optionally, it can include +public_tags+. These tags are meant to be stored -# in clean (public) and can be used, for example, to include information that -# references the key for a future retrieval operation. -# -# source://activerecord//lib/active_record/encryption/key.rb#10 -class ActiveRecord::Encryption::Key - # @return [Key] a new instance of Key - # - # source://activerecord//lib/active_record/encryption/key.rb#13 - def initialize(secret); end - - # source://activerecord//lib/active_record/encryption/key.rb#23 - def id; end - - # Returns the value of attribute public_tags. - # - # source://activerecord//lib/active_record/encryption/key.rb#11 - def public_tags; end - - # Returns the value of attribute secret. - # - # source://activerecord//lib/active_record/encryption/key.rb#11 - def secret; end - - class << self - # source://activerecord//lib/active_record/encryption/key.rb#18 - def derive_from(password); end - end -end - -# Utility for generating and deriving random keys. -# -# source://activerecord//lib/active_record/encryption/key_generator.rb#8 -class ActiveRecord::Encryption::KeyGenerator - # 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 - 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 - # length by default) - # - # Hexadecimal format is handy for representing keys as printable text. To maximize the space of characters used, it is - # good practice including not printable characters. Hexadecimal format ensures that generated keys are representable with - # plain text - # - # To convert back to the original string with the desired length: - # - # [ value ].pack("H*") - # - # source://activerecord//lib/active_record/encryption/key_generator.rb#24 - 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 - def generate_random_key(length: T.unsafe(nil)); end - - private - - # source://activerecord//lib/active_record/encryption/key_generator.rb#37 - def key_length; end -end - -# A +KeyProvider+ serves keys: -# -# * An encryption key -# * A list of potential decryption keys. Serving multiple decryption keys supports rotation-schemes -# where new keys are added but old keys need to continue working -# -# source://activerecord//lib/active_record/encryption/key_provider.rb#10 -class ActiveRecord::Encryption::KeyProvider - # @return [KeyProvider] a new instance of KeyProvider - # - # source://activerecord//lib/active_record/encryption/key_provider.rb#11 - def initialize(keys); end - - # Returns the list of decryption keys - # - # When the message holds a reference to its encryption key, it will return an array - # with that key. If not, it will return the list of keys. - # - # source://activerecord//lib/active_record/encryption/key_provider.rb#32 - def decryption_keys(encrypted_message); end - - # Returns the first key in the list as the active key to perform encryptions - # - # When +ActiveRecord::Encryption.config.store_key_references+ is true, the key will include - # a public tag referencing the key itself. That key will be stored in the public - # headers of the encrypted message - # - # source://activerecord//lib/active_record/encryption/key_provider.rb#20 - def encryption_key; end - - private - - # source://activerecord//lib/active_record/encryption/key_provider.rb#41 - def keys_grouped_by_id; end -end - -# A message defines the structure of the data we store in encrypted attributes. It contains: -# -# * An encrypted payload -# * A list of unencrypted headers -# -# See Encryptor#encrypt -# -# source://activerecord//lib/active_record/encryption/message.rb#11 -class ActiveRecord::Encryption::Message - # @return [Message] a new instance of Message - # - # source://activerecord//lib/active_record/encryption/message.rb#14 - def initialize(payload: T.unsafe(nil), headers: T.unsafe(nil)); end - - # source://activerecord//lib/active_record/encryption/message.rb#21 - def ==(other_message); end - - # Returns the value of attribute headers. - # - # source://activerecord//lib/active_record/encryption/message.rb#12 - def headers; end - - # Sets the attribute headers - # - # @param value the value to set the attribute headers to. - # - # source://activerecord//lib/active_record/encryption/message.rb#12 - def headers=(_arg0); end - - # Returns the value of attribute payload. - # - # source://activerecord//lib/active_record/encryption/message.rb#12 - def payload; end - - # Sets the attribute payload - # - # @param value the value to set the attribute payload to. - # - # source://activerecord//lib/active_record/encryption/message.rb#12 - def payload=(_arg0); end - - private - - # source://activerecord//lib/active_record/encryption/message.rb#26 - def validate_payload_type(payload); end -end - -# A message serializer that serializes +Messages+ with JSON. -# -# The generated structure is pretty simple: -# -# { -# p: , -# h: { -# header1: value1, -# header2: value2, -# ... -# } -# } -# -# Both the payload and the header values are encoded with Base64 -# to prevent JSON parsing errors and encoding issues when -# storing the resulting serialized data. -# -# source://activerecord//lib/active_record/encryption/message_serializer.rb#21 -class ActiveRecord::Encryption::MessageSerializer - # @raise [ActiveRecord::Encryption::Errors::ForbiddenClass] - # - # source://activerecord//lib/active_record/encryption/message_serializer.rb#29 - def dump(message); end - - # source://activerecord//lib/active_record/encryption/message_serializer.rb#22 - def load(serialized_content); end - - private - - # source://activerecord//lib/active_record/encryption/message_serializer.rb#79 - def decode_if_needed(value); end - - # source://activerecord//lib/active_record/encryption/message_serializer.rb#71 - def encode_if_needed(value); end - - # source://activerecord//lib/active_record/encryption/message_serializer.rb#65 - def headers_to_json(headers); end - - # source://activerecord//lib/active_record/encryption/message_serializer.rb#58 - def message_to_json(message); end - - # source://activerecord//lib/active_record/encryption/message_serializer.rb#35 - def parse_message(data, level); end - - # source://activerecord//lib/active_record/encryption/message_serializer.rb#50 - def parse_properties(headers, level); end - - # source://activerecord//lib/active_record/encryption/message_serializer.rb#40 - def validate_message_data_format(data, level); end -end - -# An encryptor that won't decrypt or encrypt. It will just return the passed -# values -# -# source://activerecord//lib/active_record/encryption/null_encryptor.rb#7 -class ActiveRecord::Encryption::NullEncryptor - # source://activerecord//lib/active_record/encryption/null_encryptor.rb#12 - def decrypt(encrypted_text, key_provider: T.unsafe(nil), cipher_options: T.unsafe(nil)); end - - # source://activerecord//lib/active_record/encryption/null_encryptor.rb#8 - def encrypt(clean_text, key_provider: T.unsafe(nil), cipher_options: T.unsafe(nil)); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/encryption/null_encryptor.rb#16 - def encrypted?(text); end -end - -# This is a wrapper for a hash of encryption properties. It is used by -# +Key+ (public tags) and +Message+ (headers). -# -# Since properties are serialized in messages, it is important for storage -# efficiency to keep their keys as short as possible. It defines accessors -# for common properties that will keep these keys very short while exposing -# a readable name. -# -# message.headers.encrypted_data_key # instead of message.headers[:k] -# -# See +Properties::DEFAULT_PROPERTIES+, Key, Message -# -# source://activerecord//lib/active_record/encryption/properties.rb#16 -class ActiveRecord::Encryption::Properties - # @return [Properties] a new instance of Properties - # - # source://activerecord//lib/active_record/encryption/properties.rb#42 - def initialize(initial_properties = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/encryption/properties.rb#20 - def ==(arg); end - - # Set a value for a given key - # - # It will raise an +EncryptedContentIntegrity+ if the value exists - # - # @raise [Errors::EncryptedContentIntegrity] - # - # source://activerecord//lib/active_record/encryption/properties.rb#50 - def []=(key, value); end - - # source://activerecord//lib/active_record/encryption/properties.rb#62 - def add(other_properties); end - - # source://activerecord//lib/active_record/encryption/properties.rb#33 - def auth_tag; end - - # source://activerecord//lib/active_record/encryption/properties.rb#37 - def auth_tag=(value); end - - # source://activerecord//lib/active_record/encryption/properties.rb#33 - def compressed; end - - # source://activerecord//lib/active_record/encryption/properties.rb#37 - def compressed=(value); end - - # source://activerecord//lib/active_record/encryption/properties.rb#33 - def encoding; end - - # source://activerecord//lib/active_record/encryption/properties.rb#37 - def encoding=(value); end - - # source://activerecord//lib/active_record/encryption/properties.rb#33 - def encrypted_data_key; end - - # source://activerecord//lib/active_record/encryption/properties.rb#37 - def encrypted_data_key=(value); end - - # source://activerecord//lib/active_record/encryption/properties.rb#33 - def encrypted_data_key_id; end - - # source://activerecord//lib/active_record/encryption/properties.rb#37 - def encrypted_data_key_id=(value); end - - # source://activerecord//lib/active_record/encryption/properties.rb#33 - def iv; end - - # source://activerecord//lib/active_record/encryption/properties.rb#37 - def iv=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/core_ext/module/delegation.rb#302 - def method_missing(method, *args, **_arg2, &block); end - - # source://activerecord//lib/active_record/encryption/properties.rb#68 - def to_h; end - - # source://activerecord//lib/active_record/encryption/properties.rb#56 - def validate_value_type(value); end - - private - - # Returns the value of attribute data. - # - # source://activerecord//lib/active_record/encryption/properties.rb#73 - def data; end - - # source://activesupport/7.0.4.2/lib/active_support/core_ext/module/delegation.rb#294 - def respond_to_missing?(name, include_private = T.unsafe(nil)); end -end - -# source://activerecord//lib/active_record/encryption/properties.rb#17 -ActiveRecord::Encryption::Properties::ALLOWED_VALUE_CLASSES = T.let(T.unsafe(nil), Array) - -# For each entry it generates an accessor exposing the full name -# -# source://activerecord//lib/active_record/encryption/properties.rb#23 -ActiveRecord::Encryption::Properties::DEFAULT_PROPERTIES = T.let(T.unsafe(nil), Hash) - -# A +NullEncryptor+ that will raise an error when trying to encrypt data -# -# This is useful when you want to reveal ciphertexts for debugging purposes -# and you want to make sure you won't overwrite any encryptable attribute with -# the wrong content. -# -# source://activerecord//lib/active_record/encryption/read_only_null_encryptor.rb#10 -class ActiveRecord::Encryption::ReadOnlyNullEncryptor - # source://activerecord//lib/active_record/encryption/read_only_null_encryptor.rb#15 - def decrypt(encrypted_text, key_provider: T.unsafe(nil), cipher_options: T.unsafe(nil)); end - - # @raise [Errors::Encryption] - # - # source://activerecord//lib/active_record/encryption/read_only_null_encryptor.rb#11 - def encrypt(clean_text, key_provider: T.unsafe(nil), cipher_options: T.unsafe(nil)); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/encryption/read_only_null_encryptor.rb#19 - def encrypted?(text); end -end - -# A container of attribute encryption options. -# -# It validates and serves attribute encryption options. -# -# See EncryptedAttributeType, Context -# -# source://activerecord//lib/active_record/encryption/scheme.rb#10 -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 - - # @return [Boolean] - # - # source://activerecord//lib/active_record/encryption/scheme.rb#38 - def deterministic?; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/encryption/scheme.rb#34 - def downcase?; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/encryption/scheme.rb#42 - def fixed?; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/encryption/scheme.rb#30 - def ignore_case?; end - - # source://activerecord//lib/active_record/encryption/scheme.rb#47 - def key_provider; end - - # source://activerecord//lib/active_record/encryption/scheme.rb#54 - def merge(other_scheme); end - - # Returns the value of attribute previous_schemes. - # - # source://activerecord//lib/active_record/encryption/scheme.rb#11 - 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/scheme.rb#11 - def previous_schemes=(_arg0); end - - # source://activerecord//lib/active_record/encryption/scheme.rb#58 - def to_h; end - - # source://activerecord//lib/active_record/encryption/scheme.rb#63 - def with_context(&block); end - - private - - # source://activerecord//lib/active_record/encryption/scheme.rb#90 - def build_key_provider; end - - # @raise [Errors::Configuration] - # - # source://activerecord//lib/active_record/encryption/scheme.rb#72 - 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, -# but can be queried by name. Example: -# -# class Conversation < ActiveRecord::Base -# enum :status, [ :active, :archived ] -# end -# -# # conversation.update! status: 0 -# conversation.active! -# conversation.active? # => true -# conversation.status # => "active" -# -# # conversation.update! status: 1 -# conversation.archived! -# conversation.archived? # => true -# conversation.status # => "archived" -# -# # conversation.status = 1 -# conversation.status = "archived" -# -# conversation.status = nil -# conversation.status.nil? # => true -# conversation.status # => nil -# -# Scopes based on the allowed values of the enum field will be provided -# as well. With the above example: -# -# Conversation.active -# Conversation.not_active -# Conversation.archived -# Conversation.not_archived -# -# Of course, you can also query them directly if the scopes don't fit your -# needs: -# -# Conversation.where(status: [:active, :archived]) -# Conversation.where.not(status: :active) -# -# Defining scopes can be disabled by setting +:scopes+ to +false+. -# -# class Conversation < ActiveRecord::Base -# enum :status, [ :active, :archived ], scopes: false -# end -# -# You can set the default enum value by setting +:default+, like: -# -# class Conversation < ActiveRecord::Base -# enum :status, [ :active, :archived ], default: :active -# end -# -# conversation = Conversation.new -# conversation.status # => "active" -# -# It's possible to explicitly map the relation between attribute and -# database integer with a hash: -# -# class Conversation < ActiveRecord::Base -# enum :status, active: 0, archived: 1 -# end -# -# Finally it's also possible to use a string column to persist the enumerated value. -# Note that this will likely lead to slower database queries: -# -# class Conversation < ActiveRecord::Base -# enum :status, active: "active", archived: "archived" -# end -# -# Note that when an array is used, the implicit mapping from the values to database -# integers is derived from the order the values appear in the array. In the example, -# :active is mapped to +0+ as it's the first element, and :archived -# is mapped to +1+. In general, the +i+-th element is mapped to i-1 in the -# database. -# -# Therefore, once a value is added to the enum array, its position in the array must -# be maintained, and new values should only be added to the end of the array. To -# remove unused values, the explicit hash syntax should be used. -# -# In rare circumstances you might need to access the mapping directly. -# The mappings are exposed through a class method with the pluralized attribute -# name, which return the mapping in a ActiveSupport::HashWithIndifferentAccess : -# -# Conversation.statuses[:active] # => 0 -# Conversation.statuses["archived"] # => 1 -# -# Use that class method when you need to know the ordinal value of an enum. -# For example, you can use that when manually building SQL strings: -# -# Conversation.where("status <> ?", Conversation.statuses[:archived]) -# -# You can use the +:prefix+ or +:suffix+ options when you need to define -# multiple enums with same values. If the passed value is +true+, the methods -# are prefixed/suffixed with the name of the enum. It is also possible to -# supply a custom value: -# -# class Conversation < ActiveRecord::Base -# enum :status, [ :active, :archived ], suffix: true -# enum :comments_status, [ :active, :inactive ], prefix: :comments -# end -# -# With the above example, the bang and predicate methods along with the -# associated scopes are now prefixed and/or suffixed accordingly: -# -# conversation.active_status! -# conversation.archived_status? # => false -# -# conversation.comments_inactive! -# conversation.comments_active? # => false -# -# source://activerecord//lib/active_record/enum.rb#114 -module ActiveRecord::Enum - # source://activerecord//lib/active_record/enum.rb#167 - def enum(name = T.unsafe(nil), values = T.unsafe(nil), **options); end - - # source://activerecord//lib/active_record/enum.rb#119 - def inherited(base); end - - private - - # source://activerecord//lib/active_record/enum.rb#180 - def _enum(name, values, prefix: T.unsafe(nil), suffix: T.unsafe(nil), scopes: T.unsafe(nil), **options); end - - # source://activerecord//lib/active_record/enum.rb#261 - def _enum_methods_module; end - - # source://activerecord//lib/active_record/enum.rb#269 - def assert_valid_enum_definition_values(values); end - - # source://activerecord//lib/active_record/enum.rb#288 - def detect_enum_conflict!(enum_name, method_name, klass_method = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/enum.rb#310 - def detect_negative_enum_conditions!(method_names); end - - # @raise [ArgumentError] - # - # source://activerecord//lib/active_record/enum.rb#300 - 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 - def extended(base); end - end -end - -# source://activerecord//lib/active_record/enum.rb#282 -ActiveRecord::Enum::ENUM_CONFLICT_MESSAGE = T.let(T.unsafe(nil), String) - -# source://activerecord//lib/active_record/enum.rb#231 -class ActiveRecord::Enum::EnumMethods < ::Module - # @return [EnumMethods] a new instance of EnumMethods - # - # source://activerecord//lib/active_record/enum.rb#232 - def initialize(klass); end - - private - - # source://activerecord//lib/active_record/enum.rb#239 - def define_enum_methods(name, value_method_name, value, scopes); end - - # Returns the value of attribute klass. - # - # source://activerecord//lib/active_record/enum.rb#237 - def klass; end -end - -# source://activerecord//lib/active_record/enum.rb#124 -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#155 - def assert_valid_value(value); end - - # source://activerecord//lib/active_record/enum.rb#133 - def cast(value); end - - # source://activerecord//lib/active_record/enum.rb#143 - def deserialize(value); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/enum.rb#151 - def serializable?(value, &block); end - - # source://activerecord//lib/active_record/enum.rb#147 - def serialize(value); end - - # Returns the value of attribute subtype. - # - # source://activerecord//lib/active_record/enum.rb#161 - def subtype; end - - # source://activerecord//lib/active_record/enum.rb#125 - def type(*_arg0, **_arg1, &_arg2); end - - private - - # Returns the value of attribute mapping. - # - # source://activerecord//lib/active_record/enum.rb#164 - def mapping; end - - # Returns the value of attribute name. - # - # source://activerecord//lib/active_record/enum.rb#164 - def name; end -end - -# source://activerecord//lib/active_record/migration.rb#197 -class ActiveRecord::EnvironmentMismatchError < ::ActiveRecord::ActiveRecordError - # @return [EnvironmentMismatchError] a new instance of EnvironmentMismatchError - # - # source://activerecord//lib/active_record/migration.rb#198 - def initialize(current: T.unsafe(nil), stored: T.unsafe(nil)); end -end - -# source://activerecord//lib/active_record/migration.rb#211 -class ActiveRecord::EnvironmentStorageError < ::ActiveRecord::ActiveRecordError - # @return [EnvironmentStorageError] a new instance of EnvironmentStorageError - # - # source://activerecord//lib/active_record/migration.rb#212 - 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!]. -# -# source://activerecord//lib/active_record/errors.rb#94 -class ActiveRecord::ExclusiveConnectionTimeoutError < ::ActiveRecord::ConnectionTimeoutError; end - -# source://activerecord//lib/active_record/explain.rb#6 -module ActiveRecord::Explain - # Executes the block with the collect flag enabled. Queries are collected - # asynchronously by the subscriber and returned. - # - # source://activerecord//lib/active_record/explain.rb#9 - def collecting_queries_for_explain; end - - # Makes the adapter execute EXPLAIN for the tuples of queries and bindings. - # Returns a formatted string ready to be logged. - # - # source://activerecord//lib/active_record/explain.rb#19 - def exec_explain(queries); end - - private - - # source://activerecord//lib/active_record/explain.rb#39 - def render_bind(attr); end -end - -# This is a thread locals registry for EXPLAIN. For example -# -# ActiveRecord::ExplainRegistry.queries -# -# returns the collected queries local to the current thread. -# -# source://activerecord//lib/active_record/explain_registry.rb#11 -class ActiveRecord::ExplainRegistry - # @return [ExplainRegistry] a new instance of ExplainRegistry - # - # source://activerecord//lib/active_record/explain_registry.rb#24 - def initialize; end - - # Returns the value of attribute collect. - # - # source://activerecord//lib/active_record/explain_registry.rb#21 - def collect; end - - # Sets the attribute collect - # - # @param value the value to set the attribute collect to. - # - # source://activerecord//lib/active_record/explain_registry.rb#21 - def collect=(_arg0); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/explain_registry.rb#28 - def collect?; end - - # Returns the value of attribute queries. - # - # source://activerecord//lib/active_record/explain_registry.rb#22 - def queries; end - - # source://activerecord//lib/active_record/explain_registry.rb#32 - def reset; end - - class << self - # source://activerecord//lib/active_record/explain_registry.rb#13 - def collect(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/explain_registry.rb#13 - def collect=(arg); end - - # source://activerecord//lib/active_record/explain_registry.rb#13 - def collect?(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/explain_registry.rb#13 - def queries(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/explain_registry.rb#13 - def reset(*_arg0, **_arg1, &_arg2); end - - private - - # source://activerecord//lib/active_record/explain_registry.rb#16 - def instance; end - end -end - -# source://activerecord//lib/active_record/explain_subscriber.rb#7 -class ActiveRecord::ExplainSubscriber - # source://activerecord//lib/active_record/explain_subscriber.rb#12 - def finish(name, id, payload); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/explain_subscriber.rb#25 - def ignore_payload?(payload); end - - # source://activerecord//lib/active_record/explain_subscriber.rb#8 - def start(name, id, payload); end -end - -# source://activerecord//lib/active_record/explain_subscriber.rb#24 -ActiveRecord::ExplainSubscriber::EXPLAINED_SQLS = T.let(T.unsafe(nil), Regexp) - -# SCHEMA queries cannot be EXPLAINed, also we do not want to run EXPLAIN on -# our own EXPLAINs no matter how loopingly beautiful that would be. -# -# On the other hand, we want to monitor the performance of our real database -# queries, not the performance of the access to the query cache. -# -# source://activerecord//lib/active_record/explain_subscriber.rb#23 -ActiveRecord::ExplainSubscriber::IGNORED_PAYLOADS = T.let(T.unsafe(nil), Array) - -# source://activerecord//lib/active_record/relation/finder_methods.rb#6 -module ActiveRecord::FinderMethods - # Returns true if a record exists in the table that matches the +id+ or - # conditions given, or false otherwise. The argument can take six forms: - # - # * Integer - Finds the record with this primary key. - # * String - Finds the record with a primary key corresponding to this - # string (such as '5'). - # * Array - Finds the record that matches these +where+-style conditions - # (such as ['name LIKE ?', "%#{query}%"]). - # * Hash - Finds the record that matches these +where+-style conditions - # (such as {name: 'David'}). - # * +false+ - Returns always +false+. - # * No args - Returns +false+ if the relation is empty, +true+ otherwise. - # - # For more information about specifying conditions as a hash or array, - # see the Conditions section in the introduction to ActiveRecord::Base. - # - # Note: You can't pass in a condition as a string (like name = - # 'Jamie'), since it would be sanitized and then queried against - # the primary key column, like id = 'name = \'Jamie\''. - # - # Person.exists?(5) - # Person.exists?('5') - # Person.exists?(['name LIKE ?', "%#{query}%"]) - # Person.exists?(id: [1, 4, 8]) - # Person.exists?(name: 'David') - # Person.exists?(false) - # Person.exists? - # Person.where(name: 'Spartacus', rating: 4).exists? - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/relation/finder_methods.rb#326 - def exists?(conditions = T.unsafe(nil)); end - - # Find the fifth record. - # If no order is defined it will order by primary key. - # - # Person.fifth # returns the fifth object fetched by SELECT * FROM people - # 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 - 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 - 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]). - # 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+. - # - # Person.find(1) # returns the object for ID = 1 - # 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([1]) # returns an array for the object with ID = 1 - # Person.where("administrator = 1").order("created_on DESC").find(1) - # - # 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. - # But ActiveRecord::QueryMethods#where method doesn't raise ActiveRecord::RecordNotFound. - # - # ==== Find with lock - # - # Example for find with a lock: Imagine two concurrent transactions: - # each will read person.visits == 2, add 1 to it, and save, resulting - # in two saves of person.visits = 3. By locking the row, the second - # transaction has to wait until the first is finished; we get the - # expected person.visits == 4. - # - # Person.transaction do - # person = Person.lock(true).find(1) - # person.visits += 1 - # person.save! - # end - # - # ==== Variations of #find - # - # Person.where(name: 'Spartacus', rating: 4) - # # returns a chainable list (which can be empty). - # - # Person.find_by(name: 'Spartacus', rating: 4) - # # returns the first item or nil. - # - # Person.find_or_initialize_by(name: 'Spartacus', rating: 4) - # # returns the first item or returns a new instance (requires you call .save to persist against the database). - # - # Person.find_or_create_by(name: 'Spartacus', rating: 4) - # # returns the first item or creates it and returns it. - # - # ==== Alternatives for #find - # - # Person.where(name: 'Spartacus', rating: 4).exists?(conditions = :none) - # # returns a boolean indicating if any record with the given conditions exist. - # - # Person.where(name: 'Spartacus', rating: 4).select("field1, field2, field3") - # # returns a chainable list of instances with only the mentioned fields. - # - # Person.where(name: 'Spartacus', rating: 4).ids - # # returns an Array of ids. - # - # 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 - def find(*args); end - - # Finds the first record matching the specified conditions. There - # is no implied ordering so if order matters, you should specify it - # yourself. - # - # If no record is found, returns nil. - # - # 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 - 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 - def find_by!(arg, *args); end - - # Finds the sole matching record. Raises ActiveRecord::RecordNotFound if no - # record is found. Raises ActiveRecord::SoleRecordExceeded if more than one - # record is found. - # - # Product.find_sole_by(["price = %?", price]) - # - # source://activerecord//lib/active_record/relation/finder_methods.rb#129 - def find_sole_by(arg, *args); end - - # Find the first record (or first N records if a parameter is supplied). - # If no order is defined it will order by primary key. - # - # Person.first # returns the first object fetched by SELECT * FROM people ORDER BY people.id LIMIT 1 - # Person.where(["user_name = ?", user_name]).first - # Person.where(["user_name = :u", { u: user_name }]).first - # 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 - 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 - def first!; end - - # Find the forty-second record. Also known as accessing "the reddit". - # If no order is defined it will order by primary key. - # - # Person.forty_two # returns the forty-second object fetched by SELECT * FROM people - # 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 - 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 - def forty_two!; end - - # Find the fourth record. - # If no order is defined it will order by primary key. - # - # Person.fourth # returns the fourth object fetched by SELECT * FROM people - # 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 - 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 - def fourth!; end - - # Returns true if the relation contains the given record or false otherwise. - # - # No query is performed if the relation is loaded; the given record is - # compared to the records in memory. If the relation is unloaded, an - # efficient existence query is performed, as in #exists?. - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/relation/finder_methods.rb#352 - def include?(record); end - - # Find the last record (or last N records if a parameter is supplied). - # If no order is defined it will order by primary key. - # - # Person.last # returns the last object fetched by SELECT * FROM people - # Person.where(["user_name = ?", user_name]).last - # Person.order("created_on DESC").offset(5).last - # Person.last(3) # returns the last three objects fetched by SELECT * FROM people. - # - # Take note that in that last case, the results are sorted in ascending order: - # - # [#, #, #] - # - # and not: - # - # [#, #, #] - # - # source://activerecord//lib/active_record/relation/finder_methods.rb#171 - 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 - def last!; end - - # Returns true if the relation contains the given record or false otherwise. - # - # No query is performed if the relation is loaded; the given record is - # compared to the records in memory. If the relation is unloaded, an - # efficient existence query is performed, as in #exists?. - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/relation/finder_methods.rb#352 - def member?(record); end - - # This method is called whenever no records are found with either a single - # id or multiple ids and raises an ActiveRecord::RecordNotFound exception. - # - # The error message is different depending on whether a single id or - # multiple ids are provided. If multiple ids are provided, then the number - # of results obtained should be provided in the +result_size+ argument and - # the expected number of results should be provided in the +expected_size+ - # argument. - # - # source://activerecord//lib/active_record/relation/finder_methods.rb#370 - 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. - # If no order is defined it will order by primary key. - # - # Person.second # returns the second object fetched by SELECT * FROM people - # 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 - 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 - def second!; end - - # Find the second-to-last record. - # If no order is defined it will order by primary key. - # - # Person.second_to_last # returns the second-to-last object fetched by SELECT * FROM people - # 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 - 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 - def second_to_last!; end - - # Finds the sole matching record. Raises ActiveRecord::RecordNotFound if no - # record is found. Raises ActiveRecord::SoleRecordExceeded if more than one - # record is found. - # - # Product.where(["price = %?", price]).sole - # - # source://activerecord//lib/active_record/relation/finder_methods.rb#112 - def sole; end - - # Gives a record (or N records if a parameter is supplied) without any implied - # order. The order will depend on the database implementation. - # If an order is supplied it will be respected. - # - # Person.take # returns an object fetched by SELECT * FROM people LIMIT 1 - # 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 - 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 - def take!; end - - # Find the third record. - # If no order is defined it will order by primary key. - # - # Person.third # returns the third object fetched by SELECT * FROM people - # 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 - 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 - def third!; end - - # Find the third-to-last record. - # If no order is defined it will order by primary key. - # - # Person.third_to_last # returns the third-to-last object fetched by SELECT * FROM people - # 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 - 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 - def third_to_last!; end - - private - - # source://activerecord//lib/active_record/relation/finder_methods.rb#410 - def apply_join_dependency(eager_loading: T.unsafe(nil)); end - - # source://activerecord//lib/active_record/relation/finder_methods.rb#391 - def construct_relation_for_exists(conditions); end - - # source://activerecord//lib/active_record/relation/finder_methods.rb#570 - def find_last(limit); end - - # source://activerecord//lib/active_record/relation/finder_methods.rb#532 - def find_nth(index); end - - # source://activerecord//lib/active_record/relation/finder_methods.rb#556 - def find_nth_from_last(index); end - - # source://activerecord//lib/active_record/relation/finder_methods.rb#537 - def find_nth_with_limit(index, limit); end - - # source://activerecord//lib/active_record/relation/finder_methods.rb#464 - def find_one(id); end - - # source://activerecord//lib/active_record/relation/finder_methods.rb#480 - def find_some(ids); end - - # source://activerecord//lib/active_record/relation/finder_methods.rb#504 - def find_some_ordered(ids); end - - # source://activerecord//lib/active_record/relation/finder_methods.rb#516 - def find_take; end - - # source://activerecord//lib/active_record/relation/finder_methods.rb#524 - def find_take_with_limit(limit); end - - # @raise [UnknownPrimaryKey] - # - # source://activerecord//lib/active_record/relation/finder_methods.rb#442 - def find_with_ids(*ids); end - - # source://activerecord//lib/active_record/relation/finder_methods.rb#574 - def ordered_relation; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/relation/finder_methods.rb#438 - 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 -class ActiveRecord::Fixture - include ::Enumerable - - # @return [Fixture] a new instance of Fixture - # - # source://activerecord//lib/active_record/fixtures.rb#750 - def initialize(fixture, model_class); end - - # source://activerecord//lib/active_record/fixtures.rb#763 - def [](key); end - - # source://activerecord//lib/active_record/fixtures.rb#755 - def class_name; end - - # source://activerecord//lib/active_record/fixtures.rb#759 - def each(&block); end - - # @raise [FixtureClassNotFound] - # - # source://activerecord//lib/active_record/fixtures.rb#769 - def find; end - - # Returns the value of attribute fixture. - # - # source://activerecord//lib/active_record/fixtures.rb#748 - def fixture; end - - # Returns the value of attribute model_class. - # - # source://activerecord//lib/active_record/fixtures.rb#748 - def model_class; end - - # Returns the value of attribute fixture. - # - # source://activerecord//lib/active_record/fixtures.rb#748 - def to_hash; end -end - -# source://activerecord//lib/active_record/fixtures.rb#742 -class ActiveRecord::Fixture::FixtureError < ::StandardError; end - -# source://activerecord//lib/active_record/fixtures.rb#745 -class ActiveRecord::Fixture::FormatError < ::ActiveRecord::Fixture::FixtureError; end - -# source://activerecord//lib/active_record/fixtures.rb#15 -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 - def initialize(pool, *args, **kwargs); end - - # source://activerecord//lib/active_record/future_result.rb#57 - def cancel; end - - # source://activerecord//lib/active_record/future_result.rb#29 - def empty?(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/future_result.rb#53 - def execute!(connection); end - - # source://activerecord//lib/active_record/future_result.rb#63 - def execute_or_skip; end - - # Returns the value of attribute lock_wait. - # - # source://activerecord//lib/active_record/future_result.rb#31 - def lock_wait; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/future_result.rb#94 - def pending?; end - - # source://activerecord//lib/active_record/future_result.rb#81 - def result; end - - # source://activerecord//lib/active_record/future_result.rb#48 - def schedule!(session); end - - # source://activerecord//lib/active_record/future_result.rb#29 - def to_a(*_arg0, **_arg1, &_arg2); end - - private - - # @return [Boolean] - # - # source://activerecord//lib/active_record/future_result.rb#99 - def canceled?; end - - # source://activerecord//lib/active_record/future_result.rb#126 - def exec_query(connection, *args, **kwargs); end - - # source://activerecord//lib/active_record/future_result.rb#103 - def execute_or_wait; end - - # source://activerecord//lib/active_record/future_result.rb#118 - def execute_query(connection, async: T.unsafe(nil)); end -end - -# source://activerecord//lib/active_record/future_result.rb#27 -class ActiveRecord::FutureResult::Canceled < ::ActiveRecord::ActiveRecordError; end - -# source://activerecord//lib/active_record/future_result.rb#5 -class ActiveRecord::FutureResult::EventBuffer - # @return [EventBuffer] a new instance of EventBuffer - # - # source://activerecord//lib/active_record/future_result.rb#6 - def initialize(future_result, instrumenter); end - - # source://activerecord//lib/active_record/future_result.rb#18 - def flush; end - - # source://activerecord//lib/active_record/future_result.rb#12 - def instrument(name, payload = T.unsafe(nil), &block); end -end - -# source://activerecord//lib/active_record/future_result.rb#130 -class ActiveRecord::FutureResult::SelectAll < ::ActiveRecord::FutureResult - private - - # source://activerecord//lib/active_record/future_result.rb#132 - def exec_query(*_arg0, **_arg1); end -end - -# source://activerecord//lib/active_record/associations.rb#74 -class ActiveRecord::HasManyThroughAssociationNotFoundError < ::ActiveRecord::ActiveRecordError - include ::DidYouMean::Correctable - - # @return [HasManyThroughAssociationNotFoundError] a new instance of HasManyThroughAssociationNotFoundError - # - # source://activerecord//lib/active_record/associations.rb#77 - def initialize(owner_class = T.unsafe(nil), reflection = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/associations.rb#90 - def corrections; end - - # Returns the value of attribute owner_class. - # - # source://activerecord//lib/active_record/associations.rb#75 - def owner_class; end - - # Returns the value of attribute reflection. - # - # source://activerecord//lib/active_record/associations.rb#75 - def reflection; end -end - -# source://activerecord//lib/active_record/associations.rb#124 -class ActiveRecord::HasManyThroughAssociationPointlessSourceTypeError < ::ActiveRecord::ActiveRecordError - # @return [HasManyThroughAssociationPointlessSourceTypeError] a new instance of HasManyThroughAssociationPointlessSourceTypeError - # - # source://activerecord//lib/active_record/associations.rb#125 - def initialize(owner_class_name = T.unsafe(nil), reflection = T.unsafe(nil), source_reflection = T.unsafe(nil)); end -end - -# source://activerecord//lib/active_record/associations.rb#104 -class ActiveRecord::HasManyThroughAssociationPolymorphicSourceError < ::ActiveRecord::ActiveRecordError - # @return [HasManyThroughAssociationPolymorphicSourceError] a new instance of HasManyThroughAssociationPolymorphicSourceError - # - # source://activerecord//lib/active_record/associations.rb#105 - def initialize(owner_class_name = T.unsafe(nil), reflection = T.unsafe(nil), source_reflection = T.unsafe(nil)); end -end - -# source://activerecord//lib/active_record/associations.rb#114 -class ActiveRecord::HasManyThroughAssociationPolymorphicThroughError < ::ActiveRecord::ActiveRecordError - # @return [HasManyThroughAssociationPolymorphicThroughError] a new instance of HasManyThroughAssociationPolymorphicThroughError - # - # source://activerecord//lib/active_record/associations.rb#115 - def initialize(owner_class_name = T.unsafe(nil), reflection = T.unsafe(nil)); end -end - -# source://activerecord//lib/active_record/associations.rb#202 -class ActiveRecord::HasManyThroughCantAssociateThroughHasOneOrManyReflection < ::ActiveRecord::ThroughCantAssociateThroughHasOneOrManyReflection; end - -# source://activerecord//lib/active_record/associations.rb#218 -class ActiveRecord::HasManyThroughNestedAssociationsAreReadonly < ::ActiveRecord::ThroughNestedAssociationsAreReadonly; end - -# source://activerecord//lib/active_record/associations.rb#167 -class ActiveRecord::HasManyThroughOrderError < ::ActiveRecord::ActiveRecordError - # @return [HasManyThroughOrderError] a new instance of HasManyThroughOrderError - # - # source://activerecord//lib/active_record/associations.rb#168 - 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#154 -class ActiveRecord::HasManyThroughSourceAssociationNotFoundError < ::ActiveRecord::ActiveRecordError - # @return [HasManyThroughSourceAssociationNotFoundError] a new instance of HasManyThroughSourceAssociationNotFoundError - # - # source://activerecord//lib/active_record/associations.rb#155 - def initialize(reflection = T.unsafe(nil)); end -end - -# source://activerecord//lib/active_record/associations.rb#144 -class ActiveRecord::HasOneAssociationPolymorphicThroughError < ::ActiveRecord::ActiveRecordError - # @return [HasOneAssociationPolymorphicThroughError] a new instance of HasOneAssociationPolymorphicThroughError - # - # source://activerecord//lib/active_record/associations.rb#145 - def initialize(owner_class_name = T.unsafe(nil), reflection = T.unsafe(nil)); end -end - -# source://activerecord//lib/active_record/associations.rb#134 -class ActiveRecord::HasOneThroughCantAssociateThroughCollection < ::ActiveRecord::ActiveRecordError - # @return [HasOneThroughCantAssociateThroughCollection] a new instance of HasOneThroughCantAssociateThroughCollection - # - # source://activerecord//lib/active_record/associations.rb#135 - 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 -class ActiveRecord::HasOneThroughCantAssociateThroughHasOneOrManyReflection < ::ActiveRecord::ThroughCantAssociateThroughHasOneOrManyReflection; end - -# source://activerecord//lib/active_record/associations.rb#221 -class ActiveRecord::HasOneThroughNestedAssociationsAreReadonly < ::ActiveRecord::ThroughNestedAssociationsAreReadonly; end - -# source://activerecord//lib/active_record/migration.rb#123 -class ActiveRecord::IllegalMigrationNameError < ::ActiveRecord::MigrationError - # @return [IllegalMigrationNameError] a new instance of IllegalMigrationNameError - # - # source://activerecord//lib/active_record/migration.rb#124 - def initialize(name = T.unsafe(nil)); end -end - -# Raised when a relation cannot be mutated because it's already loaded. -# -# class Task < ActiveRecord::Base -# end -# -# relation = Task.all -# relation.loaded? # => true -# -# # Methods which try to mutate a loaded relation fail. -# relation.where!(title: 'TODO') # => ActiveRecord::ImmutableRelation -# relation.limit!(5) # => ActiveRecord::ImmutableRelation -# -# source://activerecord//lib/active_record/errors.rb#401 -class ActiveRecord::ImmutableRelation < ::ActiveRecord::ActiveRecordError; end - -# == 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). -# This means that an inheritance looking like this: -# -# class Company < ActiveRecord::Base; end -# class Firm < Company; end -# class Client < Company; end -# class PriorityClient < Client; end -# -# When you do Firm.create(name: "37signals"), this record will be saved in -# the companies table with type = "Firm". You can then fetch this row again using -# Company.where(name: '37signals').first and it will return a Firm object. -# -# Be aware that because the type column is an attribute on the record every new -# subclass will instantly be marked as dirty and the type column will be included -# in the list of changed attributes on the record. This is different from non -# Single Table Inheritance(STI) classes: -# -# Company.new.changed? # => false -# Firm.new.changed? # => true -# Firm.new.changes # => {"type"=>["","Firm"]} -# -# If you don't have a type column defined in your table, single-table inheritance won't -# 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 -# -# source://activerecord//lib/active_record/inheritance.rb#38 -module ActiveRecord::Inheritance - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - - private - - # Sets the attribute used for single table inheritance to this class name if this is not the - # ActiveRecord::Base descendant. - # Considering the hierarchy Reply < Message < ActiveRecord::Base, this makes it possible to - # 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 - def ensure_proper_type; end - - # source://activerecord//lib/active_record/inheritance.rb#327 - def initialize_dup(other); end - - # source://activerecord//lib/active_record/inheritance.rb#333 - def initialize_internals_callback; end - - module GeneratedClassMethods - def store_full_class_name; end - def store_full_class_name=(value); end - def store_full_class_name?; end - def store_full_sti_class; end - def store_full_sti_class=(value); end - def store_full_sti_class?; end - end - - module GeneratedInstanceMethods - def store_full_class_name; end - def store_full_class_name?; end - def store_full_sti_class; end - def store_full_sti_class?; end - end -end - -# source://activerecord//lib/active_record/inheritance.rb#51 -module ActiveRecord::Inheritance::ClassMethods - # Set this to +true+ if this is an abstract class (see - # abstract_class?). - # If you are using inheritance with Active Record and don't want a class - # to be considered as part of the STI hierarchy, you must set this to - # true. - # +ApplicationRecord+, for example, is generated as an abstract class. - # - # Consider the following default behaviour: - # - # Shape = Class.new(ActiveRecord::Base) - # Polygon = Class.new(Shape) - # Square = Class.new(Polygon) - # - # Shape.table_name # => "shapes" - # Polygon.table_name # => "shapes" - # Square.table_name # => "shapes" - # Shape.create! # => # - # Polygon.create! # => # - # Square.create! # => # - # - # However, when using abstract_class, +Shape+ is omitted from - # the hierarchy: - # - # class Shape < ActiveRecord::Base - # self.abstract_class = true - # end - # Polygon = Class.new(Shape) - # Square = Class.new(Polygon) - # - # Shape.table_name # => nil - # Polygon.table_name # => "polygons" - # Square.table_name # => "polygons" - # Shape.create! # => NotImplementedError: Shape is an abstract class and cannot be instantiated. - # Polygon.create! # => # - # Square.create! # => # - # - # Note that in the above example, to disallow the creation of a plain - # +Polygon+, you should use validates :type, presence: true, - # instead of setting it as an abstract class. This way, +Polygon+ will - # stay in the hierarchy, and Active Record will continue to correctly - # derive the table name. - # - # source://activerecord//lib/active_record/inheritance.rb#153 - def abstract_class; end - - # Set this to +true+ if this is an abstract class (see - # abstract_class?). - # If you are using inheritance with Active Record and don't want a class - # to be considered as part of the STI hierarchy, you must set this to - # true. - # +ApplicationRecord+, for example, is generated as an abstract class. - # - # Consider the following default behaviour: - # - # Shape = Class.new(ActiveRecord::Base) - # Polygon = Class.new(Shape) - # Square = Class.new(Polygon) - # - # Shape.table_name # => "shapes" - # Polygon.table_name # => "shapes" - # Square.table_name # => "shapes" - # Shape.create! # => # - # Polygon.create! # => # - # Square.create! # => # - # - # However, when using abstract_class, +Shape+ is omitted from - # the hierarchy: - # - # class Shape < ActiveRecord::Base - # self.abstract_class = true - # end - # Polygon = Class.new(Shape) - # Square = Class.new(Polygon) - # - # Shape.table_name # => nil - # Polygon.table_name # => "polygons" - # Square.table_name # => "polygons" - # Shape.create! # => NotImplementedError: Shape is an abstract class and cannot be instantiated. - # Polygon.create! # => # - # Square.create! # => # - # - # Note that in the above example, to disallow the creation of a plain - # +Polygon+, you should use validates :type, presence: true, - # instead of setting it as an abstract class. This way, +Polygon+ will - # stay in the hierarchy, and Active Record will continue to correctly - # derive the table name. - # - # source://activerecord//lib/active_record/inheritance.rb#153 - 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 - def abstract_class?; end - - # Returns the class descending directly from ActiveRecord::Base, or - # an abstract class, if any, in the inheritance hierarchy. - # - # 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. - # - # 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. - # - # source://activerecord//lib/active_record/inheritance.rb#104 - def base_class; end - - # Returns whether the class is a base class. - # See #base_class for more information. - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/inheritance.rb#108 - def base_class?; end - - # Returns +true+ if this does not need STI type condition. Returns - # +false+ if STI type condition needs to be applied. - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/inheritance.rb#81 - def descends_from_active_record?; end - - # source://activerecord//lib/active_record/inheritance.rb#219 - def dup; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/inheritance.rb#91 - 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 - 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 - 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 - def polymorphic_name; end - - # Sets the application record class for Active Record - # - # This is useful if your application uses a different class than - # ApplicationRecord for your primary abstract class. This class - # 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 - 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 - 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 - def sti_name; end - - protected - - # 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 - def compute_type(type_name); end - - # source://activerecord//lib/active_record/inheritance.rb#263 - def set_base_class; end - - private - - # Called by +instantiate+ to decide which class to use for a new - # 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 - def discriminate_class_for_record(record); end - - # source://activerecord//lib/active_record/inheritance.rb#295 - def find_sti_class(type_name); end - - # source://activerecord//lib/active_record/inheritance.rb#227 - 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 - def subclass_from_attributes(attrs); end - - # source://activerecord//lib/active_record/inheritance.rb#306 - def type_condition(table = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/inheritance.rb#291 - 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 - def initialize(model, inserts, on_duplicate:, update_only: T.unsafe(nil), returning: T.unsafe(nil), unique_by: T.unsafe(nil), record_timestamps: T.unsafe(nil)); end - - # Returns the value of attribute connection. - # - # source://activerecord//lib/active_record/insert_all.rb#7 - def connection; end - - # source://activerecord//lib/active_record/insert_all.rb#37 - def execute; end - - # Returns the value of attribute inserts. - # - # source://activerecord//lib/active_record/insert_all.rb#7 - def inserts; end - - # Returns the value of attribute keys. - # - # 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 - # - # source://activerecord//lib/active_record/insert_all.rb#80 - def keys_including_timestamps; end - - # source://activerecord//lib/active_record/insert_all.rb#61 - def map_key_with_value; end - - # Returns the value of attribute model. - # - # source://activerecord//lib/active_record/insert_all.rb#7 - def model; end - - # Returns the value of attribute on_duplicate. - # - # source://activerecord//lib/active_record/insert_all.rb#8 - def on_duplicate; end - - # source://activerecord//lib/active_record/insert_all.rb#48 - def primary_keys; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/insert_all.rb#75 - def record_timestamps?; end - - # Returns the value of attribute returning. - # - # source://activerecord//lib/active_record/insert_all.rb#8 - def returning; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/insert_all.rb#53 - def skip_duplicates?; end - - # Returns the value of attribute unique_by. - # - # source://activerecord//lib/active_record/insert_all.rb#8 - def unique_by; end - - # source://activerecord//lib/active_record/insert_all.rb#44 - def updatable_columns; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/insert_all.rb#57 - def update_duplicates?; end - - # Returns the value of attribute update_only. - # - # source://activerecord//lib/active_record/insert_all.rb#8 - def update_only; end - - # Returns the value of attribute update_sql. - # - # source://activerecord//lib/active_record/insert_all.rb#8 - def update_sql; end - - private - - # source://activerecord//lib/active_record/insert_all.rb#91 - def configure_on_duplicate_update_logic; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/insert_all.rb#105 - def custom_update_sql_provided?; end - - # @raise [ArgumentError] - # - # source://activerecord//lib/active_record/insert_all.rb#172 - def disallow_raw_sql!(value); end - - # source://activerecord//lib/active_record/insert_all.rb#133 - def ensure_valid_options_for_connection!; end - - # source://activerecord//lib/active_record/insert_all.rb#109 - def find_unique_index_for(unique_by); end - - # source://activerecord//lib/active_record/insert_all.rb#157 - def readonly_columns; end - - # Returns the value of attribute scope_attributes. - # - # source://activerecord//lib/active_record/insert_all.rb#89 - def scope_attributes; end - - # source://activerecord//lib/active_record/insert_all.rb#181 - def timestamps_for_create; end - - # source://activerecord//lib/active_record/insert_all.rb#152 - def to_sql; end - - # source://activerecord//lib/active_record/insert_all.rb#161 - def unique_by_columns; end - - # source://activerecord//lib/active_record/insert_all.rb#128 - def unique_indexes; end - - # source://activerecord//lib/active_record/insert_all.rb#166 - def verify_attributes(attributes); end -end - -# source://activerecord//lib/active_record/insert_all.rb#185 -class ActiveRecord::InsertAll::Builder - # @return [Builder] a new instance of Builder - # - # source://activerecord//lib/active_record/insert_all.rb#190 - def initialize(insert_all); end - - # source://activerecord//lib/active_record/insert_all.rb#219 - def conflict_target; end - - # source://activerecord//lib/active_record/insert_all.rb#194 - def into; end - - # source://activerecord//lib/active_record/insert_all.rb#188 - def keys(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/insert_all.rb#188 - def keys_including_timestamps(*_arg0, **_arg1, &_arg2); end - - # Returns the value of attribute model. - # - # source://activerecord//lib/active_record/insert_all.rb#186 - def model; end - - # source://activerecord//lib/active_record/insert_all.rb#243 - def raw_update_sql; end - - # source://activerecord//lib/active_record/insert_all.rb#243 - def raw_update_sql?; end - - # source://activerecord//lib/active_record/insert_all.rb#188 - def record_timestamps?(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/insert_all.rb#209 - def returning; end - - # source://activerecord//lib/active_record/insert_all.rb#188 - def skip_duplicates?(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/insert_all.rb#233 - def touch_model_timestamps_unless(&block); end - - # source://activerecord//lib/active_record/insert_all.rb#229 - def updatable_columns; end - - # source://activerecord//lib/active_record/insert_all.rb#188 - def update_duplicates?(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/insert_all.rb#198 - def values_list; end - - private - - # source://activerecord//lib/active_record/insert_all.rb#256 - def columns_list; end - - # Returns the value of attribute connection. - # - # source://activerecord//lib/active_record/insert_all.rb#250 - def connection; end - - # @raise [UnknownAttributeError] - # - # source://activerecord//lib/active_record/insert_all.rb#260 - def extract_types_from_columns_on(table_name, keys:); end - - # source://activerecord//lib/active_record/insert_all.rb#269 - def format_columns(columns); end - - # Returns the value of attribute insert_all. - # - # source://activerecord//lib/active_record/insert_all.rb#250 - def insert_all; end - - # source://activerecord//lib/active_record/insert_all.rb#273 - def quote_columns(columns); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/insert_all.rb#252 - def touch_timestamp_attribute?(column_name); end -end - -# source://activerecord//lib/active_record/integration.rb#6 -module ActiveRecord::Integration - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveRecord::Integration::ClassMethods - - # Returns a stable cache key that can be used to identify this record. - # - # 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, - # the cache key will also include a version. - # - # Product.cache_versioning = false - # Product.find(5).cache_key # => "products/5-20071224150000" (updated_at available) - # - # source://activerecord//lib/active_record/integration.rb#72 - def cache_key; end - - # Returns a cache key along with the version. - # - # source://activerecord//lib/active_record/integration.rb#114 - def cache_key_with_version; end - - # Returns a cache version that can be used together with the cache key to form - # a recyclable caching scheme. By default, the #updated_at column is used for the - # cache_version, but this method can be overwritten to return something else. - # - # Note, this method will return nil if ActiveRecord::Base.cache_versioning is set to - # +false+. - # - # source://activerecord//lib/active_record/integration.rb#97 - def cache_version; end - - # Returns a +String+, which Action Pack uses for constructing a URL to this - # object. The default implementation returns this record's id as a +String+, - # or +nil+ if this record's unsaved. - # - # For example, suppose that you have a User model, and that you have a - # resources :users route. Normally, +user_path+ will - # construct a path with the user object's 'id' in it: - # - # user = User::User.find_by(name: 'Phusion') - # user_path(user) # => "/users/1" - # - # You can override +to_param+ in your model to make +user_path+ construct - # a path using the user's name instead of the user's id: - # - # class User < ActiveRecord::Base - # def to_param # overridden - # name - # end - # end - # - # user = User::User.find_by(name: 'Phusion') - # user_path(user) # => "/users/Phusion" - # - # source://activerecord//lib/active_record/integration.rb#57 - def to_param; end - - private - - # Detects if the value before type cast - # can be used to generate a cache_version. - # - # The fast cache version only works with a - # string value directly from the database. - # - # We also must check if the timestamp format has been changed - # or if the timezone is not set to UTC then - # we cannot apply our transformations correctly. - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/integration.rb#178 - def can_use_fast_cache_version?(timestamp); end - - # Converts a raw database string to `:usec` - # format. - # - # Example: - # - # timestamp = "2018-10-15 20:02:15.266505" - # raw_timestamp_to_cache_version(timestamp) - # # => "20181015200215266505" - # - # PostgreSQL truncates trailing zeros, - # https://github.com/postgres/postgres/commit/3e1beda2cde3495f41290e1ece5d544525810214 - # to account for this we pad the output with zeros - # - # source://activerecord//lib/active_record/integration.rb#197 - def raw_timestamp_to_cache_version(timestamp); end - - module GeneratedClassMethods - def cache_timestamp_format; end - def cache_timestamp_format=(value); end - def cache_timestamp_format?; end - def cache_versioning; end - def cache_versioning=(value); end - def cache_versioning?; end - def collection_cache_versioning; end - def collection_cache_versioning=(value); end - def collection_cache_versioning?; end - end - - module GeneratedInstanceMethods - def cache_timestamp_format; end - def cache_timestamp_format?; end - def cache_versioning; end - def cache_versioning?; end - def collection_cache_versioning; end - def collection_cache_versioning?; end - end -end - -# source://activerecord//lib/active_record/integration.rb#122 -module ActiveRecord::Integration::ClassMethods - # source://activerecord//lib/active_record/integration.rb#163 - def collection_cache_key(collection = T.unsafe(nil), timestamp_column = T.unsafe(nil)); end - - # Defines your model's +to_param+ method to generate "pretty" URLs - # using +method_name+, which can be any attribute or method that - # responds to +to_s+. - # - # class User < ActiveRecord::Base - # to_param :name - # end - # - # user = User::User.find_by(name: 'Fancy Pants') - # user.id # => 123 - # user_path(user) # => "/users/123-fancy-pants" - # - # Values longer than 20 characters will be truncated. The value - # is truncated word by word. - # - # user = User::User.find_by(name: 'David Heinemeier Hansson') - # user.id # => 125 - # user_path(user) # => "/users/125-david-heinemeier" - # - # Because the generated param begins with the record's +id+, it is - # suitable for passing to +find+. In a controller, for example: - # - # params[:id] # => "123-fancy-pants" - # User::User.find(params[:id]).id # => 123 - # - # source://activerecord//lib/active_record/integration.rb#147 - def to_param(method_name = T.unsafe(nil)); end -end - -# This class is used to create a table that keeps track of values and keys such -# as which environment migrations were run in. -# -# This is enabled by default. To disable this functionality set -# `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 << self - # source://activerecord//lib/active_record/internal_metadata.rb#34 - def [](key); end - - # source://activerecord//lib/active_record/internal_metadata.rb#28 - def []=(key, value); end - - # source://activemodel/7.0.4.2/lib/active_model/validations.rb#52 - def _validators; end - - # Creates an internal metadata table with columns +key+ and +value+ - # - # source://activerecord//lib/active_record/internal_metadata.rb#41 - def create_table; end - - # source://activerecord//lib/active_record/enum.rb#116 - def defined_enums; end - - # source://activerecord//lib/active_record/internal_metadata.rb#53 - def drop_table; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/internal_metadata.rb#16 - def enabled?; end - - # source://activerecord//lib/active_record/internal_metadata.rb#20 - def primary_key; end - - # source://activerecord//lib/active_record/timestamp.rb#47 - def record_timestamps; end - - # source://activerecord//lib/active_record/internal_metadata.rb#24 - def table_name; end - end -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#0 -class ActiveRecord::InternalMetadata::ActiveRecord_Associations_CollectionProxy < ::ActiveRecord::Associations::CollectionProxy - include ::ActiveRecord::Delegation::ClassSpecificRelation - include ::ActiveRecord::InternalMetadata::GeneratedRelationMethods - extend ::ActiveRecord::Delegation::ClassSpecificRelation::ClassMethods -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#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#0 -module ActiveRecord::InternalMetadata::GeneratedAssociationMethods; end - -# source://activerecord//lib/active_record/internal_metadata.rb#0 -module ActiveRecord::InternalMetadata::GeneratedAttributeMethods; end - -# source://activerecord//lib/active_record/internal_metadata.rb#0 -module ActiveRecord::InternalMetadata::GeneratedRelationMethods; 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 -class ActiveRecord::InvalidForeignKey < ::ActiveRecord::WrappedDatabaseException; end - -# source://activerecord//lib/active_record/associations.rb#33 -class ActiveRecord::InverseOfAssociationNotFoundError < ::ActiveRecord::ActiveRecordError - include ::DidYouMean::Correctable - - # @return [InverseOfAssociationNotFoundError] a new instance of InverseOfAssociationNotFoundError - # - # source://activerecord//lib/active_record/associations.rb#36 - def initialize(reflection = T.unsafe(nil), associated_class = T.unsafe(nil)); end - - # Returns the value of attribute associated_class. - # - # source://activerecord//lib/active_record/associations.rb#34 - def associated_class; end - - # source://activerecord//lib/active_record/associations.rb#49 - def corrections; end - - # Returns the value of attribute reflection. - # - # source://activerecord//lib/active_record/associations.rb#34 - def reflection; end -end - -# source://activerecord//lib/active_record/associations.rb#62 -class ActiveRecord::InverseOfAssociationRecursiveError < ::ActiveRecord::ActiveRecordError - # @return [InverseOfAssociationRecursiveError] a new instance of InverseOfAssociationRecursiveError - # - # source://activerecord//lib/active_record/associations.rb#64 - def initialize(reflection = T.unsafe(nil)); end - - # Returns the value of attribute reflection. - # - # source://activerecord//lib/active_record/associations.rb#63 - def reflection; end -end - -# Exception that can be raised to stop migrations from being rolled back. -# For example the following migration is not reversible. -# Rolling back this migration will raise an ActiveRecord::IrreversibleMigration error. -# -# class IrreversibleMigrationExample < ActiveRecord::Migration[7.0] -# def change -# create_table :distributors do |t| -# t.string :zipcode -# end -# -# execute <<~SQL -# ALTER TABLE distributors -# ADD CONSTRAINT zipchk -# CHECK (char_length(zipcode) = 5) NO INHERIT; -# SQL -# end -# end -# -# There are two ways to mitigate this problem. -# -# 1. Define #up and #down methods instead of #change: -# -# class ReversibleMigrationExample < ActiveRecord::Migration[7.0] -# def up -# create_table :distributors do |t| -# t.string :zipcode -# end -# -# execute <<~SQL -# ALTER TABLE distributors -# ADD CONSTRAINT zipchk -# CHECK (char_length(zipcode) = 5) NO INHERIT; -# SQL -# end -# -# def down -# execute <<~SQL -# ALTER TABLE distributors -# DROP CONSTRAINT zipchk -# SQL -# -# drop_table :distributors -# end -# end -# -# 2. Use the #reversible method in #change method: -# -# class ReversibleMigrationExample < ActiveRecord::Migration[7.0] -# def change -# create_table :distributors do |t| -# t.string :zipcode -# end -# -# reversible do |dir| -# dir.up do -# execute <<~SQL -# ALTER TABLE distributors -# ADD CONSTRAINT zipchk -# CHECK (char_length(zipcode) = 5) NO INHERIT; -# SQL -# end -# -# dir.down do -# execute <<~SQL -# ALTER TABLE distributors -# DROP CONSTRAINT zipchk -# SQL -# end -# end -# end -# end -# -# source://activerecord//lib/active_record/migration.rb#90 -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 -class ActiveRecord::IrreversibleOrderError < ::ActiveRecord::ActiveRecordError; end - -# source://activerecord//lib/active_record/legacy_yaml_adapter.rb#4 -module ActiveRecord::LegacyYamlAdapter - class << self - # source://activerecord//lib/active_record/legacy_yaml_adapter.rb#5 - def convert(coder); end - end -end - -# LockWaitTimeout will be raised when lock wait timeout exceeded. -# -# source://activerecord//lib/active_record/errors.rb#449 -class ActiveRecord::LockWaitTimeout < ::ActiveRecord::StatementInvalid; end - -# source://activerecord//lib/active_record.rb#134 -module ActiveRecord::Locking - extend ::ActiveSupport::Autoload -end - -# In de/serialize we change `nil` to 0, so that we can allow passing -# `nil` values to `lock_version`, and not result in `ActiveRecord::StaleObjectError` -# during update record. -# -# source://activerecord//lib/active_record/locking/optimistic.rb#191 -class ActiveRecord::Locking::LockingType - # source://activerecord//lib/active_record/locking/optimistic.rb#196 - def deserialize(value); end - - # source://activerecord//lib/active_record/locking/optimistic.rb#208 - def encode_with(coder); end - - # source://activerecord//lib/active_record/locking/optimistic.rb#204 - def init_with(coder); end - - # source://activerecord//lib/active_record/locking/optimistic.rb#200 - def serialize(value); end - - class << self - # source://activerecord//lib/active_record/locking/optimistic.rb#192 - def new(subtype); end - end -end - -# == What is Optimistic Locking -# -# Optimistic locking allows multiple users to access the same record for edits, and assumes a minimum of -# conflicts with the data. It does this by checking whether another process has made changes to a record since -# it was opened, an ActiveRecord::StaleObjectError exception is thrown if that has occurred -# and the update is ignored. -# -# Check out ActiveRecord::Locking::Pessimistic for an alternative. -# -# == Usage -# -# Active Record supports optimistic locking if the +lock_version+ field is present. Each update to the -# record increments the +lock_version+ column and the locking facilities ensure that records instantiated twice -# will let the last one saved raise a +StaleObjectError+ if the first was also updated. Example: -# -# p1 = Person.find(1) -# p2 = Person.find(1) -# -# p1.first_name = "Michael" -# p1.save -# -# p2.first_name = "should fail" -# p2.save # Raises an ActiveRecord::StaleObjectError -# -# Optimistic locking will also check for stale data when objects are destroyed. Example: -# -# p1 = Person.find(1) -# p2 = Person.find(1) -# -# p1.first_name = "Michael" -# p1.save -# -# p2.destroy # Raises an ActiveRecord::StaleObjectError -# -# You're then responsible for dealing with the conflict by rescuing the exception and either rolling back, merging, -# or otherwise apply the business logic needed to resolve the conflict. -# -# This locking mechanism will function inside a single Ruby process. To make it work across all -# web requests, the recommended approach is to add +lock_version+ as a hidden field to your form. -# -# This behavior can be turned off by setting ActiveRecord::Base.lock_optimistically = false. -# To override the name of the +lock_version+ column, set the locking_column class attribute: -# -# class Person < ActiveRecord::Base -# self.locking_column = :lock_person -# end -# -# source://activerecord//lib/active_record/locking/optimistic.rb#52 -module ActiveRecord::Locking::Optimistic - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveRecord::Locking::Optimistic::ClassMethods - - # source://activerecord//lib/active_record/locking/optimistic.rb#63 - def increment!(*_arg0, **_arg1); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/locking/optimistic.rb#59 - def locking_enabled?; end - - private - - # source://activerecord//lib/active_record/locking/optimistic.rb#73 - def _create_record(attribute_names = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/locking/optimistic.rb#137 - def _lock_value_for_database(locking_column); end - - # source://activerecord//lib/active_record/locking/optimistic.rb#82 - def _touch_row(attribute_names, time); end - - # source://activerecord//lib/active_record/locking/optimistic.rb#87 - def _update_row(attribute_names, attempted_action = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/locking/optimistic.rb#120 - def destroy_row; end - - module GeneratedClassMethods - def lock_optimistically; end - def lock_optimistically=(value); end - def lock_optimistically?; end - end - - module GeneratedInstanceMethods - def lock_optimistically; end - def lock_optimistically?; end - end -end - -# source://activerecord//lib/active_record/locking/optimistic.rb#145 -module ActiveRecord::Locking::Optimistic::ClassMethods - # source://activerecord//lib/active_record/locking/optimistic.rb#179 - def define_attribute(name, cast_type, **_arg2); end - - # The version column used for optimistic locking. Defaults to +lock_version+. - # - # source://activerecord//lib/active_record/locking/optimistic.rb#162 - def locking_column; end - - # Set the column to use for optimistic locking. Defaults to +lock_version+. - # - # source://activerecord//lib/active_record/locking/optimistic.rb#156 - def locking_column=(value); end - - # Returns true if the +lock_optimistically+ flag is set to true - # (which it is, by default) and the table includes the - # +locking_column+ column (defaults to +lock_version+). - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/locking/optimistic.rb#151 - def locking_enabled?; end - - # Reset the column used for optimistic locking back to the +lock_version+ default. - # - # source://activerecord//lib/active_record/locking/optimistic.rb#168 - def reset_locking_column; end - - # Make sure the lock version column gets updated when counters are - # updated. - # - # source://activerecord//lib/active_record/locking/optimistic.rb#174 - def update_counters(id, counters); end -end - -# source://activerecord//lib/active_record/locking/optimistic.rb#146 -ActiveRecord::Locking::Optimistic::ClassMethods::DEFAULT_LOCKING_COLUMN = T.let(T.unsafe(nil), String) - -# Locking::Pessimistic provides support for row-level locking using -# SELECT ... FOR UPDATE and other lock types. -# -# Chain ActiveRecord::Base#find to ActiveRecord::QueryMethods#lock to obtain an exclusive -# lock on the selected rows: -# # select * from accounts where id=1 for update -# Account.lock.find(1) -# -# Call lock('some locking clause') to use a database-specific locking clause -# of your own such as 'LOCK IN SHARE MODE' or 'FOR UPDATE NOWAIT'. Example: -# -# Account.transaction do -# # select * from accounts where name = 'shugo' limit 1 for update nowait -# shugo = Account.lock("FOR UPDATE NOWAIT").find_by(name: "shugo") -# yuko = Account.lock("FOR UPDATE NOWAIT").find_by(name: "yuko") -# shugo.balance -= 100 -# shugo.save! -# yuko.balance += 100 -# yuko.save! -# end -# -# You can also use ActiveRecord::Base#lock! method to lock one record by id. -# This may be better if you don't need to lock every row. Example: -# -# Account.transaction do -# # select * from accounts where ... -# accounts = Account.where(...) -# account1 = accounts.detect { |account| ... } -# account2 = accounts.detect { |account| ... } -# # select * from accounts where id=? for update -# account1.lock! -# account2.lock! -# account1.balance -= 100 -# account1.save! -# account2.balance += 100 -# account2.save! -# end -# -# You can start a transaction and acquire the lock in one go by calling -# with_lock with a block. The block is called from within -# a transaction, the object is already locked. Example: -# -# account = Account.first -# account.with_lock do -# # This block is called within a transaction, -# # account is already locked. -# account.balance -= 100 -# account.save! -# end -# -# Database-specific information on row locking: -# -# [MySQL] -# https://dev.mysql.com/doc/refman/en/innodb-locking-reads.html -# -# [PostgreSQL] -# https://www.postgresql.org/docs/current/interactive/sql-select.html#SQL-FOR-UPDATE-SHARE -# -# source://activerecord//lib/active_record/locking/pessimistic.rb#62 -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 - 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 - # 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 - def with_lock(*args); end -end - -# source://activerecord//lib/active_record/log_subscriber.rb#4 -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#7 - def backtrace_cleaner=(_arg0); end - - # source://activerecord//lib/active_record/log_subscriber.rb#7 - def backtrace_cleaner?; end - - # source://activerecord//lib/active_record/log_subscriber.rb#30 - def sql(event); end - - # source://activerecord//lib/active_record/log_subscriber.rb#22 - def strict_loading_violation(event); end - - private - - # source://activerecord//lib/active_record/log_subscriber.rb#94 - def colorize_payload_name(name, payload_name); end - - # source://activerecord//lib/active_record/log_subscriber.rb#127 - 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 - def filter(name, value); end - - # source://activerecord//lib/active_record/log_subscriber.rb#135 - def log_query_source; end - - # source://activerecord//lib/active_record/log_subscriber.rb#123 - def logger; end - - # source://activerecord//lib/active_record/log_subscriber.rb#79 - def render_bind(attr, value); end - - # source://activerecord//lib/active_record/log_subscriber.rb#102 - def sql_color(sql); end - - # source://activerecord//lib/active_record/log_subscriber.rb#75 - def type_casted_binds(casted_binds); end - - class << self - # source://activerecord//lib/active_record/log_subscriber.rb#7 - def backtrace_cleaner; end - - # source://activerecord//lib/active_record/log_subscriber.rb#7 - def backtrace_cleaner=(value); end - - # source://activerecord//lib/active_record/log_subscriber.rb#7 - def backtrace_cleaner?; end - - # source://activerecord//lib/active_record/log_subscriber.rb#17 - def reset_runtime; end - - # source://activerecord//lib/active_record/log_subscriber.rb#13 - def runtime; end - - # source://activerecord//lib/active_record/log_subscriber.rb#9 - def runtime=(value); end - end -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 -module ActiveRecord::Middleware - extend ::ActiveSupport::Autoload -end - -# The DatabaseSelector Middleware provides a framework for automatically -# 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. -# -# The resolver class defines when the application should switch (i.e. read -# from the primary if a write occurred less than 2 seconds ago) and a -# 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 -# that informs the application when to read from a primary or read from a -# replica. -# -# To use the DatabaseSelector in your application with default settings, -# run the provided generator. -# -# bin/rails g active_record:multi_db -# -# This will create a file named +config/initializers/multi_db.rb+ with the -# following contents: -# -# Rails.application.configure do -# config.active_record.database_selector = { delay: 2.seconds } -# config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver -# config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session -# end -# -# Alternatively you can set the options in your environment config or -# any other config file loaded on boot. -# -# The default behavior can be changed by setting the config options to a -# custom class: -# -# config.active_record.database_selector = { delay: 2.seconds } -# config.active_record.database_resolver = MyResolver -# config.active_record.database_resolver_context = MyResolver::MySession -# -# Note: If you are using `rails new my_app --minimal` you will need to call -# `require "active_support/core_ext/integer/time"` to load the libraries -# for +Time+. -# -# source://activerecord//lib/active_record/middleware/database_selector/resolver/session.rb#5 -class ActiveRecord::Middleware::DatabaseSelector - # @return [DatabaseSelector] a new instance of DatabaseSelector - # - # source://activerecord//lib/active_record/middleware/database_selector.rb#50 - 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 - def call(env); end - - # Returns the value of attribute context_klass. - # - # source://activerecord//lib/active_record/middleware/database_selector.rb#57 - def context_klass; end - - # Returns the value of attribute options. - # - # source://activerecord//lib/active_record/middleware/database_selector.rb#57 - def options; end - - # Returns the value of attribute resolver_klass. - # - # source://activerecord//lib/active_record/middleware/database_selector.rb#57 - 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 - def select_database(request, &blk); end -end - -# The Resolver class is used by the DatabaseSelector middleware to -# determine which database the request should use. -# -# To change the behavior of the Resolver class in your application, -# create a custom resolver class that inherits from -# DatabaseSelector::Resolver and implements the methods that need to -# be changed. -# -# By default the Resolver class will send read traffic to the replica -# if it's been 2 seconds since the last write. -# -# source://activerecord//lib/active_record/middleware/database_selector/resolver/session.rb#6 -class ActiveRecord::Middleware::DatabaseSelector::Resolver - # @return [Resolver] a new instance of Resolver - # - # source://activerecord//lib/active_record/middleware/database_selector/resolver.rb#26 - def initialize(context, options = T.unsafe(nil)); end - - # Returns the value of attribute context. - # - # source://activerecord//lib/active_record/middleware/database_selector/resolver.rb#33 - def context; end - - # Returns the value of attribute delay. - # - # source://activerecord//lib/active_record/middleware/database_selector/resolver.rb#33 - def delay; end - - # Returns the value of attribute instrumenter. - # - # source://activerecord//lib/active_record/middleware/database_selector/resolver.rb#33 - def instrumenter; end - - # source://activerecord//lib/active_record/middleware/database_selector/resolver.rb#35 - def read(&blk); end - - # source://activerecord//lib/active_record/middleware/database_selector/resolver.rb#47 - def update_context(response); end - - # source://activerecord//lib/active_record/middleware/database_selector/resolver.rb#43 - def write(&blk); end - - private - - # source://activerecord//lib/active_record/middleware/database_selector/resolver.rb#52 - def read_from_primary(&blk); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/middleware/database_selector/resolver.rb#74 - def read_from_primary?; end - - # source://activerecord//lib/active_record/middleware/database_selector/resolver.rb#58 - def read_from_replica(&blk); end - - # source://activerecord//lib/active_record/middleware/database_selector/resolver.rb#78 - def send_to_replica_delay; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/middleware/database_selector/resolver.rb#82 - def time_since_last_write_ok?; end - - # source://activerecord//lib/active_record/middleware/database_selector/resolver.rb#64 - def write_to_primary; end - - class << self - # source://activerecord//lib/active_record/middleware/database_selector/resolver.rb#22 - def call(context, options = T.unsafe(nil)); end - end -end - -# source://activerecord//lib/active_record/middleware/database_selector/resolver.rb#20 -ActiveRecord::Middleware::DatabaseSelector::Resolver::SEND_TO_REPLICA_DELAY = T.let(T.unsafe(nil), ActiveSupport::Duration) - -# The session class is used by the DatabaseSelector::Resolver to save -# timestamps of the last write in the session. -# -# The last_write is used to determine whether it's safe to read -# from the replica or the request needs to be sent to the primary. -# -# source://activerecord//lib/active_record/middleware/database_selector/resolver/session.rb#12 -class ActiveRecord::Middleware::DatabaseSelector::Resolver::Session - # @return [Session] a new instance of Session - # - # source://activerecord//lib/active_record/middleware/database_selector/resolver/session.rb#28 - def initialize(session); end - - # source://activerecord//lib/active_record/middleware/database_selector/resolver/session.rb#34 - def last_write_timestamp; end - - # source://activerecord//lib/active_record/middleware/database_selector/resolver/session.rb#42 - def save(response); end - - # Returns the value of attribute session. - # - # source://activerecord//lib/active_record/middleware/database_selector/resolver/session.rb#32 - def session; end - - # source://activerecord//lib/active_record/middleware/database_selector/resolver/session.rb#38 - def update_last_write_timestamp; end - - class << self - # source://activerecord//lib/active_record/middleware/database_selector/resolver/session.rb#13 - def call(request); end - - # Converts time to a timestamp that represents milliseconds since - # epoch. - # - # source://activerecord//lib/active_record/middleware/database_selector/resolver/session.rb#19 - def convert_time_to_timestamp(time); end - - # Converts milliseconds since epoch timestamp into a time object. - # - # source://activerecord//lib/active_record/middleware/database_selector/resolver/session.rb#24 - def convert_timestamp_to_time(timestamp); end - end -end - -# The ShardSelector Middleware provides a framework for automatically -# 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. -# -# The ShardSelector takes a set of options (currently only +lock+ is supported) -# that can be used by the middleware to alter behavior. +lock+ is -# true by default and will prohibit the request from switching shards once -# inside the block. If +lock+ is false, then shard swapping will be allowed. -# For tenant based sharding, +lock+ should always be true to prevent application -# code from mistakenly switching between tenants. -# -# Options can be set in the config: -# -# config.active_record.shard_selector = { lock: true } -# -# Applications must also provide the code for the resolver as it depends on application -# specific models. An example resolver would look like this: -# -# config.active_record.shard_resolver = ->(request) { -# subdomain = request.subdomain -# tenant = Tenant.find_by_subdomain!(subdomain) -# tenant.shard -# } -# -# source://activerecord//lib/active_record/middleware/shard_selector.rb#29 -class ActiveRecord::Middleware::ShardSelector - # @return [ShardSelector] a new instance of ShardSelector - # - # source://activerecord//lib/active_record/middleware/shard_selector.rb#30 - def initialize(app, resolver, options = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/middleware/shard_selector.rb#38 - def call(env); end - - # Returns the value of attribute options. - # - # source://activerecord//lib/active_record/middleware/shard_selector.rb#36 - def options; end - - # Returns the value of attribute resolver. - # - # source://activerecord//lib/active_record/middleware/shard_selector.rb#36 - def resolver; end - - private - - # source://activerecord//lib/active_record/middleware/shard_selector.rb#49 - def selected_shard(request); end - - # source://activerecord//lib/active_record/middleware/shard_selector.rb#53 - def set_shard(shard, &block); end -end - -# = Active Record Migrations -# -# Migrations can manage the evolution of a schema used by several physical -# databases. It's a solution to the common problem of adding a field to make -# a new feature work in your local database, but being unsure of how to -# push that change to other developers and to the production server. With -# migrations, you can describe the transformations in self-contained classes -# that can be checked into version control systems and executed against -# another database that might be one, two, or five versions behind. -# -# Example of a simple migration: -# -# class AddSsl < ActiveRecord::Migration[7.0] -# def up -# add_column :accounts, :ssl_enabled, :boolean, default: true -# end -# -# def down -# remove_column :accounts, :ssl_enabled -# end -# end -# -# This migration will add a boolean flag to the accounts table and remove it -# if you're backing out of the migration. It shows how all migrations have -# two methods +up+ and +down+ that describes the transformations -# required to implement or remove the migration. These methods can consist -# of both the migration specific methods like +add_column+ and +remove_column+, -# but may also contain regular Ruby code for generating data needed for the -# transformations. -# -# Example of a more complex migration that also needs to initialize data: -# -# class AddSystemSettings < ActiveRecord::Migration[7.0] -# def up -# create_table :system_settings do |t| -# t.string :name -# t.string :label -# t.text :value -# t.string :type -# t.integer :position -# end -# -# SystemSetting.create name: 'notice', -# label: 'Use notice?', -# value: 1 -# end -# -# def down -# drop_table :system_settings -# end -# end -# -# This migration first adds the +system_settings+ table, then creates the very -# first row in it using the Active Record model that relies on the table. It -# also uses the more advanced +create_table+ syntax where you can specify a -# complete table schema in one block call. -# -# == Available transformations -# -# === Creation -# -# * create_join_table(table_1, table_2, options): Creates a join -# table having its name as the lexical order of the first two -# arguments. See -# ActiveRecord::ConnectionAdapters::SchemaStatements#create_join_table for -# details. -# * create_table(name, options): Creates a table called +name+ and -# makes the table object available to a block that can then add columns to it, -# following the same format as +add_column+. See example above. The options hash -# is for fragments like "DEFAULT CHARSET=UTF-8" that are appended to the create -# table definition. -# * add_column(table_name, column_name, type, options): Adds a new column -# to the table called +table_name+ -# named +column_name+ specified to be one of the following types: -# :string, :text, :integer, :float, -# :decimal, :datetime, :timestamp, :time, -# :date, :binary, :boolean. A default value can be -# specified by passing an +options+ hash like { default: 11 }. -# Other options include :limit and :null (e.g. -# { limit: 50, null: false }) -- see -# ActiveRecord::ConnectionAdapters::TableDefinition#column for details. -# * add_foreign_key(from_table, to_table, options): Adds a new -# foreign key. +from_table+ is the table with the key column, +to_table+ contains -# the referenced primary key. -# * add_index(table_name, column_names, options): Adds a new index -# with the name of the column. Other options include -# :name, :unique (e.g. -# { name: 'users_name_index', unique: true }) and :order -# (e.g. { order: { name: :desc } }). -# * add_reference(:table_name, :reference_name): Adds a new column -# +reference_name_id+ by default an integer. See -# ActiveRecord::ConnectionAdapters::SchemaStatements#add_reference for details. -# * add_timestamps(table_name, options): Adds timestamps (+created_at+ -# and +updated_at+) columns to +table_name+. -# -# === Modification -# -# * change_column(table_name, column_name, type, options): Changes -# the column to a different type using the same parameters as add_column. -# * change_column_default(table_name, column_name, default_or_changes): -# Sets a default value for +column_name+ defined by +default_or_changes+ on -# +table_name+. Passing a hash containing :from and :to -# as +default_or_changes+ will make this change reversible in the migration. -# * change_column_null(table_name, column_name, null, default = nil): -# Sets or removes a NOT NULL constraint on +column_name+. The +null+ flag -# indicates whether the value can be +NULL+. See -# ActiveRecord::ConnectionAdapters::SchemaStatements#change_column_null for -# details. -# * change_table(name, options): Allows to make column alterations to -# the table called +name+. It makes the table object available to a block that -# can then add/remove columns, indexes, or foreign keys to it. -# * rename_column(table_name, column_name, new_column_name): Renames -# a column but keeps the type and content. -# * rename_index(table_name, old_name, new_name): Renames an index. -# * rename_table(old_name, new_name): Renames the table called +old_name+ -# to +new_name+. -# -# === Deletion -# -# * drop_table(name): Drops the table called +name+. -# * drop_join_table(table_1, table_2, options): Drops the join table -# specified by the given arguments. -# * remove_column(table_name, column_name, type, options): Removes the column -# named +column_name+ from the table called +table_name+. -# * remove_columns(table_name, *column_names): Removes the given -# columns from the table definition. -# * remove_foreign_key(from_table, to_table = nil, **options): Removes the -# given foreign key from the table called +table_name+. -# * remove_index(table_name, column: column_names): Removes the index -# specified by +column_names+. -# * remove_index(table_name, name: index_name): Removes the index -# specified by +index_name+. -# * remove_reference(table_name, ref_name, options): Removes the -# reference(s) on +table_name+ specified by +ref_name+. -# * remove_timestamps(table_name, options): Removes the timestamp -# columns (+created_at+ and +updated_at+) from the table definition. -# -# == Irreversible transformations -# -# Some transformations are destructive in a manner that cannot be reversed. -# Migrations of that kind should raise an ActiveRecord::IrreversibleMigration -# exception in their +down+ method. -# -# == Running migrations from within Rails -# -# 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 -# -# where MyNewMigration is the name of your migration. The generator will -# create an empty migration file timestamp_my_new_migration.rb -# in the db/migrate/ directory where timestamp is the -# UTC formatted date and time that the migration was generated. -# -# There is a special syntactic shortcut to generate migrations that add fields to a table. -# -# bin/rails generate migration add_fieldname_to_tablename fieldname:string -# -# This will generate the file timestamp_add_fieldname_to_tablename.rb, which will look like this: -# class AddFieldnameToTablename < ActiveRecord::Migration[7.0] -# def change -# add_column :tablenames, :fieldname, :string -# end -# end -# -# To run migrations against the currently configured database, use -# bin/rails db:migrate. This will update the database by running all of the -# pending migrations, creating the schema_migrations table -# (see "About the schema_migrations table" section below) if missing. It will also -# invoke the db:schema:dump command, which will update your db/schema.rb file -# to match the structure of your database. -# -# To roll the database back to a previous migration version, use -# bin/rails db:rollback VERSION=X where X is the version to which -# you wish to downgrade. Alternatively, you can also use the STEP option if you -# 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, -# 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] -# def up -# Tag.all.each { |tag| tag.destroy if tag.pages.empty? } -# end -# -# def down -# # not much we can do to restore deleted data -# raise ActiveRecord::IrreversibleMigration, "Can't recover the deleted tags" -# end -# end -# -# Others remove columns when they migrate up instead of down: -# -# class RemoveUnnecessaryItemAttributes < ActiveRecord::Migration[7.0] -# def up -# remove_column :items, :incomplete_items_count -# remove_column :items, :completed_items_count -# end -# -# def down -# add_column :items, :incomplete_items_count -# add_column :items, :completed_items_count -# end -# end -# -# And sometimes you need to do something in SQL not abstracted directly by migrations: -# -# class MakeJoinUnique < ActiveRecord::Migration[7.0] -# def up -# execute "ALTER TABLE `pages_linked_pages` ADD UNIQUE `page_id_linked_page_id` (`page_id`,`linked_page_id`)" -# end -# -# def down -# execute "ALTER TABLE `pages_linked_pages` DROP INDEX `page_id_linked_page_id`" -# end -# end -# -# == Using a model after changing its table -# -# Sometimes you'll want to add a column in a migration and populate it -# immediately after. In that case, you'll need to make a call to -# 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] -# def up -# add_column :people, :salary, :integer -# Person.reset_column_information -# Person.all.each do |p| -# p.update_attribute :salary, SalaryCalculator.compute(p) -# end -# end -# end -# -# == Controlling verbosity -# -# By default, migrations will describe the actions they are taking, writing -# them to the console as they happen, along with benchmarks describing how -# long each step took. -# -# You can quiet them down by setting ActiveRecord::Migration.verbose = false. -# -# You can also insert your own messages and benchmarks by using the +say_with_time+ -# method: -# -# def up -# ... -# say_with_time "Updating salaries..." do -# Person.all.each do |p| -# p.update_attribute :salary, SalaryCalculator.compute(p) -# end -# end -# ... -# end -# -# The phrase "Updating salaries..." would then be printed, along with the -# benchmark for the block when the block completes. -# -# == Timestamped Migrations -# -# By default, Rails generates migrations that look like: -# -# 20080717013526_your_migration_name.rb -# -# The prefix is a generation timestamp (in UTC). -# -# If you'd prefer to use numeric prefixes, you can turn timestamped migrations -# off by setting: -# -# config.active_record.timestamped_migrations = false -# -# In application.rb. -# -# == Reversible Migrations -# -# Reversible migrations are migrations that know how to go +down+ for you. -# You simply supply the +up+ logic, and the Migration system figures out -# how to execute the down commands for you. -# -# To define a reversible migration, define the +change+ method in your -# migration like this: -# -# class TenderloveMigration < ActiveRecord::Migration[7.0] -# def change -# create_table(:horses) do |t| -# t.column :content, :text -# t.column :remind_at, :datetime -# end -# end -# end -# -# This migration will create the horses table for you on the way up, and -# automatically figure out how to drop the table on the way down. -# -# Some commands cannot be reversed. If you care to define how to move up -# and down in these cases, you should define the +up+ and +down+ methods -# as before. -# -# If a command cannot be reversed, an -# 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. -# -# == Transactional Migrations -# -# If the database adapter supports DDL transactions, all migrations will -# automatically be wrapped in a transaction. There are queries that you -# can't execute inside a transaction though, and for these situations -# you can turn the automatic transactions off. -# -# class ChangeEnum < ActiveRecord::Migration[7.0] -# disable_ddl_transaction! -# -# def up -# execute "ALTER TYPE model_size ADD VALUE 'new_value'" -# end -# 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 -class ActiveRecord::Migration - # @return [Migration] a new instance of Migration - # - # source://activerecord//lib/active_record/migration.rb#684 - def initialize(name = T.unsafe(nil), version = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/migration.rb#883 - def announce(message); end - - # source://activerecord//lib/active_record/migration.rb#914 - def connection; end - - # source://activerecord//lib/active_record/migration.rb#937 - def copy(destination, sources, options = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/migration.rb#677 - def disable_ddl_transaction; end - - # source://activerecord//lib/active_record/migration.rb#836 - def down; end - - # source://activerecord//lib/active_record/migration.rb#864 - def exec_migration(conn, direction); end - - # source://activerecord//lib/active_record/migration.rb#918 - def method_missing(method, *arguments, **_arg2, &block); end - - # Execute this migration in the named direction - # - # source://activerecord//lib/active_record/migration.rb#843 - def migrate(direction); end - - # Returns the value of attribute name. - # - # source://activerecord//lib/active_record/migration.rb#682 - 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 - def name=(_arg0); end - - # Determines the version number of the next migration. - # - # source://activerecord//lib/active_record/migration.rb#1003 - 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 - def proper_table_name(name, options = T.unsafe(nil)); end - - # Used to specify an operation that can be run in one direction or another. - # Call the methods +up+ and +down+ of the yielded object to run a block - # only in one given direction. - # The whole block will be called in the right order within the migration. - # - # In the following example, the looping on users will always be done - # when the three columns 'first_name', 'last_name' and 'full_name' exist, - # even when migrating down: - # - # class SplitNameMigration < ActiveRecord::Migration[7.0] - # def change - # add_column :users, :first_name, :string - # add_column :users, :last_name, :string - # - # reversible do |dir| - # User::User.reset_column_information - # User::User.all.each do |u| - # dir.up { u.first_name, u.last_name = u.full_name.split(' ') } - # dir.down { u.full_name = "#{u.first_name} #{u.last_name}" } - # u.save - # end - # end - # - # revert { add_column :users, :full_name, :string } - # end - # end - # - # source://activerecord//lib/active_record/migration.rb#788 - def reversible; end - - # Reverses the migration commands for the given block and - # the given migrations. - # - # The following migration will remove the table 'horses' - # and create the table 'apples' on the way up, and the reverse - # on the way down. - # - # class FixTLMigration < ActiveRecord::Migration[7.0] - # def change - # revert do - # create_table(:horses) do |t| - # t.text :content - # t.datetime :remind_at - # end - # end - # create_table(:apples) do |t| - # t.string :variety - # end - # end - # end - # - # Or equivalently, if +TenderloveMigration+ is defined as in the - # documentation for Migration: - # - # require_relative "20121212123456_tenderlove_migration" - # - # class FixupTLMigration < ActiveRecord::Migration[7.0] - # def change - # revert TenderloveMigration - # - # create_table(:apples) do |t| - # t.string :variety - # end - # end - # end - # - # This command can be nested. - # - # source://activerecord//lib/active_record/migration.rb#731 - def revert(*migration_classes, &block); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/migration.rb#748 - def reverting?; end - - # Runs the given migration classes. - # Last argument can specify options: - # - # - +:direction+ - Default is +:up+. - # - +:revert+ - Default is +false+. - # - # source://activerecord//lib/active_record/migration.rb#816 - 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 - 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 - 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 - 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 - def table_name_options(config = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/migration.rb#830 - def up; end - - # Used to specify an operation that is only run when migrating up - # (for example, populating a new column with its initial values). - # - # In the following example, the new column +published+ will be given - # the value +true+ for all existing records. - # - # class AddPublishedToPosts < ActiveRecord::Migration[7.0] - # def change - # add_column :posts, :published, :boolean, default: false - # up_only do - # execute "update posts set published = 'true'" - # end - # end - # end - # - # source://activerecord//lib/active_record/migration.rb#807 - def up_only(&block); end - - # source://activerecord//lib/active_record/migration.rb#681 - def verbose; end - - # source://activerecord//lib/active_record/migration.rb#681 - def verbose=(val); end - - # Returns the value of attribute version. - # - # source://activerecord//lib/active_record/migration.rb#682 - 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 - def version=(_arg0); end - - # source://activerecord//lib/active_record/migration.rb#879 - def write(text = T.unsafe(nil)); end - - private - - # source://activerecord//lib/active_record/migration.rb#1029 - def command_recorder; end - - # source://activerecord//lib/active_record/migration.rb#1021 - def execute_block; end - - class << self - # source://activerecord//lib/active_record/migration.rb#568 - def [](version); end - - # Raises ActiveRecord::PendingMigrationError error if any migrations are pending. - # - # @raise [ActiveRecord::PendingMigrationError] - # - # source://activerecord//lib/active_record/migration.rb#626 - def check_pending!(connection = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/migration.rb#572 - def current_version; end - - # source://activerecord//lib/active_record/migration.rb#618 - def delegate; end - - # source://activerecord//lib/active_record/migration.rb#618 - def delegate=(_arg0); end - - # source://activerecord//lib/active_record/migration.rb#619 - def disable_ddl_transaction; end - - # Disable the transaction wrapping this migration. - # You can still create your own transactions even after calling #disable_ddl_transaction! - # - # For more details read the {"Transactional Migrations" section above}[rdoc-ref:Migration]. - # - # source://activerecord//lib/active_record/migration.rb#672 - def disable_ddl_transaction!; end - - # source://activerecord//lib/active_record/migration.rb#619 - def disable_ddl_transaction=(_arg0); end - - # source://activerecord//lib/active_record/migration.rb#556 - def inherited(subclass); end - - # source://activerecord//lib/active_record/migration.rb#630 - def load_schema_if_pending!; end - - # source://activerecord//lib/active_record/migration.rb#653 - def maintain_test_schema!; end - - # source://activerecord//lib/active_record/migration.rb#659 - def method_missing(name, *args, **_arg2, &block); end - - # source://activerecord//lib/active_record/migration.rb#664 - def migrate(direction); end - - # source://activerecord//lib/active_record/migration.rb#621 - def nearest_delegate; end - - # source://activerecord//lib/active_record/migration.rb#681 - def verbose; end - - # source://activerecord//lib/active_record/migration.rb#681 - def verbose=(val); 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 -class ActiveRecord::Migration::CheckPending - # @return [CheckPending] a new instance of CheckPending - # - # source://activerecord//lib/active_record/migration.rb#581 - def initialize(app, file_watcher: T.unsafe(nil)); end - - # source://activerecord//lib/active_record/migration.rb#588 - def call(env); end - - private - - # source://activerecord//lib/active_record/migration.rb#607 - def build_watcher(&block); end - - # source://activerecord//lib/active_record/migration.rb#612 - def connection; end -end - -# 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_index -# * add_reference -# * add_timestamps -# * change_column -# * change_column_default (must supply a +:from+ and +:to+ option) -# * change_column_null -# * change_column_comment (must supply a +:from+ and +:to+ option) -# * change_table_comment (must supply a +:from+ and +:to+ option) -# * create_join_table -# * create_table -# * disable_extension -# * drop_join_table -# * drop_table (must supply a block) -# * enable_extension -# * remove_column (must supply a type) -# * remove_columns (must specify at least one column name or more) -# * remove_foreign_key (must supply a second table) -# * remove_check_constraint -# * remove_index -# * remove_reference -# * remove_timestamps -# * rename_column -# * rename_index -# * rename_table -# -# source://activerecord//lib/active_record/migration/command_recorder.rb#36 -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#51 - def initialize(delegate = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#111 - def add_belongs_to(*args, **_arg1, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#111 - def add_check_constraint(*args, **_arg1, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#111 - def add_column(*args, **_arg1, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#111 - def add_foreign_key(*args, **_arg1, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#111 - def add_index(*args, **_arg1, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#111 - def add_reference(*args, **_arg1, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#111 - def add_timestamps(*args, **_arg1, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#111 - def change_column(*args, **_arg1, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#111 - def change_column_comment(*args, **_arg1, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#111 - def change_column_default(*args, **_arg1, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#111 - 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#120 - def change_table(table_name, **options); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#111 - def change_table_comment(*args, **_arg1, &block); end - - # Returns the value of attribute commands. - # - # source://activerecord//lib/active_record/migration/command_recorder.rb#49 - 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#49 - def commands=(_arg0); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#111 - def create_join_table(*args, **_arg1, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#111 - def create_table(*args, **_arg1, &block); end - - # Returns the value of attribute delegate. - # - # source://activerecord//lib/active_record/migration/command_recorder.rb#49 - 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#49 - def delegate=(_arg0); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#111 - def disable_extension(*args, **_arg1, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#111 - def drop_join_table(*args, **_arg1, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#111 - def drop_table(*args, **_arg1, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#111 - def enable_extension(*args, **_arg1, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#111 - def execute(*args, **_arg1, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#111 - def execute_block(*args, **_arg1, &block); end - - # Returns the inverse of the given command. For example: - # - # recorder.inverse_of(:rename_table, [:old, :new]) - # # => [:rename_table, [:new, :old]] - # - # If the inverse of a command requires several commands, returns array of commands. - # - # recorder.inverse_of(:remove_columns, [:some_table, :foo, :bar, type: :string]) - # # => [[:add_column, :some_table, :foo, :string], [:add_column, :some_table, :bar, :string]] - # - # This method will raise an +IrreversibleMigration+ exception if it cannot - # invert the +command+. - # - # @raise [IrreversibleMigration] - # - # source://activerecord//lib/active_record/migration/command_recorder.rb#98 - def inverse_of(command, args, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#147 - def invert_add_belongs_to(args, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#147 - def invert_remove_belongs_to(args, &block); end - - # Record +command+. +command+ should be a method name and arguments. - # For example: - # - # recorder.record(:method_name, [:arg1, :arg2]) - # - # source://activerecord//lib/active_record/migration/command_recorder.rb#78 - def record(*command, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#111 - def remove_belongs_to(*args, **_arg1, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#111 - def remove_check_constraint(*args, **_arg1, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#111 - def remove_column(*args, **_arg1, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#111 - def remove_columns(*args, **_arg1, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#111 - def remove_foreign_key(*args, **_arg1, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#111 - def remove_index(*args, **_arg1, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#111 - def remove_reference(*args, **_arg1, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#111 - def remove_timestamps(*args, **_arg1, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#111 - def rename_column(*args, **_arg1, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#111 - def rename_index(*args, **_arg1, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#111 - def rename_table(*args, **_arg1, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#124 - def replay(migration); end - - # While executing the given block, the recorded will be in reverting mode. - # All commands recorded will end up being recorded reverted - # and in reverse order. - # For example: - # - # 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#64 - def revert; end - - # Returns the value of attribute reverting. - # - # source://activerecord//lib/active_record/migration/command_recorder.rb#49 - 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#49 - def reverting=(_arg0); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#111 - def transaction(*args, **_arg1, &block); end - - private - - # source://activerecord//lib/active_record/migration/command_recorder.rb#252 - def invert_change_column_comment(args); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#223 - def invert_change_column_default(args); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#233 - def invert_change_column_null(args); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#262 - def invert_change_table_comment(args); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#168 - def invert_drop_table(args, &block); end - - # @raise [ActiveRecord::IrreversibleMigration] - # - # source://activerecord//lib/active_record/migration/command_recorder.rb#272 - def invert_remove_check_constraint(args); end - - # @raise [ActiveRecord::IrreversibleMigration] - # - # source://activerecord//lib/active_record/migration/command_recorder.rb#179 - def invert_remove_column(args); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#184 - def invert_remove_columns(args); end - - # @raise [ActiveRecord::IrreversibleMigration] - # - # source://activerecord//lib/active_record/migration/command_recorder.rb#238 - def invert_remove_foreign_key(args); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#202 - def invert_remove_index(args); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#197 - def invert_rename_column(args); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#192 - def invert_rename_index(args); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#175 - def invert_rename_table(args); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#157 - def invert_transaction(args, &block); end - - # Forwards any missing method call to the \target. - # - # source://activerecord//lib/active_record/migration/command_recorder.rb#282 - def method_missing(method, *args, **_arg2, &block); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/migration/command_recorder.rb#277 - def respond_to_missing?(method, _); end -end - -# source://activerecord//lib/active_record/migration/command_recorder.rb#37 -ActiveRecord::Migration::CommandRecorder::ReversibleAndIrreversibleMethods = T.let(T.unsafe(nil), Array) - -# source://activerecord//lib/active_record/migration/command_recorder.rb#131 -module ActiveRecord::Migration::CommandRecorder::StraightReversions - # source://activerecord//lib/active_record/migration/command_recorder.rb#147 - def invert_add_check_constraint(args, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#147 - def invert_add_column(args, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#147 - def invert_add_foreign_key(args, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#147 - def invert_add_index(args, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#147 - def invert_add_reference(args, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#147 - def invert_add_timestamps(args, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#147 - def invert_create_join_table(args, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#147 - def invert_create_table(args, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#147 - def invert_disable_extension(args, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#147 - def invert_drop_join_table(args, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#147 - def invert_drop_table(args, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#147 - def invert_enable_extension(args, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#147 - def invert_execute_block(args, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#147 - def invert_remove_check_constraint(args, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#147 - def invert_remove_column(args, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#147 - def invert_remove_foreign_key(args, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#147 - def invert_remove_index(args, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#147 - def invert_remove_reference(args, &block); end - - # source://activerecord//lib/active_record/migration/command_recorder.rb#147 - def invert_remove_timestamps(args, &block); end -end - -# source://activerecord//lib/active_record/migration/compatibility.rb#5 -module ActiveRecord::Migration::Compatibility - class << self - # source://activerecord//lib/active_record/migration/compatibility.rb#6 - def find(version); end - end -end - -# source://activerecord//lib/active_record/migration/compatibility.rb#310 -class ActiveRecord::Migration::Compatibility::V4_2 < ::ActiveRecord::Migration::Compatibility::V5_0 - # source://activerecord//lib/active_record/migration/compatibility.rb#324 - def add_belongs_to(table_name, ref_name, **options); end - - # source://activerecord//lib/active_record/migration/compatibility.rb#324 - def add_reference(table_name, ref_name, **options); end - - # source://activerecord//lib/active_record/migration/compatibility.rb#330 - def add_timestamps(table_name, **options); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/migration/compatibility.rb#335 - def index_exists?(table_name, column_name, **options); end - - # source://activerecord//lib/active_record/migration/compatibility.rb#346 - def remove_index(table_name, column_name = T.unsafe(nil), **options); end - - private - - # source://activerecord//lib/active_record/migration/compatibility.rb#352 - def compatible_table_definition(t); end - - # source://activerecord//lib/active_record/migration/compatibility.rb#359 - def index_name_for_remove(table_name, column_name, options); end -end - -# source://activerecord//lib/active_record/migration/compatibility.rb#311 -module ActiveRecord::Migration::Compatibility::V4_2::TableDefinition - # source://activerecord//lib/active_record/migration/compatibility.rb#312 - def belongs_to(*_arg0, **options); end - - # source://activerecord//lib/active_record/migration/compatibility.rb#312 - def references(*_arg0, **options); end - - # source://activerecord//lib/active_record/migration/compatibility.rb#318 - def timestamps(**options); end -end - -# source://activerecord//lib/active_record/migration/compatibility.rb#245 -class ActiveRecord::Migration::Compatibility::V5_0 < ::ActiveRecord::Migration::Compatibility::V5_1 - # source://activerecord//lib/active_record/migration/compatibility.rb#296 - def add_belongs_to(table_name, ref_name, **options); end - - # source://activerecord//lib/active_record/migration/compatibility.rb#286 - def add_column(table_name, column_name, type, **options); end - - # source://activerecord//lib/active_record/migration/compatibility.rb#296 - def add_reference(table_name, ref_name, **options); end - - # source://activerecord//lib/active_record/migration/compatibility.rb#281 - def create_join_table(table_1, table_2, column_options: T.unsafe(nil), **options); end - - # source://activerecord//lib/active_record/migration/compatibility.rb#258 - def create_table(table_name, **options); end - - private - - # source://activerecord//lib/active_record/migration/compatibility.rb#302 - def compatible_table_definition(t); end -end - -# source://activerecord//lib/active_record/migration/compatibility.rb#246 -module ActiveRecord::Migration::Compatibility::V5_0::TableDefinition - # source://activerecord//lib/active_record/migration/compatibility.rb#252 - def belongs_to(*args, **options); end - - # source://activerecord//lib/active_record/migration/compatibility.rb#247 - def primary_key(name, type = T.unsafe(nil), **options); end - - # source://activerecord//lib/active_record/migration/compatibility.rb#252 - def references(*args, **options); end -end - -# source://activerecord//lib/active_record/migration/compatibility.rb#224 -class ActiveRecord::Migration::Compatibility::V5_1 < ::ActiveRecord::Migration::Compatibility::V5_2 - # source://activerecord//lib/active_record/migration/compatibility.rb#225 - def change_column(table_name, column_name, type, **options); end - - # source://activerecord//lib/active_record/migration/compatibility.rb#236 - def create_table(table_name, **options); end -end - -# source://activerecord//lib/active_record/migration/compatibility.rb#151 -class ActiveRecord::Migration::Compatibility::V5_2 < ::ActiveRecord::Migration::Compatibility::V6_0 - # source://activerecord//lib/active_record/migration/compatibility.rb#202 - def add_timestamps(table_name, **options); end - - # source://activerecord//lib/active_record/migration/compatibility.rb#186 - def change_table(table_name, **options); end - - # source://activerecord//lib/active_record/migration/compatibility.rb#194 - def create_join_table(table_1, table_2, **options); end - - # source://activerecord//lib/active_record/migration/compatibility.rb#178 - def create_table(table_name, **options); end - - private - - # source://activerecord//lib/active_record/migration/compatibility.rb#215 - def command_recorder; end - - # source://activerecord//lib/active_record/migration/compatibility.rb#208 - def compatible_table_definition(t); end -end - -# source://activerecord//lib/active_record/migration/compatibility.rb#164 -module ActiveRecord::Migration::Compatibility::V5_2::CommandRecorder - # source://activerecord//lib/active_record/migration/compatibility.rb#169 - def invert_change_column_comment(args); end - - # source://activerecord//lib/active_record/migration/compatibility.rb#173 - def invert_change_table_comment(args); end - - # source://activerecord//lib/active_record/migration/compatibility.rb#165 - def invert_transaction(args, &block); end -end - -# source://activerecord//lib/active_record/migration/compatibility.rb#152 -module ActiveRecord::Migration::Compatibility::V5_2::TableDefinition - # source://activerecord//lib/active_record/migration/compatibility.rb#158 - def column(name, type, index: T.unsafe(nil), **options); end - - # source://activerecord//lib/active_record/migration/compatibility.rb#153 - def timestamps(**options); end -end - -# source://activerecord//lib/active_record/migration/compatibility.rb#88 -class ActiveRecord::Migration::Compatibility::V6_0 < ::ActiveRecord::Migration::Compatibility::V6_1 - # source://activerecord//lib/active_record/migration/compatibility.rb#132 - def add_belongs_to(table_name, ref_name, **options); end - - # source://activerecord//lib/active_record/migration/compatibility.rb#132 - 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 - def compatible_table_definition(t); end -end - -# source://activerecord//lib/active_record/migration/compatibility.rb#89 -class ActiveRecord::Migration::Compatibility::V6_0::ReferenceDefinition < ::ActiveRecord::ConnectionAdapters::ReferenceDefinition - # source://activerecord//lib/active_record/migration/compatibility.rb#90 - def index_options(table_name); end -end - -# source://activerecord//lib/active_record/migration/compatibility.rb#95 -module ActiveRecord::Migration::Compatibility::V6_0::TableDefinition - # source://activerecord//lib/active_record/migration/compatibility.rb#96 - def belongs_to(*args, **options); end - - # source://activerecord//lib/active_record/migration/compatibility.rb#102 - def column(name, type, index: T.unsafe(nil), **options); end - - # source://activerecord//lib/active_record/migration/compatibility.rb#96 - def references(*args, **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 - 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 - - private - - # source://activerecord//lib/active_record/migration/compatibility.rb#80 - def compatible_table_definition(t); end -end - -# source://activerecord//lib/active_record/migration/compatibility.rb#36 -class ActiveRecord::Migration::Compatibility::V6_1::PostgreSQLCompat - class << self - # source://activerecord//lib/active_record/migration/compatibility.rb#37 - def compatible_timestamp_type(type, connection); end - end -end - -# source://activerecord//lib/active_record/migration/compatibility.rb#67 -module ActiveRecord::Migration::Compatibility::V6_1::TableDefinition - # source://activerecord//lib/active_record/migration/compatibility.rb#73 - def column(name, type, index: T.unsafe(nil), **options); end - - # source://activerecord//lib/active_record/migration/compatibility.rb#68 - def new_column_definition(name, type, **options); end -end - -# This file exists to ensure that old migrations run the same way they did before a Rails upgrade. -# e.g. if you write a migration on Rails 6.1, then upgrade to Rails 7, the migration should do the same thing to your -# database as it did when you were running Rails 6.1 -# -# "Current" is an alias for `ActiveRecord::Migration`, it represents the current Rails version. -# 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 -# -# 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. -# -# For example, Rails 6 added a default value for the `precision` option on datetime columns. So in this file, the `V5_2` -# class sets the value of `precision` to `nil` if it's not explicitly provided. This way, the default value will not apply -# 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 - -# 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/join_table.rb#5 -module ActiveRecord::Migration::JoinTable - private - - # source://activerecord//lib/active_record/migration/join_table.rb#7 - def find_join_table_name(table_1, table_2, options = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/migration/join_table.rb#11 - def join_table_name(table_1, table_2); end -end - -# source://activerecord//lib/active_record/migration.rb#576 -ActiveRecord::Migration::MigrationFilenameRegexp = T.let(T.unsafe(nil), Regexp) - -# source://activerecord//lib/active_record/migration.rb#752 -class ActiveRecord::Migration::ReversibleBlockHelper < ::Struct - # source://activerecord//lib/active_record/migration.rb#757 - def down; end - - # Returns the value of attribute reverting - # - # @return [Object] the current value of reverting - def reverting; end - - # Sets the attribute reverting - # - # @param value [Object] the value to set the attribute reverting to. - # @return [Object] the newly set value - def reverting=(_); end - - # source://activerecord//lib/active_record/migration.rb#753 - def up; end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# 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. -# -# source://activerecord//lib/active_record/migration.rb#1068 -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#1190 - def current_environment; end - - # source://activerecord//lib/active_record/migration.rb#1146 - def current_version; end - - # source://activerecord//lib/active_record/migration.rb#1120 - def down(target_version = T.unsafe(nil), &block); end - - # source://activerecord//lib/active_record/migration.rb#1106 - def forward(steps = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/migration.rb#1138 - def get_all_versions; end - - # @raise [NoEnvironmentInSchemaError] - # - # source://activerecord//lib/active_record/migration.rb#1198 - def last_stored_environment; end - - # Runs the migrations in the +migrations_path+. - # - # If +target_version+ is +nil+, +migrate+ will run +up+. - # - # If the +current_version+ and +target_version+ are both - # 0 then an empty array will be returned and no migrations - # will be run. - # - # If the +current_version+ in the schema is greater than - # the +target_version+, then +down+ will be run. - # - # If none of the conditions are met, +up+ will be run with - # the +target_version+. - # - # source://activerecord//lib/active_record/migration.rb#1089 - def migrate(target_version = T.unsafe(nil), &block); end - - # source://activerecord//lib/active_record/migration.rb#1159 - def migrations; end - - # Returns the value of attribute migrations_paths. - # - # source://activerecord//lib/active_record/migration.rb#1069 - def migrations_paths; end - - # source://activerecord//lib/active_record/migration.rb#1172 - def migrations_status; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/migration.rb#1151 - def needs_migration?; end - - # source://activerecord//lib/active_record/migration.rb#1134 - def open; end - - # source://activerecord//lib/active_record/migration.rb#1155 - def pending_migration_versions; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/migration.rb#1194 - def protected_environment?; end - - # source://activerecord//lib/active_record/migration.rb#1102 - def rollback(steps = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/migration.rb#1130 - def run(direction, target_version); end - - # Returns the value of attribute schema_migration. - # - # source://activerecord//lib/active_record/migration.rb#1069 - def schema_migration; end - - # source://activerecord//lib/active_record/migration.rb#1110 - def up(target_version = T.unsafe(nil), &block); end - - private - - # source://activerecord//lib/active_record/migration.rb#1209 - def migration_files; end - - # source://activerecord//lib/active_record/migration.rb#1218 - def move(direction, steps); end - - # source://activerecord//lib/active_record/migration.rb#1214 - def parse_migration_filename(filename); end -end - -# source://activerecord//lib/active_record/migration.rb#12 -class ActiveRecord::MigrationError < ::ActiveRecord::ActiveRecordError - # @return [MigrationError] a new instance of MigrationError - # - # source://activerecord//lib/active_record/migration.rb#13 - def initialize(message = T.unsafe(nil)); end -end - -# MigrationProxy is used to defer loading of the actual migration classes -# until they are needed -# -# source://activerecord//lib/active_record/migration.rb#1036 -class ActiveRecord::MigrationProxy < ::Struct - # @return [MigrationProxy] a new instance of MigrationProxy - # - # source://activerecord//lib/active_record/migration.rb#1037 - def initialize(name, version, filename, scope); end - - # source://activerecord//lib/active_record/migration.rb#1046 - def announce(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/migration.rb#1042 - def basename; end - - # source://activerecord//lib/active_record/migration.rb#1046 - def disable_ddl_transaction(*_arg0, **_arg1, &_arg2); end - - # Returns the value of attribute filename - # - # @return [Object] the current value of filename - def filename; end - - # Sets the attribute filename - # - # @param value [Object] the value to set the attribute filename to. - # @return [Object] the newly set value - def filename=(_); end - - # source://activerecord//lib/active_record/migration.rb#1046 - def migrate(*_arg0, **_arg1, &_arg2); end - - # Returns the value of attribute name - # - # @return [Object] the current value of name - def name; end - - # Sets the attribute name - # - # @param value [Object] the value to set the attribute name to. - # @return [Object] the newly set value - def name=(_); end - - # Returns the value of attribute scope - # - # @return [Object] the current value of scope - def scope; end - - # Sets the attribute scope - # - # @param value [Object] the value to set the attribute scope to. - # @return [Object] the newly set value - def scope=(_); end - - # Returns the value of attribute version - # - # @return [Object] the current value of version - def version; end - - # Sets the attribute version - # - # @param value [Object] the value to set the attribute version to. - # @return [Object] the newly set value - def version=(_); end - - # source://activerecord//lib/active_record/migration.rb#1046 - def write(*_arg0, **_arg1, &_arg2); end - - private - - # source://activerecord//lib/active_record/migration.rb#1053 - def load_migration; end - - # source://activerecord//lib/active_record/migration.rb#1049 - def migration; 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/migration.rb#1238 -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#1267 - def current; end - - # source://activerecord//lib/active_record/migration.rb#1267 - def current_migration; end - - # source://activerecord//lib/active_record/migration.rb#1263 - def current_version; end - - # source://activerecord//lib/active_record/migration.rb#1312 - def load_migrated; end - - # source://activerecord//lib/active_record/migration.rb#1280 - def migrate; end - - # source://activerecord//lib/active_record/migration.rb#1308 - def migrated; end - - # source://activerecord//lib/active_record/migration.rb#1299 - def migrations; end - - # source://activerecord//lib/active_record/migration.rb#1303 - def pending_migrations; end - - # source://activerecord//lib/active_record/migration.rb#1272 - def run; end - - # source://activerecord//lib/active_record/migration.rb#1288 - def runnable; end - - private - - # Wrap the migration in a transaction only if supported by the adapter. - # - # source://activerecord//lib/active_record/migration.rb#1409 - def ddl_transaction(migration, &block); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/migration.rb#1404 - def down?; end - - # source://activerecord//lib/active_record/migration.rb#1353 - def execute_migration_in_transaction(migration); end - - # source://activerecord//lib/active_record/migration.rb#1374 - def finish; end - - # source://activerecord//lib/active_record/migration.rb#1453 - 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 - 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 - def migrate_without_lock; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/migration.rb#1344 - def ran?(migration); end - - # Stores the current environment in the database. - # - # source://activerecord//lib/active_record/migration.rb#1339 - def record_environment; end - - # source://activerecord//lib/active_record/migration.rb#1390 - def record_version_state_after_migrating(version); end - - # Used for running a specific migration. - # - # @raise [UnknownMigrationVersionError] - # - # source://activerecord//lib/active_record/migration.rb#1318 - def run_without_lock; end - - # source://activerecord//lib/active_record/migration.rb#1378 - def start; end - - # source://activerecord//lib/active_record/migration.rb#1370 - def target; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/migration.rb#1400 - def up?; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/migration.rb#1421 - def use_advisory_lock?; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/migration.rb#1417 - def use_transaction?(migration); end - - # @raise [DuplicateMigrationNameError] - # - # source://activerecord//lib/active_record/migration.rb#1382 - def validate(migrations); end - - # source://activerecord//lib/active_record/migration.rb#1425 - 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 - def current_version; end - - # Returns the value of attribute migrations_paths. - # - # source://activerecord//lib/active_record/migration.rb#1240 - 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 - def migrations_paths=(_arg0); end - end -end - -# source://activerecord//lib/active_record/migration.rb#1452 -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 -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 -end - -# source://activerecord//lib/active_record/model_schema.rb#6 -module ActiveRecord::ModelSchema - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveRecord::ModelSchema::ClassMethods - - class << self - # Derives the join table name for +first_table+ and +second_table+. The - # table names appear in alphabetical order. A common prefix is removed - # (useful for namespaced models like Music::Artist and Music::Record): - # - # artists, records => artists_records - # records, artists => artists_records - # music_artists, music_records => music_artists_records - # - # source://activerecord//lib/active_record/model_schema.rb#183 - def derive_join_table_name(first_table, second_table); end - end - - module GeneratedClassMethods - def immutable_strings_by_default; end - def immutable_strings_by_default=(value); end - def immutable_strings_by_default?; end - def implicit_order_column; end - def implicit_order_column=(value); end - def implicit_order_column?; end - def inheritance_column; end - def inheritance_column=(value); end - def inheritance_column?; end - def internal_metadata_table_name; end - def internal_metadata_table_name=(value); end - def internal_metadata_table_name?; end - def pluralize_table_names; end - def pluralize_table_names=(value); end - def pluralize_table_names?; end - def primary_key_prefix_type; end - def primary_key_prefix_type=(value); end - def primary_key_prefix_type?; end - def schema_migrations_table_name; end - def schema_migrations_table_name=(value); end - def schema_migrations_table_name?; end - def table_name_prefix; end - def table_name_prefix=(value); end - def table_name_prefix?; end - def table_name_suffix; end - def table_name_suffix=(value); end - def table_name_suffix?; end - end - - module GeneratedInstanceMethods - def pluralize_table_names; end - def pluralize_table_names?; end - def primary_key_prefix_type; end - def primary_key_prefix_type?; end - def table_name_prefix; end - def table_name_prefix?; end - def table_name_suffix; end - def table_name_suffix?; end - end -end - -# source://activerecord//lib/active_record/model_schema.rb#187 -module ActiveRecord::ModelSchema::ClassMethods - # source://activerecord//lib/active_record/model_schema.rb#486 - def _default_attributes; end - - # source://activerecord//lib/active_record/model_schema.rb#428 - def attribute_types; end - - # source://activerecord//lib/active_record/model_schema.rb#410 - 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 - def column_defaults; end - - # Returns the column object for the named attribute. - # Returns an +ActiveRecord::ConnectionAdapters::NullColumn+ if the - # named attribute does not exist. - # - # class Person < ActiveRecord::Base - # end - # - # person = Person.new - # person.column_for_attribute(:name) # the result depends on the ConnectionAdapter - # # => # - # - # person.column_for_attribute(:nothing) - # # => #, ...> - # - # source://activerecord//lib/active_record/model_schema.rb#472 - def column_for_attribute(name); end - - # Returns an array of column names as strings. - # - # source://activerecord//lib/active_record/model_schema.rb#492 - def column_names; end - - # source://activerecord//lib/active_record/model_schema.rb#423 - def columns; end - - # source://activerecord//lib/active_record/model_schema.rb#418 - 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 - def content_columns; end - - # source://activerecord//lib/active_record/model_schema.rb#288 - def full_table_name_prefix; end - - # source://activerecord//lib/active_record/model_schema.rb#292 - 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 - def ignored_columns; end - - # Sets the columns names the model should ignore. Ignored columns won't have attribute - # accessors defined, and won't be referenced in SQL queries. - # - # A common usage pattern for this method is to ensure all references to an attribute - # have been removed and deployed, before a migration to drop the column from the database - # has been deployed and run. Using this two step approach to dropping columns ensures there - # is no code that raises errors due to having a cached schema in memory at the time the - # schema migration is run. - # - # For example, given a model where you want to drop the "category" attribute, first mark it - # as ignored: - # - # class Project < ActiveRecord::Base - # # schema: - # # id :bigint - # # name :string, limit: 255 - # # category :string, limit: 255 - # - # self.ignored_columns = [:category] - # end - # - # The schema still contains "category", but now the model omits it, so any meta-driven code or - # schema caching will not attempt to use the column: - # - # Project.columns_hash["category"] => nil - # - # You will get an error if accessing that attribute directly, so ensure all usages of the - # column are removed (automated tests can help you find any usages). - # - # user = Project.create!(name: "First Project") - # user.category # => raises NoMethodError - # - # source://activerecord//lib/active_record/model_schema.rb#356 - def ignored_columns=(columns); 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 - def next_sequence_value; end - - # Determines if the primary key values should be selected from their - # corresponding sequence before the insert statement. - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/model_schema.rb#395 - 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 - 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 - 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 - def quoted_table_name; end - - # source://activerecord//lib/active_record/model_schema.rb#311 - def real_inheritance_column=(value); end - - # Resets all the cached information about columns, which will cause them - # to be reloaded on the next request. - # - # The most common usage pattern for this method is probably in a migration, - # when just after creating a table you want to populate it with some default - # values, e.g.: - # - # class CreateJobLevels < ActiveRecord::Migration[7.0] - # def up - # create_table :job_levels do |t| - # t.integer :id - # t.string :name - # - # t.timestamps - # end - # - # JobLevel.reset_column_information - # %w{assistant executive manager director}.each do |type| - # JobLevel.create(name: type) - # end - # end - # - # def down - # drop_table :job_levels - # end - # end - # - # source://activerecord//lib/active_record/model_schema.rb#537 - def reset_column_information; end - - # source://activerecord//lib/active_record/model_schema.rb#369 - 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 - def reset_table_name; end - - # source://activerecord//lib/active_record/model_schema.rb#361 - def sequence_name; end - - # Sets the name of the sequence to use when generating ids to the given - # value, or (if the value is +nil+ or +false+) to the value returned by the - # given block. This is required for Oracle and is useful for any - # database which relies on sequences for primary key generation. - # - # If a sequence name is not explicitly set when using Oracle, - # it will default to the commonly used pattern of: #{table_name}_seq - # - # If a sequence name is not explicitly set when using PostgreSQL, it - # will discover the sequence corresponding to your primary key for you. - # - # class Project < ActiveRecord::Base - # self.sequence_name = "projectseq" # default would have been "project_seq" - # end - # - # source://activerecord//lib/active_record/model_schema.rb#388 - def sequence_name=(value); end - - # source://activerecord//lib/active_record/model_schema.rb#496 - 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 - def table_exists?; end - - # Guesses the table name (in forced lower-case) based on the name of the class in the - # inheritance hierarchy descending directly from ActiveRecord::Base. So if the hierarchy - # looks like: Reply < Message < ActiveRecord::Base, then Message is used - # to guess the table name even when called on Reply. The rules used to do the guess - # are handled by the Inflector class in Active Support, which knows almost all common - # English inflections. You can add new inflections in config/initializers/inflections.rb. - # - # Nested classes are given table names prefixed by the singular form of - # the parent's table name. Enclosing modules are not considered. - # - # ==== Examples - # - # class Invoice < ActiveRecord::Base - # end - # - # file class table_name - # invoice.rb Invoice invoices - # - # class Invoice < ActiveRecord::Base - # class Lineitem < ActiveRecord::Base - # end - # end - # - # file class table_name - # invoice.rb Invoice::Lineitem invoice_lineitems - # - # module Invoice - # class Lineitem < ActiveRecord::Base - # end - # end - # - # file class table_name - # invoice/lineitem.rb Invoice::Lineitem lineitems - # - # Additionally, the class-level +table_name_prefix+ is prepended and the - # +table_name_suffix+ is appended. So if you have "myapp_" as a prefix, - # the table name guess for an Invoice class becomes "myapp_invoices". - # Invoice::Lineitem becomes "myapp_invoice_lineitems". - # - # Active Model Naming's +model_name+ is the base name used to guess the - # table name. In case a custom Active Model Name is defined, it will be - # used for the table name as well: - # - # class PostRecord < ActiveRecord::Base - # class << self - # def model_name - # ActiveModel::Name.new(self, nil, "Post") - # end - # end - # end - # - # PostRecord.table_name - # # => "posts" - # - # You can also set your own table name explicitly: - # - # class Mouse < ActiveRecord::Base - # self.table_name = "mice" - # end - # - # source://activerecord//lib/active_record/model_schema.rb#247 - def table_name; end - - # Sets the table name explicitly. Example: - # - # class Project < ActiveRecord::Base - # self.table_name = "project" - # end - # - # source://activerecord//lib/active_record/model_schema.rb#257 - def table_name=(value); end - - # Returns the type of the attribute with the given name, after applying - # all modifiers. This method is the only valid source of information for - # anything related to the types of a model's attributes. This method will - # access the database and load the model's schema if it is required. - # - # The return value of this method will implement the interface described - # by ActiveModel::Type::Value (though the object itself may not subclass - # it). - # - # +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 - def type_for_attribute(attr_name, &block); end - - # source://activerecord//lib/active_record/model_schema.rb#433 - def yaml_encoder; end - - protected - - # source://activerecord//lib/active_record/model_schema.rb#547 - def initialize_load_schema_monitor; end - - private - - # source://activerecord//lib/active_record/model_schema.rb#637 - 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 - def compute_table_name; end - - # source://activerecord//lib/active_record/model_schema.rb#552 - 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 - 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 - 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 - def undecorated_table_name(model_name); end -end - -# Raised when there are multiple errors while doing a mass assignment through the -# {ActiveRecord::Base#attributes=}[rdoc-ref:AttributeAssignment#attributes=] -# 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 -class ActiveRecord::MultiparameterAssignmentErrors < ::ActiveRecord::ActiveRecordError - # @return [MultiparameterAssignmentErrors] a new instance of MultiparameterAssignmentErrors - # - # source://activerecord//lib/active_record/errors.rb#369 - def initialize(errors = T.unsafe(nil)); end - - # Returns the value of attribute errors. - # - # source://activerecord//lib/active_record/errors.rb#367 - def errors; end -end - -# source://activerecord//lib/active_record/nested_attributes.rb#8 -module ActiveRecord::NestedAttributes - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveRecord::NestedAttributes::ClassMethods - - # 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. - # - # source://activerecord//lib/active_record/nested_attributes.rb#383 - def _destroy; end - - private - - # @return [Boolean] - # - # source://activerecord//lib/active_record/nested_attributes.rb#588 - def allow_destroy?(association_name); end - - # Assigns the given attributes to the collection association. - # - # Hashes with an :id value matching an existing associated record - # will update that record. Hashes without an :id value will build - # a new record for the association. Hashes with a matching :id - # value and a :_destroy key set to a truthy value will mark the - # matched record for destruction. - # - # For example: - # - # assign_nested_attributes_for_collection_association(:people, { - # '1' => { id: '1', name: 'Peter' }, - # '2' => { name: 'John' }, - # '3' => { id: '2', _destroy: true } - # }) - # - # Will update the name of the Person with ID 1, build a new associated - # person with the name 'John', and mark the associated Person with ID 2 - # for destruction. - # - # Also accepts an Array of attribute hashes: - # - # assign_nested_attributes_for_collection_association(:people, [ - # { id: '1', name: 'Peter' }, - # { name: 'John' }, - # { id: '2', _destroy: true } - # ]) - # - # source://activerecord//lib/active_record/nested_attributes.rb#464 - def assign_nested_attributes_for_collection_association(association_name, attributes_collection); end - - # Assigns the given attributes to the association. - # - # If an associated record does not yet exist, one will be instantiated. If - # an associated record already exists, the method's behavior depends on - # the value of the update_only option. If update_only is +false+ and the - # given attributes include an :id that matches the existing record's - # id, then the existing record will be modified. If no :id is provided - # it will be replaced with a new record. If update_only is +true+ the existing - # record will be modified regardless of whether an :id is provided. - # - # If the given attributes include a matching :id attribute, or - # 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 - 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 - def assign_to_or_mark_for_destruction(record, attributes, allow_destroy); end - - # Determines if a record with the particular +attributes+ should be - # rejected by calling the reject_if Symbol or Proc (if defined). - # The reject_if option is defined by +accepts_nested_attributes_for+. - # - # Returns false if there is a +destroy_flag+ on the attributes. - # - # source://activerecord//lib/active_record/nested_attributes.rb#572 - def call_reject_if(association_name, attributes); end - - # Takes in a limit and checks if the attributes_collection has too many - # records. It accepts limit in the form of symbol, proc, or - # number-like object (anything that can be compared with an integer). - # - # Raises TooManyRecords error if the attributes_collection is - # larger than the limit. - # - # source://activerecord//lib/active_record/nested_attributes.rb#530 - 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 - def has_destroy_flag?(hash); end - - # @raise [RecordNotFound] - # - # source://activerecord//lib/active_record/nested_attributes.rb#592 - def raise_nested_attributes_record_not_found!(association_name, record_id); end - - # Determines if a new record should be rejected by checking - # has_destroy_flag? or if a :reject_if proc exists for this - # association and evaluates to +true+. - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/nested_attributes.rb#563 - 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 - def will_be_destroyed?(association_name, attributes); end - - module GeneratedClassMethods - def nested_attributes_options; end - def nested_attributes_options=(value); end - def nested_attributes_options?; end - end - - module GeneratedInstanceMethods - def nested_attributes_options; end - def nested_attributes_options?; end - end -end - -# = 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 -# and you can enable it using the accepts_nested_attributes_for class -# method. When you enable nested attributes an attribute writer is -# defined on the model. -# -# The attribute writer is named after the association, which means that -# in the following example, two new methods are added to your model: -# -# author_attributes=(attributes) and -# pages_attributes=(attributes). -# -# class Book < ActiveRecord::Base -# has_one :author -# has_many :pages -# -# accepts_nested_attributes_for :author, :pages -# end -# -# Note that the :autosave option is automatically enabled on every -# association that accepts_nested_attributes_for is used for. -# -# === One-to-one -# -# Consider a Member model that has one Avatar: -# -# class Member < ActiveRecord::Base -# has_one :avatar -# accepts_nested_attributes_for :avatar -# end -# -# Enabling nested attributes on a one-to-one association allows you to -# create the member and avatar in one go: -# -# params = { member: { name: 'Jack', avatar_attributes: { icon: 'smiling' } } } -# member = Member.create(params[:member]) -# member.avatar.id # => 2 -# member.avatar.icon # => 'smiling' -# -# It also allows you to update the avatar through the member: -# -# params = { member: { avatar_attributes: { id: '2', icon: 'sad' } } } -# member.update params[:member] -# member.avatar.icon # => 'sad' -# -# If you want to update the current avatar without providing the id, you must add :update_only option. -# -# class Member < ActiveRecord::Base -# has_one :avatar -# accepts_nested_attributes_for :avatar, update_only: true -# end -# -# params = { member: { avatar_attributes: { icon: 'sad' } } } -# member.update params[:member] -# member.avatar.id # => 2 -# member.avatar.icon # => 'sad' -# -# By default you will only be able to set and update attributes on the -# associated model. If you want to destroy the associated model through the -# attributes hash, you have to enable it first using the -# :allow_destroy option. -# -# class Member < ActiveRecord::Base -# has_one :avatar -# accepts_nested_attributes_for :avatar, allow_destroy: true -# end -# -# Now, when you add the _destroy key to the attributes hash, with a -# value that evaluates to +true+, you will destroy the associated model: -# -# member.avatar_attributes = { id: '2', _destroy: '1' } -# member.avatar.marked_for_destruction? # => true -# member.save -# member.reload.avatar # => nil -# -# Note that the model will _not_ be destroyed until the parent is saved. -# -# Also note that the model will not be destroyed unless you also specify -# its id in the updated hash. -# -# === One-to-many -# -# Consider a member that has a number of posts: -# -# class Member < ActiveRecord::Base -# has_many :posts -# accepts_nested_attributes_for :posts -# end -# -# You can now set or update attributes on the associated posts through -# an attribute hash for a member: include the key +:posts_attributes+ -# with an array of hashes of post attributes as a value. -# -# For each hash that does _not_ have an id key a new record will -# be instantiated, unless the hash also contains a _destroy key -# that evaluates to +true+. -# -# params = { member: { -# name: 'joe', posts_attributes: [ -# { title: 'Kari, the awesome Ruby documentation browser!' }, -# { title: 'The egalitarian assumption of the modern citizen' }, -# { title: '', _destroy: '1' } # this will be ignored -# ] -# }} -# -# member = Member.create(params[:member]) -# member.posts.length # => 2 -# member.posts.first.title # => 'Kari, the awesome Ruby documentation browser!' -# member.posts.second.title # => 'The egalitarian assumption of the modern citizen' -# -# You may also set a +:reject_if+ proc to silently ignore any new record -# hashes if they fail to pass your criteria. For example, the previous -# example could be rewritten as: -# -# class Member < ActiveRecord::Base -# has_many :posts -# accepts_nested_attributes_for :posts, reject_if: proc { |attributes| attributes['title'].blank? } -# end -# -# params = { member: { -# name: 'joe', posts_attributes: [ -# { title: 'Kari, the awesome Ruby documentation browser!' }, -# { title: 'The egalitarian assumption of the modern citizen' }, -# { title: '' } # this will be ignored because of the :reject_if proc -# ] -# }} -# -# member = Member.create(params[:member]) -# member.posts.length # => 2 -# member.posts.first.title # => 'Kari, the awesome Ruby documentation browser!' -# member.posts.second.title # => 'The egalitarian assumption of the modern citizen' -# -# Alternatively, +:reject_if+ also accepts a symbol for using methods: -# -# class Member < ActiveRecord::Base -# has_many :posts -# accepts_nested_attributes_for :posts, reject_if: :new_record? -# end -# -# class Member < ActiveRecord::Base -# has_many :posts -# accepts_nested_attributes_for :posts, reject_if: :reject_posts -# -# def reject_posts(attributes) -# attributes['title'].blank? -# end -# end -# -# If the hash contains an id key that matches an already -# associated record, the matching record will be modified: -# -# member.attributes = { -# name: 'Joe', -# posts_attributes: [ -# { id: 1, title: '[UPDATED] An, as of yet, undisclosed awesome Ruby documentation browser!' }, -# { id: 2, title: '[UPDATED] other post' } -# ] -# } -# -# member.posts.first.title # => '[UPDATED] An, as of yet, undisclosed awesome Ruby documentation browser!' -# member.posts.second.title # => '[UPDATED] other post' -# -# However, the above applies if the parent model is being updated as well. -# For example, if you wanted to create a +member+ named _joe_ and wanted to -# update the +posts+ at the same time, that would give an -# ActiveRecord::RecordNotFound error. -# -# By default the associated records are protected from being destroyed. If -# you want to destroy any of the associated records through the attributes -# hash, you have to enable it first using the :allow_destroy -# option. This will allow you to also use the _destroy key to -# destroy existing records: -# -# class Member < ActiveRecord::Base -# has_many :posts -# accepts_nested_attributes_for :posts, allow_destroy: true -# end -# -# params = { member: { -# posts_attributes: [{ id: '2', _destroy: '1' }] -# }} -# -# member.attributes = params[:member] -# member.posts.detect { |p| p.id == 2 }.marked_for_destruction? # => true -# member.posts.length # => 2 -# member.save -# member.reload.posts.length # => 1 -# -# Nested attributes for an associated collection can also be passed in -# the form of a hash of hashes instead of an array of hashes: -# -# Member.create( -# name: 'joe', -# posts_attributes: { -# first: { title: 'Foo' }, -# second: { title: 'Bar' } -# } -# ) -# -# has the same effect as -# -# Member.create( -# name: 'joe', -# posts_attributes: [ -# { title: 'Foo' }, -# { title: 'Bar' } -# ] -# ) -# -# The keys of the hash which is the value for +:posts_attributes+ are -# ignored in this case. -# However, it is not allowed to use 'id' or :id for one of -# such keys, otherwise the hash will be wrapped in an array and -# interpreted as an attribute hash for a single post. -# -# Passing attributes for an associated collection in the form of a hash -# of hashes can be used with hashes generated from HTTP/HTML parameters, -# where there may be no natural way to submit an array of hashes. -# -# === Saving -# -# All changes to models, including the destruction of those marked for -# destruction, are saved and destroyed automatically and atomically when -# the parent model is saved. This happens inside the transaction initiated -# by the parent's save method. See ActiveRecord::AutosaveAssociation. -# -# === Validating the presence of a parent model -# -# The +belongs_to+ association validates the presence of the parent model -# by default. You can disable this behavior by specifying optional: true. -# This can be used, for example, when conditionally validating the presence -# of the parent model: -# -# class Veterinarian < ActiveRecord::Base -# has_many :patients, inverse_of: :veterinarian -# accepts_nested_attributes_for :patients -# end -# -# class Patient < ActiveRecord::Base -# belongs_to :veterinarian, inverse_of: :patients, optional: true -# validates :veterinarian, presence: true, unless: -> { awaiting_intake } -# end -# -# Note that if you do not specify the +:inverse_of+ option, then -# Active Record will try to automatically guess the inverse association -# based on heuristics. -# -# For one-to-one nested associations, if you build the new (in-memory) -# child object yourself before assignment, then this module will not -# overwrite it, e.g.: -# -# class Member < ActiveRecord::Base -# has_one :avatar -# accepts_nested_attributes_for :avatar -# -# def avatar -# super || build_avatar(width: 200) -# end -# end -# -# member = Member.new -# member.avatar_attributes = {icon: 'sad'} -# member.avatar.width # => 200 -# -# source://activerecord//lib/active_record/nested_attributes.rb#283 -module ActiveRecord::NestedAttributes::ClassMethods - # Defines an attributes writer for the specified association(s). - # - # Supported options: - # [:allow_destroy] - # If true, destroys any members from the attributes hash with a - # _destroy key and a value that evaluates to +true+ - # (e.g. 1, '1', true, or 'true'). This option is off by default. - # [:reject_if] - # Allows you to specify a Proc or a Symbol pointing to a method - # that checks whether a record should be built for a certain attribute - # hash. The hash is passed to the supplied Proc or the method - # and it should return either +true+ or +false+. When no +:reject_if+ - # is specified, a record will be built for all attribute hashes that - # do not have a _destroy value that evaluates to true. - # Passing :all_blank instead of a Proc will create a proc - # that will reject a record where all the attributes are blank excluding - # any value for +_destroy+. - # [:limit] - # Allows you to specify the maximum number of associated records that - # can be processed with the nested attributes. Limit also can be specified - # as a Proc or a Symbol pointing to a method that should return a number. - # If the size of the nested attributes array exceeds the specified limit, - # NestedAttributes::TooManyRecords exception is raised. If omitted, any - # number of associations can be processed. - # Note that the +:limit+ option is only applicable to one-to-many - # associations. - # [:update_only] - # For a one-to-one association, this option allows you to specify how - # nested attributes are going to be used when an associated record already - # exists. In general, an existing record may either be updated with the - # new set of attribute values or be replaced by a wholly new record - # containing those values. By default the +:update_only+ option is +false+ - # and the nested attributes are used to update the existing record only - # if they include the record's :id value. Otherwise a new - # record will be instantiated and used to replace the existing one. - # However if the +:update_only+ option is +true+, the nested attributes - # are used to update the record's attributes always, regardless of - # whether the :id is present. The option is ignored for collection - # associations. - # - # Examples: - # # creates avatar_attributes= - # accepts_nested_attributes_for :avatar, reject_if: proc { |attributes| attributes['name'].blank? } - # # creates avatar_attributes= - # accepts_nested_attributes_for :avatar, reject_if: :all_blank - # # creates avatar_attributes= and posts_attributes= - # accepts_nested_attributes_for :avatar, :posts, allow_destroy: true - # - # source://activerecord//lib/active_record/nested_attributes.rb#333 - def accepts_nested_attributes_for(*attr_names); end - - private - - # Generates a writer method for this association. Serves as a point for - # accessing the objects in the association. For example, this method - # could generate the following: - # - # def pirate_attributes=(attributes) - # assign_nested_attributes_for_one_to_one_association(:pirate, attributes) - # end - # - # This redirects the attempts to write objects in an association through - # 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 - def generate_association_writer(association_name, type); end -end - -# source://activerecord//lib/active_record/nested_attributes.rb#284 -ActiveRecord::NestedAttributes::ClassMethods::REJECT_ALL_BLANK_PROC = T.let(T.unsafe(nil), Proc) - -# source://activerecord//lib/active_record/nested_attributes.rb#9 -class ActiveRecord::NestedAttributes::TooManyRecords < ::ActiveRecord::ActiveRecordError; end - -# 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 -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 -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://activesupport/7.0.4.2/lib/active_support/actionable_error.rb#15 - def _actions; end - - # source://activesupport/7.0.4.2/lib/active_support/actionable_error.rb#15 - def _actions=(_arg0); end - - # source://activesupport/7.0.4.2/lib/active_support/actionable_error.rb#15 - def _actions?; end - - class << self - # source://activesupport/7.0.4.2/lib/active_support/actionable_error.rb#15 - def _actions; end - - # source://activesupport/7.0.4.2/lib/active_support/actionable_error.rb#15 - def _actions=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/actionable_error.rb#15 - def _actions?; end - - # source://activerecord//lib/active_record/errors.rb#250 - def db_error(db_name); end - end -end - -# source://activerecord//lib/active_record/migration.rb#177 -class ActiveRecord::NoEnvironmentInSchemaError < ::ActiveRecord::MigrationError - # @return [NoEnvironmentInSchemaError] a new instance of NoEnvironmentInSchemaError - # - # source://activerecord//lib/active_record/migration.rb#178 - def initialize; end -end - -# = Active Record No Touching -# -# source://activerecord//lib/active_record/no_touching.rb#5 -module ActiveRecord::NoTouching - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActiveRecord::NoTouching::ClassMethods - - # Returns +true+ if the class has +no_touching+ set, +false+ otherwise. - # - # Project.no_touching do - # Project.first.no_touching? # true - # Message.first.no_touching? # false - # end - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/no_touching.rb#53 - def no_touching?; end - - # source://activerecord//lib/active_record/no_touching.rb#61 - def touch(*_arg0, **_arg1); end - - # source://activerecord//lib/active_record/no_touching.rb#57 - def touch_later(*_arg0); end - - class << self - # @return [Boolean] - # - # source://activerecord//lib/active_record/no_touching.rb#36 - def applied_to?(klass); end - - # source://activerecord//lib/active_record/no_touching.rb#29 - def apply_to(klass); end - - private - - # source://activerecord//lib/active_record/no_touching.rb#41 - def klasses; end - end -end - -# source://activerecord//lib/active_record/no_touching.rb#8 -module ActiveRecord::NoTouching::ClassMethods - # Lets you selectively disable calls to +touch+ for the - # duration of a block. - # - # ==== Examples - # ActiveRecord::Base.no_touching do - # Project.first.touch # does nothing - # Message.first.touch # does nothing - # end - # - # Project.no_touching do - # Project.first.touch # does nothing - # Message.first.touch # works, but does not touch the associated project - # end - # - # source://activerecord//lib/active_record/no_touching.rb#23 - 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/null_relation.rb#4 -module ActiveRecord::NullRelation - # @return [Boolean] - # - # source://activerecord//lib/active_record/null_relation.rb#29 - def any?; end - - # source://activerecord//lib/active_record/null_relation.rb#41 - def calculate(operation, _column_name); end - - # source://activerecord//lib/active_record/null_relation.rb#17 - def delete(_id_or_array); end - - # source://activerecord//lib/active_record/null_relation.rb#9 - def delete_all; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/null_relation.rb#21 - def empty?; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/null_relation.rb#50 - def exists?(_conditions = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/null_relation.rb#37 - def many?; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/null_relation.rb#25 - def none?; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/null_relation.rb#33 - def one?; end - - # source://activerecord//lib/active_record/null_relation.rb#54 - def or(other); end - - # source://activerecord//lib/active_record/null_relation.rb#5 - def pluck(*column_names); end - - # source://activerecord//lib/active_record/null_relation.rb#13 - def update_all(_updates); end - - private - - # source://activerecord//lib/active_record/null_relation.rb#59 - def exec_main_query(async: T.unsafe(nil)); end -end - -# source://activerecord//lib/active_record/migration.rb#133 -class ActiveRecord::PendingMigrationError < ::ActiveRecord::MigrationError - include ::ActiveSupport::ActionableError - extend ::ActiveSupport::ActionableError::ClassMethods - - # @return [PendingMigrationError] a new instance of PendingMigrationError - # - # source://activerecord//lib/active_record/migration.rb#146 - def initialize(message = T.unsafe(nil)); end - - # source://activesupport/7.0.4.2/lib/active_support/actionable_error.rb#15 - def _actions; end - - # source://activesupport/7.0.4.2/lib/active_support/actionable_error.rb#15 - def _actions=(_arg0); end - - # source://activesupport/7.0.4.2/lib/active_support/actionable_error.rb#15 - def _actions?; end - - private - - # source://activerecord//lib/active_record/migration.rb#151 - def detailed_migration_message; end - - class << self - # source://activesupport/7.0.4.2/lib/active_support/actionable_error.rb#15 - def _actions; end - - # source://activesupport/7.0.4.2/lib/active_support/actionable_error.rb#15 - def _actions=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/actionable_error.rb#15 - def _actions?; end - end -end - -# = Active Record \Persistence -# -# source://activerecord//lib/active_record/persistence.rb#7 -module ActiveRecord::Persistence - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActiveRecord::Persistence::ClassMethods - - # Returns an instance of the specified +klass+ with the attributes of the - # current record. This is mostly useful in relation to single table - # inheritance (STI) structures where you want a subclass to appear as the - # superclass. This can be used along with record identification in - # Action Pack to allow, say, Client < Company to do something - # like render partial: @client.becomes(Company) to render that - # instance using the companies/company partial instead of clients/client. - # - # 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. - # If you want to change the STI column as well, use #becomes! instead. - # - # source://activerecord//lib/active_record/persistence.rb#711 - def becomes(klass); end - - # Wrapper around #becomes that also changes the instance's STI column value. - # This is especially useful if you want to persist the changed class in your - # database. - # - # 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 - 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 - def decrement(attribute, by = T.unsafe(nil)); end - - # Wrapper around #decrement that writes the update to the database. - # Only +attribute+ is updated; the record itself is not saved. - # This means that any other modified attributes will still be dirty. - # Validations and callbacks are skipped. Supports the +touch+ option from - # +update_counters+, see that for more. - # Returns +self+. - # - # source://activerecord//lib/active_record/persistence.rb#866 - def decrement!(attribute, by = T.unsafe(nil), touch: T.unsafe(nil)); end - - # Deletes the record in the database and freezes this instance to - # reflect that no changes should be made (since they can't be - # persisted). Returns the frozen instance. - # - # The row is simply removed with an SQL +DELETE+ statement on the - # record's primary key, and no callbacks are executed. - # - # Note that this will also delete records marked as {#readonly?}[rdoc-ref:Core#readonly?]. - # - # To enforce the object's +before_destroy+ and +after_destroy+ - # callbacks or any :dependent association - # options, use #destroy. - # - # source://activerecord//lib/active_record/persistence.rb#663 - def delete; end - - # Deletes the record in the database and freezes this instance to reflect - # that no changes should be made (since they can't be persisted). - # - # There's a series of callbacks associated with #destroy. If the - # before_destroy callback throws +:abort+ the action is cancelled - # and #destroy returns +false+. - # See ActiveRecord::Callbacks for further details. - # - # source://activerecord//lib/active_record/persistence.rb#676 - def destroy; end - - # Deletes the record in the database and freezes this instance to reflect - # that no changes should be made (since they can't be persisted). - # - # There's a series of callbacks associated with #destroy!. If the - # before_destroy callback throws +:abort+ the action is cancelled - # and #destroy! raises ActiveRecord::RecordNotDestroyed. - # See ActiveRecord::Callbacks for further details. - # - # source://activerecord//lib/active_record/persistence.rb#695 - def destroy!; end - - # Returns true if this object has been destroyed, otherwise returns false. - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/persistence.rb#579 - 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 - def increment(attribute, by = T.unsafe(nil)); end - - # Wrapper around #increment that writes the update to the database. - # Only +attribute+ is updated; the record itself is not saved. - # This means that any other modified attributes will still be dirty. - # Validations and callbacks are skipped. Supports the +touch+ option from - # +update_counters+, see that for more. - # Returns +self+. - # - # source://activerecord//lib/active_record/persistence.rb#845 - 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 - # for the object doesn't exist in the database yet; otherwise, returns false. - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/persistence.rb#562 - def new_record?; end - - # Returns true if the record is persisted, i.e. it's not a new record and it was - # not destroyed, otherwise returns false. - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/persistence.rb#585 - 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 - # returned true. - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/persistence.rb#569 - 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 - def previously_persisted?; end - - # Reloads the record from the database. - # - # This method finds the record by its primary key (which could be assigned - # manually) and modifies the receiver in-place: - # - # account = Account.new - # # => # - # account.id = 1 - # account.reload - # # Account Load (1.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1 [["id", 1]] - # # => # - # - # Attributes are reloaded from the database, and caches busted, in - # particular the associations cache and the QueryCache. - # - # If the record no longer exists in the database ActiveRecord::RecordNotFound - # is raised. Otherwise, in addition to the in-place modification the method - # returns +self+ for convenience. - # - # The optional :lock flag option allows you to lock the reloaded record: - # - # reload(lock: true) # reload with pessimistic locking - # - # Reloading is commonly used in test suites to test something is actually - # written to the database, or when some action modifies the corresponding - # row in the database but not the object in memory: - # - # assert account.deposit!(25) - # assert_equal 25, account.credit # check it is updated in memory - # assert_equal 25, account.reload.credit # check it is also persisted - # - # Another common use case is optimistic locking handling: - # - # def with_optimistic_retry - # begin - # yield - # rescue ActiveRecord::StaleObjectError - # begin - # # Reload lock_version in particular. - # reload - # rescue ActiveRecord::RecordNotFound - # # If the record is gone there is nothing to do. - # else - # retry - # end - # end - # end - # - # source://activerecord//lib/active_record/persistence.rb#943 - def reload(options = T.unsafe(nil)); end - - # :call-seq: - # save(**options) - # - # Saves the model. - # - # If the model is new, a record gets created in the database, otherwise - # the existing record gets updated. - # - # By default, save always runs validations. If any of them fail the action - # is cancelled and #save returns +false+, and the record won't be saved. However, if you supply - # validate: false, validations are bypassed altogether. See - # ActiveRecord::Validations for more information. - # - # By default, #save also sets the +updated_at+/+updated_on+ attributes to - # the current time. However, if you supply touch: false, these - # timestamps will not be updated. - # - # There's a series of callbacks associated with #save. If any of the - # before_* callbacks throws +:abort+ the action is cancelled and - # #save returns +false+. See ActiveRecord::Callbacks for further - # details. - # - # Attributes marked as readonly are silently ignored if the record is - # being updated. - # - # source://activerecord//lib/active_record/persistence.rb#614 - def save(**options, &block); end - - # :call-seq: - # save!(**options) - # - # Saves the model. - # - # If the model is new, a record gets created in the database, otherwise - # the existing record gets updated. - # - # By default, #save! always runs validations. If any of them fail - # ActiveRecord::RecordInvalid gets raised, and the record won't be saved. However, if you supply - # validate: false, validations are bypassed altogether. See - # ActiveRecord::Validations for more information. - # - # By default, #save! also sets the +updated_at+/+updated_on+ attributes to - # the current time. However, if you supply touch: false, these - # timestamps will not be updated. - # - # There's a series of callbacks associated with #save!. If any of - # the before_* callbacks throws +:abort+ the action is cancelled - # and #save! raises ActiveRecord::RecordNotSaved. See - # ActiveRecord::Callbacks for further details. - # - # Attributes marked as readonly are silently ignored if the record is - # being updated. - # - # Unless an error is raised, returns true. - # - # source://activerecord//lib/active_record/persistence.rb#647 - def save!(**options, &block); end - - # Assigns to +attribute+ the boolean opposite of attribute?. So - # if the predicate returns +true+ the attribute will become +false+. This - # method toggles directly the underlying value without calling any setter. - # Returns +self+. - # - # Example: - # - # user = User::User.first - # user.banned? # => false - # user.toggle(:banned) - # user.banned? # => true - # - # source://activerecord//lib/active_record/persistence.rb#882 - def toggle(attribute); end - - # Wrapper around #toggle that saves the record. This method differs from - # its non-bang version in the sense that it passes through the attribute setter. - # Saving is not subjected to validation checks. Returns +true+ if the - # record could be saved. - # - # source://activerecord//lib/active_record/persistence.rb#891 - def toggle!(attribute); end - - # Saves the record with the updated_at/on attributes set to the current time - # or the time specified. - # Please note that no validation is performed and only the +after_touch+, - # +after_commit+ and +after_rollback+ callbacks are executed. - # - # This method can be passed attribute names and an optional time argument. - # If attribute names are passed, they are updated along with updated_at/on - # attributes. If no time argument is passed, the current time is used as default. - # - # product.touch # updates updated_at/on with current time - # product.touch(time: Time.new(2015, 2, 16, 0, 0, 0)) # updates updated_at/on with specified time - # product.touch(:designed_at) # updates the designed_at attribute and updated_at/on - # product.touch(:started_at, :ended_at) # updates started_at, ended_at and updated_at/on attributes - # - # If used along with {belongs_to}[rdoc-ref:Associations::ClassMethods#belongs_to] - # then +touch+ will invoke +touch+ method on associated object. - # - # class Brake < ActiveRecord::Base - # belongs_to :car, touch: true - # end - # - # class Car < ActiveRecord::Base - # belongs_to :corporation, touch: true - # end - # - # # triggers @brake.car.touch and @brake.car.corporation.touch - # @brake.touch - # - # Note that +touch+ must be used on a persisted object, or else an - # ActiveRecordError will be thrown. For example: - # - # ball = Ball.new - # ball.touch(:updated_at) # => raises ActiveRecordError - # - # source://activerecord//lib/active_record/persistence.rb#993 - 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 - 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 - def update!(attributes); 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. - # - # Also see #update_column. - # - # source://activerecord//lib/active_record/persistence.rb#753 - def update_attribute(name, value); end - - # Equivalent to update_columns(name => value). - # - # source://activerecord//lib/active_record/persistence.rb#785 - def update_column(name, value); end - - # Updates the attributes directly in the database issuing an UPDATE SQL - # statement and sets them in the receiver: - # - # user.update_columns(last_request_at: Time.current) - # - # This is the fastest way to update attributes because it goes straight to - # the database, but take into account that in consequence the regular update - # procedures are totally bypassed. In particular: - # - # * \Validations are skipped. - # * \Callbacks are skipped. - # * +updated_at+/+updated_on+ are not updated. - # * However, attributes are serialized with the same rules as ActiveRecord::Relation#update_all - # - # This method raises an ActiveRecord::ActiveRecordError when called on new - # objects, or when at least one of the attributes is marked as readonly. - # - # @raise [ActiveRecordError] - # - # source://activerecord//lib/active_record/persistence.rb#805 - def update_columns(attributes); end - - private - - # Creates a record with values matching those of the instance attributes - # and returns its id. - # - # @yield [_self] - # @yieldparam _self [ActiveRecord::Persistence] the object that the method was called on - # - # source://activerecord//lib/active_record/persistence.rb#1093 - def _create_record(attribute_names = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/persistence.rb#1043 - def _delete_row; end - - # source://activerecord//lib/active_record/persistence.rb#1018 - def _find_record(options); end - - # source://activerecord//lib/active_record/persistence.rb#1031 - def _primary_key_constraints_hash; end - - # @raise [ReadOnlyRecord] - # - # source://activerecord//lib/active_record/persistence.rb#1122 - def _raise_readonly_record_error; end - - # source://activerecord//lib/active_record/persistence.rb#1114 - def _raise_record_not_destroyed; end - - # @raise [ActiveRecordError] - # - # source://activerecord//lib/active_record/persistence.rb#1126 - def _raise_record_not_touched_error; end - - # source://activerecord//lib/active_record/persistence.rb#1047 - def _touch_row(attribute_names, time); end - - # Updates the associated record with values matching those of the instance attributes. - # Returns the number of affected rows. - # - # @yield [_self] - # @yieldparam _self [ActiveRecord::Persistence] the object that the method was called on - # - # source://activerecord//lib/active_record/persistence.rb#1073 - def _update_record(attribute_names = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/persistence.rb#1057 - def _update_row(attribute_names, attempted_action = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/persistence.rb#1026 - 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 - def create_or_update(**_arg0, &block); end - - # A hook to be overridden by association modules. - # - # source://activerecord//lib/active_record/persistence.rb#1036 - def destroy_associations; end - - # source://activerecord//lib/active_record/persistence.rb#1039 - def destroy_row; end - - # source://activerecord//lib/active_record/persistence.rb#1012 - def strict_loaded_associations; end - - # @raise [ActiveRecordError] - # - # source://activerecord//lib/active_record/persistence.rb#1110 - 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 - 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#499 - def _update_record(values, constraints); 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. - # - # 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 created. - # - # ==== Examples - # # Create a single new object - # User::User.create(first_name: 'Jamie') - # - # # Create an Array of new objects - # User::User.create([{ first_name: 'Jamie' }, { first_name: 'Jeremy' }]) - # - # # Create a single object and pass it into a block to set other attributes. - # User::User.create(first_name: 'Jamie') do |u| - # u.is_admin = false - # end - # - # # Creating an Array of new objects using a block, where the block is executed for each object: - # User::User.create([{ first_name: 'Jamie' }, { first_name: 'Jeremy' }]) do |u| - # u.is_admin = false - # end - # - # source://activerecord//lib/active_record/persistence.rb#33 - def create(attributes = T.unsafe(nil), &block); end - - # Creates an object (or multiple objects) and saves it to the database, - # if validations pass. Raises a RecordInvalid error if validations fail, - # unlike Base#create. - # - # The +attributes+ parameter can be either a Hash or an Array of Hashes. - # These describe which attributes to be created on the object, or - # multiple objects when given an Array of Hashes. - # - # source://activerecord//lib/active_record/persistence.rb#50 - def create!(attributes = T.unsafe(nil), &block); end - - # Deletes the row with a primary key matching the +id+ argument, using an - # SQL +DELETE+ statement, and returns the number of rows deleted. Active - # Record objects are not instantiated, so the object's callbacks are not - # executed, including any :dependent association options. - # - # You can delete multiple rows at once by passing an Array of ids. - # - # Note: Although it is often much faster than the alternative, #destroy, - # skipping callbacks might bypass business logic in your application - # that ensures referential integrity or performs other essential jobs. - # - # ==== Examples - # - # # Delete a single row - # Todo.delete(1) - # - # # Delete multiple rows - # Todo.delete([2,3,4]) - # - # source://activerecord//lib/active_record/persistence.rb#473 - def delete(id_or_array); end - - # Destroy an object (or multiple objects) that has the given id. The object is instantiated first, - # therefore all callbacks and filters are fired off before the object is deleted. This method is - # less efficient than #delete but allows cleanup methods and other actions to be run. - # - # This essentially finds the object (or multiple objects) with the given id, creates a new object - # from the attributes, and then calls destroy on it. - # - # ==== Parameters - # - # * +id+ - This should be the id or an array of ids to be destroyed. - # - # ==== Examples - # - # # Destroy a single object - # Todo.destroy(1) - # - # # Destroy multiple objects - # todos = [1,2,3] - # Todo.destroy(todos) - # - # source://activerecord//lib/active_record/persistence.rb#447 - def destroy(id); 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 - # go through Active Record's type casting and serialization. - # - # See #insert_all for documentation. - # - # source://activerecord//lib/active_record/persistence.rb#66 - 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 - # statement. It does not instantiate any models nor does it trigger - # Active Record callbacks or validations. Though passed values - # go through Active Record's type casting and serialization. - # - # See #insert_all! for more. - # - # source://activerecord//lib/active_record/persistence.rb#155 - def insert!(attributes, returning: T.unsafe(nil), record_timestamps: T.unsafe(nil)); end - - # Inserts multiple records 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 - # go through Active Record's type casting and serialization. - # - # The +attributes+ parameter is an Array of Hashes. Every Hash determines - # the attributes for a single row and must have the same keys. - # - # Rows are considered to be unique by every unique index on the table. Any - # duplicate rows are skipped. - # Override with :unique_by (see below). - # - # Returns an ActiveRecord::Result with its contents based on - # :returning (see below). - # - # ==== Options - # - # [:returning] - # (PostgreSQL only) An array of attributes to return for all successfully - # inserted records, which by default is the primary key. - # Pass returning: %w[ id name ] for both id and name - # or returning: false to omit the underlying RETURNING SQL - # clause entirely. - # - # You can also pass an SQL string if you need more control on the return values - # (for example, returning: "id, name as new_name"). - # - # [:unique_by] - # (PostgreSQL and SQLite only) By default rows are considered to be unique - # by every unique index on the table. Any duplicate rows are skipped. - # - # To skip rows according to just one unique index pass :unique_by. - # - # 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. - # - # Unique indexes can be identified by columns or name: - # - # unique_by: :isbn - # unique_by: %i[ author_id name ] - # unique_by: :index_books_on_isbn - # - # [:record_timestamps] - # By default, automatic setting of timestamp columns is controlled by - # the model's record_timestamps config, matching typical - # behavior. - # - # To override this and force automatic setting of timestamp columns one - # way or the other, pass :record_timestamps: - # - # record_timestamps: true # Always set timestamps automatically - # record_timestamps: false # Never set timestamps automatically - # - # Because it relies on the index information from the database - # :unique_by is recommended to be paired with - # Active Record's schema_cache. - # - # ==== Example - # - # # Insert records and skip inserting any duplicates. - # # Here "Eloquent Ruby" is skipped because its id is not unique. - # - # Book.insert_all([ - # { id: 1, title: "Rework", author: "David" }, - # { id: 1, title: "Eloquent Ruby", author: "Russ" } - # ]) - # - # # insert_all works on chained scopes, and you can use create_with - # # to set default attributes for all inserted records. - # - # author.books.create_with(created_at: Time.now).insert_all([ - # { id: 1, title: "Rework" }, - # { id: 2, title: "Eloquent Ruby" } - # ]) - # - # source://activerecord//lib/active_record/persistence.rb#145 - 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 - # statement. It does not instantiate any models nor does it trigger - # Active Record callbacks or validations. Though passed values - # go through Active Record's type casting and serialization. - # - # 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 - # 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. - # - # Returns an ActiveRecord::Result with its contents based on - # :returning (see below). - # - # ==== Options - # - # [:returning] - # (PostgreSQL only) An array of attributes to return for all successfully - # inserted records, which by default is the primary key. - # Pass returning: %w[ id name ] for both id and name - # or returning: false to omit the underlying RETURNING SQL - # clause entirely. - # - # You can also pass an SQL string if you need more control on the return values - # (for example, returning: "id, name as new_name"). - # - # [:record_timestamps] - # By default, automatic setting of timestamp columns is controlled by - # the model's record_timestamps config, matching typical - # behavior. - # - # To override this and force automatic setting of timestamp columns one - # way or the other, pass :record_timestamps: - # - # record_timestamps: true # Always set timestamps automatically - # record_timestamps: false # Never set timestamps automatically - # - # ==== Examples - # - # # Insert multiple records - # Book.insert_all!([ - # { title: "Rework", author: "David" }, - # { title: "Eloquent Ruby", author: "Russ" } - # ]) - # - # # Raises ActiveRecord::RecordNotUnique because "Eloquent Ruby" - # # does not have a unique id. - # Book.insert_all!([ - # { id: 1, title: "Rework", author: "David" }, - # { id: 1, title: "Eloquent Ruby", author: "Russ" } - # ]) - # - # source://activerecord//lib/active_record/persistence.rb#212 - def insert_all!(attributes, returning: T.unsafe(nil), record_timestamps: T.unsafe(nil)); end - - # Given an attributes hash, +instantiate+ returns a new instance of - # the appropriate class. Accepts only keys as strings. - # - # For example, +Post.all+ may return Comments, Messages, and Emails - # by storing the record's subclass in a +type+ attribute. By calling - # +instantiate+ instead of +new+, finder methods ensure they get new - # instances of the appropriate class for each record. - # - # 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 - def instantiate(attributes, column_types = T.unsafe(nil), &block); 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. - # - # ==== Parameters - # - # * +id+ - This should be the id or an array of ids to be updated. - # Optional argument, defaults to all records in the relation. - # * +attributes+ - This should be a hash of attributes or an array of hashes. - # - # ==== Examples - # - # # Updates one record - # Person.update(15, user_name: "Samuel", group: "expert") - # - # # Updates multiple records - # people = { 1 => { "first_name" => "David" }, 2 => { "first_name" => "Jeremy" } } - # Person.update(people.keys, people.values) - # - # # Updates multiple records from the result of a relation - # people = Person.where(group: "expert") - # people.update(group: "masters") - # - # Note: Updating a large number of records will run an UPDATE - # query for each record, which may cause a performance issue. - # When running callbacks is not needed for each record update, - # 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 - 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 - def update!(id = T.unsafe(nil), attributes); end - - # Updates or inserts (upserts) 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 - # go through Active Record's type casting and serialization. - # - # 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 - - # Updates or inserts (upserts) multiple records 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 - # go through Active Record's type casting and serialization. - # - # The +attributes+ parameter is an Array of Hashes. Every Hash determines - # the attributes for a single row and must have the same keys. - # - # Returns an ActiveRecord::Result with its contents based on - # :returning (see below). - # - # By default, +upsert_all+ will update all the columns that can be updated when - # there is a conflict. These are all the columns except primary keys, read-only - # columns, and columns covered by the optional +unique_by+. - # - # ==== Options - # - # [:returning] - # (PostgreSQL only) An array of attributes to return for all successfully - # inserted records, which by default is the primary key. - # Pass returning: %w[ id name ] for both id and name - # or returning: false to omit the underlying RETURNING SQL - # clause entirely. - # - # You can also pass an SQL string if you need more control on the return values - # (for example, returning: "id, name as new_name"). - # - # [:unique_by] - # (PostgreSQL and SQLite only) By default rows are considered to be unique - # by every unique index on the table. Any duplicate rows are skipped. - # - # To skip rows according to just one unique index pass :unique_by. - # - # 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. - # - # Unique indexes can be identified by columns or name: - # - # unique_by: :isbn - # unique_by: %i[ author_id name ] - # unique_by: :index_books_on_isbn - # - # Because it relies on the index information from the database - # :unique_by is recommended to be paired with - # Active Record's schema_cache. - # - # [:on_duplicate] - # Configure the SQL update sentence that will be used in case of conflict. - # - # NOTE: If you use this option you must provide all the columns you want to update - # by yourself. - # - # Example: - # - # Commodity.upsert_all( - # [ - # { id: 2, name: "Copper", price: 4.84 }, - # { id: 4, name: "Gold", price: 1380.87 }, - # { id: 6, name: "Aluminium", price: 0.35 } - # ], - # on_duplicate: Arel.sql("price = GREATEST(commodities.price, EXCLUDED.price)") - # ) - # - # See the related +:update_only+ option. Both options can't be used at the same time. - # - # [:update_only] - # Provide a list of column names that will be updated in case of conflict. If not provided, - # +upsert_all+ will update all the columns that can be updated. These are all the columns - # except primary keys, read-only columns, and columns covered by the optional +unique_by+ - # - # Example: - # - # Commodity.upsert_all( - # [ - # { id: 2, name: "Copper", price: 4.84 }, - # { id: 4, name: "Gold", price: 1380.87 }, - # { id: 6, name: "Aluminium", price: 0.35 } - # ], - # update_only: [:price] # Only prices will be updated - # ) - # - # See the related +:on_duplicate+ option. Both options can't be used at the same time. - # - # [:record_timestamps] - # By default, automatic setting of timestamp columns is controlled by - # the model's record_timestamps config, matching typical - # behavior. - # - # To override this and force automatic setting of timestamp columns one - # way or the other, pass :record_timestamps: - # - # record_timestamps: true # Always set timestamps automatically - # record_timestamps: false # Never set timestamps automatically - # - # ==== Examples - # - # # Inserts multiple records, performing an upsert when records have duplicate ISBNs. - # # Here "Eloquent Ruby" overwrites "Rework" because its ISBN is duplicate. - # - # Book.upsert_all([ - # { title: "Rework", author: "David", isbn: "1" }, - # { title: "Eloquent Ruby", author: "Russ", isbn: "1" } - # ], unique_by: :isbn) - # - # Book.find_by(isbn: "1").title # => "Eloquent Ruby" - # - # source://activerecord//lib/active_record/persistence.rb#332 - 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 - - # Called by +_update_record+ and +_delete_record+ - # to build `where` clause from default scopes. - # Skips empty scopes. - # - # source://activerecord//lib/active_record/persistence.rb#552 - def build_default_constraint; end - - # Called by +instantiate+ to decide which class to use for a new - # record instance. - # - # See +ActiveRecord::Inheritance#discriminate_class_for_record+ for - # the single-table inheritance discriminator. - # - # source://activerecord//lib/active_record/persistence.rb#545 - def discriminate_class_for_record(record); 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 - def instantiate_instance_of(klass, attributes, column_types = T.unsafe(nil), &block); end -end - -# source://activerecord//lib/active_record/relation/predicate_builder.rb#4 -class ActiveRecord::PredicateBuilder - # @return [PredicateBuilder] a new instance of PredicateBuilder - # - # source://activerecord//lib/active_record/relation/predicate_builder.rb#12 - def initialize(table); end - - # source://activerecord//lib/active_record/relation/predicate_builder.rb#53 - def [](attr_name, value, operator = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/relation/predicate_builder.rb#57 - def build(attribute, value, operator = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/relation/predicate_builder.rb#67 - def build_bind_attribute(column_name, value); end - - # source://activerecord//lib/active_record/relation/predicate_builder.rb#23 - def build_from_hash(attributes, &block); end - - # Define how a class is converted to Arel nodes when passed to +where+. - # The handler can be any object that responds to +call+, and will be used - # for any value that +===+ the class given. For example: - # - # MyCustomDateRange = Struct.new(:start, :end) - # handler = proc do |column, range| - # Arel::Nodes::Between.new(column, - # Arel::Nodes::And.new([range.start, range.end]) - # ) - # end - # ActiveRecord::PredicateBuilder.new("users").register_handler(MyCustomDateRange, handler) - # - # 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#71 - def resolve_arel_attribute(table_name, column_name, &block); end - - protected - - # 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#144 - def convert_dot_notation_to_hash(attributes); end - - # source://activerecord//lib/active_record/relation/predicate_builder.rb#134 - def grouping_queries(queries); end - - # source://activerecord//lib/active_record/relation/predicate_builder.rb#160 - def handler_for(object); end - - # Returns the value of attribute table. - # - # source://activerecord//lib/active_record/relation/predicate_builder.rb#132 - def table; end - - class << self - # source://activerecord//lib/active_record/relation/predicate_builder.rb#28 - def references(attributes); end - end -end - -# source://activerecord//lib/active_record/relation/predicate_builder/array_handler.rb#7 -class ActiveRecord::PredicateBuilder::ArrayHandler - # @return [ArrayHandler] a new instance of ArrayHandler - # - # source://activerecord//lib/active_record/relation/predicate_builder/array_handler.rb#8 - def initialize(predicate_builder); end - - # source://activerecord//lib/active_record/relation/predicate_builder/array_handler.rb#12 - def call(attribute, value); end - - private - - # Returns the value of attribute predicate_builder. - # - # source://activerecord//lib/active_record/relation/predicate_builder/array_handler.rb#39 - def predicate_builder; end -end - -# source://activerecord//lib/active_record/relation/predicate_builder/array_handler.rb#41 -module ActiveRecord::PredicateBuilder::ArrayHandler::NullPredicate - class << self - # source://activerecord//lib/active_record/relation/predicate_builder/array_handler.rb#42 - def or(other); end - end -end - -# source://activerecord//lib/active_record/relation/predicate_builder/association_query_value.rb#5 -class ActiveRecord::PredicateBuilder::AssociationQueryValue - # @return [AssociationQueryValue] a new instance of AssociationQueryValue - # - # source://activerecord//lib/active_record/relation/predicate_builder/association_query_value.rb#6 - def initialize(associated_table, value); end - - # source://activerecord//lib/active_record/relation/predicate_builder/association_query_value.rb#11 - def queries; end - - private - - # Returns the value of attribute associated_table. - # - # source://activerecord//lib/active_record/relation/predicate_builder/association_query_value.rb#16 - def associated_table; end - - # source://activerecord//lib/active_record/relation/predicate_builder/association_query_value.rb#33 - def convert_to_id(value); end - - # source://activerecord//lib/active_record/relation/predicate_builder/association_query_value.rb#18 - def ids; end - - # source://activerecord//lib/active_record/relation/predicate_builder/association_query_value.rb#29 - def primary_key; end - - # Returns the value of attribute value. - # - # source://activerecord//lib/active_record/relation/predicate_builder/association_query_value.rb#16 - def value; end -end - -# source://activerecord//lib/active_record/relation/predicate_builder/basic_object_handler.rb#5 -class ActiveRecord::PredicateBuilder::BasicObjectHandler - # @return [BasicObjectHandler] a new instance of BasicObjectHandler - # - # source://activerecord//lib/active_record/relation/predicate_builder/basic_object_handler.rb#6 - def initialize(predicate_builder); end - - # source://activerecord//lib/active_record/relation/predicate_builder/basic_object_handler.rb#10 - def call(attribute, value); end - - private - - # Returns the value of attribute predicate_builder. - # - # source://activerecord//lib/active_record/relation/predicate_builder/basic_object_handler.rb#16 - def predicate_builder; end -end - -# source://activerecord//lib/active_record/relation/predicate_builder/polymorphic_array_value.rb#5 -class ActiveRecord::PredicateBuilder::PolymorphicArrayValue - # @return [PolymorphicArrayValue] a new instance of PolymorphicArrayValue - # - # source://activerecord//lib/active_record/relation/predicate_builder/polymorphic_array_value.rb#6 - def initialize(associated_table, values); end - - # source://activerecord//lib/active_record/relation/predicate_builder/polymorphic_array_value.rb#11 - def queries; end - - private - - # Returns the value of attribute associated_table. - # - # 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 - def convert_to_id(value); end - - # source://activerecord//lib/active_record/relation/predicate_builder/polymorphic_array_value.rb#36 - def klass(value); end - - # source://activerecord//lib/active_record/relation/predicate_builder/polymorphic_array_value.rb#32 - def primary_key(value); end - - # source://activerecord//lib/active_record/relation/predicate_builder/polymorphic_array_value.rb#25 - def type_to_ids_mapping; end - - # Returns the value of attribute values. - # - # source://activerecord//lib/active_record/relation/predicate_builder/polymorphic_array_value.rb#23 - def values; end -end - -# source://activerecord//lib/active_record/relation/predicate_builder/range_handler.rb#5 -class ActiveRecord::PredicateBuilder::RangeHandler - # @return [RangeHandler] a new instance of RangeHandler - # - # source://activerecord//lib/active_record/relation/predicate_builder/range_handler.rb#8 - def initialize(predicate_builder); end - - # source://activerecord//lib/active_record/relation/predicate_builder/range_handler.rb#12 - def call(attribute, value); end - - private - - # Returns the value of attribute predicate_builder. - # - # source://activerecord//lib/active_record/relation/predicate_builder/range_handler.rb#19 - def predicate_builder; end -end - -# source://activerecord//lib/active_record/relation/predicate_builder/range_handler.rb#6 -class ActiveRecord::PredicateBuilder::RangeHandler::RangeWithBinds < ::Struct - # Returns the value of attribute begin - # - # @return [Object] the current value of begin - def begin; end - - # Sets the attribute begin - # - # @param value [Object] the value to set the attribute begin to. - # @return [Object] the newly set value - def begin=(_); end - - # Returns the value of attribute end - # - # @return [Object] the current value of end - def end; end - - # Sets the attribute end - # - # @param value [Object] the value to set the attribute end to. - # @return [Object] the newly set value - def end=(_); end - - # Returns the value of attribute exclude_end? - # - # @return [Object] the current value of exclude_end? - def exclude_end?; 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/relation/predicate_builder/relation_handler.rb#5 -class ActiveRecord::PredicateBuilder::RelationHandler - # source://activerecord//lib/active_record/relation/predicate_builder/relation_handler.rb#6 - def call(attribute, value); end -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 -class ActiveRecord::PreparedStatementCacheExpired < ::ActiveRecord::StatementInvalid; end - -# Raised when the number of placeholders in an SQL fragment passed to -# {ActiveRecord::Base.where}[rdoc-ref:QueryMethods#where] -# does not match the number of values supplied. -# -# For example, when there are two placeholders with only one value supplied: -# -# Location.where("lat = ? AND lng = ?", 53.7362) -# -# source://activerecord//lib/active_record/errors.rb#234 -class ActiveRecord::PreparedStatementInvalid < ::ActiveRecord::ActiveRecordError; end - -# source://activerecord//lib/active_record/migration.rb#188 -class ActiveRecord::ProtectedEnvironmentError < ::ActiveRecord::ActiveRecordError - # @return [ProtectedEnvironmentError] a new instance of ProtectedEnvironmentError - # - # source://activerecord//lib/active_record/migration.rb#189 - 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 -class ActiveRecord::QueryAborted < ::ActiveRecord::StatementInvalid; end - -# = Active Record Query Cache -# -# source://activerecord//lib/active_record/query_cache.rb#5 -class ActiveRecord::QueryCache - class << self - # source://activerecord//lib/active_record/query_cache.rb#42 - def complete(pools); end - - # source://activerecord//lib/active_record/query_cache.rb#58 - def install_executor_hooks(executor = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/query_cache.rb#28 - def run; end - end -end - -# source://activerecord//lib/active_record/query_cache.rb#6 -module ActiveRecord::QueryCache::ClassMethods - # Enable the query cache within the block if Active Record is configured. - # If it's not, it will execute the given block. - # - # source://activerecord//lib/active_record/query_cache.rb#9 - def cache(&block); end - - # Disable the query cache within the block if Active Record is configured. - # If it's not, it will execute the given block. - # - # source://activerecord//lib/active_record/query_cache.rb#19 - def uncached(&block); end -end - -# QueryCanceled will be raised when canceling statement due to user request. -# -# source://activerecord//lib/active_record/errors.rb#457 -class ActiveRecord::QueryCanceled < ::ActiveRecord::QueryAborted; end - -# = Active Record Query Logs -# -# Automatically tag SQL queries with runtime information. -# -# Default tags available for use: -# -# * +application+ -# * +pid+ -# * +socket+ -# * +db_host+ -# * +database+ -# -# _Action Controller and Active Job tags are also defined when used in Rails:_ -# -# * +controller+ -# * +action+ -# * +job+ -# -# The tags used in a query can be configured directly: -# -# ActiveRecord::QueryLogs.tags = [ :application, :controller, :action, :job ] -# -# or via Rails configuration: -# -# config.active_record.query_log_tags = [ :application, :controller, :action, :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. -# -# 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: -# -# ActiveSupport::ExecutionContext[:foo] = Bar.new -# -# Tag comments can be prepended to the query: -# -# ActiveRecord::QueryLogs.prepend_comment = true -# -# 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 -module ActiveRecord::QueryLogs - class << self - # source://activerecord//lib/active_record/query_logs.rb#77 - def cache_query_log_tags; end - - # source://activerecord//lib/active_record/query_logs.rb#77 - def cache_query_log_tags=(val); end - - # source://activesupport/7.0.4.2/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#48 - def cached_comment; end - - # source://activesupport/7.0.4.2/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#92 - 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#89 - def clear_cache; end - - # source://activerecord//lib/active_record/query_logs.rb#76 - def prepend_comment; end - - # source://activerecord//lib/active_record/query_logs.rb#76 - def prepend_comment=(val); end - - # source://activerecord//lib/active_record/query_logs.rb#74 - def taggings; end - - # source://activerecord//lib/active_record/query_logs.rb#74 - def taggings=(val); end - - # source://activerecord//lib/active_record/query_logs.rb#75 - def tags; end - - # source://activerecord//lib/active_record/query_logs.rb#75 - def tags=(val); 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#113 - 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#106 - def uncached_comment; end - end -end - -# source://activerecord//lib/active_record/relation/query_methods.rb#10 -module ActiveRecord::QueryMethods - include ::ActiveModel::ForbiddenAttributesProtection - - # source://activerecord//lib/active_record/relation/query_methods.rb#317 - def _select!(*fields); end - - # Returns a new relation, which is the logical intersection of this relation and the one passed - # as an argument. - # - # The two relations must be structurally compatible: they must be scoping the same model, and - # they must differ only by #where (if no #group has been defined) or #having (if a #group is - # present). - # - # 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#845 - def and(other); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#853 - def and!(other); end - - # Adds an SQL comment to queries generated from this relation. For example: - # - # User::User.annotate("selecting user names").select(:name) - # # SELECT "users"."name" FROM "users" /* selecting user names */ - # - # User::User.annotate("selecting", "user", "names").select(:name) - # # SELECT "users"."name" FROM "users" /* selecting */ /* user */ /* names */ - # - # The SQL block comment delimiters, "/*" and "*/", will be added automatically. - # - # Some escaping is performed, however untrusted user input should not be used. - # - # source://activerecord//lib/active_record/relation/query_methods.rb#1221 - def annotate(*args); end - - # Like #annotate, but modifies relation in place. - # - # source://activerecord//lib/active_record/relation/query_methods.rb#1227 - def annotate!(*args); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#139 - def annotate_values; end - - # source://activerecord//lib/active_record/relation/query_methods.rb#143 - def annotate_values=(value); end - - # Returns the Arel object associated with the relation. - # - # source://activerecord//lib/active_record/relation/query_methods.rb#1282 - def arel(aliases = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#1286 - def construct_join_dependency(associations, join_type); end - - # Sets attributes to be used when creating new records from a - # relation object. - # - # users = User::User.where(name: 'Oscar') - # users.new.name # => 'Oscar' - # - # users = users.create_with(name: 'DHH') - # users.new.name # => 'DHH' - # - # You can pass +nil+ to #create_with to reset attributes: - # - # users = users.create_with(nil) - # users.new.name # => 'Oscar' - # - # source://activerecord//lib/active_record/relation/query_methods.rb#1038 - def create_with(value); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#1042 - def create_with!(value); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#139 - def create_with_value; end - - # source://activerecord//lib/active_record/relation/query_methods.rb#143 - def create_with_value=(value); end - - # Specifies whether the records should be unique or not. For example: - # - # User::User.select(:name) - # # Might return two records with the same name - # - # User::User.select(:name).distinct - # # Returns 1 record per distinct name - # - # User::User.select(:name).distinct.distinct(false) - # # You can also remove the uniqueness - # - # source://activerecord//lib/active_record/relation/query_methods.rb#1102 - def distinct(value = T.unsafe(nil)); end - - # Like #distinct, but modifies relation in place. - # - # source://activerecord//lib/active_record/relation/query_methods.rb#1107 - def distinct!(value = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#139 - def distinct_value; end - - # source://activerecord//lib/active_record/relation/query_methods.rb#143 - def distinct_value=(value); end - - # Forces eager loading by performing a LEFT OUTER JOIN on +args+: - # - # User::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" - # - # source://activerecord//lib/active_record/relation/query_methods.rb#207 - def eager_load(*args); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#212 - def eager_load!(*args); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#139 - def eager_load_values; end - - # source://activerecord//lib/active_record/relation/query_methods.rb#143 - def eager_load_values=(value); end - - # Excludes the specified record (or collection of records) from the resulting - # relation. For example: - # - # Post.excluding(post) - # # SELECT "posts".* FROM "posts" WHERE "posts"."id" != 1 - # - # Post.excluding(post_one, post_two) - # # SELECT "posts".* FROM "posts" WHERE "posts"."id" NOT IN (1, 2) - # - # This can also be called on associations. As with the above example, either - # a single record of collection thereof may be specified: - # - # post = Post.find(1) - # comment = Comment.find(2) - # post.comments.excluding(comment) - # # SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 AND "comments"."id" != 2 - # - # This is short-hand for .where.not(id: post.id) and .where.not(id: [post_one.id, post_two.id]). - # - # An ArgumentError will be raised if either no records are - # specified, or if any of the records in the collection (if a collection - # is passed in) are not instances of the same model that the relation is - # scoping. - # - # source://activerecord//lib/active_record/relation/query_methods.rb#1263 - def excluding(*records); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#1275 - def excluding!(records); end - - # Used to extend a scope with additional methods, either through - # a module or through a block provided. - # - # The object returned is a relation, which can be further extended. - # - # === Using a module - # - # module Pagination - # def page(number) - # # pagination code goes here - # end - # end - # - # scope = Model.all.extending(Pagination) - # scope.page(params[:page]) - # - # You can also pass a list of modules: - # - # scope = Model.all.extending(Pagination, SomethingElse) - # - # === Using a block - # - # scope = Model.all.extending do - # def page(number) - # # pagination code goes here - # end - # end - # scope.page(params[:page]) - # - # You can also use a block and a module list: - # - # scope = Model.all.extending(Pagination) do - # def per_page(number) - # # pagination code goes here - # end - # end - # - # source://activerecord//lib/active_record/relation/query_methods.rb#1148 - def extending(*modules, &block); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#1156 - def extending!(*modules, &block); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#139 - def extending_values; end - - # source://activerecord//lib/active_record/relation/query_methods.rb#143 - def extending_values=(value); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#139 - def extensions; end - - # Extracts a named +association+ from the relation. The named association is first preloaded, - # then the individual association records are collected from the relation. Like so: - # - # account.memberships.extract_associated(:user) - # # => Returns collection of User records - # - # This is short-hand for: - # - # account.memberships.preload(:user).collect(&:user) - # - # source://activerecord//lib/active_record/relation/query_methods.rb#240 - def extract_associated(association); end - - # Specifies the table from which the records will be fetched. For example: - # - # Topic.select('title').from('posts') - # # SELECT title FROM posts - # - # Can accept other relation objects. For example: - # - # Topic.select('title').from(Topic.approved) - # # SELECT title FROM (SELECT * FROM topics WHERE approved = 't') subquery - # - # Passing a second argument (string or symbol), creates the alias for the SQL from clause. Otherwise the alias "subquery" is used: - # - # Topic.select('a.title').from(Topic.approved, :a) - # # SELECT a.title FROM (SELECT * FROM topics WHERE approved = 't') a - # - # It does not add multiple arguments to the SQL from clause. The last +from+ chained is the one used: - # - # Topic.select('title').from(Topic.approved).from(Topic.inactive) - # # SELECT title FROM (SELECT topics.* FROM topics WHERE topics.active = 'f') subquery - # - # For multiple arguments for the SQL from clause, you can pass a string with the exact elements in the SQL from list: - # - # color = "red" - # Color - # .from("colors c, JSONB_ARRAY_ELEMENTS(colored_things) AS colorvalues(colorvalue)") - # .where("colorvalue->>'color' = ?", color) - # .select("c.*").to_a - # # SELECT c.* - # # FROM colors c, JSONB_ARRAY_ELEMENTS(colored_things) AS colorvalues(colorvalue) - # # WHERE (colorvalue->>'color' = 'red') - # - # source://activerecord//lib/active_record/relation/query_methods.rb#1083 - def from(value, subquery_name = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#1087 - def from!(value, subquery_name = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#139 - def from_clause; end - - # source://activerecord//lib/active_record/relation/query_methods.rb#143 - def from_clause=(value); end - - # Allows to specify a group attribute: - # - # User::User.group(:name) - # # SELECT "users".* FROM "users" GROUP BY name - # - # Returns an array with distinct records based on the +group+ attribute: - # - # User::User.select([:id, :name]) - # # => [#, #, #] - # - # User::User.group(:name) - # # => [#, #] - # - # User::User.group('name AS grouped_name, age') - # # => [#, #, #] - # - # Passing in an array of attributes to group by is also supported. - # - # User::User.select([:id, :first_name]).group(:id, :first_name).first(3) - # # => [#, #, #] - # - # source://activerecord//lib/active_record/relation/query_methods.rb#363 - def group(*args); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#368 - def group!(*args); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#139 - def group_values; end - - # source://activerecord//lib/active_record/relation/query_methods.rb#143 - def group_values=(value); end - - # Allows to specify a HAVING clause. Note that you can't use HAVING - # without also specifying a GROUP clause. - # - # Order.having('SUM(price) > 30').group('user_id') - # - # source://activerecord//lib/active_record/relation/query_methods.rb#903 - def having(opts, *rest); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#907 - def having!(opts, *rest); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#139 - def having_clause; end - - # source://activerecord//lib/active_record/relation/query_methods.rb#143 - 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. - # - # User::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) - # - # source://activerecord//lib/active_record/relation/query_methods.rb#447 - def in_order_of(column, values); end - - # Specify relationships to be included in the result set. For - # example: - # - # users = User::User.includes(:address) - # 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. - # - # You can also specify multiple relationships, like this: - # - # users = User::User.includes(:address, :friends) - # - # Loading nested relationships is possible using a Hash: - # - # users = User::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::User.includes(:posts).where('posts.name = ?', 'example') - # - # Will throw an error, but this will work: - # - # User::User.includes(:posts).where('posts.name = ?', 'example').references(:posts) - # - # 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 - # explicitly, as #where references the tables for you. For example, this - # will work correctly: - # - # User::User.includes(:posts).where(posts: { name: 'example' }) - # - # source://activerecord//lib/active_record/relation/query_methods.rb#191 - def includes(*args); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#196 - def includes!(*args); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#139 - def includes_values; end - - # source://activerecord//lib/active_record/relation/query_methods.rb#143 - def includes_values=(value); end - - # Allows you to invert an entire where clause instead of manually applying conditions. - # - # class User - # scope :active, -> { where(accepted: true, locked: false) } - # end - # - # User::User.where(accepted: true) - # # WHERE `accepted` = 1 - # - # User::User.where(accepted: true).invert_where - # # WHERE `accepted` != 1 - # - # User::User.active - # # WHERE `accepted` = 1 AND `locked` = 0 - # - # User::User.active.invert_where - # # WHERE NOT (`accepted` = 1 AND `locked` = 0) - # - # Be careful because this inverts all conditions before +invert_where+ call. - # - # class User - # scope :active, -> { where(accepted: true, locked: false) } - # scope :inactive, -> { active.invert_where } # Do not attempt it - # end - # - # # It also inverts `where(role: 'admin')` unexpectedly. - # User::User.where(role: 'admin').inactive - # # WHERE NOT (`role` = 'admin' AND `accepted` = 1 AND `locked` = 0) - # - # source://activerecord//lib/active_record/relation/query_methods.rb#811 - def invert_where; end - - # source://activerecord//lib/active_record/relation/query_methods.rb#815 - def invert_where!; end - - # Performs JOINs on +args+. The given symbol(s) should match the name of - # the association(s). - # - # User::User.joins(:posts) - # # SELECT "users".* - # # FROM "users" - # # INNER JOIN "posts" ON "posts"."user_id" = "users"."id" - # - # Multiple joins: - # - # User::User.joins(:posts, :account) - # # SELECT "users".* - # # FROM "users" - # # INNER JOIN "posts" ON "posts"."user_id" = "users"."id" - # # INNER JOIN "accounts" ON "accounts"."id" = "users"."account_id" - # - # Nested joins: - # - # User::User.joins(posts: [:comments]) - # # SELECT "users".* - # # FROM "users" - # # INNER JOIN "posts" ON "posts"."user_id" = "users"."id" - # # INNER JOIN "comments" ON "comments"."post_id" = "posts"."id" - # - # You can use strings in order to customize your joins: - # - # User::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#586 - def joins(*args); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#591 - def joins!(*args); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#139 - def joins_values; end - - # source://activerecord//lib/active_record/relation/query_methods.rb#143 - def joins_values=(value); end - - # Performs LEFT OUTER JOINs on +args+: - # - # User::User.left_outer_joins(:posts) - # => SELECT "users".* FROM "users" LEFT OUTER JOIN "posts" ON "posts"."user_id" = "users"."id" - # - # source://activerecord//lib/active_record/relation/query_methods.rb#601 - def left_joins(*args); end - - # Performs LEFT OUTER JOINs on +args+: - # - # User::User.left_outer_joins(:posts) - # => SELECT "users".* FROM "users" LEFT OUTER JOIN "posts" ON "posts"."user_id" = "users"."id" - # - # source://activerecord//lib/active_record/relation/query_methods.rb#601 - def left_outer_joins(*args); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#607 - def left_outer_joins!(*args); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#139 - def left_outer_joins_values; end - - # source://activerecord//lib/active_record/relation/query_methods.rb#143 - def left_outer_joins_values=(value); end - - # Specifies a limit for the number of records to retrieve. - # - # User::User.limit(10) # generated SQL has 'LIMIT 10' - # - # User::User.limit(10).limit(20) # generated SQL has 'LIMIT 20' - # - # source://activerecord//lib/active_record/relation/query_methods.rb#917 - def limit(value); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#921 - def limit!(value); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#139 - def limit_value; end - - # source://activerecord//lib/active_record/relation/query_methods.rb#143 - 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#944 - def lock(locks = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#948 - def lock!(locks = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#139 - def lock_value; end - - # source://activerecord//lib/active_record/relation/query_methods.rb#143 - def lock_value=(value); end - - # Returns a chainable relation with zero records. - # - # The returned relation implements the Null Object pattern. It is an - # object with defined null behavior and always returns an empty array of - # records without querying the database. - # - # Any subsequent condition chained to the returned relation will continue - # generating an empty relation and will not fire any query to the database. - # - # Used in cases where a method or scope could return zero records but the - # result needs to be chainable. - # - # For example: - # - # @posts = current_user.visible_posts.where(name: params[:name]) - # # the visible_posts method is expected to return a chainable Relation - # - # def visible_posts - # case role - # when 'Country Manager' - # Post.where(country: country) - # when 'Reviewer' - # Post.published - # when 'Bad User' - # Post.none # It can't be chained if [] is returned. - # end - # end - # - # source://activerecord//lib/active_record/relation/query_methods.rb#987 - def none; end - - # source://activerecord//lib/active_record/relation/query_methods.rb#991 - def none!; end - - # Specifies the number of rows to skip before returning rows. - # - # User::User.offset(10) # generated SQL has "OFFSET 10" - # - # Should be used with order. - # - # User::User.offset(10).order("name ASC") - # - # source://activerecord//lib/active_record/relation/query_methods.rb#933 - def offset(value); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#937 - def offset!(value); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#139 - def offset_value; end - - # source://activerecord//lib/active_record/relation/query_methods.rb#143 - def offset_value=(value); end - - # Specify optimizer hints to be used in the SELECT statement. - # - # Example (for MySQL): - # - # Topic.optimizer_hints("MAX_EXECUTION_TIME(50000)", "NO_INDEX_MERGE(topics)") - # # SELECT /*+ MAX_EXECUTION_TIME(50000) NO_INDEX_MERGE(topics) */ `topics`.* FROM `topics` - # - # Example (for PostgreSQL with pg_hint_plan): - # - # 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#1177 - def optimizer_hints(*args); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#1182 - def optimizer_hints!(*args); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#139 - def optimizer_hints_values; end - - # source://activerecord//lib/active_record/relation/query_methods.rb#143 - def optimizer_hints_values=(value); end - - # Returns a new relation, which is the logical union of this relation and the one passed as an - # argument. - # - # The two relations must be structurally compatible: they must be scoping the same model, and - # they must differ only by #where (if no #group has been defined) or #having (if a #group is - # present). - # - # 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#877 - def or(other); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#885 - def or!(other); end - - # Applies an ORDER BY clause to a query. - # - # #order accepts arguments in one of several formats. - # - # === symbols - # - # The symbol represents the name of the column you want to order the results by. - # - # User::User.order(:name) - # # SELECT "users".* FROM "users" ORDER BY "users"."name" ASC - # - # By default, the order is ascending. If you want descending order, you can - # map the column name symbol to +:desc+. - # - # User::User.order(email: :desc) - # # SELECT "users".* FROM "users" ORDER BY "users"."email" DESC - # - # Multiple columns can be passed this way, and they will be applied in the order specified. - # - # User::User.order(:name, email: :desc) - # # SELECT "users".* FROM "users" ORDER BY "users"."name" ASC, "users"."email" DESC - # - # === strings - # - # Strings are passed directly to the database, allowing you to specify - # simple SQL expressions. - # - # This could be a source of SQL injection, so only strings composed of plain - # column names and simple function(column_name) expressions - # with optional +ASC+/+DESC+ modifiers are allowed. - # - # User::User.order('name') - # # SELECT "users".* FROM "users" ORDER BY name - # - # User::User.order('name DESC') - # # SELECT "users".* FROM "users" ORDER BY name DESC - # - # User::User.order('name DESC, email') - # # SELECT "users".* FROM "users" ORDER BY name DESC, email - # - # === Arel - # - # If you need to pass in complicated expressions that you have verified - # are safe for the database, you can use Arel. - # - # User::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. - # - # User::User.order(Arel.sql("payload->>'kind'")) - # # SELECT "users".* FROM "users" ORDER BY payload->>'kind' - # - # source://activerecord//lib/active_record/relation/query_methods.rb#425 - 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#433 - def order!(*args); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#139 - def order_values; end - - # source://activerecord//lib/active_record/relation/query_methods.rb#143 - def order_values=(value); end - - # Allows preloading of +args+, in the same way that #includes does: - # - # User::User.preload(:posts) - # # SELECT "posts".* FROM "posts" WHERE "posts"."user_id" IN (1, 2, 3) - # - # source://activerecord//lib/active_record/relation/query_methods.rb#221 - def preload(*args); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#226 - def preload!(*args); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#139 - def preload_values; end - - # source://activerecord//lib/active_record/relation/query_methods.rb#143 - 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. - # - # users = User::User.readonly - # users.first.save - # => ActiveRecord::ReadOnlyRecord: User is marked as readonly - # - # source://activerecord//lib/active_record/relation/query_methods.rb#1001 - def readonly(value = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#1005 - def readonly!(value = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#139 - def readonly_value; end - - # source://activerecord//lib/active_record/relation/query_methods.rb#143 - 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. - # This method only works in conjunction with #includes. - # See #includes for more details. - # - # User::User.includes(:posts).where("posts.name = 'foo'") - # # Doesn't JOIN the posts table, resulting in an error. - # - # User::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#254 - def references(*table_names); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#259 - def references!(*table_names); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#139 - def references_values; end - - # source://activerecord//lib/active_record/relation/query_methods.rb#143 - def references_values=(value); end - - # Replaces any existing order defined on the relation with the specified order. - # - # User::User.order('email DESC').reorder('id ASC') # generated SQL has 'ORDER BY id ASC' - # - # Subsequent calls to order on the same relation will be appended. For example: - # - # User::User.order('email DESC').reorder('id ASC').order('name ASC') - # - # generates a query with 'ORDER BY id ASC, name ASC'. - # - # source://activerecord//lib/active_record/relation/query_methods.rb#471 - 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#479 - def reorder!(*args); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#139 - def reordering_value; end - - # source://activerecord//lib/active_record/relation/query_methods.rb#143 - def reordering_value=(value); end - - # Allows you to change a previously set select statement. - # - # Post.select(:title, :body) - # # SELECT `posts`.`title`, `posts`.`body` FROM `posts` - # - # Post.select(:title, :body).reselect(:created_at) - # # SELECT `posts`.`created_at` FROM `posts` - # - # 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#332 - 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#338 - def reselect!(*args); end - - # Reverse the existing order clause on the relation. - # - # User::User.order('name ASC').reverse_order # generated SQL has 'ORDER BY name DESC' - # - # source://activerecord//lib/active_record/relation/query_methods.rb#1190 - def reverse_order; end - - # source://activerecord//lib/active_record/relation/query_methods.rb#1194 - def reverse_order!; end - - # source://activerecord//lib/active_record/relation/query_methods.rb#139 - def reverse_order_value; end - - # source://activerecord//lib/active_record/relation/query_methods.rb#143 - 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. - # - # Post.where(trashed: true).where(trashed: false) - # # WHERE `trashed` = 1 AND `trashed` = 0 - # - # Post.where(trashed: true).rewhere(trashed: false) - # # WHERE `trashed` = 0 - # - # Post.where(active: true).where(trashed: true).rewhere(trashed: false) - # # WHERE `active` = 1 AND `trashed` = 0 - # - # 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#773 - def rewhere(conditions); end - - # Works in two unique ways. - # - # First: takes a block so it can be used just like Array#select. - # - # Model.all.select { |m| m.field == value } - # - # This will build an array of objects from the database for the scope, - # converting them into an array and iterating through them using - # Array#select. - # - # Second: Modifies the SELECT statement for the query so that only certain - # fields are retrieved: - # - # Model.select(:field) - # # => [#] - # - # Although in the above example it looks as though this method returns an - # array, it actually returns a relation object and can have other query - # methods appended to it, such as the other methods in ActiveRecord::QueryMethods. - # - # The argument to the method can also be an array of fields. - # - # Model.select(:field, :other_field, :and_one_more) - # # => [#] - # - # 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') - # # => [#] - # - # If an alias was specified, it will be accessible from the resulting objects: - # - # Model.select('field AS field_one').first.field_one - # # => "value" - # - # Accessing attributes of an object that do not have fields retrieved by a select - # except +id+ will throw ActiveModel::MissingAttributeError: - # - # Model.select(:field).first.other_field - # # => ActiveModel::MissingAttributeError: missing attribute: other_field - # - # source://activerecord//lib/active_record/relation/query_methods.rb#304 - def select(*fields); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#139 - def select_values; end - - # source://activerecord//lib/active_record/relation/query_methods.rb#143 - def select_values=(value); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#1205 - def skip_preloading!; end - - # source://activerecord//lib/active_record/relation/query_methods.rb#1200 - def skip_query_cache!(value = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#139 - def skip_query_cache_value; end - - # source://activerecord//lib/active_record/relation/query_methods.rb#143 - def skip_query_cache_value=(value); end - - # Sets the returned relation to strict_loading mode. This will raise an error - # if the record tries to lazily load an association. - # - # user = User::User.strict_loading.first - # user.comments.to_a - # => ActiveRecord::StrictLoadingViolationError - # - # source://activerecord//lib/active_record/relation/query_methods.rb#1016 - def strict_loading(value = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#1020 - def strict_loading!(value = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#139 - def strict_loading_value; end - - # source://activerecord//lib/active_record/relation/query_methods.rb#143 - def strict_loading_value=(value); end - - # Checks whether the given relation is structurally compatible with this relation, to determine - # if it's possible to use the #and and #or methods without raising an error. Structurally - # compatible is defined as: they must be scoping the same model, and they must differ only by - # #where (if no #group has been defined) or #having (if a #group is present). - # - # Post.where("id = 1").structurally_compatible?(Post.where("author_id = 3")) - # # => true - # - # Post.joins(:comments).structurally_compatible?(Post.where("id = 1")) - # # => false - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/relation/query_methods.rb#831 - def structurally_compatible?(other); end - - # Deduplicate multiple values. - # - # source://activerecord//lib/active_record/relation/query_methods.rb#1233 - def uniq!(name); end - - # Removes an unwanted relation that is already defined on a chain of relations. - # This is useful when passing around chains of relations and would like to - # modify the relations without reconstructing the entire chain. - # - # User::User.order('email DESC').unscope(:order) == User::User.all - # - # The method arguments are symbols which correspond to the names of the methods - # which should be unscoped. The valid arguments are given in VALID_UNSCOPING_VALUES. - # The method can also be called with multiple arguments. For example: - # - # User::User.order('email DESC').select('id').where(name: "John") - # .unscope(:order, :select, :where) == User::User.all - # - # One can additionally pass a hash as an argument to unscope specific +:where+ values. - # This is done by passing a hash with a single key-value pair. The key should be - # +:where+ and the value should be the where value to unscope. For example: - # - # User::User.where(name: "John", active: true).unscope(where: :name) - # == User::User.where(active: true) - # - # This method is similar to #except, but unlike - # #except, it persists across merges: - # - # User::User.order('email').merge(User::User.except(:order)) - # == User::User.order('email') - # - # User::User.order('email').merge(User::User.unscope(:order)) - # == User::User.all - # - # This means it can be used in association definitions: - # - # has_many :comments, -> { unscope(where: :trashed) } - # - # source://activerecord//lib/active_record/relation/query_methods.rb#524 - def unscope(*args); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#529 - def unscope!(*args); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#139 - def unscope_values; end - - # source://activerecord//lib/active_record/relation/query_methods.rb#143 - def unscope_values=(value); end - - # Returns a new relation, which is the result of filtering the current relation - # according to the conditions in the arguments. - # - # #where accepts conditions in one of several formats. In the examples below, the resulting - # SQL is given as an illustration; the actual query generated may be different depending - # on the database adapter. - # - # === 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. - # - # Client.where("orders_count = '2'") - # # SELECT * from clients where orders_count = '2'; - # - # Note that building your own string from user input may expose your application - # to injection attacks if not done properly. As an alternative, it is recommended - # to use one of the following methods. - # - # === 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. - # Active Record takes care of building the query to avoid injection attacks, and will - # convert from the ruby type to the database type where needed. Elements are inserted - # into the string in the order in which they appear. - # - # User::User.where(["name = ? and email = ?", "Joe", "joe@example.com"]) - # # SELECT * FROM users WHERE name = 'Joe' AND email = 'joe@example.com'; - # - # Alternatively, you can use named placeholders in the template, and pass a hash as the - # second element of the array. The names in the template are replaced with the corresponding - # values from the hash. - # - # User::User.where(["name = :name and email = :email", { name: "Joe", email: "joe@example.com" }]) - # # SELECT * FROM users WHERE name = 'Joe' AND email = 'joe@example.com'; - # - # This can make for more readable code in complex queries. - # - # Lastly, you can use sprintf-style % escapes in the template. This works slightly differently - # than the previous methods; you are responsible for ensuring that the values in the template - # are properly quoted. The values are passed to the connector for quoting, but the caller - # is responsible for ensuring they are enclosed in quotes in the resulting SQL. After quoting, - # the values are inserted using the same escapes as the Ruby core method +Kernel::sprintf+. - # - # User::User.where(["name = '%s' and email = '%s'", "Joe", "joe@example.com"]) - # # SELECT * FROM users WHERE name = 'Joe' AND email = 'joe@example.com'; - # - # If #where is called with multiple arguments, these are treated as if they were passed as - # the elements of a single array. - # - # User::User.where("name = :name and email = :email", { name: "Joe", email: "joe@example.com" }) - # # SELECT * FROM users WHERE name = 'Joe' AND email = 'joe@example.com'; - # - # When using strings to specify conditions, you can use any operator available from - # the database. While this provides the most flexibility, you can also unintentionally introduce - # dependencies on the underlying database. If your code is intended for general consumption, - # test with multiple database backends. - # - # === hash - # - # #where will also accept a hash condition, in which the keys are fields and the values - # are values to be searched for. - # - # Fields can be symbols or strings. Values can be single values, arrays, or ranges. - # - # User::User.where(name: "Joe", email: "joe@example.com") - # # SELECT * FROM users WHERE name = 'Joe' AND email = 'joe@example.com' - # - # User::User.where(name: ["Alice", "Bob"]) - # # SELECT * FROM users WHERE name IN ('Alice', 'Bob') - # - # User::User.where(created_at: (Time.now.midnight - 1.day)..Time.now.midnight) - # # SELECT * FROM users WHERE (created_at BETWEEN '2012-06-09 07:00:00.000000' AND '2012-06-10 07:00:00.000000') - # - # In the case of a belongs_to relationship, an association key can be used - # to specify the model if an ActiveRecord object is used as the value. - # - # author = Author.find(1) - # - # # The following queries will be equivalent: - # Post.where(author: author) - # Post.where(author_id: author) - # - # This also works with polymorphic belongs_to relationships: - # - # treasure = Treasure.create(name: 'gold coins') - # treasure.price_estimates << PriceEstimate.create(price: 125) - # - # # The following queries will be equivalent: - # PriceEstimate.where(estimate_of: treasure) - # PriceEstimate.where(estimate_of_type: 'Treasure', estimate_of_id: treasure) - # - # === Joins - # - # If the relation is the result of a join, you may create a condition which uses any of the - # tables in the join. For string and array conditions, use the table name in the condition. - # - # User::User.joins(:posts).where("posts.created_at < ?", Time.now) - # - # For hash conditions, you can either use the table name in the key, or use a sub-hash. - # - # User::User.joins(:posts).where("posts.published" => true) - # User::User.joins(:posts).where(posts: { published: true }) - # - # === 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. - # - # Chaining with WhereChain#not: - # - # User::User.where.not(name: "Jon") - # # SELECT * FROM users WHERE name != 'Jon' - # - # Chaining with WhereChain#associated: - # - # Post.where.associated(:author) - # # SELECT "posts".* FROM "posts" - # # INNER JOIN "authors" ON "authors"."id" = "posts"."author_id" - # # WHERE "authors"."id" IS NOT NULL - # - # Chaining with WhereChain#missing: - # - # Post.where.missing(:author) - # # SELECT "posts".* FROM "posts" - # # LEFT OUTER JOIN "authors" ON "authors"."id" = "posts"."author_id" - # # WHERE "authors"."id" IS NULL - # - # === 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#745 - def where(*args); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#755 - def where!(opts, *rest); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#139 - def where_clause; end - - # source://activerecord//lib/active_record/relation/query_methods.rb#143 - def where_clause=(value); end - - # Excludes the specified record (or collection of records) from the resulting - # relation. For example: - # - # Post.excluding(post) - # # SELECT "posts".* FROM "posts" WHERE "posts"."id" != 1 - # - # Post.excluding(post_one, post_two) - # # SELECT "posts".* FROM "posts" WHERE "posts"."id" NOT IN (1, 2) - # - # This can also be called on associations. As with the above example, either - # a single record of collection thereof may be specified: - # - # post = Post.find(1) - # comment = Comment.find(2) - # post.comments.excluding(comment) - # # SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 AND "comments"."id" != 2 - # - # This is short-hand for .where.not(id: post.id) and .where.not(id: [post_one.id, post_two.id]). - # - # An ArgumentError will be raised if either no records are - # specified, or if any of the records in the collection (if a collection - # is passed in) are not instances of the same model that the relation is - # scoping. - # - # source://activerecord//lib/active_record/relation/query_methods.rb#1263 - def without(*records); end - - protected - - # source://activerecord//lib/active_record/relation/query_methods.rb#1301 - def build_having_clause(opts, rest = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#1293 - def build_subquery(subquery_alias, select_value); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#1301 - def build_where_clause(opts, rest = T.unsafe(nil)); end - - private - - # source://activerecord//lib/active_record/relation/query_methods.rb#1522 - def arel_column(field); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#1505 - def arel_columns(columns); end - - # @raise [ImmutableRelation] - # - # source://activerecord//lib/active_record/relation/query_methods.rb#1353 - def assert_mutability!; end - - # source://activerecord//lib/active_record/relation/query_methods.rb#1358 - def build_arel(aliases = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#1386 - def build_cast_value(name, value); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#1390 - def build_from; end - - # source://activerecord//lib/active_record/relation/query_methods.rb#1423 - def build_join_buckets; end - - # source://activerecord//lib/active_record/relation/query_methods.rb#1342 - def build_join_dependencies; end - - # source://activerecord//lib/active_record/relation/query_methods.rb#1473 - def build_joins(join_sources, aliases = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#1584 - def build_order(arel); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#1495 - def build_select(arel); 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. - # - # Example: - # - # Post.references() # raises an error - # Post.references([]) # does not raise an error - # - # This particular method should be called with a method_name (__callee__) and the args - # passed into that method as an input. For example: - # - # def references(*args) - # check_if_method_has_arguments!(__callee__, args) - # ... - # end - # - # source://activerecord//lib/active_record/relation/query_methods.rb#1704 - def check_if_method_has_arguments!(method_name, args, message = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#1641 - def column_references(order_args); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/relation/query_methods.rb#1573 - def does_not_support_reverse?(order); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#1336 - def each_join_dependencies(join_dependencies = T.unsafe(nil), &block); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#1329 - def lookup_table_klass_from_join_dependencies(table_name); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#1654 - def order_column(field); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#1604 - def preprocess_order_args(order_args); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#1664 - def resolve_arel_attributes(attrs); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#1544 - def reverse_sql_order(order_query); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#1635 - def sanitize_order_arguments(order_args); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#1405 - def select_association_list(associations, stashed_joins = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#1720 - def structurally_incompatible_values_for(other); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/relation/query_methods.rb#1538 - def table_name_matches?(from); end - - # source://activerecord//lib/active_record/relation/query_methods.rb#1592 - def validate_order_args(args); end -end - -# source://activerecord//lib/active_record/relation/query_methods.rb#124 -ActiveRecord::QueryMethods::FROZEN_EMPTY_ARRAY = T.let(T.unsafe(nil), Array) - -# source://activerecord//lib/active_record/relation/query_methods.rb#125 -ActiveRecord::QueryMethods::FROZEN_EMPTY_HASH = T.let(T.unsafe(nil), Hash) - -# source://activerecord//lib/active_record/relation/query_methods.rb#1715 -ActiveRecord::QueryMethods::STRUCTURAL_VALUE_METHODS = T.let(T.unsafe(nil), Array) - -# source://activerecord//lib/active_record/relation/query_methods.rb#1589 -ActiveRecord::QueryMethods::VALID_DIRECTIONS = T.let(T.unsafe(nil), Set) - -# source://activerecord//lib/active_record/relation/query_methods.rb#487 -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. -# In this case, +where+ can be chained to return a new relation. -# -# source://activerecord//lib/active_record/relation/query_methods.rb#15 -class ActiveRecord::QueryMethods::WhereChain - # @return [WhereChain] a new instance of WhereChain - # - # source://activerecord//lib/active_record/relation/query_methods.rb#16 - def initialize(scope); end - - # Returns a new relation with joins and where clause to identify - # associated relations. - # - # For example, posts that are associated to a related author: - # - # Post.where.associated(:author) - # # SELECT "posts".* FROM "posts" - # # INNER JOIN "authors" ON "authors"."id" = "posts"."author_id" - # # WHERE "authors"."id" IS NOT NULL - # - # Additionally, multiple relations can be combined. This will return posts - # associated to both an author and any comments: - # - # Post.where.associated(:author, :comments) - # # SELECT "posts".* FROM "posts" - # # INNER JOIN "authors" ON "authors"."id" = "posts"."author_id" - # # 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 - def associated(*associations); end - - # Returns a new relation with left outer joins and where clause to identify - # missing relations. - # - # For example, posts that are missing a related author: - # - # Post.where.missing(:author) - # # SELECT "posts".* FROM "posts" - # # LEFT OUTER JOIN "authors" ON "authors"."id" = "posts"."author_id" - # # WHERE "authors"."id" IS NULL - # - # Additionally, multiple relations can be combined. This will return posts - # that are missing both an author and any comments: - # - # Post.where.missing(:author, :comments) - # # SELECT "posts".* FROM "posts" - # # LEFT OUTER JOIN "authors" ON "authors"."id" = "posts"."author_id" - # # 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#104 - def missing(*associations); end - - # Returns a new relation expressing WHERE + NOT condition according to - # the conditions in the arguments. - # - # #not accepts conditions as a string, array, or hash. See QueryMethods#where for - # more details on each format. - # - # User::User.where.not("name = 'Jon'") - # # SELECT * FROM users WHERE NOT (name = 'Jon') - # - # User::User.where.not(["name = ?", "Jon"]) - # # SELECT * FROM users WHERE NOT (name = 'Jon') - # - # User::User.where.not(name: "Jon") - # # SELECT * FROM users WHERE name != 'Jon' - # - # User::User.where.not(name: nil) - # # SELECT * FROM users WHERE name IS NOT NULL - # - # User::User.where.not(name: %w(Ko1 Nobu)) - # # SELECT * FROM users WHERE name NOT IN ('Ko1', 'Nobu') - # - # User::User.where.not(name: "Jon", 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. - # User::User.create!(nullable_country: nil) - # User::User.where.not(nullable_country: "UK") - # # SELECT * FROM users WHERE NOT (nullable_country = 'UK') - # # => [] - # - # source://activerecord//lib/active_record/relation/query_methods.rb#50 - def not(opts, *rest); end - - private - - # source://activerecord//lib/active_record/relation/query_methods.rb#115 - 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 - def _load_from_sql(result_set, &block); end - - # source://activerecord//lib/active_record/querying.rb#53 - 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 - def and(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def annotate(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def any?(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def average(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def calculate(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def count(*_arg0, **_arg1, &_arg2); end - - # Returns the result of an SQL statement that should only include a COUNT(*) in the SELECT part. - # The use of this method should be restricted to complicated SQL queries that can't be executed - # using the ActiveRecord::Calculations class methods. Look into those before using this method, - # as it could lock you into a specific database engine or require a code change to switch - # database engines. - # - # Product.count_by_sql "SELECT COUNT(*) FROM sales s, customers c WHERE s.customer_id = c.id" - # # => 12 - # - # ==== Parameters - # - # * +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 - def count_by_sql(sql); end - - # source://activerecord//lib/active_record/querying.rb#22 - def create_or_find_by(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def create_or_find_by!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def create_with(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def delete_all(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def delete_by(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def destroy_all(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def destroy_by(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def distinct(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def eager_load(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def except(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def excluding(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def exists?(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def extending(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def extract_associated(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def fifth(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def fifth!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def find(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def find_by(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def find_by!(*_arg0, **_arg1, &_arg2); end - - # Executes a custom SQL query against your database and returns all the results. The results will - # be returned as an array, with the requested columns encapsulated as attributes of the model you call - # this method from. For example, if you call Product.find_by_sql, then the results will be returned in - # a +Product+ object with the attributes you specified in the SQL query. - # - # If you call a complicated SQL query which spans multiple tables, the columns specified by the - # SELECT will be attributes of the model, whether or not they are columns of the corresponding - # table. - # - # The +sql+ parameter is a full SQL query as a string. It will be called as is; there will be - # no database agnostic conversions performed. This should be a last resort because using - # database-specific terms will lock you into using that particular database engine, or require you to - # change your call if you switch engines. - # - # # A simple SQL query spanning multiple tables - # Post.find_by_sql "SELECT p.title, c.author FROM posts p, comments c WHERE p.id = c.post_id" - # # => [#"Ruby Meetup", "author"=>"Quentin"}>, ...] - # - # You can use the same string replacement techniques as you can with ActiveRecord::QueryMethods#where : - # - # Post.find_by_sql ["SELECT title FROM posts WHERE author = ? AND created > ?", author_id, start_date] - # Post.find_by_sql ["SELECT body FROM comments WHERE author = :user_id OR approved_by = :user_id", { :user_id => user_id }] - # - # 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 - def find_by_sql(sql, binds = T.unsafe(nil), preparable: T.unsafe(nil), &block); end - - # source://activerecord//lib/active_record/querying.rb#22 - def find_each(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def find_in_batches(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def find_or_create_by(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def find_or_create_by!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def find_or_initialize_by(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def find_sole_by(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def first(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def first!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def first_or_create(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def first_or_create!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def first_or_initialize(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def forty_two(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def forty_two!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def fourth(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def fourth!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def from(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def group(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def having(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def ids(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def in_batches(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def in_order_of(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def includes(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def invert_where(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def joins(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def last(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def last!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def left_joins(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def left_outer_joins(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def limit(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def lock(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def many?(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def maximum(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def merge(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def minimum(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def none(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def none?(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def offset(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def one?(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def only(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def optimizer_hints(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def or(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def order(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def pick(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def pluck(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def preload(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def readonly(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def references(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def reorder(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def reselect(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def rewhere(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def second(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def second!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def second_to_last(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def second_to_last!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def select(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def sole(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def strict_loading(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def sum(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def take(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def take!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def third(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def third!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def third_to_last(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def third_to_last!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def touch_all(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def unscope(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def update_all(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def where(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/querying.rb#22 - def without(*_arg0, **_arg1, &_arg2); end -end - -# source://activerecord//lib/active_record/querying.rb#5 -ActiveRecord::Querying::QUERYING_METHODS = T.let(T.unsafe(nil), Array) - -# = Active Record Railtie -# -# source://activerecord//lib/active_record/railtie.rb#16 -class ActiveRecord::Railtie < ::Rails::Railtie; end - -# source://activerecord//lib/active_record/railtie.rb#203 -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 -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 -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 -class ActiveRecord::ReadOnlyRecord < ::ActiveRecord::ActiveRecordError; end - -# source://activerecord//lib/active_record/readonly_attributes.rb#4 -module ActiveRecord::ReadonlyAttributes - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveRecord::ReadonlyAttributes::ClassMethods - - module GeneratedClassMethods - def _attr_readonly; end - def _attr_readonly=(value); end - def _attr_readonly?; end - end - - module GeneratedInstanceMethods; end -end - -# source://activerecord//lib/active_record/readonly_attributes.rb#11 -module ActiveRecord::ReadonlyAttributes::ClassMethods - # Attributes listed as readonly will be used to create a new record but update operations will - # ignore these fields. - # - # You can assign a new value to a readonly attribute, but it will be ignored when the record is updated. - # - # ==== Examples - # - # class Post < ActiveRecord::Base - # attr_readonly :title - # end - # - # post = Post.create!(title: "Introducing Ruby on Rails!") - # post.update(title: "a different title") # change to title will be ignored - # - # source://activerecord//lib/active_record/readonly_attributes.rb#25 - def attr_readonly(*attributes); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/readonly_attributes.rb#34 - 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 - def readonly_attributes; end -end - -# = Active Record \RecordInvalid -# -# Raised by {ActiveRecord::Base#save!}[rdoc-ref:Persistence#save!] and -# {ActiveRecord::Base#create!}[rdoc-ref:Persistence::ClassMethods#create!] when the record is invalid. -# Use the #record method to retrieve the record which did not validate. -# -# begin -# complex_operation_that_internally_calls_save! -# rescue ActiveRecord::RecordInvalid => invalid -# puts invalid.record.errors -# end -# -# source://activerecord//lib/active_record/validations.rb#15 -class ActiveRecord::RecordInvalid < ::ActiveRecord::ActiveRecordError - # @return [RecordInvalid] a new instance of RecordInvalid - # - # source://activerecord//lib/active_record/validations.rb#18 - def initialize(record = T.unsafe(nil)); end - - # Returns the value of attribute record. - # - # source://activerecord//lib/active_record/validations.rb#16 - def record; end -end - -# Raised by {ActiveRecord::Base#destroy!}[rdoc-ref:Persistence#destroy!] -# when a call to {#destroy}[rdoc-ref:Persistence#destroy] -# would return false. -# -# begin -# complex_operation_that_internally_calls_destroy! -# rescue ActiveRecord::RecordNotDestroyed => invalid -# puts invalid.record.errors -# end -# -# source://activerecord//lib/active_record/errors.rb#136 -class ActiveRecord::RecordNotDestroyed < ::ActiveRecord::ActiveRecordError - # @return [RecordNotDestroyed] a new instance of RecordNotDestroyed - # - # source://activerecord//lib/active_record/errors.rb#139 - 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 - 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 -class ActiveRecord::RecordNotFound < ::ActiveRecord::ActiveRecordError - # @return [RecordNotFound] a new instance of RecordNotFound - # - # source://activerecord//lib/active_record/errors.rb#105 - 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 - def id; end - - # Returns the value of attribute model. - # - # source://activerecord//lib/active_record/errors.rb#103 - def model; end - - # Returns the value of attribute primary_key. - # - # source://activerecord//lib/active_record/errors.rb#103 - def primary_key; end -end - -# Raised by {ActiveRecord::Base#save!}[rdoc-ref:Persistence#save!] and -# {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 -class ActiveRecord::RecordNotSaved < ::ActiveRecord::ActiveRecordError - # @return [RecordNotSaved] a new instance of RecordNotSaved - # - # source://activerecord//lib/active_record/errors.rb#120 - 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 - 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 -class ActiveRecord::RecordNotUnique < ::ActiveRecord::WrappedDatabaseException; end - -# = Active Record Reflection -# -# source://activerecord//lib/active_record/reflection.rb#7 -module ActiveRecord::Reflection - extend ::ActiveSupport::Concern - extend ::ActiveStorage::Reflection::ReflectionExtension - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveRecord::Reflection::ClassMethods - - class << self - # source://activerecord//lib/active_record/reflection.rb#28 - def add_aggregate_reflection(ar, name, reflection); end - - # source://activerecord//lib/active_record/reflection.rb#22 - def add_reflection(ar, name, reflection); end - - # source://activerecord//lib/active_record/reflection.rb#17 - def create(macro, name, scope, options, ar); end - - private - - # source://activestorage/7.0.4.2/lib/active_storage/reflection.rb#37 - def reflection_class_for(macro); end - end - - module GeneratedClassMethods - def _reflections; end - def _reflections=(value); end - def _reflections?; end - def aggregate_reflections; end - def aggregate_reflections=(value); end - def aggregate_reflections?; end - def automatic_scope_inversing; end - def automatic_scope_inversing=(value); end - def automatic_scope_inversing?; end - end - - module GeneratedInstanceMethods - def _reflections; end - def _reflections?; end - def aggregate_reflections; end - def aggregate_reflections?; end - def automatic_scope_inversing; end - def automatic_scope_inversing?; end - end -end - -# Holds all the methods that are shared between MacroReflection and ThroughReflection. -# -# AbstractReflection -# MacroReflection -# AggregateReflection -# AssociationReflection -# HasManyReflection -# HasOneReflection -# BelongsToReflection -# HasAndBelongsToManyReflection -# ThroughReflection -# PolymorphicReflection -# RuntimeReflection -# -# source://activerecord//lib/active_record/reflection.rb#146 -class ActiveRecord::Reflection::AbstractReflection - # source://activerecord//lib/active_record/reflection.rb#280 - 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 - def build_association(attributes, &block); end - - # source://activerecord//lib/active_record/reflection.rb#288 - def build_scope(table, predicate_builder = T.unsafe(nil), klass = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/reflection.rb#284 - def chain; end - - # source://activerecord//lib/active_record/reflection.rb#233 - def check_validity_of_inverse!; end - - # Returns the class name for the macro. - # - # composed_of :balance, class_name: 'Money' returns 'Money' - # has_many :clients returns 'Client' - # - # source://activerecord//lib/active_record/reflection.rb#165 - def class_name; end - - # source://activerecord//lib/active_record/reflection.rb#211 - def constraints; end - - # source://activerecord//lib/active_record/reflection.rb#215 - def counter_cache_column; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/reflection.rb#276 - def counter_must_be_updated_by_has_many?; end - - # Returns whether a counter cache should be used for this association. - # - # The counter_cache option must be given on either the owner or inverse - # association, and the column must be present on the owner. - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/reflection.rb#270 - def has_cached_counter?; end - - # source://activerecord//lib/active_record/reflection.rb#227 - def inverse_of; end - - # We need to avoid the following situation: - # - # * An associated record is deleted via record.destroy - # * Hence the callbacks run, and they find a belongs_to on the record with a - # :counter_cache options which points back at our owner. So they update the - # counter cache. - # * In which case, we must make sure to *not* update the counter cache, or else - # it will be decremented twice. - # - # Hence this method. - # - # source://activerecord//lib/active_record/reflection.rb#254 - def inverse_updates_counter_cache?; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/reflection.rb#262 - def inverse_updates_counter_in_memory?; end - - # We need to avoid the following situation: - # - # * An associated record is deleted via record.destroy - # * Hence the callbacks run, and they find a belongs_to on the record with a - # :counter_cache options which points back at our owner. So they update the - # counter cache. - # * In which case, we must make sure to *not* update the counter cache, or else - # it will be decremented twice. - # - # Hence this method. - # - # source://activerecord//lib/active_record/reflection.rb#254 - def inverse_which_updates_counter_cache; end - - # source://activerecord//lib/active_record/reflection.rb#175 - def join_scope(table, foreign_table, foreign_klass); end - - # source://activerecord//lib/active_record/reflection.rb#198 - def join_scopes(table, predicate_builder, klass = T.unsafe(nil), record = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/reflection.rb#206 - 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 - def scopes; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/reflection.rb#296 - def strict_loading?; end - - # source://activerecord//lib/active_record/reflection.rb#300 - def strict_loading_violation_message(owner); end - - # source://activerecord//lib/active_record/reflection.rb#151 - def table_name; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/reflection.rb#147 - def through_reflection?; end - - protected - - # FIXME: this is a horrible name - # - # source://activerecord//lib/active_record/reflection.rb#307 - def actual_source_reflection; end - - private - - # source://activerecord//lib/active_record/reflection.rb#320 - def ensure_option_not_given_as_class!(option_name); end - - # source://activerecord//lib/active_record/reflection.rb#312 - def predicate_builder(table); end - - # source://activerecord//lib/active_record/reflection.rb#316 - 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 -class ActiveRecord::Reflection::AggregateReflection < ::ActiveRecord::Reflection::MacroReflection - # source://activerecord//lib/active_record/reflection.rb#412 - 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 -class ActiveRecord::Reflection::AssociationReflection < ::ActiveRecord::Reflection::MacroReflection - # @return [AssociationReflection] a new instance of AssociationReflection - # - # source://activerecord//lib/active_record/reflection.rb#448 - def initialize(name, scope, options, active_record); end - - # source://activerecord//lib/active_record/reflection.rb#480 - def active_record_primary_key; end - - # source://activerecord//lib/active_record/reflection.rb#595 - def add_as_polymorphic_through(reflection, seed); end - - # source://activerecord//lib/active_record/reflection.rb#591 - def add_as_source(seed); end - - # source://activerecord//lib/active_record/reflection.rb#599 - def add_as_through(seed); end - - # @raise [NotImplementedError] - # - # source://activerecord//lib/active_record/reflection.rb#585 - def association_class; end - - # source://activerecord//lib/active_record/reflection.rb#472 - def association_foreign_key; end - - # source://activerecord//lib/active_record/reflection.rb#476 - def association_primary_key(klass = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/reflection.rb#456 - 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#580 - def belongs_to?; end - - # source://activerecord//lib/active_record/reflection.rb#496 - def check_eager_loadable!; end - - # source://activerecord//lib/active_record/reflection.rb#492 - 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#528 - 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#522 - def collect_join_chain; end - - # Returns whether or not this association reflection is for a collection - # association. Returns +true+ if the +macro+ is either +has_many+ or - # +has_and_belongs_to_many+, +false+ otherwise. - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/reflection.rb#562 - def collection?; end - - # source://activerecord//lib/active_record/reflection.rb#421 - def compute_class(name); end - - # source://activerecord//lib/active_record/reflection.rb#603 - def extensions; end - - # source://activerecord//lib/active_record/reflection.rb#468 - def foreign_key; end - - # Returns the value of attribute foreign_type. - # - # source://activerecord//lib/active_record/reflection.rb#445 - def foreign_type; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/reflection.rb#540 - def has_inverse?; end - - # Returns +true+ if +self+ is a +has_one+ reflection. - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/reflection.rb#583 - def has_one?; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/reflection.rb#536 - def has_scope?; end - - # source://activerecord//lib/active_record/reflection.rb#488 - def join_foreign_key; end - - # source://activerecord//lib/active_record/reflection.rb#508 - def join_id_for(owner); end - - # source://activerecord//lib/active_record/reflection.rb#484 - def join_primary_key(klass = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/reflection.rb#464 - def join_table; end - - # Returns the macro type. - # - # has_many :clients returns :has_many - # - # @raise [NotImplementedError] - # - # source://activerecord//lib/active_record/reflection.rb#557 - def macro; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/reflection.rb#532 - def nested?; end - - # Reflection - # - # source://activerecord//lib/active_record/reflection.rb#446 - def parent_reflection; end - - # Reflection - # - # source://activerecord//lib/active_record/reflection.rb#446 - def parent_reflection=(_arg0); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/reflection.rb#587 - def polymorphic?; end - - # source://activerecord//lib/active_record/reflection.rb#544 - def polymorphic_inverse_of(associated_class); end - - # source://activerecord//lib/active_record/reflection.rb#516 - def source_reflection; end - - # source://activerecord//lib/active_record/reflection.rb#512 - def through_reflection; end - - # Returns the value of attribute type. - # - # source://activerecord//lib/active_record/reflection.rb#445 - def type; end - - # Returns whether or not the association should be validated as part of - # the parent's validation. - # - # Unless you explicitly disable validation with - # validate: false, validation will take place when: - # - # * you explicitly enable validation; validate: true - # * you use autosave; autosave: true - # * the association is a +has_many+ association - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/reflection.rb#575 - def validate?; end - - private - - # returns either +nil+ or the inverse association name that it finds. - # - # source://activerecord//lib/active_record/reflection.rb#620 - def automatic_inverse_of; end - - # Checks to see if the reflection doesn't have any options that prevent - # us from being able to guess the inverse automatically. First, the - # inverse_of option cannot be set to false. Second, we must - # have has_many, has_one, belongs_to associations. - # Third, we must not have options such as :foreign_key - # which prevent us from correctly guessing the inverse association. - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/reflection.rb#656 - def can_find_inverse_of_automatically?(reflection, inverse_reflection = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/reflection.rb#677 - def derive_class_name; end - - # source://activerecord//lib/active_record/reflection.rb#683 - def derive_foreign_key; end - - # source://activerecord//lib/active_record/reflection.rb#693 - 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#611 - def inverse_name; end - - # Scopes on the potential inverse reflection prevent automatic - # inverse_of, since the scope could exclude the owner record - # we would inverse from. Scopes on the reflection itself allow for - # automatic inverse_of as long as - # config.active_record.automatic_scope_inversing is set to - # +true+ (the default for new applications). - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/reflection.rb#669 - def scope_allows_automatic_inverse_of?(reflection, inverse_reflection); end - - # Checks if the inverse reflection that is returned from the - # +automatic_inverse_of+ method is a valid reflection. We must - # make sure that the reflection's active_record name matches up - # with the current reflection's klass name. - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/reflection.rb#642 - def valid_inverse_reflection?(reflection); end -end - -# source://activerecord//lib/active_record/reflection.rb#726 -class ActiveRecord::Reflection::BelongsToReflection < ::ActiveRecord::Reflection::AssociationReflection - # source://activerecord//lib/active_record/reflection.rb#731 - def association_class; end - - # klass option is necessary to support loading polymorphic associations - # - # source://activerecord//lib/active_record/reflection.rb#740 - def association_primary_key(klass = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/reflection.rb#729 - def belongs_to?; end - - # source://activerecord//lib/active_record/reflection.rb#752 - def join_foreign_key; end - - # source://activerecord//lib/active_record/reflection.rb#756 - def join_foreign_type; end - - # source://activerecord//lib/active_record/reflection.rb#748 - def join_primary_key(klass = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/reflection.rb#727 - def macro; end - - private - - # @return [Boolean] - # - # source://activerecord//lib/active_record/reflection.rb#761 - def can_find_inverse_of_automatically?(*_arg0); end -end - -# \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 -# and creates input fields for all of the attributes depending on their type -# and displays the associations to other objects. -# -# MacroReflection class has info for AggregateReflection and AssociationReflection -# classes. -# -# source://activerecord//lib/active_record/reflection.rb#57 -module ActiveRecord::Reflection::ClassMethods - # source://activerecord//lib/active_record/reflection.rb#119 - def _reflect_on_association(association); end - - # source://activerecord//lib/active_record/reflection.rb#128 - 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 - 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 - def reflect_on_all_aggregations; end - - # Returns an array of AssociationReflection objects for all the - # associations in the class. If you only want to reflect on a certain - # association type, pass in the symbol (:has_many, :has_one, - # :belongs_to) as the first parameter. - # - # Example: - # - # 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 - 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 - def reflect_on_all_autosave_associations; end - - # Returns the AssociationReflection object for the +association+ (use the symbol). - # - # 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 - 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 - def reflections; end -end - -# source://activerecord//lib/active_record/reflection.rb#766 -class ActiveRecord::Reflection::HasAndBelongsToManyReflection < ::ActiveRecord::Reflection::AssociationReflection - # @return [Boolean] - # - # source://activerecord//lib/active_record/reflection.rb#769 - def collection?; end - - # source://activerecord//lib/active_record/reflection.rb#767 - def macro; end -end - -# source://activerecord//lib/active_record/reflection.rb#698 -class ActiveRecord::Reflection::HasManyReflection < ::ActiveRecord::Reflection::AssociationReflection - # source://activerecord//lib/active_record/reflection.rb#703 - def association_class; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/reflection.rb#701 - def collection?; end - - # source://activerecord//lib/active_record/reflection.rb#699 - def macro; end -end - -# source://activerecord//lib/active_record/reflection.rb#712 -class ActiveRecord::Reflection::HasOneReflection < ::ActiveRecord::Reflection::AssociationReflection - # source://activerecord//lib/active_record/reflection.rb#717 - def association_class; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/reflection.rb#715 - def has_one?; end - - # source://activerecord//lib/active_record/reflection.rb#713 - 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#333 -class ActiveRecord::Reflection::MacroReflection < ::ActiveRecord::Reflection::AbstractReflection - # @return [MacroReflection] a new instance of MacroReflection - # - # source://activerecord//lib/active_record/reflection.rb#348 - 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 - def ==(other_aggregation); end - - # Returns the value of attribute active_record. - # - # source://activerecord//lib/active_record/reflection.rb#344 - def active_record; end - - # source://activerecord//lib/active_record/reflection.rb#358 - def autosave=(autosave); end - - # source://activerecord//lib/active_record/reflection.rb#385 - def compute_class(name); end - - # Returns the class for the macro. - # - # composed_of :balance, class_name: 'Money' returns the Money class - # has_many :clients returns the Client class - # - # class Company < ActiveRecord::Base - # has_many :clients - # end - # - # Company.reflect_on_association(:clients).klass - # # => Client - # - # Note: Do not call +klass.new+ or +klass.create+ to instantiate - # 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 - def klass; end - - # Returns the name of the macro. - # - # composed_of :balance, class_name: 'Money' returns :balance - # has_many :clients returns :clients - # - # source://activerecord//lib/active_record/reflection.rb#334 - def name; end - - # Returns the hash of options used for the macro. - # - # composed_of :balance, class_name: 'Money' returns { class_name: "Money" } - # has_many :clients returns {} - # - # source://activerecord//lib/active_record/reflection.rb#342 - def options; end - - # source://activerecord//lib/active_record/reflection.rb#346 - def plural_name; end - - # Returns the value of attribute scope. - # - # source://activerecord//lib/active_record/reflection.rb#336 - def scope; end - - # source://activerecord//lib/active_record/reflection.rb#399 - def scope_for(relation, owner = T.unsafe(nil)); end - - private - - # source://activerecord//lib/active_record/reflection.rb#404 - def derive_class_name; end -end - -# source://activerecord//lib/active_record/reflection.rb#1030 -class ActiveRecord::Reflection::PolymorphicReflection < ::ActiveRecord::Reflection::AbstractReflection - # @return [PolymorphicReflection] a new instance of PolymorphicReflection - # - # source://activerecord//lib/active_record/reflection.rb#1034 - def initialize(reflection, previous_reflection); end - - # source://activerecord//lib/active_record/reflection.rb#1044 - def constraints; end - - # source://activerecord//lib/active_record/reflection.rb#1031 - def join_foreign_key(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/reflection.rb#1031 - def join_primary_key(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/reflection.rb#1039 - def join_scopes(table, predicate_builder, klass = T.unsafe(nil), record = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/reflection.rb#1031 - def klass(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/reflection.rb#1031 - def name(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/reflection.rb#1031 - def plural_name(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/reflection.rb#1031 - def scope(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/reflection.rb#1031 - def scope_for(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/reflection.rb#1031 - def type(*_arg0, **_arg1, &_arg2); end - - private - - # source://activerecord//lib/active_record/reflection.rb#1049 - def source_type_scope; end -end - -# source://activerecord//lib/active_record/reflection.rb#1056 -class ActiveRecord::Reflection::RuntimeReflection < ::ActiveRecord::Reflection::AbstractReflection - # @return [RuntimeReflection] a new instance of RuntimeReflection - # - # source://activerecord//lib/active_record/reflection.rb#1059 - def initialize(reflection, association); end - - # source://activerecord//lib/active_record/reflection.rb#1068 - def aliased_table; end - - # source://activerecord//lib/active_record/reflection.rb#1076 - def all_includes; end - - # source://activerecord//lib/active_record/reflection.rb#1057 - def constraints(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/reflection.rb#1057 - def join_foreign_key(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/reflection.rb#1072 - def join_primary_key(klass = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/reflection.rb#1064 - def klass; end - - # source://activerecord//lib/active_record/reflection.rb#1057 - def scope(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/reflection.rb#1057 - 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#776 -class ActiveRecord::Reflection::ThroughReflection < ::ActiveRecord::Reflection::AbstractReflection - # @return [ThroughReflection] a new instance of ThroughReflection - # - # source://activerecord//lib/active_record/reflection.rb#780 - def initialize(delegate_reflection); end - - # source://activerecord//lib/active_record/reflection.rb#1027 - def active_record(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/reflection.rb#777 - def active_record_primary_key(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/reflection.rb#992 - def add_as_polymorphic_through(reflection, seed); end - - # source://activerecord//lib/active_record/reflection.rb#988 - def add_as_source(seed); end - - # source://activerecord//lib/active_record/reflection.rb#996 - def add_as_through(seed); end - - # source://activerecord//lib/active_record/reflection.rb#1027 - def association_class(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/reflection.rb#777 - 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#884 - def association_primary_key(klass = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/reflection.rb#1027 - def association_scope_cache(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/reflection.rb#1027 - def autosave=(arg); end - - # source://activerecord//lib/active_record/reflection.rb#1027 - def belongs_to?(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/reflection.rb#1027 - def check_eager_loadable!(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/reflection.rb#942 - 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#856 - def clear_association_scope_cache; end - - # Returns an array of reflections which are involved in this association. Each item in the - # array corresponds to a table which will be part of the query for this association. - # - # The chain is built by recursively calling #chain on the source reflection and the through - # reflection. The base case for the recursion is a normal association, which just returns - # [self] as its #chain. - # - # class Post < ActiveRecord::Base - # has_many :taggings - # has_many :tags, through: :taggings - # end - # - # tags_reflection = Post.reflect_on_association(:tags) - # tags_reflection.chain - # # => [, - # ] - # - # source://activerecord//lib/active_record/reflection.rb#850 - def collect_join_chain; end - - # source://activerecord//lib/active_record/reflection.rb#1027 - def collection?(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/reflection.rb#1027 - def compute_class(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/reflection.rb#982 - def constraints; end - - # source://activerecord//lib/active_record/reflection.rb#1027 - def extensions(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/reflection.rb#777 - def foreign_key(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/reflection.rb#777 - def foreign_type(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/reflection.rb#1027 - def has_inverse?(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/reflection.rb#1027 - def has_one?(*_arg0, **_arg1, &_arg2); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/reflection.rb#870 - def has_scope?; end - - # source://activerecord//lib/active_record/reflection.rb#777 - def join_foreign_key(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/reflection.rb#777 - def join_id_for(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/reflection.rb#894 - def join_primary_key(klass = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/reflection.rb#866 - def join_scopes(table, predicate_builder, klass = T.unsafe(nil), record = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/reflection.rb#1027 - def join_table(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/reflection.rb#792 - def klass; end - - # source://activerecord//lib/active_record/reflection.rb#1027 - def macro(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/reflection.rb#1027 - 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#877 - def nested?; end - - # source://activerecord//lib/active_record/reflection.rb#1027 - def options(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/reflection.rb#1027 - def parent_reflection(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/reflection.rb#1027 - def parent_reflection=(arg); end - - # source://activerecord//lib/active_record/reflection.rb#1027 - def plural_name(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/reflection.rb#1027 - def polymorphic?(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/reflection.rb#1027 - def polymorphic_inverse_of(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/reflection.rb#1027 - def scope(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/reflection.rb#1027 - def scope_for(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/reflection.rb#862 - def scopes; end - - # source://activerecord//lib/active_record/reflection.rb#934 - def source_options; end - - # Returns the source of the through reflection. It checks both a singularized - # and pluralized form for :belongs_to or :has_many. - # - # class Post < ActiveRecord::Base - # has_many :taggings - # has_many :tags, through: :taggings - # end - # - # class Tagging < ActiveRecord::Base - # belongs_to :post - # belongs_to :tag - # end - # - # tags_reflection = Post.reflect_on_association(:tags) - # tags_reflection.source_reflection - # # => - # - # source://activerecord//lib/active_record/reflection.rb#813 - def source_reflection; end - - # source://activerecord//lib/active_record/reflection.rb#913 - def source_reflection_name; end - - # Gets an array of possible :through source reflection names in both singular and plural form. - # - # class Post < ActiveRecord::Base - # has_many :taggings - # has_many :tags, through: :taggings - # end - # - # tags_reflection = Post.reflect_on_association(:tags) - # tags_reflection.source_reflection_names - # # => [:tag, :tags] - # - # source://activerecord//lib/active_record/reflection.rb#909 - def source_reflection_names; end - - # source://activerecord//lib/active_record/reflection.rb#938 - def through_options; end - - # Returns the AssociationReflection object specified in the :through option - # of a HasManyThrough or HasOneThrough association. - # - # class Post < ActiveRecord::Base - # has_many :taggings - # has_many :tags, through: :taggings - # end - # - # tags_reflection = Post.reflect_on_association(:tags) - # tags_reflection.through_reflection - # # => - # - # source://activerecord//lib/active_record/reflection.rb#829 - def through_reflection; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/reflection.rb#788 - def through_reflection?; end - - # source://activerecord//lib/active_record/reflection.rb#777 - def type(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/reflection.rb#1027 - def validate?(*_arg0, **_arg1, &_arg2); end - - protected - - # FIXME: this is a horrible name - # - # source://activerecord//lib/active_record/reflection.rb#1001 - def actual_source_reflection; end - - private - - # source://activerecord//lib/active_record/reflection.rb#1008 - def collect_join_reflections(seed); end - - # Returns the value of attribute delegate_reflection. - # - # source://activerecord//lib/active_record/reflection.rb#1006 - def delegate_reflection; end - - # source://activerecord//lib/active_record/reflection.rb#1019 - def derive_class_name; end - - # source://activerecord//lib/active_record/reflection.rb#1017 - def inverse_name; end -end - -# = Active Record \Relation -# -# source://activerecord//lib/active_record/relation.rb#5 -class ActiveRecord::Relation - include ::Enumerable - include ::ActiveRecord::Delegation - include ::ActiveRecord::Explain - include ::ActiveRecord::Batches - include ::ActiveModel::ForbiddenAttributesProtection - include ::ActiveRecord::QueryMethods - include ::ActiveRecord::SpawnMethods - include ::ActiveRecord::Calculations - include ::ActiveRecord::FinderMethods - extend ::ActiveRecord::Delegation::ClassMethods - - # @return [Relation] a new instance of Relation - # - # source://activerecord//lib/active_record/relation.rb#27 - 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 - def ==(other); end - - # source://activerecord//lib/active_record/relation.rb#432 - def _exec_scope(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/relation.rb#811 - 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 - - # @yield [attr, bind] - # - # source://activerecord//lib/active_record/relation.rb#43 - def bind_attribute(name, value); end - - # Returns true if relation is blank. - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/relation.rb#782 - def blank?; end - - # Initializes new record from relation while maintaining the current - # scope. - # - # Expects arguments in the same format as {ActiveRecord::Base.new}[rdoc-ref:Core.new]. - # - # users = User::User.where(name: 'DHH') - # user = users.new # => # - # - # You can also pass a block to new with the new record as argument: - # - # user = users.new { |user| user.name = 'Oscar' } - # user.name # => Oscar - # - # source://activerecord//lib/active_record/relation.rb#66 - def build(attributes = T.unsafe(nil), &block); end - - # Returns a stable cache key that can be used to identify this query. - # The cache key is built with a fingerprint of the SQL query. - # - # Product.where("name like ?", "%Cosmic Encounter%").cache_key - # # => "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. - # - # ActiveRecord::Base.collection_cache_versioning = false - # Product.where("name like ?", "%Cosmic Encounter%").cache_key - # # => "products/query-1850ab3d302391b85b8693e941286659-1-20150714212553907087000" - # - # You can also pass a custom timestamp column to fetch the timestamp of the - # last updated record. - # - # Product.where("name like ?", "%Game%").cache_key(:last_reviewed_at) - # - # source://activerecord//lib/active_record/relation.rb#320 - 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 - def cache_key_with_version; end - - # Returns a cache version that can be used together with the cache key to form - # a recyclable caching scheme. The cache version is built with the number of records - # matching the query, and the timestamp of the last updated record. When a new record - # comes to match the query, or any of the existing records is updated or deleted, - # the cache version changes. - # - # If the collection is loaded, the method will iterate through the records - # to generate the timestamp, otherwise it will trigger one SQL query like: - # - # SELECT COUNT(*), MAX("products"."updated_at") FROM "products" WHERE (name like '%Cosmic Encounter%') - # - # source://activerecord//lib/active_record/relation.rb#347 - def cache_version(timestamp_column = T.unsafe(nil)); end - - # Tries to create a new record with the same scoped attributes - # defined in the relation. Returns the initialized object if validation fails. - # - # Expects arguments in the same format as - # {ActiveRecord::Base.create}[rdoc-ref:Persistence::ClassMethods#create]. - # - # ==== Examples - # - # users = User::User.where(name: 'Oscar') - # users.create # => # - # - # users.create(name: 'fxn') - # users.create # => # - # - # users.create { |user| user.name = 'tenderlove' } - # # => # - # - # users.create(name: nil) # validation on name - # # => # - # - # source://activerecord//lib/active_record/relation.rb#95 - def create(attributes = T.unsafe(nil), &block); end - - # Similar to #create, but calls - # {create!}[rdoc-ref:Persistence::ClassMethods#create!] - # on the base class. Raises an exception if a validation error occurs. - # - # Expects arguments in the same format as - # {ActiveRecord::Base.create!}[rdoc-ref:Persistence::ClassMethods#create!]. - # - # source://activerecord//lib/active_record/relation.rb#110 - 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 - # on one or several of its columns. If a row already exists with one or several of these - # 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. - # - # 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, - # 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 - # if a DELETE between those two statements is run by another client. But for most applications, - # that's a significantly less likely condition to hit. - # * 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 - # to this problem). - # - # This method will return a record if all given attributes are covered by unique constraints - # (unless the INSERT -> DELETE -> SELECT race condition is triggered), but if creation was attempted - # 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 - 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 - def create_or_find_by!(attributes, &block); end - - # Deletes the records without instantiating the records - # first, and hence not calling the {#destroy}[rdoc-ref:Persistence#destroy] - # method nor invoking callbacks. - # This is a single SQL DELETE statement that goes straight to the database, much more - # efficient than #destroy_all. Be careful with relations though, in particular - # :dependent rules defined on associations are not honored. Returns the - # number of rows affected. - # - # Post.where(person_id: 5).where(category: ['Something', 'Else']).delete_all - # - # Both calls delete the affected posts all at once with a single DELETE statement. - # If you need to destroy dependent associations or call your before_* or - # +after_destroy+ callbacks, use the #destroy_all method instead. - # - # If an invalid method is supplied, #delete_all raises an ActiveRecordError: - # - # Post.distinct.delete_all - # # => ActiveRecord::ActiveRecordError: delete_all doesn't support distinct - # - # source://activerecord//lib/active_record/relation.rb#601 - def delete_all; end - - # Finds and deletes all records matching the specified conditions. - # This is short-hand for relation.where(condition).delete_all. - # Returns the number of rows affected. - # - # If no record is found, returns 0 as zero rows were affected. - # - # Person.delete_by(id: 13) - # Person.delete_by(name: 'Spartacus', rating: 4) - # Person.delete_by("published_at < ?", 2.weeks.ago) - # - # source://activerecord//lib/active_record/relation.rb#642 - def delete_by(*args); end - - # Destroys the records by instantiating each - # record and calling its {#destroy}[rdoc-ref:Persistence#destroy] method. - # Each object's callbacks are executed (including :dependent association options). - # Returns the collection of objects that were destroyed; each will be frozen, to - # reflect that no changes should be made (since they can't be persisted). - # - # Note: Instantiation, callback execution, and deletion of each - # record can be time consuming when you're removing many records at - # once. It generates at least one SQL +DELETE+ query per record (or - # possibly more, to enforce your callbacks). If you want to delete many - # rows quickly, without concern for their associations or callbacks, use - # #delete_all instead. - # - # ==== Examples - # - # Person.where(age: 0..18).destroy_all - # - # source://activerecord//lib/active_record/relation.rb#579 - def destroy_all; end - - # Finds and destroys all records matching the specified conditions. - # This is short-hand for relation.where(condition).destroy_all. - # Returns the collection of objects that were destroyed. - # - # If no record is found, returns empty array. - # - # Person.destroy_by(id: 13) - # Person.destroy_by(name: 'Spartacus', rating: 4) - # Person.destroy_by("published_at < ?", 2.weeks.ago) - # - # source://activerecord//lib/active_record/relation.rb#629 - def destroy_by(*args); end - - # Returns true if relation needs eager loading. - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/relation.rb#751 - def eager_loading?; end - - # Returns true if there are no records. - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/relation.rb#269 - def empty?; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/relation.rb#803 - def empty_scope?; end - - # Serializes the relation objects Array. - # - # source://activerecord//lib/active_record/relation.rb#255 - def encode_with(coder); end - - # Runs EXPLAIN on the query or queries triggered by this relation and - # returns the result as a string. The string is formatted imitating the - # ones printed by the database shell. - # - # Note that this method actually runs the queries, since the results of some - # are needed by the next ones when eager loading is going on. - # - # Please see further details in the - # {Active Record Query Interface guide}[https://guides.rubyonrails.org/active_record_querying.html#running-explain]. - # - # source://activerecord//lib/active_record/relation.rb#239 - def explain; end - - # Finds the first record with the given attributes, or creates a record - # with the attributes if one is not found: - # - # # Find the first user named "Penélope" or create a new one. - # User::User.find_or_create_by(first_name: 'Penélope') - # # => # - # - # # Find the first user named "Penélope" or create a new one. - # # We already have one so the existing record will be returned. - # User::User.find_or_create_by(first_name: 'Penélope') - # # => # - # - # # Find the first user named "Scarlett" or create a new one with - # # a particular last name. - # User::User.create_with(last_name: 'Johansson').find_or_create_by(first_name: 'Scarlett') - # # => # - # - # This method accepts a block, which is passed down to #create. The last example - # above can be alternatively written this way: - # - # # Find the first user named "Scarlett" or create a new one with a - # # particular last name. - # User::User.find_or_create_by(first_name: 'Scarlett') do |user| - # user.last_name = 'Johansson' - # end - # # => # - # - # This method always returns a record, but if creation was attempted and - # 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 this might be a problem for your application, please see #create_or_find_by. - # - # source://activerecord//lib/active_record/relation.rb#168 - 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 - 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 - def find_or_initialize_by(attributes, &block); end - - # source://activerecord//lib/active_record/relation.rb#119 - def first_or_create(attributes = T.unsafe(nil), &block); end - - # source://activerecord//lib/active_record/relation.rb#123 - def first_or_create!(attributes = T.unsafe(nil), &block); end - - # source://activerecord//lib/active_record/relation.rb#127 - def first_or_initialize(attributes = T.unsafe(nil), &block); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/relation.rb#807 - def has_limit_or_offset?; end - - # source://activerecord//lib/active_record/relation.rb#794 - def inspect; end - - # Joins that are also marked for preloading. In which case we should just eager load them. - # Note that this is a naive implementation because we could have strings and symbols which - # 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 - def joined_includes_values; end - - # Returns the value of attribute klass. - # - # source://activerecord//lib/active_record/relation.rb#21 - def klass; end - - # Causes the records to be loaded from the database if they have not - # been loaded already. You can use this if for some reason you need - # to explicitly load some records before actually using them. The - # return value is the relation itself, not the records. - # - # Post.where(published: true).load # => # - # - # source://activerecord//lib/active_record/relation.rb#693 - def load(&block); end - - # Schedule the query to be performed from a background thread pool. - # - # Post.where(published: true).load_async # => # - # - # When the +Relation+ is iterated, if the background query wasn't executed yet, - # it will be performed by the foreground thread. - # - # Note that {config.active_record.async_query_executor}[https://guides.rubyonrails.org/configuring.html#config-active-record-async-query-executor] must be configured - # for queries to actually be executed concurrently. Otherwise it defaults to - # executing them in the foreground. - # - # +load_async+ will also fall back to executing in the foreground in the test environment when transactional - # fixtures are enabled. - # - # If the query was actually executed in the background, the Active Record logs will show - # it by prefixing the log line with ASYNC: - # - # ASYNC Post Load (0.0ms) (db time 2ms) SELECT "posts".* FROM "posts" LIMIT 100 - # - # source://activerecord//lib/active_record/relation.rb#664 - def load_async; end - - # Returns the value of attribute loaded. - # - # source://activerecord//lib/active_record/relation.rb#21 - def loaded; end - - # Returns the value of attribute loaded. - # - # source://activerecord//lib/active_record/relation.rb#21 - def loaded?; end - - # source://activerecord//lib/active_record/relation/query_methods.rb#139 - def locked?; end - - # Returns true if there is more than one record. - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/relation.rb#297 - def many?; end - - # Returns the value of attribute klass. - # - # source://activerecord//lib/active_record/relation.rb#21 - def model; end - - # Initializes new record from relation while maintaining the current - # scope. - # - # Expects arguments in the same format as {ActiveRecord::Base.new}[rdoc-ref:Core.new]. - # - # users = User::User.where(name: 'DHH') - # user = users.new # => # - # - # You can also pass a block to new with the new record as argument: - # - # user = users.new { |user| user.name = 'Oscar' } - # user.name # => Oscar - # - # source://activerecord//lib/active_record/relation.rb#66 - 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 - - # Returns true if there is exactly one record. - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/relation.rb#290 - def one?; end - - # Returns the value of attribute predicate_builder. - # - # source://activerecord//lib/active_record/relation.rb#21 - def predicate_builder; end - - # source://activerecord//lib/active_record/relation.rb#825 - 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#249 - def records; end - - # Forces reloading of relation. - # - # source://activerecord//lib/active_record/relation.rb#703 - def reload; end - - # source://activerecord//lib/active_record/relation.rb#708 - def reset; end - - # Returns true if the relation was scheduled on the background - # thread pool. - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/relation.rb#683 - def scheduled?; end - - # source://activerecord//lib/active_record/relation.rb#744 - def scope_for_create; end - - # Scope all queries to the current scope. - # - # 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 - # - # If all_queries: true is passed, scoping will apply to all queries - # for the relation including +update+ and +delete+ on instances. - # Once +all_queries+ is set to true it cannot be set to false in a - # nested block. - # - # 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 - def scoping(all_queries: T.unsafe(nil), &block); end - - # Returns size of the records. - # - # source://activerecord//lib/active_record/relation.rb#260 - def size; end - - # Returns the value of attribute skip_preloading_value. - # - # source://activerecord//lib/active_record/relation.rb#22 - 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 - def skip_preloading_value=(_arg0); end - - # Returns the value of attribute table. - # - # source://activerecord//lib/active_record/relation.rb#21 - def table; end - - # Converts relation objects to Array. - # - # source://activerecord//lib/active_record/relation.rb#244 - def to_a; end - - # Converts relation objects to Array. - # - # source://activerecord//lib/active_record/relation.rb#244 - def to_ary; end - - # Returns sql statement for the relation. - # - # User::User.where(name: 'Oscar').to_sql - # # => SELECT "users".* FROM "users" WHERE "users"."name" = 'Oscar' - # - # source://activerecord//lib/active_record/relation.rb#724 - 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. - # It does not instantiate the involved models, and it does not trigger Active Record callbacks or validations. - # This method can be passed attribute names and an optional time argument. - # If attribute names are passed, they are updated along with +updated_at+/+updated_on+ attributes. - # If no time argument is passed, the current time is used as default. - # - # === Examples - # - # # Touch all records - # Person.all.touch_all - # # => "UPDATE \"people\" SET \"updated_at\" = '2018-01-04 22:55:23.132670'" - # - # # Touch multiple records with a custom attribute - # Person.all.touch_all(:created_at) - # # => "UPDATE \"people\" SET \"updated_at\" = '2018-01-04 22:55:23.132670', \"created_at\" = '2018-01-04 22:55:23.132670'" - # - # # Touch multiple records with a specified time - # Person.all.touch_all(time: Time.new(2020, 5, 16, 0, 0, 0)) - # # => "UPDATE \"people\" SET \"updated_at\" = '2020-05-16 00:00:00'" - # - # # Touch records with scope - # 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 - def touch_all(*names, time: T.unsafe(nil)); end - - # source://activerecord//lib/active_record/relation.rb#488 - def update(id = T.unsafe(nil), attributes); end - - # source://activerecord//lib/active_record/relation.rb#496 - 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 - # statement and sends it straight to the database. It does not instantiate the involved models and it does not - # trigger Active Record callbacks or validations. However, values passed to #update_all will still go through - # Active Record's normal type casting and serialization. Returns the number of rows affected. - # - # Note: As Active Record callbacks are not triggered, this method will not automatically update +updated_at+/+updated_on+ columns. - # - # ==== Parameters - # - # * +updates+ - A string, array, or hash representing the SET part of an SQL statement. - # - # ==== Examples - # - # # Update all customers with the given attributes - # Customer.update_all wants_email: true - # - # # Update all books with 'Rails' in their title - # Book.where('title LIKE ?', '%Rails%').update_all(author: 'David') - # - # # Update all books that match conditions, but limit it to 5 ordered by date - # Book.where('title LIKE ?', '%Rails%').order(:created_at).limit(5).update_all(author: 'David') - # - # # Update all invoices and set the number column to its id value. - # Invoice.update_all('number = id') - # - # @raise [ArgumentError] - # - # source://activerecord//lib/active_record/relation.rb#464 - def update_all(updates); end - - # Updates the counters of the records in the current relation. - # - # ==== Parameters - # - # * +counter+ - A Hash containing the names of the fields to update as keys and the amount to update as values. - # * :touch option - Touch the timestamp columns when updating. - # * If attributes names are passed, they are updated along with update_at/on attributes. - # - # ==== Examples - # - # # 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 - def update_counters(counters); end - - # source://activerecord//lib/active_record/relation.rb#786 - def values; end - - # source://activerecord//lib/active_record/relation.rb#790 - def values_for_queries; end - - # Returns a hash of where conditions. - # - # User::User.where(name: 'Oscar').where_values_hash - # # => {name: "Oscar"} - # - # source://activerecord//lib/active_record/relation.rb#740 - def where_values_hash(relation_table_name = T.unsafe(nil)); end - - protected - - # source://activerecord//lib/active_record/relation.rb#835 - 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 - def _create(attributes, &block); end - - # source://activerecord//lib/active_record/relation.rb#869 - def _create!(attributes, &block); end - - # source://activerecord//lib/active_record/relation.rb#900 - def _increment_attribute(attribute, value = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/relation.rb#861 - def _new(attributes, &block); end - - # source://activerecord//lib/active_record/relation.rb#873 - def _scoping(scope, registry, all_queries = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/relation.rb#889 - def _substitute_values(values); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/relation.rb#845 - def already_in_scope?(registry); end - - # source://activerecord//lib/active_record/relation.rb#325 - def compute_cache_key(timestamp_column = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/relation.rb#354 - def compute_cache_version(timestamp_column); end - - # source://activerecord//lib/active_record/relation.rb#853 - def current_scope_restoring_block(&block); end - - # source://activerecord//lib/active_record/relation.rb#927 - def exec_main_query(async: T.unsafe(nil)); end - - # source://activerecord//lib/active_record/relation.rb#907 - def exec_queries(&block); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/relation.rb#849 - def global_scope?(registry); end - - # source://activerecord//lib/active_record/relation.rb#38 - def initialize_copy(other); end - - # source://activerecord//lib/active_record/relation.rb#947 - def instantiate_records(rows, &block); end - - # source://activerecord//lib/active_record/relation.rb#990 - def limited_count; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/relation.rb#966 - def references_eager_loaded_tables?; end - - # source://activerecord//lib/active_record/relation.rb#958 - def skip_query_cache_if_necessary(&block); end - - # source://activerecord//lib/active_record/relation.rb#983 - def tables_in_string(string); end -end - -# source://activerecord//lib/active_record/relation.rb#13 -ActiveRecord::Relation::CLAUSE_METHODS = T.let(T.unsafe(nil), Array) - -# source://activerecord//lib/active_record/relation/from_clause.rb#5 -class ActiveRecord::Relation::FromClause - # @return [FromClause] a new instance of FromClause - # - # source://activerecord//lib/active_record/relation/from_clause.rb#8 - def initialize(value, name); end - - # source://activerecord//lib/active_record/relation/from_clause.rb#21 - def ==(other); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/relation/from_clause.rb#17 - def empty?; end - - # source://activerecord//lib/active_record/relation/from_clause.rb#13 - def merge(other); end - - # Returns the value of attribute name. - # - # source://activerecord//lib/active_record/relation/from_clause.rb#6 - def name; end - - # Returns the value of attribute value. - # - # source://activerecord//lib/active_record/relation/from_clause.rb#6 - def value; end - - class << self - # source://activerecord//lib/active_record/relation/from_clause.rb#25 - def empty; end - end -end - -# source://activerecord//lib/active_record/relation/merger.rb#7 -class ActiveRecord::Relation::HashMerger - # @return [HashMerger] a new instance of HashMerger - # - # source://activerecord//lib/active_record/relation/merger.rb#10 - def initialize(relation, hash, rewhere = T.unsafe(nil)); end - - # Returns the value of attribute hash. - # - # source://activerecord//lib/active_record/relation/merger.rb#8 - def hash; end - - # source://activerecord//lib/active_record/relation/merger.rb#18 - def merge; end - - # Applying values to a relation has some side effects. E.g. - # interpolation might take place for where values. So we should - # build a relation to merge in rather than directly merging - # the values. - # - # source://activerecord//lib/active_record/relation/merger.rb#26 - def other; end - - # Returns the value of attribute relation. - # - # source://activerecord//lib/active_record/relation/merger.rb#8 - def relation; end -end - -# source://activerecord//lib/active_record/relation.rb#14 -ActiveRecord::Relation::INVALID_METHODS_FOR_DELETE_ALL = T.let(T.unsafe(nil), Array) - -# source://activerecord//lib/active_record/relation.rb#6 -ActiveRecord::Relation::MULTI_VALUE_METHODS = T.let(T.unsafe(nil), Array) - -# source://activerecord//lib/active_record/relation/merger.rb#44 -class ActiveRecord::Relation::Merger - # @return [Merger] a new instance of Merger - # - # source://activerecord//lib/active_record/relation/merger.rb#47 - def initialize(relation, other, rewhere = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/relation/merger.rb#60 - def merge; end - - # Returns the value of attribute other. - # - # source://activerecord//lib/active_record/relation/merger.rb#45 - def other; end - - # Returns the value of attribute relation. - # - # source://activerecord//lib/active_record/relation/merger.rb#45 - def relation; end - - # Returns the value of attribute values. - # - # source://activerecord//lib/active_record/relation/merger.rb#45 - def values; end - - private - - # source://activerecord//lib/active_record/relation/merger.rb#176 - def merge_clauses; end - - # source://activerecord//lib/active_record/relation/merger.rb#117 - def merge_joins; end - - # source://activerecord//lib/active_record/relation/merger.rb#155 - def merge_multi_values; end - - # source://activerecord//lib/active_record/relation/merger.rb#136 - def merge_outer_joins; end - - # source://activerecord//lib/active_record/relation/merger.rb#96 - def merge_preloads; end - - # source://activerecord//lib/active_record/relation/merger.rb#84 - def merge_select_values; end - - # source://activerecord//lib/active_record/relation/merger.rb#168 - def merge_single_values; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/relation/merger.rb#186 - def replace_from_clause?; end -end - -# source://activerecord//lib/active_record/relation/merger.rb#54 -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 [Boolean] - # - # source://activerecord//lib/active_record/relation/query_attribute.rb#27 - def infinite?; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/relation/query_attribute.rb#20 - def nil?; end - - # source://activerecord//lib/active_record/relation/query_attribute.rb#8 - def type_cast(value); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/relation/query_attribute.rb#31 - def unboundable?; end - - # source://activerecord//lib/active_record/relation/query_attribute.rb#12 - def value_for_database; end - - # source://activerecord//lib/active_record/relation/query_attribute.rb#16 - def with_cast_value(value); end - - private - - # @return [Boolean] - # - # source://activerecord//lib/active_record/relation/query_attribute.rb#39 - def infinity?(value); end -end - -# source://activerecord//lib/active_record/relation.rb#10 -ActiveRecord::Relation::SINGLE_VALUE_METHODS = T.let(T.unsafe(nil), Array) - -# source://activerecord//lib/active_record/relation.rb#815 -class ActiveRecord::Relation::StrictLoadingScope - class << self - # @return [Boolean] - # - # source://activerecord//lib/active_record/relation.rb#816 - def empty_scope?; end - - # source://activerecord//lib/active_record/relation.rb#820 - def strict_loading_value; end - end -end - -# source://activerecord//lib/active_record/relation.rb#16 -ActiveRecord::Relation::VALUE_METHODS = T.let(T.unsafe(nil), Array) - -# source://activerecord//lib/active_record/relation/where_clause.rb#7 -class ActiveRecord::Relation::WhereClause - # @return [WhereClause] a new instance of WhereClause - # - # source://activerecord//lib/active_record/relation/where_clause.rb#10 - def initialize(predicates); end - - # source://activerecord//lib/active_record/relation/where_clause.rb#14 - def +(other); end - - # source://activerecord//lib/active_record/relation/where_clause.rb#18 - def -(other); end - - # source://activerecord//lib/active_record/relation/where_clause.rb#75 - def ==(other); end - - # source://activerecord//lib/active_record/relation/where_clause.rb#8 - def any?(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/relation/where_clause.rb#70 - def ast; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/relation/where_clause.rb#99 - def contradiction?; end - - # source://activerecord//lib/active_record/relation/where_clause.rb#8 - def empty?(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/relation/where_clause.rb#75 - def eql?(other); end - - # source://activerecord//lib/active_record/relation/where_clause.rb#36 - def except(*columns); end - - # source://activerecord//lib/active_record/relation/where_clause.rb#110 - def extract_attributes; end - - # source://activerecord//lib/active_record/relation/where_clause.rb#81 - def hash; end - - # source://activerecord//lib/active_record/relation/where_clause.rb#85 - def invert; end - - # source://activerecord//lib/active_record/relation/where_clause.rb#26 - def merge(other, rewhere = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/relation/where_clause.rb#40 - def or(other); end - - # source://activerecord//lib/active_record/relation/where_clause.rb#61 - def to_h(table_name = T.unsafe(nil), equality_only: T.unsafe(nil)); end - - # source://activerecord//lib/active_record/relation/where_clause.rb#22 - def |(other); end - - protected - - # Returns the value of attribute predicates. - # - # source://activerecord//lib/active_record/relation/where_clause.rb#117 - def predicates; end - - # source://activerecord//lib/active_record/relation/where_clause.rb#119 - def referenced_columns; end - - private - - # source://activerecord//lib/active_record/relation/where_clause.rb#126 - def each_attributes; end - - # source://activerecord//lib/active_record/relation/where_clause.rb#145 - def equalities(predicates, equality_only); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/relation/where_clause.rb#171 - def equality_node?(node); end - - # source://activerecord//lib/active_record/relation/where_clause.rb#186 - def except_predicates(columns); end - - # source://activerecord//lib/active_record/relation/where_clause.rb#136 - def extract_attribute(node); end - - # source://activerecord//lib/active_record/relation/where_clause.rb#221 - def extract_node_value(node); end - - # source://activerecord//lib/active_record/relation/where_clause.rb#175 - def invert_predicate(node); end - - # source://activerecord//lib/active_record/relation/where_clause.rb#210 - def non_empty_predicates; end - - # source://activerecord//lib/active_record/relation/where_clause.rb#159 - def predicates_unreferenced_by(other); end - - # source://activerecord//lib/active_record/relation/where_clause.rb#199 - def predicates_with_wrapped_sql_literals; end - - # source://activerecord//lib/active_record/relation/where_clause.rb#214 - def wrap_sql_literal(node); end - - class << self - # source://activerecord//lib/active_record/relation/where_clause.rb#95 - def empty; end - end -end - -# source://activerecord//lib/active_record/relation/where_clause.rb#209 -ActiveRecord::Relation::WhereClause::ARRAY_WITH_EMPTY_STRING = T.let(T.unsafe(nil), Array) - -# This class encapsulates a result returned from calling -# {#exec_query}[rdoc-ref:ConnectionAdapters::DatabaseStatements#exec_query] -# on any database connection adapter. For example: -# -# result = ActiveRecord::Base.connection.exec_query('SELECT id, title, body FROM posts') -# result # => # -# -# # Get the column names of the result: -# result.columns -# # => ["id", "title", "body"] -# -# # Get the record values of the result: -# result.rows -# # => [[1, "title_1", "body_1"], -# [2, "title_2", "body_2"], -# ... -# ] -# -# # Get an array of hashes representing the result (column => value): -# result.to_a -# # => [{"id" => 1, "title" => "title_1", "body" => "body_1"}, -# {"id" => 2, "title" => "title_2", "body" => "body_2"}, -# ... -# ] -# -# # ActiveRecord::Result also includes Enumerable. -# result.each do |row| -# puts row['title'] + " " + row['body'] -# end -# -# source://activerecord//lib/active_record/result.rb#34 -class ActiveRecord::Result - include ::Enumerable - - # @return [Result] a new instance of Result - # - # source://activerecord//lib/active_record/result.rb#43 - def initialize(columns, rows, column_types = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/result.rb#87 - def [](idx); end - - # source://activerecord//lib/active_record/result.rb#100 - def cancel; end - - # source://activerecord//lib/active_record/result.rb#104 - def cast_values(type_overrides = T.unsafe(nil)); end - - # Returns the value of attribute column_types. - # - # source://activerecord//lib/active_record/result.rb#37 - def column_types; end - - # Returns the value of attribute columns. - # - # source://activerecord//lib/active_record/result.rb#37 - def columns; end - - # Calls the given block once for each element in row collection, passing - # row as parameter. - # - # Returns an +Enumerator+ if no block is given. - # - # source://activerecord//lib/active_record/result.rb#67 - def each(&block); end - - # Returns true if there are no records, otherwise false. - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/result.rb#76 - def empty?; end - - # Returns true if this result set includes the column named +name+ - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/result.rb#54 - def includes_column?(name); end - - # Returns the last record from the rows collection. - # - # source://activerecord//lib/active_record/result.rb#92 - def last(n = T.unsafe(nil)); end - - # Returns the number of elements in the rows array. - # - # source://activerecord//lib/active_record/result.rb#59 - def length; end - - # source://activerecord//lib/active_record/result.rb#96 - def result; end - - # Returns the value of attribute rows. - # - # source://activerecord//lib/active_record/result.rb#37 - def rows; end - - # Returns an array of hashes representing each row record. - # - # source://activerecord//lib/active_record/result.rb#81 - def to_a; end - - # Returns an array of hashes representing each row record. - # - # source://activerecord//lib/active_record/result.rb#81 - def to_ary; end - - private - - # source://activerecord//lib/active_record/result.rb#138 - def column_type(name, type_overrides = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/result.rb#144 - def hash_rows; end - - # source://activerecord//lib/active_record/result.rb#130 - def initialize_copy(other); end - - class << self - # source://activerecord//lib/active_record/result.rb#39 - def empty; end - end -end - -# source://activerecord//lib/active_record/result.rb#50 -ActiveRecord::Result::EMPTY = T.let(T.unsafe(nil), ActiveRecord::Result) - -# {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 -# {.transaction}[rdoc-ref:Transactions::ClassMethods#transaction] method to rollback -# the database transaction *and* pass on the exception. But if you raise an -# ActiveRecord::Rollback exception, then the database transaction will be rolled back, -# without passing on the exception. -# -# For example, you could do this in your controller to rollback a transaction: -# -# class BooksController < ActionController::Base -# def create -# Book.transaction do -# book = Book.new(params[:book]) -# book.save! -# if today_is_friday? -# # The system must fail on Friday so that our support department -# # won't be out of job. We silently rollback this transaction -# # without telling the user. -# raise ActiveRecord::Rollback -# end -# end -# # ActiveRecord::Rollback is the only exception that won't be passed on -# # by ActiveRecord::Base.transaction, so this line will still be reached -# # even on Friday. -# redirect_to root_url -# end -# end -# -# source://activerecord//lib/active_record/errors.rb#338 -class ActiveRecord::Rollback < ::ActiveRecord::ActiveRecordError; end - -# This is a thread locals registry for Active Record. For example: -# -# ActiveRecord::RuntimeRegistry.sql_runtime -# -# returns the connection handler local to the current unit of execution (either thread of fiber). -# -# source://activerecord//lib/active_record/runtime_registry.rb#9 -module ActiveRecord::RuntimeRegistry - extend ::ActiveRecord::RuntimeRegistry - - # source://activerecord//lib/active_record/runtime_registry.rb#12 - def sql_runtime; end - - # source://activerecord//lib/active_record/runtime_registry.rb#16 - def sql_runtime=(runtime); end -end - -# source://activerecord//lib/active_record/sanitization.rb#4 -module ActiveRecord::Sanitization - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActiveRecord::Sanitization::ClassMethods -end - -# source://activerecord//lib/active_record/sanitization.rb#7 -module ActiveRecord::Sanitization::ClassMethods - # source://activerecord//lib/active_record/sanitization.rb#138 - 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. - # - # sanitize_sql_for_conditions(["name=? and group_id=?", "foo'bar", 4]) - # # => "name='foo''bar' and group_id=4" - # - # sanitize_sql_for_conditions(["name=:name and group_id=:group_id", name: "foo'bar", group_id: 4]) - # # => "name='foo''bar' and group_id='4'" - # - # sanitize_sql_for_conditions(["name='%s' and group_id='%s'", "foo'bar", 4]) - # # => "name='foo''bar' and group_id='4'" - # - # 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 - def sanitize_sql(condition); end - - # Accepts an array of conditions. The array has each value - # sanitized and interpolated into the SQL statement. - # - # sanitize_sql_array(["name=? and group_id=?", "foo'bar", 4]) - # # => "name='foo''bar' and group_id=4" - # - # 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(["name='%s' and group_id='%s'", "foo'bar", 4]) - # # => "name='foo''bar' and group_id='4'" - # - # source://activerecord//lib/active_record/sanitization.rb#125 - 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. - # - # sanitize_sql_for_assignment(["name=? and group_id=?", nil, 4]) - # # => "name=NULL and group_id=4" - # - # sanitize_sql_for_assignment(["name=:name and group_id=:group_id", name: nil, group_id: 4]) - # # => "name=NULL and group_id=4" - # - # Post.sanitize_sql_for_assignment({ name: nil, group_id: 4 }) - # # => "`posts`.`name` = NULL, `posts`.`group_id` = 4" - # - # sanitize_sql_for_assignment("name=NULL and group_id='4'") - # # => "name=NULL and group_id='4'" - # - # source://activerecord//lib/active_record/sanitization.rb#46 - 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. - # - # sanitize_sql_for_conditions(["name=? and group_id=?", "foo'bar", 4]) - # # => "name='foo''bar' and group_id=4" - # - # sanitize_sql_for_conditions(["name=:name and group_id=:group_id", name: "foo'bar", group_id: 4]) - # # => "name='foo''bar' and group_id='4'" - # - # sanitize_sql_for_conditions(["name='%s' and group_id='%s'", "foo'bar", 4]) - # # => "name='foo''bar' and group_id='4'" - # - # 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 - def sanitize_sql_for_conditions(condition); end - - # Accepts an array, or string of SQL conditions and sanitizes - # them into a valid SQL fragment for an ORDER clause. - # - # sanitize_sql_for_order([Arel.sql("field(id, ?)"), [1,3,2]]) - # # => "field(id, 1,3,2)" - # - # sanitize_sql_for_order("id ASC") - # # => "id ASC" - # - # source://activerecord//lib/active_record/sanitization.rb#62 - def sanitize_sql_for_order(condition); end - - # Sanitizes a hash of attribute/value pairs into SQL conditions for a SET clause. - # - # 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 - def sanitize_sql_hash_for_assignment(attrs, table); end - - # Sanitizes a +string+ so that it is safe to use within an SQL - # LIKE statement. This method uses +escape_character+ to escape all - # occurrences of itself, "_" and "%". - # - # sanitize_sql_like("100% true!") - # # => "100\\% true!" - # - # sanitize_sql_like("snake_cased_string") - # # => "snake\\_cased\\_string" - # - # sanitize_sql_like("100% true!", "!") - # # => "100!% true!!" - # - # sanitize_sql_like("snake_cased_string", "!") - # # => "snake!_cased!_string" - # - # source://activerecord//lib/active_record/sanitization.rb#109 - def sanitize_sql_like(string, escape_character = T.unsafe(nil)); end - - private - - # source://activerecord//lib/active_record/sanitization.rb#187 - def quote_bound_value(value, c = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/sanitization.rb#201 - def raise_if_bind_arity_mismatch(statement, expected, provided); end - - # source://activerecord//lib/active_record/sanitization.rb#167 - def replace_bind_variable(value, c = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/sanitization.rb#158 - def replace_bind_variables(statement, values); end - - # source://activerecord//lib/active_record/sanitization.rb#175 - def replace_named_bind_variables(statement, bind_vars); end -end - -# = Active Record \Schema -# -# Allows programmers to programmatically define a schema in a portable -# DSL. This means you can define tables, indexes, etc. without using SQL -# directly, so your applications can more easily support multiple -# databases. -# -# Usage: -# -# ActiveRecord::Schema[7.0].define do -# create_table :authors do |t| -# t.string :name, null: false -# end -# -# add_index :authors, :name, :unique -# -# create_table :posts do |t| -# t.integer :author_id, null: false -# t.string :subject -# t.text :body -# t.boolean :private, default: false -# end -# -# add_index :posts, :author_id -# end -# -# ActiveRecord::Schema is only supported by database adapters that also -# support migrations, the two features being very similar. -# -# source://activerecord//lib/active_record/schema.rb#32 -class ActiveRecord::Schema < ::ActiveRecord::Migration::Current - include ::ActiveRecord::Schema::Definition - extend ::ActiveRecord::Schema::Definition::ClassMethods - - class << self - # source://activerecord//lib/active_record/schema.rb#69 - def [](version); end - end -end - -# source://activerecord//lib/active_record/schema.rb#33 -module ActiveRecord::Schema::Definition - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActiveRecord::Schema::Definition::ClassMethods - - # source://activerecord//lib/active_record/schema.rb#54 - def define(info, &block); end -end - -# source://activerecord//lib/active_record/schema.rb#36 -module ActiveRecord::Schema::Definition::ClassMethods - # Eval the given block. All methods available to the current connection - # adapter are available within the block, so you can easily use the - # database definition DSL to build up your schema ( - # {create_table}[rdoc-ref:ConnectionAdapters::SchemaStatements#create_table], - # {add_index}[rdoc-ref:ConnectionAdapters::SchemaStatements#add_index], etc.). - # - # The +info+ hash is optional, and if given is used to define metadata - # about the current schema (currently, only the schema's version): - # - # ActiveRecord::Schema[7.0].define(version: 2038_01_19_000001) do - # ... - # end - # - # source://activerecord//lib/active_record/schema.rb#49 - def define(info = T.unsafe(nil), &block); end -end - -# = Active Record Schema Dumper -# -# This class is used to dump the database schema for some connection to some -# output format (i.e., ActiveRecord::Schema). -# -# source://activerecord//lib/active_record/schema_dumper.rb#10 -class ActiveRecord::SchemaDumper - # @return [SchemaDumper] a new instance of SchemaDumper - # - # source://activerecord//lib/active_record/schema_dumper.rb#59 - 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 - def chk_ignore_pattern; end - - # source://activerecord//lib/active_record/schema_dumper.rb#30 - def chk_ignore_pattern=(val); end - - # source://activerecord//lib/active_record/schema_dumper.rb#47 - def dump(stream); 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 - def fk_ignore_pattern; end - - # source://activerecord//lib/active_record/schema_dumper.rb#24 - 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. - # - # source://activerecord//lib/active_record/schema_dumper.rb#18 - def ignore_tables; end - - # source://activerecord//lib/active_record/schema_dumper.rb#18 - def ignore_tables=(val); end - - private - - # source://activerecord//lib/active_record/schema_dumper.rb#227 - def check_constraints_in_create(table, stream); end - - # source://activerecord//lib/active_record/schema_dumper.rb#72 - def define_params; end - - # extensions are only supported by PostgreSQL - # - # source://activerecord//lib/active_record/schema_dumper.rb#99 - def extensions(stream); end - - # source://activerecord//lib/active_record/schema_dumper.rb#245 - def foreign_keys(table, stream); end - - # source://activerecord//lib/active_record/schema_dumper.rb#276 - def format_colspec(colspec); end - - # source://activerecord//lib/active_record/schema_dumper.rb#286 - def format_index_parts(options); end - - # source://activerecord//lib/active_record/schema_dumper.rb#282 - def format_options(options); end - - # turns 20170404131909 into "2017_04_04_131909" - # - # source://activerecord//lib/active_record/schema_dumper.rb#66 - def formatted_version; end - - # source://activerecord//lib/active_record/schema_dumper.rb#76 - def header(stream); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/schema_dumper.rb#300 - def ignored?(table_name); end - - # source://activerecord//lib/active_record/schema_dumper.rb#211 - def index_parts(index); end - - # Keep it for indexing materialized views - # - # source://activerecord//lib/active_record/schema_dumper.rb#190 - def indexes(table, stream); end - - # source://activerecord//lib/active_record/schema_dumper.rb#202 - def indexes_in_create(table, stream); end - - # source://activerecord//lib/active_record/schema_dumper.rb#294 - def remove_prefix_and_suffix(table); end - - # source://activerecord//lib/active_record/schema_dumper.rb#121 - def table(table, stream); end - - # Returns the value of attribute table_name. - # - # source://activerecord//lib/active_record/schema_dumper.rb#57 - 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 - def table_name=(_arg0); end - - # source://activerecord//lib/active_record/schema_dumper.rb#106 - def tables(stream); end - - # source://activerecord//lib/active_record/schema_dumper.rb#94 - def trailer(stream); end - - # (enum) types are only supported by PostgreSQL - # - # source://activerecord//lib/active_record/schema_dumper.rb#103 - def types(stream); end - - class << self - # source://activerecord//lib/active_record/schema_dumper.rb#30 - def chk_ignore_pattern; end - - # source://activerecord//lib/active_record/schema_dumper.rb#30 - def chk_ignore_pattern=(val); end - - # source://activerecord//lib/active_record/schema_dumper.rb#33 - def dump(connection = T.unsafe(nil), stream = T.unsafe(nil), config = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/schema_dumper.rb#24 - def fk_ignore_pattern; end - - # source://activerecord//lib/active_record/schema_dumper.rb#24 - def fk_ignore_pattern=(val); end - - # source://activerecord//lib/active_record/schema_dumper.rb#18 - def ignore_tables; end - - # source://activerecord//lib/active_record/schema_dumper.rb#18 - def ignore_tables=(val); end - - private - - # source://activerecord//lib/active_record/schema_dumper.rb#39 - def generate_options(config); end - end -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 -# 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#50 - def version; end - - class << self - # source://activemodel/7.0.4.2/lib/active_model/validations.rb#52 - def _validators; end - - # source://activerecord//lib/active_record/schema_migration.rb#41 - def all_versions; end - - # source://activerecord//lib/active_record/schema_migration.rb#21 - def create_table; end - - # source://activerecord//lib/active_record/enum.rb#116 - def defined_enums; end - - # source://activerecord//lib/active_record/schema_migration.rb#29 - def drop_table; end - - # source://activerecord//lib/active_record/schema_migration.rb#33 - def normalize_migration_number(number); end - - # source://activerecord//lib/active_record/schema_migration.rb#37 - def normalized_versions; end - - # source://activerecord//lib/active_record/schema_migration.rb#13 - def primary_key; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/schema_migration.rb#45 - def table_exists?; end - - # source://activerecord//lib/active_record/schema_migration.rb#17 - def table_name; end - end -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#0 -class ActiveRecord::SchemaMigration::ActiveRecord_Associations_CollectionProxy < ::ActiveRecord::Associations::CollectionProxy - include ::ActiveRecord::Delegation::ClassSpecificRelation - include ::ActiveRecord::SchemaMigration::GeneratedRelationMethods - extend ::ActiveRecord::Delegation::ClassSpecificRelation::ClassMethods -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#0 -class ActiveRecord::SchemaMigration::ActiveRecord_Relation < ::ActiveRecord::Relation - include ::ActiveRecord::Delegation::ClassSpecificRelation - include ::ActiveRecord::SchemaMigration::GeneratedRelationMethods - extend ::ActiveRecord::Delegation::ClassSpecificRelation::ClassMethods -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 - -# = Active Record \Named \Scopes -# -# source://activerecord//lib/active_record/scoping.rb#6 -module ActiveRecord::Scoping - extend ::ActiveSupport::Concern - extend ::ActiveSupport::Autoload - include GeneratedInstanceMethods - include ::ActiveRecord::Scoping::Default - include ::ActiveRecord::Scoping::Named - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveRecord::Scoping::ClassMethods - mixes_in_class_methods ::ActiveRecord::Scoping::Default::ClassMethods - mixes_in_class_methods ::ActiveRecord::Scoping::Named::ClassMethods - - # source://activerecord//lib/active_record/scoping.rb#54 - def initialize_internals_callback; end - - # source://activerecord//lib/active_record/scoping.rb#47 - def populate_with_current_scope_attributes; end - - module GeneratedClassMethods - def default_scope_override; end - def default_scope_override=(value); end - def default_scopes; end - def default_scopes=(value); end - end - - module GeneratedInstanceMethods - def default_scope_override; end - def default_scopes; end - end -end - -# source://activerecord//lib/active_record/scoping.rb#14 -module ActiveRecord::Scoping::ClassMethods - # source://activerecord//lib/active_record/scoping.rb#26 - def current_scope(skip_inherited_scope = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/scoping.rb#30 - def current_scope=(scope); end - - # source://activerecord//lib/active_record/scoping.rb#34 - def global_current_scope(skip_inherited_scope = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/scoping.rb#38 - def global_current_scope=(scope); end - - # Collects attributes from scopes that should be applied when creating - # an AR instance for the particular class this is called on. - # - # source://activerecord//lib/active_record/scoping.rb#17 - def scope_attributes; end - - # Are there attributes associated with this scope? - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/scoping.rb#22 - def scope_attributes?; end - - # source://activerecord//lib/active_record/scoping.rb#42 - def scope_registry; end -end - -# source://activerecord//lib/active_record/scoping/default.rb#14 -module ActiveRecord::Scoping::Default - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveRecord::Scoping::Default::ClassMethods - - module GeneratedClassMethods - def default_scope_override; end - def default_scope_override=(value); end - def default_scopes; end - def default_scopes=(value); end - end - - module GeneratedInstanceMethods - def default_scope_override; end - def default_scopes; end - end -end - -# source://activerecord//lib/active_record/scoping/default.rb#23 -module ActiveRecord::Scoping::Default::ClassMethods - # Checks if the model has any default scopes. If all_queries - # is set to true, the method will check if there are any - # default_scopes for the model where +all_queries+ is true. - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/scoping/default.rb#54 - 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 - def scope_attributes?; end - - # Returns a scope for the model without the previously set scopes. - # - # class Post < ActiveRecord::Base - # def self.default_scope - # where(published: true) - # end - # 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" - # - # This method also accepts a block. All queries inside the block will - # not use the previously set scopes. - # - # Post.unscoped { - # Post.limit(10) # Fires "SELECT * FROM posts LIMIT 10" - # } - # - # source://activerecord//lib/active_record/scoping/default.rb#42 - def unscoped(&block); end - - private - - # source://activerecord//lib/active_record/scoping/default.rb#135 - 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 - # the model. - # - # class Article < ActiveRecord::Base - # default_scope { where(published: true) } - # end - # - # 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. - # - # Article.new.published # => true - # Article.create.published # => true - # - # To apply a #default_scope when updating or deleting a record, add - # all_queries: true: - # - # class Article < ActiveRecord::Base - # default_scope -> { where(blog_id: 1) }, all_queries: true - # end - # - # Applying a default scope to all queries will ensure that records - # are always queried by the additional conditions. Note that only - # where clauses apply, as it does not make sense to add order to - # queries that return a single object by primary key. - # - # Article.find(1).destroy - # => 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 - # default scope.) - # - # If you use multiple #default_scope declarations in your model then - # they will be merged together: - # - # class Article < ActiveRecord::Base - # default_scope { where(published: true) } - # default_scope { where(rating: 'G') } - # end - # - # 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 - # class defines a second one. - # - # If you need to do more complex things with a default scope, you can - # alternatively define it as a class method: - # - # class Article < ActiveRecord::Base - # def self.default_scope - # # Should return a scope, you can call 'super' here etc. - # end - # end - # - # source://activerecord//lib/active_record/scoping/default.rb#119 - 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 - 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. - # - # @return [Boolean] - # - # source://activerecord//lib/active_record/scoping/default.rb#167 - def execute_scope?(all_queries, default_scope_obj); end - - # source://activerecord//lib/active_record/scoping/default.rb#175 - def ignore_default_scope=(ignore); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/scoping/default.rb#171 - def ignore_default_scope?; end -end - -# source://activerecord//lib/active_record/scoping/default.rb#5 -class ActiveRecord::Scoping::DefaultScope - # @return [DefaultScope] a new instance of DefaultScope - # - # source://activerecord//lib/active_record/scoping/default.rb#8 - def initialize(scope, all_queries = T.unsafe(nil)); end - - # Returns the value of attribute all_queries. - # - # source://activerecord//lib/active_record/scoping/default.rb#6 - def all_queries; end - - # Returns the value of attribute scope. - # - # source://activerecord//lib/active_record/scoping/default.rb#6 - def scope; end -end - -# source://activerecord//lib/active_record/scoping/named.rb#6 -module ActiveRecord::Scoping::Named - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActiveRecord::Scoping::Named::ClassMethods -end - -# source://activerecord//lib/active_record/scoping/named.rb#9 -module ActiveRecord::Scoping::Named::ClassMethods - # Returns an ActiveRecord::Relation scope object. - # - # posts = Post.all - # posts.size # Fires "select count(*) from posts" and returns the count - # posts.each {|p| puts p.name } # Fires "select * from posts" and loads post objects - # - # fruits = Fruit.all - # fruits = fruits.where(color: 'red') if options[:red_only] - # fruits = fruits.limit(10) if limited? - # - # You can define a scope that applies to all finders using - # {default_scope}[rdoc-ref:Scoping::Default::ClassMethods#default_scope]. - # - # source://activerecord//lib/active_record/scoping/named.rb#22 - def all; end - - # source://activerecord//lib/active_record/scoping/named.rb#49 - def default_extensions; end - - # Returns a scope for the model with default scopes. - # - # source://activerecord//lib/active_record/scoping/named.rb#45 - def default_scoped(scope = T.unsafe(nil), all_queries: T.unsafe(nil)); end - - # Adds a class method for retrieving and querying objects. - # The method is intended to return an ActiveRecord::Relation - # object, which is composable with other scopes. - # If it returns +nil+ or +false+, an - # {all}[rdoc-ref:Scoping::Named::ClassMethods#all] scope is returned instead. - # - # A \scope represents a narrowing of a database query, such as - # where(color: :red).select('shirts.*').includes(:washing_instructions). - # - # class Shirt < ActiveRecord::Base - # scope :red, -> { where(color: 'red') } - # scope :dry_clean_only, -> { joins(:washing_instructions).where('washing_instructions.dry_clean_only = ?', true) } - # end - # - # The above calls to #scope define class methods Shirt.red and - # Shirt.dry_clean_only. Shirt.red, in effect, - # represents the query Shirt.where(color: 'red'). - # - # Note that this is simply 'syntactic sugar' for defining an actual - # class method: - # - # class Shirt < ActiveRecord::Base - # def self.red - # where(color: 'red') - # end - # end - # - # Unlike Shirt.find(...), however, the object returned by - # Shirt.red is not an Array but an ActiveRecord::Relation, - # which is composable with other scopes; it resembles the association object - # constructed by a {has_many}[rdoc-ref:Associations::ClassMethods#has_many] - # declaration. For instance, you can invoke Shirt.red.first, Shirt.red.count, - # Shirt.red.where(size: 'small'). Also, just as with the - # association objects, named \scopes act like an Array, implementing - # Enumerable; Shirt.red.each(&block), Shirt.red.first, - # and Shirt.red.inject(memo, &block) all behave as if - # Shirt.red really was an array. - # - # These named \scopes are composable. For instance, - # Shirt.red.dry_clean_only will produce all shirts that are - # both red and dry clean only. Nested finds and calculations also work - # with these compositions: Shirt.red.dry_clean_only.count - # returns the number of garments for which these criteria obtain. - # Similarly with Shirt.red.dry_clean_only.average(:thread_count). - # - # All scopes are available as class methods on the ActiveRecord::Base - # descendant upon which the \scopes were defined. But they are also - # available to {has_many}[rdoc-ref:Associations::ClassMethods#has_many] - # associations. If, - # - # class Person < ActiveRecord::Base - # has_many :shirts - # end - # - # then elton.shirts.red.dry_clean_only will return all of - # Elton's red, dry clean only shirts. - # - # \Named scopes can also have extensions, just as with - # {has_many}[rdoc-ref:Associations::ClassMethods#has_many] declarations: - # - # class Shirt < ActiveRecord::Base - # scope :red, -> { where(color: 'red') } do - # def dom_id - # 'red_shirts' - # end - # end - # end - # - # Scopes can also be used while creating/building a record. - # - # class Article < ActiveRecord::Base - # scope :published, -> { where(published: true) } - # end - # - # Article.published.new.published # => true - # Article.published.create.published # => true - # - # \Class methods on your model are automatically available - # on scopes. Assuming the following setup: - # - # class Article < ActiveRecord::Base - # scope :published, -> { where(published: true) } - # scope :featured, -> { where(featured: true) } - # - # def self.latest_article - # order('published_at desc').first - # end - # - # def self.titles - # pluck(:title) - # end - # end - # - # We are able to call the methods like this: - # - # Article.published.featured.latest_article - # Article.featured.titles - # - # source://activerecord//lib/active_record/scoping/named.rb#154 - def scope(name, body, &block); end - - # source://activerecord//lib/active_record/scoping/named.rb#36 - def scope_for_association(scope = T.unsafe(nil)); end - - private - - # source://activerecord//lib/active_record/scoping/named.rb#192 - def singleton_method_added(name); end -end - -# This class stores the +:current_scope+ and +:ignore_default_scope+ values -# for different classes. The registry is stored as either a thread or fiber -# local depending on the application configuration. -# -# This class allows you to store and get the scope values on different -# classes and different types of scopes. For example, if you are attempting -# to get the current_scope for the +Board+ model, then you would use the -# following code: -# -# registry = ActiveRecord::Scoping::ScopeRegistry -# registry.set_current_scope(Board, some_new_scope) -# -# Now when you run: -# -# registry.current_scope(Board) -# -# You will obtain whatever was defined in +some_new_scope+. -# -# source://activerecord//lib/active_record/scoping.rb#76 -class ActiveRecord::Scoping::ScopeRegistry - # @return [ScopeRegistry] a new instance of ScopeRegistry - # - # source://activerecord//lib/active_record/scoping.rb#86 - def initialize; end - - # source://activerecord//lib/active_record/scoping.rb#92 - def current_scope(model, skip_inherited_scope = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/scoping.rb#108 - def global_current_scope(model, skip_inherited_scope = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/scoping.rb#100 - def ignore_default_scope(model, skip_inherited_scope = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/scoping.rb#96 - def set_current_scope(model, value); end - - # source://activerecord//lib/active_record/scoping.rb#112 - def set_global_current_scope(model, value); end - - # source://activerecord//lib/active_record/scoping.rb#104 - def set_ignore_default_scope(model, value); end - - private - - # Sets the +value+ for a given +scope_type+ and +model+. - # - # source://activerecord//lib/active_record/scoping.rb#130 - def set_value_for(scope_type, model, value); end - - # Obtains the value for a given +scope_type+ and +model+. - # - # source://activerecord//lib/active_record/scoping.rb#118 - def value_for(scope_type, model, skip_inherited_scope = T.unsafe(nil)); end - - class << self - # source://activerecord//lib/active_record/scoping.rb#78 - def current_scope(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/scoping.rb#78 - def global_current_scope(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/scoping.rb#78 - def ignore_default_scope(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/scoping.rb#81 - def instance; end - - # source://activerecord//lib/active_record/scoping.rb#78 - def set_current_scope(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/scoping.rb#78 - def set_global_current_scope(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/scoping.rb#78 - def set_ignore_default_scope(*_arg0, **_arg1, &_arg2); end - end -end - -# source://activerecord//lib/active_record/secure_token.rb#4 -module ActiveRecord::SecureToken - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActiveRecord::SecureToken::ClassMethods -end - -# source://activerecord//lib/active_record/secure_token.rb#11 -module ActiveRecord::SecureToken::ClassMethods - # source://activerecord//lib/active_record/secure_token.rb#43 - def generate_unique_secure_token(length: T.unsafe(nil)); end - - # Example using #has_secure_token - # - # # Schema: User(token:string, auth_token:string) - # class User < ActiveRecord::Base - # has_secure_token - # has_secure_token :auth_token, length: 36 - # end - # - # user = User::User.new - # user.save - # user.token # => "pX27zsMN2ViQKta1bGfLmVJE" - # user.auth_token # => "tU9bLuZseefXQ4yQxQo8wjtBvsAfPc78os6R" - # 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. - # - # 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 -end - -# source://activerecord//lib/active_record/secure_token.rb#7 -ActiveRecord::SecureToken::MINIMUM_TOKEN_LENGTH = T.let(T.unsafe(nil), Integer) - -# source://activerecord//lib/active_record/secure_token.rb#5 -class ActiveRecord::SecureToken::MinimumLengthError < ::StandardError; end - -# = Active Record \Serialization -# -# source://activerecord//lib/active_record/serialization.rb#5 -module ActiveRecord::Serialization - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - include ::ActiveModel::Serializers::JSON - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveModel::Naming - - # source://activerecord//lib/active_record/serialization.rb#13 - def serializable_hash(options = T.unsafe(nil)); end - - private - - # source://activerecord//lib/active_record/serialization.rb#25 - def attribute_names_for_serialization; end - - module GeneratedClassMethods - def include_root_in_json; end - def include_root_in_json=(value); end - def include_root_in_json?; end - end - - module GeneratedInstanceMethods - def include_root_in_json; end - def include_root_in_json?; end - end -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 -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 -class ActiveRecord::SerializationTypeMismatch < ::ActiveRecord::ActiveRecordError; end - -# = Active Record Signed Id -# -# source://activerecord//lib/active_record/signed_id.rb#5 -module ActiveRecord::SignedId - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveRecord::SignedId::ClassMethods - - # Returns a signed id that's generated using a preconfigured +ActiveSupport::MessageVerifier+ instance. - # This signed id is tamper proof, so it's safe to send in an email or otherwise share with the outside world. - # It can furthermore be set to expire (the default is not to expire), and scoped down with a specific purpose. - # If the expiration date has been exceeded before +find_signed+ is called, the id won't find the designated - # record. If a purpose is set, this too must match. - # - # If you accidentally let a signed id out in the wild that you wish to retract sooner than its expiration date - # (or maybe you forgot to set an expiration date while meaning to!), you can use the purpose to essentially - # version the signed_id, like so: - # - # user.signed_id purpose: :v2 - # - # 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. - # - # source://activerecord//lib/active_record/signed_id.rb#112 - def signed_id(expires_in: T.unsafe(nil), purpose: T.unsafe(nil)); end - - module GeneratedClassMethods - def signed_id_verifier_secret; end - def signed_id_verifier_secret=(value); end - def signed_id_verifier_secret?; end - end - - module GeneratedInstanceMethods - def signed_id_verifier_secret; end - def signed_id_verifier_secret?; end - end -end - -# source://activerecord//lib/active_record/signed_id.rb#16 -module ActiveRecord::SignedId::ClassMethods - # source://activerecord//lib/active_record/signed_id.rb#92 - def combine_signed_id_purposes(purpose); end - - # Lets you find a record based on a signed id that's safe to put into the world without risk of tampering. - # This is particularly useful for things like password reset or email verification, where you want - # the bearer of the signed id to be able to interact with the underlying record, but usually only within - # a certain time period. - # - # You set the time period that the signed id is valid for during generation, using the instance method - # signed_id(expires_in: 15.minutes). If the time has elapsed before a signed find is attempted, - # the signed id will no longer be valid, and nil is returned. - # - # It's possible to further restrict the use of a signed id with a purpose. This helps when you have a - # general base model, like a User, which might have signed ids for several things, like password reset - # or email verification. The purpose that was set during generation must match the purpose set when - # finding. If there's a mismatch, nil is again returned. - # - # ==== Examples - # - # signed_id = User::User.first.signed_id expires_in: 15.minutes, purpose: :password_reset - # - # User::User.find_signed signed_id # => nil, since the purpose does not match - # - # travel 16.minutes - # User::User.find_signed signed_id, purpose: :password_reset # => nil, since the signed id has expired - # - # travel_back - # User::User.find_signed signed_id, purpose: :password_reset # => User::User.first - # - # @raise [UnknownPrimaryKey] - # - # source://activerecord//lib/active_record/signed_id.rb#42 - def find_signed(signed_id, purpose: T.unsafe(nil)); end - - # Works like find_signed, but will raise an +ActiveSupport::MessageVerifier::InvalidSignature+ - # exception if the +signed_id+ has either expired, has a purpose mismatch, is for another record, - # or has been tampered with. It will also raise an +ActiveRecord::RecordNotFound+ exception if - # the valid signed id can't find a record. - # - # === Examples - # - # User::User.find_signed! "bad data" # => ActiveSupport::MessageVerifier::InvalidSignature - # - # signed_id = User::User.first.signed_id - # User::User.first.destroy - # User::User.find_signed! signed_id # => ActiveRecord::RecordNotFound - # - # source://activerecord//lib/active_record/signed_id.rb#62 - 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 - # 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 - def signed_id_verifier; end - - # Allows you to pass in a custom verifier used for the signed ids. This also allows you to use different - # verifiers for different classes. This is also helpful if you need to rotate keys, as you can prepare - # your custom verifier for that in advance. See +ActiveSupport::MessageVerifier+ for details. - # - # source://activerecord//lib/active_record/signed_id.rb#87 - def signed_id_verifier=(verifier); end -end - -# Raised when Active Record finds multiple records but only expected one. -# -# source://activerecord//lib/active_record/errors.rb#146 -class ActiveRecord::SoleRecordExceeded < ::ActiveRecord::ActiveRecordError - # @return [SoleRecordExceeded] a new instance of SoleRecordExceeded - # - # source://activerecord//lib/active_record/errors.rb#149 - def initialize(record = T.unsafe(nil)); end - - # Returns the value of attribute record. - # - # source://activerecord//lib/active_record/errors.rb#147 - def record; end -end - -# source://activerecord//lib/active_record/relation/spawn_methods.rb#8 -module ActiveRecord::SpawnMethods - # Removes from the query the condition(s) specified in +skips+. - # - # 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 - def except(*skips); end - - # Merges in the conditions from other, if other is an ActiveRecord::Relation. - # Returns an array representing the intersection of the resulting records with other, if other is an array. - # - # Post.where(published: true).joins(:comments).merge( Comment.where(spam: false) ) - # # Performs a single join query with both where conditions. - # - # recent_posts = Post.order('created_at DESC').first(5) - # Post.where(published: true).merge(recent_posts) - # # Returns the intersection of all published posts with the 5 most recently created posts. - # # (This is just an example. You'd probably want to do this with a single query!) - # - # Procs will be evaluated by merge: - # - # Post.where(published: true).merge(-> { joins(:comments) }) - # # => Post.where(published: true).joins(:comments) - # - # This is mainly intended for sharing common conditions between multiple associations. - # - # source://activerecord//lib/active_record/relation/spawn_methods.rb#31 - def merge(other, *rest); end - - # source://activerecord//lib/active_record/relation/spawn_methods.rb#41 - def merge!(other, *rest); end - - # Removes any condition from the query other than the one(s) specified in +onlies+. - # - # 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 - def only(*onlies); end - - # This is overridden by Associations::CollectionProxy - # - # source://activerecord//lib/active_record/relation/spawn_methods.rb#10 - def spawn; end - - private - - # source://activerecord//lib/active_record/relation/spawn_methods.rb#71 - def relation_with(values); end -end - -# Raised on attempt to save stale record. Record is stale when it's being saved in another query after -# instantiation, for example, when two users edit the same wiki page and one starts editing and saves -# the page before the other. -# -# Read more about optimistic locking in ActiveRecord::Locking module -# documentation. -# -# source://activerecord//lib/active_record/errors.rb#280 -class ActiveRecord::StaleObjectError < ::ActiveRecord::ActiveRecordError - # @return [StaleObjectError] a new instance of StaleObjectError - # - # source://activerecord//lib/active_record/errors.rb#283 - 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 - def attempted_action; end - - # Returns the value of attribute record. - # - # source://activerecord//lib/active_record/errors.rb#281 - def record; end -end - -# Statement cache is used to cache a single statement in order to avoid creating the AST again. -# Initializing the cache is done by passing the statement in the create block: -# -# cache = StatementCache.create(Book.connection) do |params| -# Book.where(name: "my book").where("author_id > 3") -# end -# -# The cached statement is executed by using the -# {connection.execute}[rdoc-ref:ConnectionAdapters::DatabaseStatements#execute] method: -# -# cache.execute([], Book.connection) -# -# The relation returned by the block is cached, and for each -# {execute}[rdoc-ref:ConnectionAdapters::DatabaseStatements#execute] -# call the cached relation gets duped. Database is queried when +to_a+ is called on the relation. -# -# If you want to cache the statement without the values you can use the +bind+ method of the -# block parameter. -# -# cache = StatementCache.create(Book.connection) do |params| -# Book.where(name: params.bind) -# end -# -# And pass the bind values as the first argument of +execute+ call. -# -# cache.execute(["my book"], Book.connection) -# -# source://activerecord//lib/active_record/statement_cache.rb#30 -class ActiveRecord::StatementCache - # @return [StatementCache] a new instance of StatementCache - # - # source://activerecord//lib/active_record/statement_cache.rb#139 - def initialize(query_builder, bind_map, klass); end - - # source://activerecord//lib/active_record/statement_cache.rb#145 - def execute(params, connection, &block); end - - private - - # Returns the value of attribute bind_map. - # - # source://activerecord//lib/active_record/statement_cache.rb#162 - def bind_map; end - - # Returns the value of attribute klass. - # - # source://activerecord//lib/active_record/statement_cache.rb#162 - def klass; end - - # Returns the value of attribute query_builder. - # - # source://activerecord//lib/active_record/statement_cache.rb#162 - def query_builder; end - - class << self - # source://activerecord//lib/active_record/statement_cache.rb#132 - def create(connection, callable = T.unsafe(nil), &block); end - - # source://activerecord//lib/active_record/statement_cache.rb#101 - def partial_query(values); end - - # source://activerecord//lib/active_record/statement_cache.rb#105 - def partial_query_collector; end - - # source://activerecord//lib/active_record/statement_cache.rb#97 - def query(sql); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/statement_cache.rb#155 - def unsupported_value?(value); end - end -end - -# source://activerecord//lib/active_record/statement_cache.rb#113 -class ActiveRecord::StatementCache::BindMap - # @return [BindMap] a new instance of BindMap - # - # source://activerecord//lib/active_record/statement_cache.rb#114 - def initialize(bound_attributes); end - - # source://activerecord//lib/active_record/statement_cache.rb#125 - def bind(values); end -end - -# source://activerecord//lib/active_record/statement_cache.rb#109 -class ActiveRecord::StatementCache::Params - # source://activerecord//lib/active_record/statement_cache.rb#110 - def bind; end -end - -# source://activerecord//lib/active_record/statement_cache.rb#43 -class ActiveRecord::StatementCache::PartialQuery < ::ActiveRecord::StatementCache::Query - # @return [PartialQuery] a new instance of PartialQuery - # - # source://activerecord//lib/active_record/statement_cache.rb#44 - def initialize(values); end - - # source://activerecord//lib/active_record/statement_cache.rb#51 - def sql_for(binds, connection); end -end - -# source://activerecord//lib/active_record/statement_cache.rb#64 -class ActiveRecord::StatementCache::PartialQueryCollector - # @return [PartialQueryCollector] a new instance of PartialQueryCollector - # - # source://activerecord//lib/active_record/statement_cache.rb#67 - def initialize; end - - # source://activerecord//lib/active_record/statement_cache.rb#72 - def <<(str); end - - # source://activerecord//lib/active_record/statement_cache.rb#77 - def add_bind(obj); end - - # source://activerecord//lib/active_record/statement_cache.rb#83 - def add_binds(binds, proc_for_binds = T.unsafe(nil)); end - - # Returns the value of attribute preparable. - # - # source://activerecord//lib/active_record/statement_cache.rb#65 - def preparable; end - - # Sets the attribute preparable - # - # @param value the value to set the attribute preparable to. - # - # source://activerecord//lib/active_record/statement_cache.rb#65 - def preparable=(_arg0); end - - # source://activerecord//lib/active_record/statement_cache.rb#92 - def value; end -end - -# source://activerecord//lib/active_record/statement_cache.rb#33 -class ActiveRecord::StatementCache::Query - # @return [Query] a new instance of Query - # - # source://activerecord//lib/active_record/statement_cache.rb#34 - def initialize(sql); end - - # source://activerecord//lib/active_record/statement_cache.rb#38 - def sql_for(binds, connection); end -end - -# source://activerecord//lib/active_record/statement_cache.rb#31 -class ActiveRecord::StatementCache::Substitute; end - -# Superclass for all database execution errors. -# -# Wraps the underlying database error as +cause+. -# -# source://activerecord//lib/active_record/errors.rb#158 -class ActiveRecord::StatementInvalid < ::ActiveRecord::ActiveRecordError - # @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 - - # Returns the value of attribute binds. - # - # source://activerecord//lib/active_record/errors.rb#165 - def binds; end - - # Returns the value of attribute sql. - # - # source://activerecord//lib/active_record/errors.rb#165 - def sql; end -end - -# StatementTimeout will be raised when statement timeout exceeded. -# -# source://activerecord//lib/active_record/errors.rb#453 -class ActiveRecord::StatementTimeout < ::ActiveRecord::QueryAborted; end - -# 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. -# -# You can then declare accessors to this store that are then accessible just like any other attribute -# of the model. This is very helpful for easily exposing store keys to a form or elsewhere that's -# already built around just accessing attributes on the model. -# -# Every accessor comes with dirty tracking methods (+key_changed?+, +key_was+ and +key_change+) and -# methods to access the changes made during the last save (+saved_change_to_key?+, +saved_change_to_key+ and -# +key_before_last_save+). -# -# NOTE: There is no +key_will_change!+ method for accessors, use +store_will_change!+ instead. -# -# Make sure that you declare the database column used for the serialized store as a text, so there's -# plenty of room. -# -# You can set custom coder to encode/decode your serialized attributes to/from different formats. -# JSON, YAML, Marshal are supported out of the box. Generally it can be any wrapper that provides +load+ and +dump+. -# -# NOTE: If you are using structured database data types (e.g. PostgreSQL +hstore+/+json+, or MySQL 5.7+ -# +json+) there is no need for the serialization provided by {.store}[rdoc-ref:rdoc-ref:ClassMethods#store]. -# Simply use {.store_accessor}[rdoc-ref:ClassMethods#store_accessor] instead to generate -# the accessor methods. Be aware that these columns use a string keyed hash and do not allow access -# using a symbol. -# -# NOTE: The default validations with the exception of +uniqueness+ will work. -# For example, if you want to check for +uniqueness+ with +hstore+ you will -# need to use a custom validation to handle it. -# -# Examples: -# -# class User < ActiveRecord::Base -# store :settings, accessors: [ :color, :homepage ], coder: JSON -# store :parent, accessors: [ :name ], coder: JSON, prefix: true -# store :spouse, accessors: [ :name ], coder: JSON, prefix: :partner -# store :settings, accessors: [ :two_factor_auth ], suffix: true -# store :settings, accessors: [ :login_retry ], suffix: :config -# end -# -# u = User::User.new(color: 'black', homepage: '37signals.com', parent_name: 'Mary', partner_name: 'Lily') -# u.color # Accessor stored attribute -# u.parent_name # Accessor stored attribute with prefix -# u.partner_name # Accessor stored attribute with custom prefix -# u.two_factor_auth_settings # Accessor stored attribute with suffix -# u.login_retry_config # Accessor stored attribute with custom suffix -# u.settings[:country] = 'Denmark' # Any attribute, even if not specified with an accessor -# -# # There is no difference between strings and symbols for accessing custom attributes -# u.settings[:country] # => 'Denmark' -# u.settings['country'] # => 'Denmark' -# -# # Dirty tracking -# u.color = 'green' -# u.color_changed? # => true -# u.color_was # => 'black' -# u.color_change # => ['black', 'green'] -# -# # Add additional accessors to an existing store through store_accessor -# class SuperUser < User -# store_accessor :settings, :privileges, :servants -# store_accessor :parent, :birthday, prefix: true -# store_accessor :settings, :secret_question, suffix: :config -# end -# -# The stored attribute names can be retrieved using {.stored_attributes}[rdoc-ref:rdoc-ref:ClassMethods#stored_attributes]. -# -# User::User.stored_attributes[:settings] # [:color, :homepage, :two_factor_auth, :login_retry] -# -# == Overwriting default accessors -# -# All stored values are automatically available through accessors on the Active Record -# object, but sometimes you want to specialize this behavior. This can be done by overwriting -# the default accessors (using the same name as the attribute) and calling super -# to actually change things. -# -# class Song < ActiveRecord::Base -# # Uses a stored integer to hold the volume adjustment of the song -# store :settings, accessors: [:volume_adjustment] -# -# def volume_adjustment=(decibels) -# super(decibels.to_i) -# end -# -# def volume_adjustment -# super.to_i -# end -# end -# -# source://activerecord//lib/active_record/store.rb#94 -module ActiveRecord::Store - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActiveRecord::Store::ClassMethods - - private - - # source://activerecord//lib/active_record/store.rb#206 - def read_store_attribute(store_attribute, key); end - - # source://activerecord//lib/active_record/store.rb#216 - def store_accessor_for(store_attribute); end - - # source://activerecord//lib/active_record/store.rb#211 - def write_store_attribute(store_attribute, key, value); end -end - -# source://activerecord//lib/active_record/store.rb#103 -module ActiveRecord::Store::ClassMethods - # source://activerecord//lib/active_record/store.rb#188 - def _store_accessors_module; end - - # source://activerecord//lib/active_record/store.rb#104 - def store(store_attribute, options = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/store.rb#109 - def store_accessor(store_attribute, *keys, prefix: T.unsafe(nil), suffix: T.unsafe(nil)); end - - # source://activerecord//lib/active_record/store.rb#196 - def stored_attributes; end -end - -# source://activerecord//lib/active_record/store.rb#220 -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 - def read(object, attribute, key); end - - # source://activerecord//lib/active_record/store.rb#226 - def write(object, attribute, key, value); end - end -end - -# source://activerecord//lib/active_record/store.rb#260 -class ActiveRecord::Store::IndifferentCoder - # @return [IndifferentCoder] a new instance of IndifferentCoder - # - # source://activerecord//lib/active_record/store.rb#261 - def initialize(attr_name, coder_or_class_name); end - - # source://activerecord//lib/active_record/store.rb#270 - def dump(obj); end - - # source://activerecord//lib/active_record/store.rb#274 - def load(yaml); end - - private - - # source://activerecord//lib/active_record/store.rb#290 - def as_regular_hash(obj); end - - class << self - # source://activerecord//lib/active_record/store.rb#278 - def as_indifferent_hash(obj); end - end -end - -# source://activerecord//lib/active_record/store.rb#249 -class ActiveRecord::Store::IndifferentHashAccessor < ::ActiveRecord::Store::HashAccessor - class << self - # source://activerecord//lib/active_record/store.rb#250 - def prepare(object, store_attribute); end - end -end - -# source://activerecord//lib/active_record/store.rb#239 -class ActiveRecord::Store::StringKeyedHashAccessor < ::ActiveRecord::Store::HashAccessor - class << self - # source://activerecord//lib/active_record/store.rb#240 - def read(object, attribute, key); end - - # source://activerecord//lib/active_record/store.rb#244 - def write(object, attribute, key, value); end - end -end - -# Raised on attempt to lazily load records that are marked as strict loading. -# -# source://activerecord//lib/active_record/errors.rb#307 -class ActiveRecord::StrictLoadingViolationError < ::ActiveRecord::ActiveRecordError; end - -# Raised when the single-table inheritance mechanism fails to locate the subclass -# (for example due to improper usage of column that -# {ActiveRecord::Base.inheritance_column}[rdoc-ref:ModelSchema::ClassMethods#inheritance_column] -# points to). -# -# source://activerecord//lib/active_record/errors.rb#18 -class ActiveRecord::SubclassNotFound < ::ActiveRecord::ActiveRecordError; end - -# ActiveRecord::Suppressor prevents the receiver from being saved during -# a given block. -# -# For example, here's a pattern of creating notifications when new comments -# are posted. (The notification may in turn trigger an email, a push -# notification, or just appear in the UI somewhere): -# -# class Comment < ActiveRecord::Base -# belongs_to :commentable, polymorphic: true -# after_create -> { Notification.create! comment: self, -# recipients: commentable.recipients } -# end -# -# That's what you want the bulk of the time. New comment creates a new -# Notification. But there may well be off cases, like copying a commentable -# and its comments, where you don't want that. So you'd have a concern -# something like this: -# -# module Copyable -# def copy_to(destination) -# Notification.suppress do -# # Copy logic that creates new comments that we do not want -# # triggering notifications. -# end -# end -# end -# -# source://activerecord//lib/active_record/suppressor.rb#30 -module ActiveRecord::Suppressor - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActiveRecord::Suppressor::ClassMethods - - # source://activerecord//lib/active_record/suppressor.rb#49 - def save(**_arg0); end - - # source://activerecord//lib/active_record/suppressor.rb#53 - def save!(**_arg0); end - - class << self - # source://activerecord//lib/active_record/suppressor.rb#34 - def registry; end - end -end - -# source://activerecord//lib/active_record/suppressor.rb#39 -module ActiveRecord::Suppressor::ClassMethods - # source://activerecord//lib/active_record/suppressor.rb#40 - def suppress(&block); end -end - -# source://activerecord//lib/active_record/table_metadata.rb#4 -class ActiveRecord::TableMetadata - # @return [TableMetadata] a new instance of 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#61 - def aggregated_with?(aggregation_name); end - - # Returns the value of attribute arel_table. - # - # source://activerecord//lib/active_record/table_metadata.rb#76 - def arel_table; end - - # source://activerecord//lib/active_record/table_metadata.rb#29 - def associated_table(table_name); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/table_metadata.rb#25 - def associated_with?(table_name); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/table_metadata.rb#21 - def has_column?(column_name); end - - # source://activerecord//lib/active_record/table_metadata.rb#5 - def join_foreign_key(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/table_metadata.rb#5 - def join_foreign_type(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/table_metadata.rb#5 - def join_primary_key(*_arg0, **_arg1, &_arg2); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/table_metadata.rb#53 - def polymorphic_association?; end - - # source://activerecord//lib/active_record/table_metadata.rb#66 - 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#61 - def reflect_on_aggregation(aggregation_name); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/table_metadata.rb#57 - def through_association?; end - - # source://activerecord//lib/active_record/table_metadata.rb#17 - def type(column_name); end - - private - - # Returns the value of attribute klass. - # - # source://activerecord//lib/active_record/table_metadata.rb#79 - def klass; end - - # Returns the value of attribute reflection. - # - # source://activerecord//lib/active_record/table_metadata.rb#79 - 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 -class ActiveRecord::TableNotSpecified < ::ActiveRecord::ActiveRecordError; end - -# source://activerecord//lib/active_record.rb#159 -module ActiveRecord::Tasks - extend ::ActiveSupport::Autoload -end - -# source://activerecord//lib/active_record/tasks/database_tasks.rb#7 -class ActiveRecord::Tasks::DatabaseNotSupported < ::StandardError; end - -# 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. -# -# 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 -# (in such case after configuring the database tasks, you can also use the rake tasks -# defined in Active Record). -# -# The possible config values are: -# -# * +env+: current environment (like Rails.env). -# * +database_configuration+: configuration of your databases (as in +config/database.yml+). -# * +db_dir+: your +db+ directory. -# * +fixtures_path+: a path to fixtures directory. -# * +migrations_paths+: a list of paths to directories with migrations. -# * +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: -# -# include ActiveRecord::Tasks -# DatabaseTasks.database_configuration = YAML.load_file('my_database_config.yml') -# DatabaseTasks.db_dir = 'db' -# # other settings... -# -# DatabaseTasks.create_current('production') -# -# source://activerecord//lib/active_record/tasks/database_tasks.rb#38 -module ActiveRecord::Tasks::DatabaseTasks - extend ::ActiveRecord::Tasks::DatabaseTasks - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#470 - def cache_dump_filename(db_config_name, schema_cache_path: T.unsafe(nil)); end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#324 - def charset(configuration, *arguments); end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#319 - 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#487 - def check_schema_file(filename); end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#309 - def check_target_version; end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#513 - def clear_schema_cache(filename); end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#334 - def collation(configuration, *arguments); end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#329 - def collation_current(env_name = T.unsafe(nil), db_name = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#120 - def create(configuration, *arguments); end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#132 - def create_all; end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#183 - 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 - 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 - def database_configuration=(_arg0); end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#277 - def db_configs_with_versions(db_configs); end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#88 - 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 - def db_dir=(_arg0); end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#222 - def drop(configuration, *arguments); end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#234 - def drop_all; end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#238 - def drop_current(environment = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#423 - def dump_schema(db_config, format = T.unsafe(nil)); end - - # Dumps the schema cache in YAML format for the connection into the file - # - # ==== Examples: - # ActiveRecord::Tasks::DatabaseTasks.dump_schema_cache(ActiveRecord::Base.connection, "tmp/schema_dump.yaml") - # - # source://activerecord//lib/active_record/tasks/database_tasks.rb#509 - def dump_schema_cache(conn, filename); end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#108 - 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 - def env=(_arg0); end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#96 - 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 - def fixtures_path=(_arg0); end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#154 - def for_each(databases); end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#367 - def load_schema(db_config, format = T.unsafe(nil), file = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#480 - 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 - def load_seed; end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#256 - def migrate(version = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#294 - def migrate_status; end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#92 - 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 - def migrations_paths=(_arg0); end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#112 - def name; end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#188 - def prepare_all; end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#339 - def purge(configuration); end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#344 - def purge_all; end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#348 - def purge_current(environment = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#169 - def raise_for_multi_db(environment = T.unsafe(nil), command:); end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#405 - 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 - def register_task(pattern, task); end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#104 - 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 - def root=(_arg0); end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#457 - def schema_dump_path(db_config, format = T.unsafe(nil)); end - - # source://activesupport/7.0.4.2/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 - 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 - 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 - def seed_loader=(_arg0); end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#140 - def setup_initial_database_yaml; end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#353 - def structure_dump(configuration, *arguments); end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#360 - def structure_load(configuration, *arguments); end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#315 - def target_version; end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#250 - def truncate_all(environment = T.unsafe(nil)); end - - private - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#541 - def class_for_adapter(adapter); end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#518 - 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 - def database_adapter_for(db_config, *arguments); end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#549 - def each_current_configuration(environment, name = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#562 - def each_local_configuration; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/tasks/database_tasks.rb#574 - def local_database?(db_config); end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#522 - def resolve_configuration(configuration); end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#579 - def schema_sha1(file); end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#583 - def structure_dump_flags_for(adapter); end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#591 - def structure_load_flags_for(adapter); end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#242 - def truncate_tables(db_config); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/tasks/database_tasks.rb#526 - def verbose?; end - - class << self - # source://activerecord//lib/active_record/tasks/database_tasks.rb#48 - def structure_dump_flags; end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#48 - def structure_dump_flags=(val); end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#54 - def structure_load_flags; end - - # source://activerecord//lib/active_record/tasks/database_tasks.rb#54 - def structure_load_flags=(val); end - end -end - -# source://activerecord//lib/active_record/tasks/database_tasks.rb#61 -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 - def initialize(db_config); end - - # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#35 - def charset; end - - # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#39 - 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 - def create; end - - # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#25 - 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 - def purge; end - - # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#43 - def structure_dump(filename, extra_flags); end - - # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#61 - def structure_load(filename, extra_flags); end - - private - - # Returns the value of attribute configuration_hash. - # - # 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 - def configuration_hash_without_database; end - - # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#77 - def creation_options; end - - # Returns the value of attribute db_config. - # - # 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 - def prepare_command_options; end - - # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#102 - def run_cmd(cmd, args, action); end - - # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#106 - def run_cmd_error(cmd, args, action); end - - class << self - # @return [Boolean] - # - # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#10 - def using_database_configurations?; end - end -end - -# source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#6 -ActiveRecord::Tasks::MySQLDatabaseTasks::ER_DB_CREATE_EXISTS = T.let(T.unsafe(nil), Integer) - -# source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#7 -class ActiveRecord::Tasks::PostgreSQLDatabaseTasks - # @return [PostgreSQLDatabaseTasks] a new instance of PostgreSQLDatabaseTasks - # - # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#19 - def initialize(db_config); end - - # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#35 - 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 - 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#30 - 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 - def purge; end - - # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#49 - def structure_dump(filename, extra_flags); end - - # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#82 - 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 - def configuration_hash; end - - # Returns the value of attribute db_config. - # - # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#90 - def db_config; end - - # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#92 - 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#103 - def psql_env; end - - # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#127 - def remove_sql_header_comments(filename); end - - # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#116 - def run_cmd(cmd, args, action); end - - # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#120 - def run_cmd_error(cmd, args, action); end - - class << self - # @return [Boolean] - # - # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#15 - def using_database_configurations?; end - end -end - -# source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#8 -ActiveRecord::Tasks::PostgreSQLDatabaseTasks::DEFAULT_ENCODING = T.let(T.unsafe(nil), String) - -# source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#9 -ActiveRecord::Tasks::PostgreSQLDatabaseTasks::ON_ERROR_STOP_1 = T.let(T.unsafe(nil), String) - -# source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#10 -ActiveRecord::Tasks::PostgreSQLDatabaseTasks::SQL_COMMENT_BEGIN = T.let(T.unsafe(nil), String) - -# source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#5 -class ActiveRecord::Tasks::SQLiteDatabaseTasks - # @return [SQLiteDatabaseTasks] a new instance of SQLiteDatabaseTasks - # - # source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#12 - def initialize(db_config, root = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#41 - 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 - def create; end - - # source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#24 - 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 - def purge; end - - # source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#45 - def structure_dump(filename, extra_flags); end - - # source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#60 - def structure_load(filename, extra_flags); end - - private - - # Returns the value of attribute db_config. - # - # source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#66 - def db_config; 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 - def run_cmd(cmd, args, out); end - - # source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#72 - def run_cmd_error(cmd, args); end - - class << self - # @return [Boolean] - # - # source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#8 - def using_database_configurations?; end - end -end - -# source://activerecord//lib/active_record/test_databases.rb#6 -module ActiveRecord::TestDatabases - class << self - # source://activerecord//lib/active_record/test_databases.rb#11 - def create_and_load_schema(i, env_name:); end - end -end - -# source://activerecord//lib/active_record/test_fixtures.rb#6 -module ActiveRecord::TestFixtures - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveRecord::TestFixtures::ClassMethods - - # source://activerecord//lib/active_record/test_fixtures.rb#14 - def after_teardown; end - - # source://activerecord//lib/active_record/test_fixtures.rb#9 - def before_setup; end - - # source://activerecord//lib/active_record/test_fixtures.rb#189 - def enlist_fixture_connections; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/test_fixtures.rb#103 - def run_in_transaction?; end - - # source://activerecord//lib/active_record/test_fixtures.rb#108 - def setup_fixtures(config = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/test_fixtures.rb#172 - def teardown_fixtures; end - - private - - # source://activerecord//lib/active_record/test_fixtures.rb#278 - def instantiate_fixtures; end - - # source://activerecord//lib/active_record/test_fixtures.rb#274 - def load_fixtures(config); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/test_fixtures.rb#290 - def load_instances?; end - - # Shares the writing connection pool with connections on - # other handlers. - # - # In an application with a primary and replica the test fixtures - # need to share a connection pool so that the reading connection - # can see data in the open transaction on the writing connection. - # - # source://activerecord//lib/active_record/test_fixtures.rb#202 - def setup_shared_connection_pool; end - - # source://activerecord//lib/active_record/test_fixtures.rb#245 - def teardown_shared_connection_pool; end - - module GeneratedClassMethods - 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_table_names; end - def fixture_table_names=(value); end - def fixture_table_names?; end - def lock_threads; end - def lock_threads=(value); end - def lock_threads?; end - def pre_loaded_fixtures; end - def pre_loaded_fixtures=(value); end - def pre_loaded_fixtures?; end - def use_instantiated_fixtures; end - def use_instantiated_fixtures=(value); end - def use_instantiated_fixtures?; end - def use_transactional_tests; end - def use_transactional_tests=(value); end - def use_transactional_tests?; end - end - - module GeneratedInstanceMethods - 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_table_names; end - def fixture_table_names=(value); end - def fixture_table_names?; end - def lock_threads; end - def lock_threads=(value); end - def lock_threads?; end - def pre_loaded_fixtures; end - def pre_loaded_fixtures=(value); end - def pre_loaded_fixtures?; end - def use_instantiated_fixtures; end - def use_instantiated_fixtures=(value); end - def use_instantiated_fixtures?; end - def use_transactional_tests; end - def use_transactional_tests=(value); end - def use_transactional_tests?; end - end -end - -# source://activerecord//lib/active_record/test_fixtures.rb#29 -module ActiveRecord::TestFixtures::ClassMethods - # source://activerecord//lib/active_record/test_fixtures.rb#42 - def fixtures(*fixture_set_names); end - - # Sets the model class for a fixture when the class name cannot be inferred from the fixture name. - # - # Examples: - # - # set_fixture_class some_fixture: SomeModel, - # 'namespaced/fixture' => Another::Model - # - # The keys must be the fixture names, that coincide with the short paths to the fixture files. - # - # source://activerecord//lib/active_record/test_fixtures.rb#38 - def set_fixture_class(class_names = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/test_fixtures.rb#56 - def setup_fixture_accessors(fixture_set_names = T.unsafe(nil)); end - - # Prevents automatically wrapping each specified test in a transaction, - # to allow application logic transactions to be tested in a top-level - # (non-nested) context. - # - # source://activerecord//lib/active_record/test_fixtures.rb#92 - def uses_transaction(*methods); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/test_fixtures.rb#97 - def uses_transaction?(method); end -end - -# source://activerecord//lib/active_record/associations.rb#177 -class ActiveRecord::ThroughCantAssociateThroughHasOneOrManyReflection < ::ActiveRecord::ActiveRecordError - # @return [ThroughCantAssociateThroughHasOneOrManyReflection] a new instance of ThroughCantAssociateThroughHasOneOrManyReflection - # - # source://activerecord//lib/active_record/associations.rb#178 - def initialize(owner = T.unsafe(nil), reflection = T.unsafe(nil)); end -end - -# source://activerecord//lib/active_record/associations.rb#208 -class ActiveRecord::ThroughNestedAssociationsAreReadonly < ::ActiveRecord::ActiveRecordError - # @return [ThroughNestedAssociationsAreReadonly] a new instance of ThroughNestedAssociationsAreReadonly - # - # source://activerecord//lib/active_record/associations.rb#209 - def initialize(owner = T.unsafe(nil), reflection = T.unsafe(nil)); end -end - -# = Active Record \Timestamp -# -# Active Record automatically timestamps create and update operations if the -# table has fields named created_at/created_on or -# updated_at/updated_on. -# -# Timestamping can be turned off by setting: -# -# config.active_record.record_timestamps = false -# -# Timestamps are in UTC by default but you can use the local timezone by setting: -# -# config.active_record.default_timezone = :local -# -# == Time Zone aware attributes -# -# Active Record keeps all the datetime and time columns -# timezone aware. By default, these values are stored in the database as UTC -# and converted back to the current Time.zone when pulled from the database. -# -# This feature can be turned off completely by setting: -# -# config.active_record.time_zone_aware_attributes = false -# -# You can also specify that only datetime columns should be time-zone -# aware (while time should not) by setting: -# -# ActiveRecord::Base.time_zone_aware_types = [:datetime] -# -# You can also add database specific timezone aware types. For example, for PostgreSQL: -# -# ActiveRecord::Base.time_zone_aware_types += [:tsrange, :tstzrange] -# -# Finally, you can indicate specific attributes of a model for which time zone -# conversion should not applied, for instance by setting: -# -# class Topic < ActiveRecord::Base -# self.skip_time_zone_conversion_for_attributes = [:written_on] -# end -# -# source://activerecord//lib/active_record/timestamp.rb#43 -module ActiveRecord::Timestamp - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveRecord::Timestamp::ClassMethods - - private - - # source://activerecord//lib/active_record/timestamp.rb#99 - def _create_record; end - - # source://activerecord//lib/active_record/timestamp.rb#111 - def _update_record; end - - # source://activerecord//lib/active_record/timestamp.rb#141 - def all_timestamp_attributes_in_model; end - - # Clear attributes and changed_attributes - # - # source://activerecord//lib/active_record/timestamp.rb#156 - def clear_timestamp_attributes; end - - # source://activerecord//lib/active_record/timestamp.rb#124 - def create_or_update(touch: T.unsafe(nil), **_arg1); end - - # source://activerecord//lib/active_record/timestamp.rb#145 - def current_time_from_proper_timezone; end - - # source://activerecord//lib/active_record/timestamp.rb#50 - def initialize_dup(other); end - - # source://activerecord//lib/active_record/timestamp.rb#149 - def max_updated_column_timestamp; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/timestamp.rb#129 - def should_record_timestamps?; end - - # source://activerecord//lib/active_record/timestamp.rb#133 - def timestamp_attributes_for_create_in_model; end - - # source://activerecord//lib/active_record/timestamp.rb#137 - def timestamp_attributes_for_update_in_model; end - - module GeneratedClassMethods - def record_timestamps; end - def record_timestamps=(value); end - def record_timestamps?; end - end - - module GeneratedInstanceMethods - def record_timestamps; end - def record_timestamps=(value); end - def record_timestamps?; end - end -end - -# source://activerecord//lib/active_record/timestamp.rb#55 -module ActiveRecord::Timestamp::ClassMethods - # source://activerecord//lib/active_record/timestamp.rb#72 - def all_timestamp_attributes_in_model; end - - # source://activerecord//lib/active_record/timestamp.rb#77 - def current_time_from_proper_timezone; end - - # source://activerecord//lib/active_record/timestamp.rb#62 - def timestamp_attributes_for_create_in_model; end - - # source://activerecord//lib/active_record/timestamp.rb#67 - def timestamp_attributes_for_update_in_model; end - - # source://activerecord//lib/active_record/timestamp.rb#56 - def touch_attributes_with_time(*names, time: 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 - def timestamp_attributes_for_update; end -end - -# = Active Record Touch Later -# -# source://activerecord//lib/active_record/touch_later.rb#5 -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 - def touch(*names, time: T.unsafe(nil)); end - - # source://activerecord//lib/active_record/touch_later.rb#11 - def touch_later(*names); end - - 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 - def has_defer_touch_attrs?; end - - # source://activerecord//lib/active_record/touch_later.rb#45 - def surreptitiously_touch(attr_names); end - - # source://activerecord//lib/active_record/touch_later.rb#52 - def touch_deferred_attributes; end -end - -# TransactionIsolationError will be raised under the following conditions: -# -# * The adapter does not support setting the isolation level -# * 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. -# -# source://activerecord//lib/active_record/errors.rb#411 -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. -# -# 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 -class ActiveRecord::TransactionRollbackError < ::ActiveRecord::StatementInvalid; end - -# See ActiveRecord::Transactions::ClassMethods for documentation. -# -# source://activerecord//lib/active_record/transactions.rb#5 -module ActiveRecord::Transactions - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActiveRecord::Transactions::ClassMethods - - # source://activerecord//lib/active_record/transactions.rb#309 - def before_committed!; end - - # Call the #after_commit callbacks. - # - # 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 - def committed!(should_run_callbacks: T.unsafe(nil)); end - - # source://activerecord//lib/active_record/transactions.rb#293 - 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 - def rolledback!(force_restore_state: T.unsafe(nil), should_run_callbacks: T.unsafe(nil)); end - - # source://activerecord//lib/active_record/transactions.rb#297 - def save(**_arg0); end - - # source://activerecord//lib/active_record/transactions.rb#301 - def save!(**_arg0); end - - # source://activerecord//lib/active_record/transactions.rb#305 - def touch(*_arg0, **_arg1); end - - # See ActiveRecord::Transactions::ClassMethods for detailed documentation. - # - # source://activerecord//lib/active_record/transactions.rb#289 - def transaction(**options, &block); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/transactions.rb#360 - 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. - # - # This method is available within the context of an ActiveRecord::Base - # instance. - # - # source://activerecord//lib/active_record/transactions.rb#345 - def with_transaction_returning_status; end - - private - - # Returns the value of attribute _committed_already_called. - # - # source://activerecord//lib/active_record/transactions.rb#366 - def _committed_already_called; end - - # Returns the value of attribute _trigger_destroy_callback. - # - # source://activerecord//lib/active_record/transactions.rb#366 - def _trigger_destroy_callback; end - - # Returns the value of attribute _trigger_update_callback. - # - # source://activerecord//lib/active_record/transactions.rb#366 - 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 - 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 - def clear_transaction_record_state; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/transactions.rb#437 - def has_transactional_callbacks?; 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 - 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 - 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 - 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 -# -# \Transactions are protective blocks where SQL statements are only permanent -# if they can all succeed as one atomic action. The classic example is a -# transfer between two accounts where you can only have a deposit if the -# withdrawal succeeded and vice versa. \Transactions enforce the integrity of -# the database and guard the data against program errors or database -# break-downs. So basically you should use transaction blocks whenever you -# have a number of statements that must be executed together or not at all. -# -# For example: -# -# ActiveRecord::Base.transaction do -# david.withdrawal(100) -# mary.deposit(100) -# end -# -# This example will only take money from David and give it to Mary if neither -# +withdrawal+ nor +deposit+ raise an exception. Exceptions will force a -# ROLLBACK that returns the database to the state before the transaction -# began. Be aware, though, that the objects will _not_ have their instance -# data returned to their pre-transactional state. -# -# == Different Active Record classes in a single transaction -# -# Though the #transaction class method is called on some Active Record class, -# the objects within the transaction block need not all be instances of -# that class. This is because transactions are per-database connection, not -# per-model. -# -# In this example a +balance+ record is transactionally saved even -# though #transaction is called on the +Account+ class: -# -# Account.transaction do -# balance.save! -# account.save! -# end -# -# The #transaction method is also available as a model instance method. -# For example, you can also do this: -# -# balance.transaction do -# balance.save! -# account.save! -# end -# -# == Transactions are not distributed across database connections -# -# A transaction acts on a single database connection. If you have -# multiple class-specific databases, the transaction will not protect -# interaction among them. One workaround is to begin a transaction -# on each class whose models you alter: -# -# Student.transaction do -# Course.transaction do -# course.enroll(student) -# student.units += course.units -# end -# end -# -# This is a poor solution, but fully distributed transactions are beyond -# the scope of Active Record. -# -# == +save+ and +destroy+ are automatically wrapped in a transaction -# -# Both {#save}[rdoc-ref:Persistence#save] and -# {#destroy}[rdoc-ref:Persistence#destroy] come wrapped in a transaction that ensures -# that whatever you do in validations or callbacks will happen under its -# protected cover. So you can use validations to check for values that -# the transaction depends on or you can raise exceptions in the callbacks -# to rollback, including after_* callbacks. -# -# As a consequence changes to the database are not seen outside your connection -# until the operation is complete. For example, if you try to update the index -# of a search engine in +after_save+ the indexer won't see the updated record. -# The #after_commit callback is the only one that is triggered once the update -# is committed. See below. -# -# == Exception handling and rolling back -# -# Also have in mind that exceptions thrown within a transaction block will -# be propagated (after triggering the ROLLBACK), so you should be ready to -# 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. -# -# *Warning*: one should not catch ActiveRecord::StatementInvalid exceptions -# inside a transaction block. ActiveRecord::StatementInvalid exceptions indicate that an -# error occurred at the database level, for example when a unique constraint -# is violated. On some database systems, such as PostgreSQL, database errors -# inside a transaction cause the entire transaction to become unusable -# until it's restarted from the beginning. Here is an example which -# demonstrates the problem: -# -# # Suppose that we have a Number model with a unique column called 'i'. -# Number.transaction do -# Number.create(i: 0) -# begin -# # This will raise a unique constraint error... -# Number.create(i: 0) -# rescue ActiveRecord::StatementInvalid -# # ...which we ignore. -# end -# -# # On PostgreSQL, the transaction is now unusable. The following -# # statement will cause a PostgreSQL error, even though the unique -# # constraint is no longer violated: -# Number.create(i: 1) -# # => "PG::Error: ERROR: current transaction is aborted, commands -# # ignored until end of transaction block" -# end -# -# One should restart the entire transaction if an -# ActiveRecord::StatementInvalid occurred. -# -# == Nested transactions -# -# #transaction calls can be nested. By default, this makes all database -# statements in the nested transaction block become part of the parent -# transaction. For example, the following behavior may be surprising: -# -# User::User.transaction do -# User::User.create(username: 'Kotori') -# User::User.transaction do -# User::User.create(username: 'Nemu') -# raise ActiveRecord::Rollback -# end -# end -# -# creates both "Kotori" and "Nemu". Reason is the ActiveRecord::Rollback -# exception in the nested block does not issue a ROLLBACK. Since these exceptions -# are captured in transaction blocks, the parent block does not see it and the -# real transaction is committed. -# -# In order to get a ROLLBACK for the nested transaction you may ask for a real -# sub-transaction by passing requires_new: true. If anything goes wrong, -# the database rolls back to the beginning of the sub-transaction without rolling -# back the parent transaction. If we add it to the previous example: -# -# User::User.transaction do -# User::User.create(username: 'Kotori') -# User::User.transaction(requires_new: true) do -# User::User.create(username: 'Nemu') -# raise ActiveRecord::Rollback -# end -# end -# -# only "Kotori" is created. -# -# Most databases don't support true nested transactions. At the time of -# writing, the only database that we're aware of that supports true nested -# transactions, is MS-SQL. Because of this, Active Record emulates nested -# transactions by using savepoints. See -# https://dev.mysql.com/doc/refman/en/savepoint.html -# for more information about savepoints. -# -# === \Callbacks -# -# There are two types of callbacks associated with committing and rolling back transactions: -# #after_commit and #after_rollback. -# -# #after_commit callbacks are called on every record saved or destroyed within a -# transaction immediately after the transaction is committed. #after_rollback callbacks -# are called on every record saved or destroyed within a transaction immediately after the -# transaction or savepoint is rolled back. -# -# These callbacks are useful for interacting with other systems since you will be guaranteed -# that the callback is only executed when the database is in a permanent state. For example, -# #after_commit is a good spot to put in a hook to clearing a cache since clearing it from -# within a transaction could trigger the cache to be regenerated before the database is updated. -# -# === Caveats -# -# If you're on MySQL, then do not use Data Definition Language (DDL) operations in nested -# transactions blocks that are emulated with savepoints. That is, do not execute statements -# like 'CREATE TABLE' inside such blocks. This is because MySQL automatically -# releases all savepoints upon executing a DDL operation. When +transaction+ -# is finished and tries to release the savepoint it created earlier, a -# database error will occur because the savepoint has already been -# automatically released. The following example demonstrates the problem: -# -# Model.connection.transaction do # BEGIN -# Model.connection.transaction(requires_new: true) do # CREATE SAVEPOINT active_record_1 -# Model.connection.create_table(...) # active_record_1 now automatically released -# end # RELEASE SAVEPOINT active_record_1 -# # ^^^^ BOOM! database error! -# end -# -# Note that "TRUNCATE" is also a MySQL DDL statement! -# -# source://activerecord//lib/active_record/transactions.rb#206 -module ActiveRecord::Transactions::ClassMethods - # This callback is called after a record has been created, updated, or destroyed. - # - # You can specify that the callback should only be fired by a certain action with - # the +:on+ option: - # - # after_commit :do_foo, on: :create - # after_commit :do_bar, on: :update - # after_commit :do_baz, on: :destroy - # - # after_commit :do_foo_bar, on: [:create, :update] - # after_commit :do_bar_baz, on: [:update, :destroy] - # - # source://activerecord//lib/active_record/transactions.rb#229 - def after_commit(*args, &block); end - - # Shortcut for after_commit :hook, on: :create. - # - # source://activerecord//lib/active_record/transactions.rb#241 - def after_create_commit(*args, &block); end - - # Shortcut for after_commit :hook, on: :destroy. - # - # source://activerecord//lib/active_record/transactions.rb#253 - 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 - def after_rollback(*args, &block); end - - # Shortcut for after_commit :hook, on: [ :create, :update ]. - # - # source://activerecord//lib/active_record/transactions.rb#235 - def after_save_commit(*args, &block); end - - # Shortcut for after_commit :hook, on: :update. - # - # source://activerecord//lib/active_record/transactions.rb#247 - def after_update_commit(*args, &block); end - - # source://activerecord//lib/active_record/transactions.rb#212 - def before_commit(*args, &block); end - - # See the ConnectionAdapters::DatabaseStatements#transaction API docs. - # - # source://activerecord//lib/active_record/transactions.rb#208 - def transaction(**options, &block); end - - private - - # source://activerecord//lib/active_record/transactions.rb#281 - def assert_valid_transaction_action(actions); end - - # source://activerecord//lib/active_record/transactions.rb#267 - def set_options_for_callbacks!(args, enforced_options = T.unsafe(nil)); end -end - -# source://activerecord//lib/active_record/translation.rb#4 -module ActiveRecord::Translation - include ::ActiveModel::Naming - include ::ActiveModel::Translation - - # Set the i18n scope to override ActiveModel. - # - # source://activerecord//lib/active_record/translation.rb#20 - def i18n_scope; end - - # Set the lookup ancestors for ActiveModel. - # - # source://activerecord//lib/active_record/translation.rb#8 - def lookup_ancestors; end -end - -# :stopdoc: -# -# source://activerecord//lib/active_record/type/internal/timezone.rb#4 -module ActiveRecord::Type - class << self - # source://activerecord//lib/active_record/type.rb#49 - def adapter_name_from(model); end - - # source://activerecord//lib/active_record/type.rb#27 - def add_modifier(*_arg0, **_arg1, &_arg2); end - - # source://activerecord//lib/active_record/type.rb#45 - def default_value; end - - # source://activerecord//lib/active_record/type.rb#41 - def lookup(*args, adapter: T.unsafe(nil), **kwargs); end - - # Add a new type to the registry, allowing it to be referenced as a - # symbol by {ActiveRecord::Base.attribute}[rdoc-ref:Attributes::ClassMethods#attribute]. - # If your type is only meant to be used with a specific database adapter, you can - # do so by passing adapter: :postgresql. If your type has the same - # name as a native type for the current adapter, an exception will be - # raised unless you specify an +:override+ option. override: true will - # cause your type to be used instead of the native type. override: - # false will cause the native type to be used over yours if one exists. - # - # source://activerecord//lib/active_record/type.rb#37 - def register(type_name, klass = T.unsafe(nil), **options, &block); end - - # source://activerecord//lib/active_record/type.rb#26 - def registry; end - - # source://activerecord//lib/active_record/type.rb#26 - def registry=(_arg0); end - - private - - # source://activerecord//lib/active_record/type.rb#54 - def current_adapter_name; end - end -end - -# source://activerecord//lib/active_record/type/adapter_specific_registry.rb#8 -class ActiveRecord::Type::AdapterSpecificRegistry - # @return [AdapterSpecificRegistry] a new instance of AdapterSpecificRegistry - # - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#9 - def initialize; end - - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#18 - def add_modifier(options, klass, **args); end - - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#30 - def lookup(symbol, *args, **kwargs); end - - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#22 - def register(type_name, klass = T.unsafe(nil), **options, &block); end - - private - - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#43 - def find_registration(symbol, *args, **kwargs); end - - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#13 - def initialize_copy(other); end - - # Returns the value of attribute registrations. - # - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#41 - def registrations; end -end - -# source://activerecord//lib/active_record/type.rb#59 -ActiveRecord::Type::BigInteger = ActiveModel::Type::BigInteger - -# source://activerecord//lib/active_record/type.rb#60 -ActiveRecord::Type::Binary = ActiveModel::Type::Binary - -# source://activerecord//lib/active_record/type.rb#61 -ActiveRecord::Type::Boolean = ActiveModel::Type::Boolean - -# source://activerecord//lib/active_record/type/date.rb#5 -class ActiveRecord::Type::Date < ::ActiveModel::Type::Date - include ::ActiveRecord::Type::Internal::Timezone -end - -# source://activerecord//lib/active_record/type/date_time.rb#5 -class ActiveRecord::Type::DateTime < ::ActiveModel::Type::DateTime - include ::ActiveRecord::Type::Internal::Timezone -end - -# source://activerecord//lib/active_record/type.rb#62 -ActiveRecord::Type::Decimal = ActiveModel::Type::Decimal - -# source://activerecord//lib/active_record/type/decimal_without_scale.rb#5 -class ActiveRecord::Type::DecimalWithoutScale < ::ActiveModel::Type::BigInteger - # source://activerecord//lib/active_record/type/decimal_without_scale.rb#6 - def type; end - - # source://activerecord//lib/active_record/type/decimal_without_scale.rb#10 - def type_cast_for_schema(value); end -end - -# source://activerecord//lib/active_record/type/adapter_specific_registry.rb#117 -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 - def initialize(options, klass, adapter: T.unsafe(nil)); end - - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#124 - def call(registry, *args, **kwargs); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#129 - def matches?(*args, **kwargs); end - - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#133 - def priority; end - - private - - # Returns the value of attribute klass. - # - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#138 - def klass; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#140 - def matches_options?(**kwargs); end - - # Returns the value of attribute options. - # - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#138 - def options; end -end - -# source://activerecord//lib/active_record/type.rb#63 -ActiveRecord::Type::Float = ActiveModel::Type::Float - -# source://activerecord//lib/active_record/type/hash_lookup_type_map.rb#5 -class ActiveRecord::Type::HashLookupTypeMap - # @return [HashLookupTypeMap] a new instance of HashLookupTypeMap - # - # source://activerecord//lib/active_record/type/hash_lookup_type_map.rb#6 - def initialize(parent = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/type/hash_lookup_type_map.rb#39 - def alias_type(type, alias_type); end - - # source://activerecord//lib/active_record/type/hash_lookup_type_map.rb#34 - def clear; end - - # source://activerecord//lib/active_record/type/hash_lookup_type_map.rb#17 - def fetch(lookup_key, *args, &block); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/type/hash_lookup_type_map.rb#43 - def key?(key); end - - # source://activerecord//lib/active_record/type/hash_lookup_type_map.rb#47 - def keys; end - - # source://activerecord//lib/active_record/type/hash_lookup_type_map.rb#13 - def lookup(lookup_key, *args); end - - # @raise [::ArgumentError] - # - # source://activerecord//lib/active_record/type/hash_lookup_type_map.rb#23 - def register_type(key, value = T.unsafe(nil), &block); end - - private - - # source://activerecord//lib/active_record/type/hash_lookup_type_map.rb#52 - def perform_fetch(type, *args, &block); end -end - -# source://activerecord//lib/active_record/type.rb#65 -ActiveRecord::Type::ImmutableString = ActiveModel::Type::ImmutableString - -# source://activerecord//lib/active_record/type.rb#64 -ActiveRecord::Type::Integer = ActiveModel::Type::Integer - -# source://activerecord//lib/active_record/type/internal/timezone.rb#5 -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 - def default_timezone; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/type/internal/timezone.rb#7 - def is_utc?; end -end - -# source://activerecord//lib/active_record/type/json.rb#5 -class ActiveRecord::Type::Json < ::ActiveModel::Type::Value - include ::ActiveModel::Type::Helpers::Mutable - - # source://activerecord//lib/active_record/type/json.rb#25 - def accessor; end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/type/json.rb#21 - def changed_in_place?(raw_old_value, new_value); end - - # source://activerecord//lib/active_record/type/json.rb#12 - def deserialize(value); end - - # source://activerecord//lib/active_record/type/json.rb#17 - def serialize(value); end - - # source://activerecord//lib/active_record/type/json.rb#8 - def type; end -end - -# source://activerecord//lib/active_record/type/adapter_specific_registry.rb#50 -class ActiveRecord::Type::Registration - # @return [Registration] a new instance of Registration - # - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#51 - def initialize(name, block, adapter: T.unsafe(nil), override: T.unsafe(nil)); end - - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#70 - def <=>(other); end - - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#58 - def call(_registry, *args, adapter: T.unsafe(nil), **kwargs); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#66 - 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 - def adapter; end - - # Returns the value of attribute block. - # - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#80 - def block; end - - # Returns the value of attribute name. - # - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#80 - def name; end - - # Returns the value of attribute override. - # - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#80 - def override; end - - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#82 - def priority; end - - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#93 - def priority_except_adapter; end - - private - - # @return [Boolean] - # - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#102 - def conflicts_with?(other); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#111 - def has_adapter_conflict?(other); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#98 - def matches_adapter?(adapter: T.unsafe(nil), **_arg1); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#107 - def same_priority_except_adapter?(other); end -end - -# source://activerecord//lib/active_record/type/serialized.rb#5 -class ActiveRecord::Type::Serialized - include ::ActiveModel::Type::Helpers::Mutable - - # @return [Serialized] a new instance of Serialized - # - # source://activerecord//lib/active_record/type/serialized.rb#12 - def initialize(subtype, coder); end - - # source://activerecord//lib/active_record/type/serialized.rb#44 - def accessor; end - - # source://activerecord//lib/active_record/type/serialized.rb#48 - def assert_valid_value(value); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/type/serialized.rb#37 - def changed_in_place?(raw_old_value, value); end - - # Returns the value of attribute coder. - # - # source://activerecord//lib/active_record/type/serialized.rb#10 - def coder; end - - # source://activerecord//lib/active_record/type/serialized.rb#18 - def deserialize(value); end - - # @return [Boolean] - # - # source://activerecord//lib/active_record/type/serialized.rb#54 - def force_equality?(value); end - - # source://activerecord//lib/active_record/type/serialized.rb#33 - def inspect; end - - # source://activerecord//lib/active_record/type/serialized.rb#26 - def serialize(value); end - - # Returns the value of attribute subtype. - # - # source://activerecord//lib/active_record/type/serialized.rb#10 - def subtype; end - - private - - # @return [Boolean] - # - # source://activerecord//lib/active_record/type/serialized.rb#59 - def default_value?(value); end - - # source://activerecord//lib/active_record/type/serialized.rb#63 - def encoded(value); end -end - -# source://activerecord//lib/active_record/type.rb#66 -ActiveRecord::Type::String = ActiveModel::Type::String - -# source://activerecord//lib/active_record/type/text.rb#5 -class ActiveRecord::Type::Text < ::ActiveModel::Type::String - # source://activerecord//lib/active_record/type/text.rb#6 - def type; end -end - -# source://activerecord//lib/active_record/type/time.rb#5 -class ActiveRecord::Type::Time < ::ActiveModel::Type::Time - include ::ActiveRecord::Type::Internal::Timezone - - # source://activerecord//lib/active_record/type/time.rb#11 - def serialize(value); end - - private - - # source://activerecord//lib/active_record/type/time.rb#21 - def cast_value(value); end -end - -# source://activerecord//lib/active_record/type/time.rb#8 -class ActiveRecord::Type::Time::Value; end - -# source://activerecord//lib/active_record/type/type_map.rb#7 -class ActiveRecord::Type::TypeMap - # @return [TypeMap] a new instance of TypeMap - # - # source://activerecord//lib/active_record/type/type_map.rb#8 - def initialize(parent = T.unsafe(nil)); end - - # source://activerecord//lib/active_record/type/type_map.rb#35 - def alias_type(key, target_key); end - - # source://activerecord//lib/active_record/type/type_map.rb#18 - def fetch(lookup_key, &block); end - - # source://activerecord//lib/active_record/type/type_map.rb#14 - def lookup(lookup_key); end - - # @raise [::ArgumentError] - # - # source://activerecord//lib/active_record/type/type_map.rb#24 - def register_type(key, value = T.unsafe(nil), &block); end - - protected - - # source://activerecord//lib/active_record/type/type_map.rb#43 - def perform_fetch(lookup_key, &block); end -end - -# source://activerecord//lib/active_record/type/unsigned_integer.rb#5 -class ActiveRecord::Type::UnsignedInteger < ::ActiveModel::Type::Integer - private - - # source://activerecord//lib/active_record/type/unsigned_integer.rb#7 - def max_value; end - - # source://activerecord//lib/active_record/type/unsigned_integer.rb#11 - def min_value; end -end - -# source://activerecord//lib/active_record/type.rb#67 -ActiveRecord::Type::Value = ActiveModel::Type::Value - -# source://activerecord//lib/active_record/type_caster/map.rb#4 -module ActiveRecord::TypeCaster; end - -# source://activerecord//lib/active_record/type_caster/connection.rb#5 -class ActiveRecord::TypeCaster::Connection - # @return [Connection] a new instance of Connection - # - # source://activerecord//lib/active_record/type_caster/connection.rb#6 - def initialize(klass, table_name); end - - # source://activerecord//lib/active_record/type_caster/connection.rb#11 - def type_cast_for_database(attr_name, value); end - - # source://activerecord//lib/active_record/type_caster/connection.rb#16 - def type_for_attribute(attr_name); end - - private - - # source://activerecord//lib/active_record/type_caster/connection.rb#27 - def connection(*_arg0, **_arg1, &_arg2); end - - # Returns the value of attribute table_name. - # - # source://activerecord//lib/active_record/type_caster/connection.rb#30 - def table_name; end -end - -# source://activerecord//lib/active_record/type_caster/map.rb#5 -class ActiveRecord::TypeCaster::Map - # @return [Map] a new instance of Map - # - # source://activerecord//lib/active_record/type_caster/map.rb#6 - def initialize(klass); end - - # source://activerecord//lib/active_record/type_caster/map.rb#10 - def type_cast_for_database(attr_name, value); end - - # source://activerecord//lib/active_record/type_caster/map.rb#15 - def type_for_attribute(name); end - - private - - # Returns the value of attribute klass. - # - # source://activerecord//lib/active_record/type_caster/map.rb#20 - def klass; end -end - -# source://activerecord//lib/active_record/type/adapter_specific_registry.rb#148 -class ActiveRecord::TypeConflictError < ::StandardError; end - -# Raised when unknown attributes are supplied via mass assignment. -# -# source://activerecord//lib/active_record/errors.rb#347 -ActiveRecord::UnknownAttributeError = ActiveModel::UnknownAttributeError - -# UnknownAttributeReference is raised when an unknown and potentially unsafe -# value is passed to a query method. For example, passing a non column name -# value to a relation's #order method might cause this exception. -# -# When working around this exception, caution should be taken to avoid SQL -# injection vulnerabilities when passing user-provided values to query -# methods. Known-safe values can be passed to query methods by wrapping them -# in Arel.sql. -# -# For example, the following code would raise this exception: -# -# Post.order("REPLACE(title, 'misc', 'zzzz') asc").pluck(:id) -# -# The desired result can be accomplished by wrapping the known-safe string -# in Arel.sql: -# -# Post.order(Arel.sql("REPLACE(title, 'misc', 'zzzz') asc")).pluck(:id) -# -# 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 -class ActiveRecord::UnknownAttributeReference < ::ActiveRecord::ActiveRecordError; end - -# source://activerecord//lib/active_record/migration.rb#113 -class ActiveRecord::UnknownMigrationVersionError < ::ActiveRecord::MigrationError - # @return [UnknownMigrationVersionError] a new instance of UnknownMigrationVersionError - # - # source://activerecord//lib/active_record/migration.rb#114 - def initialize(version = T.unsafe(nil)); end -end - -# Raised when a primary key is needed, but not specified in the schema or model. -# -# source://activerecord//lib/active_record/errors.rb#375 -class ActiveRecord::UnknownPrimaryKey < ::ActiveRecord::ActiveRecordError - # @return [UnknownPrimaryKey] a new instance of UnknownPrimaryKey - # - # source://activerecord//lib/active_record/errors.rb#378 - 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 - def model; end -end - -# source://activerecord//lib/active_record/gem_version.rb#9 -module ActiveRecord::VERSION; end - -# source://activerecord//lib/active_record/gem_version.rb#10 -ActiveRecord::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) - -# source://activerecord//lib/active_record/gem_version.rb#11 -ActiveRecord::VERSION::MINOR = T.let(T.unsafe(nil), Integer) - -# source://activerecord//lib/active_record/gem_version.rb#13 -ActiveRecord::VERSION::PRE = T.let(T.unsafe(nil), String) - -# source://activerecord//lib/active_record/gem_version.rb#15 -ActiveRecord::VERSION::STRING = T.let(T.unsafe(nil), String) - -# source://activerecord//lib/active_record/gem_version.rb#12 -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 -# {new_record?}[rdoc-ref:Persistence#new_record?]. -# -# source://activerecord//lib/active_record/validations.rb#38 -module ActiveRecord::Validations - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - include ::ActiveSupport::Callbacks - include ::ActiveModel::Validations::HelperMethods - include ::ActiveModel::Validations - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveModel::Validations::ClassMethods - mixes_in_class_methods ::ActiveModel::Callbacks - mixes_in_class_methods ::ActiveSupport::Callbacks::ClassMethods - mixes_in_class_methods ::ActiveSupport::DescendantsTracker - mixes_in_class_methods ::ActiveModel::Translation - mixes_in_class_methods ::ActiveModel::Validations::HelperMethods - mixes_in_class_methods ::ActiveRecord::Validations::ClassMethods - - # The validation process on save can be skipped by passing validate: false. - # The validation context can be changed by passing context: context. - # 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 - 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 - def save!(**options); end - - # Runs all the validations within the specified context. Returns +true+ if - # no errors are found, +false+ otherwise. - # - # Aliased as #validate. - # - # 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. - # - # \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 - def valid?(context = T.unsafe(nil)); end - - # Runs all the validations within the specified context. Returns +true+ if - # no errors are found, +false+ otherwise. - # - # Aliased as #validate. - # - # 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. - # - # \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 - def validate(context = T.unsafe(nil)); end - - private - - # source://activerecord//lib/active_record/validations.rb#75 - def default_validation_context; end - - # source://activerecord//lib/active_record/validations.rb#83 - def perform_validations(options = T.unsafe(nil)); end - - # @raise [RecordInvalid] - # - # source://activerecord//lib/active_record/validations.rb#79 - def raise_validation_error; end - - module GeneratedClassMethods - def __callbacks; end - def __callbacks=(value); end - def __callbacks?; end - def _validators; end - def _validators=(value); end - def _validators?; end - end - - module GeneratedInstanceMethods - def __callbacks; end - def __callbacks?; end - def _validators; end - def _validators?; end - end -end - -# source://activerecord//lib/active_record/validations/absence.rb#5 -class ActiveRecord::Validations::AbsenceValidator < ::ActiveModel::Validations::AbsenceValidator - # source://activerecord//lib/active_record/validations/absence.rb#6 - def validate_each(record, attribute, association_or_value); end -end - -# source://activerecord//lib/active_record/validations/associated.rb#5 -class ActiveRecord::Validations::AssociatedValidator < ::ActiveModel::EachValidator - # source://activerecord//lib/active_record/validations/associated.rb#6 - def validate_each(record, attribute, value); end - - private - - # @return [Boolean] - # - # source://activerecord//lib/active_record/validations/associated.rb#13 - def valid_object?(record); end -end - -# source://activerecord//lib/active_record/validations/associated.rb#18 -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. - # - # See ActiveModel::Validations::HelperMethods.validates_absence_of for more information. - # - # source://activerecord//lib/active_record/validations/absence.rb#20 - def validates_absence_of(*attr_names); end - - # Validates whether the associated object or objects are all valid. - # Works with any kind of association. - # - # class Book < ActiveRecord::Base - # has_many :pages - # belongs_to :library - # - # validates_associated :pages, :library - # end - # - # WARNING: This validation must not be used on both ends of an association. - # Doing so will lead to a circular dependency and cause infinite recursion. - # - # NOTE: This validation will not fail if the association hasn't been - # assigned. If you want to ensure that the association is both present and - # guaranteed to be valid, you also need to use - # {validates_presence_of}[rdoc-ref:Validations::ClassMethods#validates_presence_of]. - # - # Configuration options: - # - # * :message - A custom error message (default is: "is invalid"). - # * :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. - # - # source://activerecord//lib/active_record/validations/associated.rb#54 - def validates_associated(*attr_names); end - - # Validates that the specified attributes match the length restrictions supplied. - # If the attribute is an association, records that are marked for destruction are not counted. - # - # See ActiveModel::Validations::HelperMethods.validates_length_of for more information. - # - # source://activerecord//lib/active_record/validations/length.rb#19 - 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. - # - # See ActiveModel::Validations::HelperMethods.validates_numericality_of for more information. - # - # source://activerecord//lib/active_record/validations/numericality.rb#30 - 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. - # - # class Person < ActiveRecord::Base - # has_one :face - # validates_presence_of :face - # end - # - # 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. - # - # 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 - def validates_presence_of(*attr_names); end - - # Validates that the specified attributes match the length restrictions supplied. - # If the attribute is an association, records that are marked for destruction are not counted. - # - # See ActiveModel::Validations::HelperMethods.validates_length_of for more information. - # - # source://activerecord//lib/active_record/validations/length.rb#19 - def validates_size_of(*attr_names); end - - # Validates whether the value of the specified attributes are unique - # across the system. Useful for making sure that only one user - # can be named "davidhh". - # - # class Person < ActiveRecord::Base - # validates_uniqueness_of :user_name - # end - # - # It can also validate whether the value of the specified attributes are - # unique based on a :scope parameter: - # - # class Person < ActiveRecord::Base - # validates_uniqueness_of :user_name, scope: :account_id - # end - # - # Or even multiple scope parameters. For example, making sure that a - # teacher can only be on the schedule once per semester for a particular - # class. - # - # class TeacherSchedule < ActiveRecord::Base - # validates_uniqueness_of :teacher_id, scope: [:semester_id, :class_id] - # end - # - # It is also possible to limit the uniqueness constraint to a set of - # records matching certain conditions. In this example archived articles - # are not being taken into consideration when validating uniqueness - # of the title attribute: - # - # class Article < ActiveRecord::Base - # validates_uniqueness_of :title, conditions: -> { where.not(status: 'archived') } - # end - # - # To build conditions based on the record's state, define the conditions - # callable with a parameter, which will be the record itself. This - # example validates the title is unique for the year of publication: - # - # class Article < ActiveRecord::Base - # validates_uniqueness_of :title, conditions: ->(article) { - # published_at = article.published_at - # where(published_at: published_at.beginning_of_year..published_at.end_of_year) - # } - # end - # - # When the record is created, a check is performed to make sure that no - # record exists in the database with the given value for the specified - # attribute (that maps to a column). When the record is updated, - # the same check is made but disregarding the record itself. - # - # Configuration options: - # - # * :message - Specifies a custom error message (default is: - # "has already been taken"). - # * :scope - One or more columns by which to limit the scope of - # the uniqueness constraint. - # * :conditions - Specify the conditions to be included as a - # WHERE SQL fragment to limit the uniqueness constraint lookup - # (e.g. conditions: -> { where(status: 'active') }). - # * :case_sensitive - Looks for an exact match. Ignored by - # non-text columns. The default behavior respects the default database collation. - # * :allow_nil - If set to +true+, skips this validation if the - # attribute is +nil+ (default is +false+). - # * :allow_blank - If set to +true+, skips this validation if the - # attribute is blank (default is +false+). - # * :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. - # - # === Concurrency and integrity - # - # Using this validation method in conjunction with - # {ActiveRecord::Base#save}[rdoc-ref:Persistence#save] - # does not guarantee the absence of duplicate record insertions, because - # uniqueness checks on the application level are inherently prone to race - # conditions. For example, suppose that two users try to post a Comment at - # the same time, and a Comment's title must be unique. At the database-level, - # the actions performed by these users could be interleaved in the following manner: - # - # User 1 | User 2 - # ------------------------------------+-------------------------------------- - # # User 1 checks whether there's | - # # already a comment with the title | - # # 'My Post'. This is not the case. | - # SELECT * FROM comments | - # WHERE title = 'My Post' | - # | - # | # User 2 does the same thing and also - # | # infers that their title is unique. - # | SELECT * FROM comments - # | WHERE title = 'My Post' - # | - # # User 1 inserts their comment. | - # INSERT INTO comments | - # (title, content) VALUES | - # ('My Post', 'hi!') | - # | - # | # User 2 does the same thing. - # | INSERT INTO comments - # | (title, content) VALUES - # | ('My Post', 'hello!') - # | - # | # ^^^^^^ - # | # Boom! We now have a duplicate - # | # title! - # - # The best way to work around this problem is to add a unique index to the database table using - # {connection.add_index}[rdoc-ref:ConnectionAdapters::SchemaStatements#add_index]. - # In the rare case that a race condition occurs, the database will guarantee - # the field's uniqueness. - # - # 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 - # 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 - # {optimistic concurrency control}[https://en.wikipedia.org/wiki/Optimistic_concurrency_control]. - # - # The bundled ActiveRecord::ConnectionAdapters distinguish unique index - # constraint errors from other types of database errors by throwing an - # ActiveRecord::RecordNotUnique exception. For other adapters you will - # have to parse the (database-specific) exception message to detect such - # a case. - # - # The following bundled adapters throw the ActiveRecord::RecordNotUnique exception: - # - # * ActiveRecord::ConnectionAdapters::Mysql2Adapter. - # * ActiveRecord::ConnectionAdapters::SQLite3Adapter. - # * ActiveRecord::ConnectionAdapters::PostgreSQLAdapter. - # - # source://activerecord//lib/active_record/validations/uniqueness.rb#241 - def validates_uniqueness_of(*attr_names); end -end - -# source://activerecord//lib/active_record/validations/length.rb#5 -class ActiveRecord::Validations::LengthValidator < ::ActiveModel::Validations::LengthValidator - # source://activerecord//lib/active_record/validations/length.rb#6 - def validate_each(record, attribute, association_or_value); end -end - -# source://activerecord//lib/active_record/validations/numericality.rb#5 -class ActiveRecord::Validations::NumericalityValidator < ::ActiveModel::Validations::NumericalityValidator - # source://activerecord//lib/active_record/validations/numericality.rb#6 - def validate_each(record, attribute, value, precision: T.unsafe(nil), scale: T.unsafe(nil)); end - - private - - # source://activerecord//lib/active_record/validations/numericality.rb#13 - def column_precision_for(record, attribute); end - - # source://activerecord//lib/active_record/validations/numericality.rb#17 - def column_scale_for(record, attribute); end -end - -# source://activerecord//lib/active_record/validations/presence.rb#5 -class ActiveRecord::Validations::PresenceValidator < ::ActiveModel::Validations::PresenceValidator - # source://activerecord//lib/active_record/validations/presence.rb#6 - def validate_each(record, attribute, association_or_value); end -end - -# source://activerecord//lib/active_record/validations/uniqueness.rb#5 -class ActiveRecord::Validations::UniquenessValidator < ::ActiveModel::EachValidator - # @return [UniquenessValidator] a new instance of UniquenessValidator - # - # source://activerecord//lib/active_record/validations/uniqueness.rb#6 - def initialize(options); end - - # source://activerecord//lib/active_record/validations/uniqueness.rb#19 - def validate_each(record, attribute, value); end - - private - - # source://activerecord//lib/active_record/validations/uniqueness.rb#67 - def build_relation(klass, attribute, value); 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 - def find_finder_class_for(record); end - - # source://activerecord//lib/active_record/validations/uniqueness.rb#98 - def map_enum_attribute(klass, attribute, value); end - - # source://activerecord//lib/active_record/validations/uniqueness.rb#85 - def scope_relation(record, relation); 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 -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 -class ActiveRecord::WrappedDatabaseException < ::ActiveRecord::StatementInvalid; end - -# source://activerecord//lib/arel/errors.rb#3 -module Arel - class << self - # @return [Boolean] - # - # source://activerecord//lib/arel.rb#46 - def arel_node?(value); end - - # source://activerecord//lib/arel.rb#50 - def fetch_attribute(value, &block); end - - # Wrap a known-safe SQL string for passing to query methods, e.g. - # - # Post.order(Arel.sql("REPLACE(title, 'misc', 'zzzz') asc")).pluck(:id) - # - # Great caution should be taken to avoid SQL injection vulnerabilities. - # 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 - - # source://activerecord//lib/arel.rb#42 - def star; end - end -end - -# source://activerecord//lib/arel/alias_predication.rb#4 -module Arel::AliasPredication - # source://activerecord//lib/arel/alias_predication.rb#5 - def as(other); end -end - -# source://activerecord//lib/arel/errors.rb#4 -class Arel::ArelError < ::StandardError; end - -# source://activerecord//lib/arel/attributes/attribute.rb#32 -Arel::Attribute = Arel::Attributes::Attribute - -# source://activerecord//lib/arel/attributes/attribute.rb#4 -module Arel::Attributes; end - -# source://activerecord//lib/arel/attributes/attribute.rb#5 -class Arel::Attributes::Attribute < ::Struct - include ::Arel::Expressions - include ::Arel::Predications - include ::Arel::AliasPredication - include ::Arel::OrderPredications - include ::Arel::Math - - # @return [Boolean] - # - # source://activerecord//lib/arel/attributes/attribute.rb#26 - def able_to_type_cast?; end - - # Create a node for lowering this attribute - # - # source://activerecord//lib/arel/attributes/attribute.rb#18 - def lower; end - - # source://activerecord//lib/arel/attributes/attribute.rb#22 - def type_cast_for_database(value); end - - # source://activerecord//lib/arel/attributes/attribute.rb#12 - def type_caster; end -end - -# source://activerecord//lib/arel/collectors/plain_string.rb#4 -module Arel::Collectors; end - -# source://activerecord//lib/arel/collectors/bind.rb#5 -class Arel::Collectors::Bind - # @return [Bind] a new instance of Bind - # - # source://activerecord//lib/arel/collectors/bind.rb#6 - def initialize; end - - # source://activerecord//lib/arel/collectors/bind.rb#10 - def <<(str); end - - # source://activerecord//lib/arel/collectors/bind.rb#14 - def add_bind(bind); end - - # source://activerecord//lib/arel/collectors/bind.rb#19 - def add_binds(binds, proc_for_binds = T.unsafe(nil)); end - - # source://activerecord//lib/arel/collectors/bind.rb#24 - def value; end -end - -# source://activerecord//lib/arel/collectors/composite.rb#5 -class Arel::Collectors::Composite - # @return [Composite] a new instance of Composite - # - # source://activerecord//lib/arel/collectors/composite.rb#8 - def initialize(left, right); end - - # source://activerecord//lib/arel/collectors/composite.rb#13 - def <<(str); end - - # source://activerecord//lib/arel/collectors/composite.rb#19 - def add_bind(bind, &block); end - - # source://activerecord//lib/arel/collectors/composite.rb#25 - def add_binds(binds, proc_for_binds = T.unsafe(nil), &block); end - - # Returns the value of attribute preparable. - # - # source://activerecord//lib/arel/collectors/composite.rb#6 - def preparable; end - - # Sets the attribute preparable - # - # @param value the value to set the attribute preparable to. - # - # source://activerecord//lib/arel/collectors/composite.rb#6 - def preparable=(_arg0); end - - # source://activerecord//lib/arel/collectors/composite.rb#31 - def value; end - - private - - # Returns the value of attribute left. - # - # source://activerecord//lib/arel/collectors/composite.rb#36 - def left; end - - # Returns the value of attribute right. - # - # source://activerecord//lib/arel/collectors/composite.rb#36 - def right; end -end - -# source://activerecord//lib/arel/collectors/plain_string.rb#5 -class Arel::Collectors::PlainString - # @return [PlainString] a new instance of PlainString - # - # source://activerecord//lib/arel/collectors/plain_string.rb#6 - def initialize; end - - # source://activerecord//lib/arel/collectors/plain_string.rb#14 - def <<(str); end - - # source://activerecord//lib/arel/collectors/plain_string.rb#10 - def value; end -end - -# source://activerecord//lib/arel/collectors/sql_string.rb#7 -class Arel::Collectors::SQLString < ::Arel::Collectors::PlainString - # @return [SQLString] a new instance of SQLString - # - # source://activerecord//lib/arel/collectors/sql_string.rb#10 - def initialize(*_arg0); end - - # source://activerecord//lib/arel/collectors/sql_string.rb#15 - def add_bind(bind); end - - # source://activerecord//lib/arel/collectors/sql_string.rb#21 - def add_binds(binds, proc_for_binds = T.unsafe(nil), &block); end - - # Returns the value of attribute preparable. - # - # source://activerecord//lib/arel/collectors/sql_string.rb#8 - def preparable; end - - # Sets the attribute preparable - # - # @param value the value to set the attribute preparable to. - # - # source://activerecord//lib/arel/collectors/sql_string.rb#8 - def preparable=(_arg0); end -end - -# source://activerecord//lib/arel/collectors/substitute_binds.rb#5 -class Arel::Collectors::SubstituteBinds - # @return [SubstituteBinds] a new instance of SubstituteBinds - # - # source://activerecord//lib/arel/collectors/substitute_binds.rb#8 - def initialize(quoter, delegate_collector); end - - # source://activerecord//lib/arel/collectors/substitute_binds.rb#13 - def <<(str); end - - # source://activerecord//lib/arel/collectors/substitute_binds.rb#18 - def add_bind(bind); end - - # source://activerecord//lib/arel/collectors/substitute_binds.rb#23 - def add_binds(binds, proc_for_binds = T.unsafe(nil)); end - - # Returns the value of attribute preparable. - # - # source://activerecord//lib/arel/collectors/substitute_binds.rb#6 - def preparable; end - - # Sets the attribute preparable - # - # @param value the value to set the attribute preparable to. - # - # source://activerecord//lib/arel/collectors/substitute_binds.rb#6 - def preparable=(_arg0); end - - # source://activerecord//lib/arel/collectors/substitute_binds.rb#27 - def value; end - - private - - # Returns the value of attribute delegate. - # - # source://activerecord//lib/arel/collectors/substitute_binds.rb#32 - def delegate; end - - # Returns the value of attribute quoter. - # - # source://activerecord//lib/arel/collectors/substitute_binds.rb#32 - def quoter; end -end - -# FIXME hopefully we can remove this -# -# source://activerecord//lib/arel/crud.rb#6 -module Arel::Crud - # source://activerecord//lib/arel/crud.rb#36 - def compile_delete(key = T.unsafe(nil), having_clause = T.unsafe(nil), group_values_columns = T.unsafe(nil)); end - - # source://activerecord//lib/arel/crud.rb#7 - def compile_insert(values); end - - # source://activerecord//lib/arel/crud.rb#17 - def compile_update(values, key = T.unsafe(nil), having_clause = T.unsafe(nil), group_values_columns = T.unsafe(nil)); end - - # source://activerecord//lib/arel/crud.rb#13 - def create_insert; end -end - -# source://activerecord//lib/arel/delete_manager.rb#4 -class Arel::DeleteManager < ::Arel::TreeManager - include ::Arel::TreeManager::StatementMethods - - # @return [DeleteManager] a new instance of DeleteManager - # - # source://activerecord//lib/arel/delete_manager.rb#7 - def initialize(table = T.unsafe(nil)); end - - # source://activerecord//lib/arel/delete_manager.rb#11 - def from(relation); end - - # source://activerecord//lib/arel/delete_manager.rb#16 - def group(columns); end - - # source://activerecord//lib/arel/delete_manager.rb#27 - def having(expr); end -end - -# source://activerecord//lib/arel/errors.rb#7 -class Arel::EmptyJoinError < ::Arel::ArelError; end - -# source://activerecord//lib/arel/expressions.rb#4 -module Arel::Expressions - # source://activerecord//lib/arel/expressions.rb#21 - def average; end - - # source://activerecord//lib/arel/expressions.rb#5 - def count(distinct = T.unsafe(nil)); end - - # source://activerecord//lib/arel/expressions.rb#25 - def extract(field); end - - # source://activerecord//lib/arel/expressions.rb#13 - def maximum; end - - # source://activerecord//lib/arel/expressions.rb#17 - def minimum; end - - # source://activerecord//lib/arel/expressions.rb#9 - def sum; end -end - -# Methods for creating various nodes -# -# source://activerecord//lib/arel/factory_methods.rb#6 -module Arel::FactoryMethods - # source://activerecord//lib/arel/factory_methods.rb#45 - def coalesce(*exprs); end - - # source://activerecord//lib/arel/factory_methods.rb#27 - def create_and(clauses); end - - # source://activerecord//lib/arel/factory_methods.rb#11 - def create_false; end - - # source://activerecord//lib/arel/factory_methods.rb#19 - def create_join(to, constraint = T.unsafe(nil), klass = T.unsafe(nil)); end - - # source://activerecord//lib/arel/factory_methods.rb#31 - def create_on(expr); end - - # source://activerecord//lib/arel/factory_methods.rb#23 - def create_string_join(to); end - - # source://activerecord//lib/arel/factory_methods.rb#15 - def create_table_alias(relation, name); end - - # source://activerecord//lib/arel/factory_methods.rb#7 - def create_true; end - - # source://activerecord//lib/arel/factory_methods.rb#35 - def grouping(expr); end - - # Create a LOWER() function - # - # source://activerecord//lib/arel/factory_methods.rb#41 - def lower(column); end -end - -# source://activerecord//lib/arel/filter_predications.rb#4 -module Arel::FilterPredications - # source://activerecord//lib/arel/filter_predications.rb#5 - def filter(expr); end -end - -# source://activerecord//lib/arel/insert_manager.rb#4 -class Arel::InsertManager < ::Arel::TreeManager - # @return [InsertManager] a new instance of InsertManager - # - # source://activerecord//lib/arel/insert_manager.rb#5 - def initialize(table = T.unsafe(nil)); end - - # source://activerecord//lib/arel/insert_manager.rb#14 - def columns; end - - # source://activerecord//lib/arel/insert_manager.rb#40 - def create_values(values); end - - # source://activerecord//lib/arel/insert_manager.rb#44 - def create_values_list(rows); end - - # source://activerecord//lib/arel/insert_manager.rb#21 - def insert(fields); end - - # source://activerecord//lib/arel/insert_manager.rb#9 - def into(table); end - - # source://activerecord//lib/arel/insert_manager.rb#17 - def select(select); end - - # source://activerecord//lib/arel/insert_manager.rb#15 - def values=(val); end -end - -# source://activerecord//lib/arel/math.rb#4 -module Arel::Math - # source://activerecord//lib/arel/math.rb#21 - def &(other); end - - # source://activerecord//lib/arel/math.rb#5 - def *(other); end - - # source://activerecord//lib/arel/math.rb#9 - def +(other); end - - # source://activerecord//lib/arel/math.rb#13 - def -(other); end - - # source://activerecord//lib/arel/math.rb#17 - def /(other); end - - # source://activerecord//lib/arel/math.rb#33 - def <<(other); end - - # source://activerecord//lib/arel/math.rb#37 - def >>(other); end - - # source://activerecord//lib/arel/math.rb#29 - def ^(other); end - - # source://activerecord//lib/arel/math.rb#25 - def |(other); end - - # source://activerecord//lib/arel/math.rb#41 - def ~; end -end - -# source://activerecord//lib/arel/nodes/node.rb#4 -module Arel::Nodes - class << self - # source://activerecord//lib/arel/nodes/casted.rb#48 - def build_quoted(other, attribute = T.unsafe(nil)); end - end -end - -# source://activerecord//lib/arel/nodes/infix_operation.rb#32 -class Arel::Nodes::Addition < ::Arel::Nodes::InfixOperation - # @return [Addition] a new instance of Addition - # - # source://activerecord//lib/arel/nodes/infix_operation.rb#33 - def initialize(left, right); end -end - -# source://activerecord//lib/arel/nodes/and.rb#5 -class Arel::Nodes::And < ::Arel::Nodes::NodeExpression - # @return [And] a new instance of And - # - # source://activerecord//lib/arel/nodes/and.rb#8 - def initialize(children); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/and.rb#25 - def ==(other); end - - # Returns the value of attribute children. - # - # source://activerecord//lib/arel/nodes/and.rb#6 - def children; end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/and.rb#25 - def eql?(other); end - - # source://activerecord//lib/arel/nodes/and.rb#21 - def hash; end - - # source://activerecord//lib/arel/nodes/and.rb#13 - def left; end - - # source://activerecord//lib/arel/nodes/and.rb#17 - 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/ascending.rb#5 -class Arel::Nodes::Ascending < ::Arel::Nodes::Ordering - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/ascending.rb#14 - def ascending?; end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/ascending.rb#18 - def descending?; end - - # source://activerecord//lib/arel/nodes/ascending.rb#10 - def direction; end - - # source://activerecord//lib/arel/nodes/ascending.rb#6 - def reverse; end -end - -# source://activerecord//lib/arel/nodes/binary.rb#123 -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 -class Arel::Nodes::Between < ::Arel::Nodes::Binary - include ::Arel::Nodes::FetchAttribute -end - -# source://activerecord//lib/arel/nodes/unary.rb#41 -class Arel::Nodes::Bin < ::Arel::Nodes::Unary; end - -# source://activerecord//lib/arel/nodes/binary.rb#5 -class Arel::Nodes::Binary < ::Arel::Nodes::NodeExpression - # @return [Binary] a new instance of Binary - # - # source://activerecord//lib/arel/nodes/binary.rb#8 - def initialize(left, right); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/binary.rb#24 - def ==(other); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/binary.rb#24 - def eql?(other); end - - # source://activerecord//lib/arel/nodes/binary.rb#20 - def hash; end - - # Returns the value of attribute left. - # - # source://activerecord//lib/arel/nodes/binary.rb#6 - def left; end - - # Sets the attribute left - # - # @param value the value to set the attribute left to. - # - # source://activerecord//lib/arel/nodes/binary.rb#6 - def left=(_arg0); end - - # Returns the value of attribute right. - # - # source://activerecord//lib/arel/nodes/binary.rb#6 - def right; end - - # Sets the attribute right - # - # @param value the value to set the attribute right to. - # - # source://activerecord//lib/arel/nodes/binary.rb#6 - def right=(_arg0); end - - private - - # source://activerecord//lib/arel/nodes/binary.rb#14 - def initialize_copy(other); end -end - -# source://activerecord//lib/arel/nodes/bind_param.rb#5 -class Arel::Nodes::BindParam < ::Arel::Nodes::Node - # @return [BindParam] a new instance of BindParam - # - # source://activerecord//lib/arel/nodes/bind_param.rb#8 - def initialize(value); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/bind_param.rb#17 - def ==(other); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/bind_param.rb#17 - def eql?(other); end - - # source://activerecord//lib/arel/nodes/bind_param.rb#13 - def hash; end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/bind_param.rb#35 - def infinite?; end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/bind_param.rb#23 - def nil?; end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/bind_param.rb#39 - def unboundable?; end - - # Returns the value of attribute value. - # - # source://activerecord//lib/arel/nodes/bind_param.rb#6 - def value; end - - # source://activerecord//lib/arel/nodes/bind_param.rb#27 - def value_before_type_cast; end -end - -# source://activerecord//lib/arel/nodes/infix_operation.rb#62 -class Arel::Nodes::BitwiseAnd < ::Arel::Nodes::InfixOperation - # @return [BitwiseAnd] a new instance of BitwiseAnd - # - # source://activerecord//lib/arel/nodes/infix_operation.rb#63 - def initialize(left, right); end -end - -# source://activerecord//lib/arel/nodes/unary_operation.rb#14 -class Arel::Nodes::BitwiseNot < ::Arel::Nodes::UnaryOperation - # @return [BitwiseNot] a new instance of BitwiseNot - # - # source://activerecord//lib/arel/nodes/unary_operation.rb#15 - def initialize(operand); end -end - -# source://activerecord//lib/arel/nodes/infix_operation.rb#68 -class Arel::Nodes::BitwiseOr < ::Arel::Nodes::InfixOperation - # @return [BitwiseOr] a new instance of BitwiseOr - # - # source://activerecord//lib/arel/nodes/infix_operation.rb#69 - def initialize(left, right); end -end - -# source://activerecord//lib/arel/nodes/infix_operation.rb#80 -class Arel::Nodes::BitwiseShiftLeft < ::Arel::Nodes::InfixOperation - # @return [BitwiseShiftLeft] a new instance of BitwiseShiftLeft - # - # source://activerecord//lib/arel/nodes/infix_operation.rb#81 - def initialize(left, right); end -end - -# source://activerecord//lib/arel/nodes/infix_operation.rb#86 -class Arel::Nodes::BitwiseShiftRight < ::Arel::Nodes::InfixOperation - # @return [BitwiseShiftRight] a new instance of BitwiseShiftRight - # - # source://activerecord//lib/arel/nodes/infix_operation.rb#87 - def initialize(left, right); end -end - -# source://activerecord//lib/arel/nodes/infix_operation.rb#74 -class Arel::Nodes::BitwiseXor < ::Arel::Nodes::InfixOperation - # @return [BitwiseXor] a new instance of BitwiseXor - # - # source://activerecord//lib/arel/nodes/infix_operation.rb#75 - def initialize(left, right); end -end - -# source://activerecord//lib/arel/nodes/case.rb#5 -class Arel::Nodes::Case < ::Arel::Nodes::NodeExpression - # @return [Case] a new instance of Case - # - # source://activerecord//lib/arel/nodes/case.rb#8 - def initialize(expression = T.unsafe(nil), default = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/case.rb#40 - def ==(other); end - - # Returns the value of attribute case. - # - # source://activerecord//lib/arel/nodes/case.rb#6 - def case; end - - # Sets the attribute case - # - # @param value the value to set the attribute case to. - # - # source://activerecord//lib/arel/nodes/case.rb#6 - def case=(_arg0); end - - # Returns the value of attribute conditions. - # - # source://activerecord//lib/arel/nodes/case.rb#6 - def conditions; end - - # Sets the attribute conditions - # - # @param value the value to set the attribute conditions to. - # - # source://activerecord//lib/arel/nodes/case.rb#6 - def conditions=(_arg0); end - - # Returns the value of attribute default. - # - # source://activerecord//lib/arel/nodes/case.rb#6 - def default; end - - # Sets the attribute default - # - # @param value the value to set the attribute default to. - # - # source://activerecord//lib/arel/nodes/case.rb#6 - def default=(_arg0); end - - # source://activerecord//lib/arel/nodes/case.rb#24 - def else(expression); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/case.rb#40 - def eql?(other); end - - # source://activerecord//lib/arel/nodes/case.rb#36 - def hash; end - - # source://activerecord//lib/arel/nodes/case.rb#19 - def then(expression); end - - # source://activerecord//lib/arel/nodes/case.rb#14 - def when(condition, expression = T.unsafe(nil)); end - - private - - # source://activerecord//lib/arel/nodes/case.rb#29 - def initialize_copy(other); end -end - -# source://activerecord//lib/arel/nodes/casted.rb#5 -class Arel::Nodes::Casted < ::Arel::Nodes::NodeExpression - # @return [Casted] a new instance of Casted - # - # source://activerecord//lib/arel/nodes/casted.rb#9 - def initialize(value, attribute); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/casted.rb#29 - def ==(other); end - - # Returns the value of attribute attribute. - # - # source://activerecord//lib/arel/nodes/casted.rb#6 - def attribute; end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/casted.rb#29 - def eql?(other); end - - # source://activerecord//lib/arel/nodes/casted.rb#25 - def hash; end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/casted.rb#15 - def nil?; end - - # Returns the value of attribute value. - # - # source://activerecord//lib/arel/nodes/casted.rb#6 - def value; end - - # Returns the value of attribute value. - # - # source://activerecord//lib/arel/nodes/casted.rb#6 - def value_before_type_cast; end - - # source://activerecord//lib/arel/nodes/casted.rb#17 - def value_for_database; end -end - -# source://activerecord//lib/arel/nodes/comment.rb#5 -class Arel::Nodes::Comment < ::Arel::Nodes::Node - # @return [Comment] a new instance of Comment - # - # source://activerecord//lib/arel/nodes/comment.rb#8 - def initialize(values); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/comment.rb#22 - def ==(other); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/comment.rb#22 - def eql?(other); end - - # source://activerecord//lib/arel/nodes/comment.rb#18 - def hash; end - - # Returns the value of attribute values. - # - # source://activerecord//lib/arel/nodes/comment.rb#6 - def values; end - - private - - # source://activerecord//lib/arel/nodes/comment.rb#13 - def initialize_copy(other); end -end - -# source://activerecord//lib/arel/nodes/infix_operation.rb#44 -class Arel::Nodes::Concat < ::Arel::Nodes::InfixOperation - # @return [Concat] a new instance of Concat - # - # source://activerecord//lib/arel/nodes/infix_operation.rb#45 - def initialize(left, right); end -end - -# source://activerecord//lib/arel/nodes/infix_operation.rb#50 -class Arel::Nodes::Contains < ::Arel::Nodes::InfixOperation - # @return [Contains] a new instance of Contains - # - # source://activerecord//lib/arel/nodes/infix_operation.rb#51 - def initialize(left, right); end -end - -# source://activerecord//lib/arel/nodes/count.rb#5 -class Arel::Nodes::Count < ::Arel::Nodes::Function - # @return [Count] a new instance of Count - # - # source://activerecord//lib/arel/nodes/count.rb#6 - def initialize(expr, distinct = T.unsafe(nil), aliaz = T.unsafe(nil)); end -end - -# source://activerecord//lib/arel/nodes/unary.rb#41 -class Arel::Nodes::Cube < ::Arel::Nodes::Unary; end - -# source://activerecord//lib/arel/nodes/window.rb#103 -class Arel::Nodes::CurrentRow < ::Arel::Nodes::Node - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/window.rb#108 - def ==(other); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/window.rb#108 - def eql?(other); end - - # source://activerecord//lib/arel/nodes/window.rb#104 - def hash; end -end - -# source://activerecord//lib/arel/nodes/delete_statement.rb#5 -class Arel::Nodes::DeleteStatement < ::Arel::Nodes::Node - # @return [DeleteStatement] a new instance of DeleteStatement - # - # source://activerecord//lib/arel/nodes/delete_statement.rb#8 - def initialize(relation = T.unsafe(nil), wheres = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/delete_statement.rb#30 - def ==(other); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/delete_statement.rb#30 - def eql?(other); end - - # Returns the value of attribute groups. - # - # source://activerecord//lib/arel/nodes/delete_statement.rb#6 - def groups; end - - # Sets the attribute groups - # - # @param value the value to set the attribute groups to. - # - # source://activerecord//lib/arel/nodes/delete_statement.rb#6 - def groups=(_arg0); end - - # source://activerecord//lib/arel/nodes/delete_statement.rb#26 - def hash; end - - # Returns the value of attribute havings. - # - # source://activerecord//lib/arel/nodes/delete_statement.rb#6 - def havings; end - - # Sets the attribute havings - # - # @param value the value to set the attribute havings to. - # - # source://activerecord//lib/arel/nodes/delete_statement.rb#6 - def havings=(_arg0); end - - # Returns the value of attribute key. - # - # source://activerecord//lib/arel/nodes/delete_statement.rb#6 - def key; end - - # Sets the attribute key - # - # @param value the value to set the attribute key to. - # - # source://activerecord//lib/arel/nodes/delete_statement.rb#6 - def key=(_arg0); end - - # Returns the value of attribute limit. - # - # source://activerecord//lib/arel/nodes/delete_statement.rb#6 - def limit; end - - # Sets the attribute limit - # - # @param value the value to set the attribute limit to. - # - # source://activerecord//lib/arel/nodes/delete_statement.rb#6 - def limit=(_arg0); end - - # Returns the value of attribute offset. - # - # source://activerecord//lib/arel/nodes/delete_statement.rb#6 - def offset; end - - # Sets the attribute offset - # - # @param value the value to set the attribute offset to. - # - # source://activerecord//lib/arel/nodes/delete_statement.rb#6 - def offset=(_arg0); end - - # Returns the value of attribute orders. - # - # source://activerecord//lib/arel/nodes/delete_statement.rb#6 - def orders; end - - # Sets the attribute orders - # - # @param value the value to set the attribute orders to. - # - # source://activerecord//lib/arel/nodes/delete_statement.rb#6 - def orders=(_arg0); end - - # Returns the value of attribute relation. - # - # source://activerecord//lib/arel/nodes/delete_statement.rb#6 - def relation; end - - # Sets the attribute relation - # - # @param value the value to set the attribute relation to. - # - # source://activerecord//lib/arel/nodes/delete_statement.rb#6 - def relation=(_arg0); end - - # Returns the value of attribute wheres. - # - # source://activerecord//lib/arel/nodes/delete_statement.rb#6 - def wheres; end - - # Sets the attribute wheres - # - # @param value the value to set the attribute wheres to. - # - # source://activerecord//lib/arel/nodes/delete_statement.rb#6 - def wheres=(_arg0); end - - private - - # source://activerecord//lib/arel/nodes/delete_statement.rb#20 - def initialize_copy(other); end -end - -# source://activerecord//lib/arel/nodes/descending.rb#5 -class Arel::Nodes::Descending < ::Arel::Nodes::Ordering - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/descending.rb#14 - def ascending?; end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/descending.rb#18 - def descending?; end - - # source://activerecord//lib/arel/nodes/descending.rb#10 - def direction; end - - # source://activerecord//lib/arel/nodes/descending.rb#6 - def reverse; end -end - -# source://activerecord//lib/arel/nodes/terminal.rb#5 -class Arel::Nodes::Distinct < ::Arel::Nodes::NodeExpression - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/terminal.rb#10 - def ==(other); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/terminal.rb#10 - def eql?(other); end - - # source://activerecord//lib/arel/nodes/terminal.rb#6 - def hash; end -end - -# source://activerecord//lib/arel/nodes/unary.rb#41 -class Arel::Nodes::DistinctOn < ::Arel::Nodes::Unary; end - -# source://activerecord//lib/arel/nodes/infix_operation.rb#26 -class Arel::Nodes::Division < ::Arel::Nodes::InfixOperation - # @return [Division] a new instance of Division - # - # source://activerecord//lib/arel/nodes/infix_operation.rb#27 - def initialize(left, right); end -end - -# source://activerecord//lib/arel/nodes/matches.rb#16 -class Arel::Nodes::DoesNotMatch < ::Arel::Nodes::Matches; end - -# source://activerecord//lib/arel/nodes/case.rb#52 -class Arel::Nodes::Else < ::Arel::Nodes::Unary; end - -# source://activerecord//lib/arel/nodes/equality.rb#5 -class Arel::Nodes::Equality < ::Arel::Nodes::Binary - include ::Arel::Nodes::FetchAttribute - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/equality.rb#8 - def equality?; end - - # source://activerecord//lib/arel/nodes/equality.rb#10 - def invert; end -end - -# source://activerecord//lib/arel/nodes/binary.rb#123 -class Arel::Nodes::Except < ::Arel::Nodes::Binary; end - -# source://activerecord//lib/arel/nodes/function.rb#42 -class Arel::Nodes::Exists < ::Arel::Nodes::Function; end - -# source://activerecord//lib/arel/nodes/extract.rb#5 -class Arel::Nodes::Extract < ::Arel::Nodes::Unary - # @return [Extract] a new instance of Extract - # - # source://activerecord//lib/arel/nodes/extract.rb#8 - def initialize(expr, field); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/extract.rb#17 - def ==(other); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/extract.rb#17 - def eql?(other); end - - # Returns the value of attribute field. - # - # source://activerecord//lib/arel/nodes/extract.rb#6 - def field; end - - # Sets the attribute field - # - # @param value the value to set the attribute field to. - # - # source://activerecord//lib/arel/nodes/extract.rb#6 - def field=(_arg0); end - - # source://activerecord//lib/arel/nodes/extract.rb#13 - def hash; end -end - -# source://activerecord//lib/arel/nodes/false.rb#5 -class Arel::Nodes::False < ::Arel::Nodes::NodeExpression - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/false.rb#10 - def ==(other); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/false.rb#10 - def eql?(other); end - - # source://activerecord//lib/arel/nodes/false.rb#6 - def hash; end -end - -# source://activerecord//lib/arel/nodes/binary.rb#32 -module Arel::Nodes::FetchAttribute - # source://activerecord//lib/arel/nodes/binary.rb#33 - def fetch_attribute; end -end - -# source://activerecord//lib/arel/nodes/filter.rb#5 -class Arel::Nodes::Filter < ::Arel::Nodes::Binary - include ::Arel::WindowPredications -end - -# source://activerecord//lib/arel/nodes/window.rb#120 -class Arel::Nodes::Following < ::Arel::Nodes::Unary - # @return [Following] a new instance of Following - # - # source://activerecord//lib/arel/nodes/window.rb#121 - def initialize(expr = T.unsafe(nil)); end -end - -# source://activerecord//lib/arel/nodes/full_outer_join.rb#5 -class Arel::Nodes::FullOuterJoin < ::Arel::Nodes::Join; end - -# source://activerecord//lib/arel/nodes/function.rb#5 -class Arel::Nodes::Function < ::Arel::Nodes::NodeExpression - include ::Arel::WindowPredications - include ::Arel::FilterPredications - - # @return [Function] a new instance of Function - # - # source://activerecord//lib/arel/nodes/function.rb#10 - def initialize(expr, aliaz = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/function.rb#26 - def ==(other); end - - # Returns the value of attribute alias. - # - # source://activerecord//lib/arel/nodes/function.rb#8 - def alias; end - - # Sets the attribute alias - # - # @param value the value to set the attribute alias to. - # - # source://activerecord//lib/arel/nodes/function.rb#8 - def alias=(_arg0); end - - # source://activerecord//lib/arel/nodes/function.rb#17 - def as(aliaz); end - - # Returns the value of attribute distinct. - # - # source://activerecord//lib/arel/nodes/function.rb#8 - def distinct; end - - # Sets the attribute distinct - # - # @param value the value to set the attribute distinct to. - # - # source://activerecord//lib/arel/nodes/function.rb#8 - def distinct=(_arg0); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/function.rb#26 - def eql?(other); end - - # Returns the value of attribute expressions. - # - # source://activerecord//lib/arel/nodes/function.rb#8 - def expressions; end - - # Sets the attribute expressions - # - # @param value the value to set the attribute expressions to. - # - # source://activerecord//lib/arel/nodes/function.rb#8 - def expressions=(_arg0); end - - # source://activerecord//lib/arel/nodes/function.rb#22 - def hash; end -end - -# source://activerecord//lib/arel/nodes/binary.rb#44 -class Arel::Nodes::GreaterThan < ::Arel::Nodes::Binary - include ::Arel::Nodes::FetchAttribute - - # source://activerecord//lib/arel/nodes/binary.rb#47 - def invert; end -end - -# source://activerecord//lib/arel/nodes/binary.rb#52 -class Arel::Nodes::GreaterThanOrEqual < ::Arel::Nodes::Binary - include ::Arel::Nodes::FetchAttribute - - # source://activerecord//lib/arel/nodes/binary.rb#55 - def invert; end -end - -# source://activerecord//lib/arel/nodes/unary.rb#41 -class Arel::Nodes::Group < ::Arel::Nodes::Unary; end - -# source://activerecord//lib/arel/nodes/grouping.rb#5 -class Arel::Nodes::Grouping < ::Arel::Nodes::Unary - # source://activerecord//lib/arel/nodes/grouping.rb#6 - def fetch_attribute(&block); end -end - -# source://activerecord//lib/arel/nodes/unary.rb#41 -class Arel::Nodes::GroupingElement < ::Arel::Nodes::Unary; end - -# source://activerecord//lib/arel/nodes/unary.rb#41 -class Arel::Nodes::GroupingSet < ::Arel::Nodes::Unary; end - -# source://activerecord//lib/arel/nodes/homogeneous_in.rb#5 -class Arel::Nodes::HomogeneousIn < ::Arel::Nodes::Node - # @return [HomogeneousIn] a new instance of HomogeneousIn - # - # source://activerecord//lib/arel/nodes/homogeneous_in.rb#8 - def initialize(values, attribute, type); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/homogeneous_in.rb#18 - def ==(other); end - - # Returns the value of attribute attribute. - # - # source://activerecord//lib/arel/nodes/homogeneous_in.rb#6 - def attribute; end - - # source://activerecord//lib/arel/nodes/homogeneous_in.rb#47 - 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 - def eql?(other); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/homogeneous_in.rb#23 - def equality?; end - - # source://activerecord//lib/arel/nodes/homogeneous_in.rb#62 - def fetch_attribute(&block); end - - # source://activerecord//lib/arel/nodes/homogeneous_in.rb#14 - def hash; end - - # source://activerecord//lib/arel/nodes/homogeneous_in.rb#27 - def invert; end - - # source://activerecord//lib/arel/nodes/homogeneous_in.rb#31 - def left; end - - # source://activerecord//lib/arel/nodes/homogeneous_in.rb#58 - 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 - def type; end - - # Returns the value of attribute values. - # - # source://activerecord//lib/arel/nodes/homogeneous_in.rb#6 - def values; end - - protected - - # source://activerecord//lib/arel/nodes/homogeneous_in.rb#71 - def ivars; end -end - -# source://activerecord//lib/arel/nodes/in.rb#5 -class Arel::Nodes::In < ::Arel::Nodes::Binary - include ::Arel::Nodes::FetchAttribute - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/in.rb#8 - def equality?; end - - # source://activerecord//lib/arel/nodes/in.rb#10 - def invert; end -end - -# source://activerecord//lib/arel/nodes/infix_operation.rb#5 -class Arel::Nodes::InfixOperation < ::Arel::Nodes::Binary - # @return [InfixOperation] a new instance of InfixOperation - # - # source://activerecord//lib/arel/nodes/infix_operation.rb#14 - def initialize(operator, left, right); end - - # Returns the value of attribute operator. - # - # source://activerecord//lib/arel/nodes/infix_operation.rb#12 - def operator; end -end - -# source://activerecord//lib/arel/nodes/inner_join.rb#5 -class Arel::Nodes::InnerJoin < ::Arel::Nodes::Join; end - -# source://activerecord//lib/arel/nodes/insert_statement.rb#5 -class Arel::Nodes::InsertStatement < ::Arel::Nodes::Node - # @return [InsertStatement] a new instance of InsertStatement - # - # source://activerecord//lib/arel/nodes/insert_statement.rb#8 - def initialize(relation = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/insert_statement.rb#27 - def ==(other); end - - # Returns the value of attribute columns. - # - # source://activerecord//lib/arel/nodes/insert_statement.rb#6 - def columns; end - - # Sets the attribute columns - # - # @param value the value to set the attribute columns to. - # - # source://activerecord//lib/arel/nodes/insert_statement.rb#6 - def columns=(_arg0); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/insert_statement.rb#27 - def eql?(other); end - - # source://activerecord//lib/arel/nodes/insert_statement.rb#23 - def hash; end - - # Returns the value of attribute relation. - # - # source://activerecord//lib/arel/nodes/insert_statement.rb#6 - def relation; end - - # Sets the attribute relation - # - # @param value the value to set the attribute relation to. - # - # source://activerecord//lib/arel/nodes/insert_statement.rb#6 - def relation=(_arg0); end - - # Returns the value of attribute select. - # - # source://activerecord//lib/arel/nodes/insert_statement.rb#6 - def select; end - - # Sets the attribute select - # - # @param value the value to set the attribute select to. - # - # source://activerecord//lib/arel/nodes/insert_statement.rb#6 - def select=(_arg0); end - - # Returns the value of attribute values. - # - # source://activerecord//lib/arel/nodes/insert_statement.rb#6 - def values; end - - # Sets the attribute values - # - # @param value the value to set the attribute values to. - # - # source://activerecord//lib/arel/nodes/insert_statement.rb#6 - def values=(_arg0); end - - private - - # source://activerecord//lib/arel/nodes/insert_statement.rb#16 - def initialize_copy(other); end -end - -# source://activerecord//lib/arel/nodes/binary.rb#123 -class Arel::Nodes::Intersect < ::Arel::Nodes::Binary; end - -# source://activerecord//lib/arel/nodes/binary.rb#76 -class Arel::Nodes::IsDistinctFrom < ::Arel::Nodes::Binary - include ::Arel::Nodes::FetchAttribute - - # source://activerecord//lib/arel/nodes/binary.rb#79 - def invert; end -end - -# source://activerecord//lib/arel/nodes/binary.rb#84 -class Arel::Nodes::IsNotDistinctFrom < ::Arel::Nodes::Binary - include ::Arel::Nodes::FetchAttribute - - # source://activerecord//lib/arel/nodes/binary.rb#87 - def invert; end -end - -# source://activerecord//lib/arel/nodes/binary.rb#123 -class Arel::Nodes::Join < ::Arel::Nodes::Binary; end - -# Class that represents a join source -# -# https://www.sqlite.org/syntaxdiagrams.html#join-source -# -# source://activerecord//lib/arel/nodes/join_source.rb#10 -class Arel::Nodes::JoinSource < ::Arel::Nodes::Binary - # @return [JoinSource] a new instance of JoinSource - # - # source://activerecord//lib/arel/nodes/join_source.rb#11 - def initialize(single_source, joinop = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/join_source.rb#15 - def empty?; end -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#1420 -class Arel::Nodes::LeadingJoin < ::Arel::Nodes::InnerJoin; end - -# source://activerecord//lib/arel/nodes/binary.rb#60 -class Arel::Nodes::LessThan < ::Arel::Nodes::Binary - include ::Arel::Nodes::FetchAttribute - - # source://activerecord//lib/arel/nodes/binary.rb#63 - def invert; end -end - -# source://activerecord//lib/arel/nodes/binary.rb#68 -class Arel::Nodes::LessThanOrEqual < ::Arel::Nodes::Binary - include ::Arel::Nodes::FetchAttribute - - # source://activerecord//lib/arel/nodes/binary.rb#71 - def invert; end -end - -# source://activerecord//lib/arel/nodes/unary.rb#41 -class Arel::Nodes::Limit < ::Arel::Nodes::Unary; end - -# source://activerecord//lib/arel/nodes/unary.rb#41 -class Arel::Nodes::Lock < ::Arel::Nodes::Unary; end - -# source://activerecord//lib/arel/nodes/matches.rb#5 -class Arel::Nodes::Matches < ::Arel::Nodes::Binary - # @return [Matches] a new instance of Matches - # - # source://activerecord//lib/arel/nodes/matches.rb#9 - def initialize(left, right, escape = T.unsafe(nil), case_sensitive = T.unsafe(nil)); end - - # Returns the value of attribute case_sensitive. - # - # source://activerecord//lib/arel/nodes/matches.rb#7 - def case_sensitive; end - - # Sets the attribute case_sensitive - # - # @param value the value to set the attribute case_sensitive to. - # - # source://activerecord//lib/arel/nodes/matches.rb#7 - def case_sensitive=(_arg0); end - - # Returns the value of attribute escape. - # - # source://activerecord//lib/arel/nodes/matches.rb#6 - def escape; end -end - -# source://activerecord//lib/arel/nodes/function.rb#42 -class Arel::Nodes::Max < ::Arel::Nodes::Function; end - -# source://activerecord//lib/arel/nodes/function.rb#42 -class Arel::Nodes::Min < ::Arel::Nodes::Function; end - -# source://activerecord//lib/arel/nodes/infix_operation.rb#20 -class Arel::Nodes::Multiplication < ::Arel::Nodes::InfixOperation - # @return [Multiplication] a new instance of Multiplication - # - # source://activerecord//lib/arel/nodes/infix_operation.rb#21 - def initialize(left, right); end -end - -# source://activerecord//lib/arel/nodes/named_function.rb#5 -class Arel::Nodes::NamedFunction < ::Arel::Nodes::Function - # @return [NamedFunction] a new instance of NamedFunction - # - # source://activerecord//lib/arel/nodes/named_function.rb#8 - def initialize(name, expr, aliaz = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/named_function.rb#17 - def ==(other); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/named_function.rb#17 - def eql?(other); end - - # source://activerecord//lib/arel/nodes/named_function.rb#13 - def hash; end - - # Returns the value of attribute name. - # - # source://activerecord//lib/arel/nodes/named_function.rb#6 - def name; end - - # Sets the attribute name - # - # @param value the value to set the attribute name to. - # - # source://activerecord//lib/arel/nodes/named_function.rb#6 - def name=(_arg0); end -end - -# source://activerecord//lib/arel/nodes/window.rb#68 -class Arel::Nodes::NamedWindow < ::Arel::Nodes::Window - # @return [NamedWindow] a new instance of NamedWindow - # - # source://activerecord//lib/arel/nodes/window.rb#71 - def initialize(name); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/window.rb#85 - def ==(other); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/window.rb#85 - def eql?(other); end - - # source://activerecord//lib/arel/nodes/window.rb#81 - def hash; end - - # Returns the value of attribute name. - # - # source://activerecord//lib/arel/nodes/window.rb#69 - def name; end - - # Sets the attribute name - # - # @param value the value to set the attribute name to. - # - # source://activerecord//lib/arel/nodes/window.rb#69 - def name=(_arg0); end - - private - - # source://activerecord//lib/arel/nodes/window.rb#76 - def initialize_copy(other); end -end - -# Abstract base class for all AST nodes -# -# source://activerecord//lib/arel/nodes/node.rb#7 -class Arel::Nodes::Node - include ::Arel::FactoryMethods - - # Factory method to create an Nodes::And node. - # - # source://activerecord//lib/arel/nodes/node.rb#26 - def and(right); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/node.rb#48 - def equality?; end - - # source://activerecord//lib/arel/nodes/node.rb#45 - def fetch_attribute; end - - # source://activerecord//lib/arel/nodes/node.rb#30 - 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 - 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 - def or(right); end - - # FIXME: this method should go away. I don't like people calling - # to_sql on non-head nodes. This forces us to walk the AST until we - # can find a node that has a "relation" member. - # - # Maybe we should just use `Table.engine`? :'( - # - # source://activerecord//lib/arel/nodes/node.rb#39 - def to_sql(engine = T.unsafe(nil)); end -end - -# source://activerecord//lib/arel/nodes/node_expression.rb#5 -class Arel::Nodes::NodeExpression < ::Arel::Nodes::Node - include ::Arel::Expressions - include ::Arel::Predications - include ::Arel::AliasPredication - include ::Arel::OrderPredications - include ::Arel::Math -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 -class Arel::Nodes::NotEqual < ::Arel::Nodes::Binary - include ::Arel::Nodes::FetchAttribute - - # source://activerecord//lib/arel/nodes/binary.rb#95 - def invert; end -end - -# source://activerecord//lib/arel/nodes/binary.rb#100 -class Arel::Nodes::NotIn < ::Arel::Nodes::Binary - include ::Arel::Nodes::FetchAttribute - - # source://activerecord//lib/arel/nodes/binary.rb#103 - def invert; end -end - -# source://activerecord//lib/arel/nodes/regexp.rb#14 -class Arel::Nodes::NotRegexp < ::Arel::Nodes::Regexp; end - -# source://activerecord//lib/arel/nodes/ordering.rb#15 -class Arel::Nodes::NullsFirst < ::Arel::Nodes::Ordering - # source://activerecord//lib/arel/nodes/ordering.rb#16 - def reverse; end -end - -# source://activerecord//lib/arel/nodes/ordering.rb#21 -class Arel::Nodes::NullsLast < ::Arel::Nodes::Ordering - # source://activerecord//lib/arel/nodes/ordering.rb#22 - def reverse; end -end - -# source://activerecord//lib/arel/nodes/unary.rb#41 -class Arel::Nodes::Offset < ::Arel::Nodes::Unary; end - -# source://activerecord//lib/arel/nodes/unary.rb#41 -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 -class Arel::Nodes::Or < ::Arel::Nodes::Binary - # source://activerecord//lib/arel/nodes/binary.rb#109 - def fetch_attribute(&block); end -end - -# source://activerecord//lib/arel/nodes/ordering.rb#5 -class Arel::Nodes::Ordering < ::Arel::Nodes::Unary - # source://activerecord//lib/arel/nodes/ordering.rb#6 - def nulls_first; end - - # source://activerecord//lib/arel/nodes/ordering.rb#10 - def nulls_last; end -end - -# source://activerecord//lib/arel/nodes/outer_join.rb#5 -class Arel::Nodes::OuterJoin < ::Arel::Nodes::Join; end - -# source://activerecord//lib/arel/nodes/over.rb#5 -class Arel::Nodes::Over < ::Arel::Nodes::Binary - # @return [Over] a new instance of Over - # - # source://activerecord//lib/arel/nodes/over.rb#8 - def initialize(left, right = T.unsafe(nil)); end - - # source://activerecord//lib/arel/nodes/over.rb#12 - def operator; end -end - -# source://activerecord//lib/arel/nodes/infix_operation.rb#56 -class Arel::Nodes::Overlaps < ::Arel::Nodes::InfixOperation - # @return [Overlaps] a new instance of Overlaps - # - # source://activerecord//lib/arel/nodes/infix_operation.rb#57 - def initialize(left, right); end -end - -# source://activerecord//lib/arel/nodes/window.rb#114 -class Arel::Nodes::Preceding < ::Arel::Nodes::Unary - # @return [Preceding] a new instance of Preceding - # - # source://activerecord//lib/arel/nodes/window.rb#115 - def initialize(expr = T.unsafe(nil)); end -end - -# source://activerecord//lib/arel/nodes/casted.rb#37 -class Arel::Nodes::Quoted < ::Arel::Nodes::Unary - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/casted.rb#43 - def infinite?; end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/casted.rb#41 - def nil?; end - - # source://activerecord//lib/arel/nodes/unary.rb#6 - def value_before_type_cast; end - - # source://activerecord//lib/arel/nodes/unary.rb#6 - def value_for_database; end -end - -# source://activerecord//lib/arel/nodes/window.rb#97 -class Arel::Nodes::Range < ::Arel::Nodes::Unary - # @return [Range] a new instance of Range - # - # source://activerecord//lib/arel/nodes/window.rb#98 - def initialize(expr = T.unsafe(nil)); end -end - -# source://activerecord//lib/arel/nodes/regexp.rb#5 -class Arel::Nodes::Regexp < ::Arel::Nodes::Binary - # @return [Regexp] a new instance of Regexp - # - # source://activerecord//lib/arel/nodes/regexp.rb#8 - def initialize(left, right, case_sensitive = T.unsafe(nil)); end - - # Returns the value of attribute case_sensitive. - # - # source://activerecord//lib/arel/nodes/regexp.rb#6 - def case_sensitive; end - - # Sets the attribute case_sensitive - # - # @param value the value to set the attribute case_sensitive to. - # - # source://activerecord//lib/arel/nodes/regexp.rb#6 - def case_sensitive=(_arg0); end -end - -# source://activerecord//lib/arel/nodes/right_outer_join.rb#5 -class Arel::Nodes::RightOuterJoin < ::Arel::Nodes::Join; end - -# source://activerecord//lib/arel/nodes/unary.rb#41 -class Arel::Nodes::RollUp < ::Arel::Nodes::Unary; end - -# source://activerecord//lib/arel/nodes/window.rb#91 -class Arel::Nodes::Rows < ::Arel::Nodes::Unary - # @return [Rows] a new instance of Rows - # - # source://activerecord//lib/arel/nodes/window.rb#92 - def initialize(expr = T.unsafe(nil)); end -end - -# source://activerecord//lib/arel/nodes/select_core.rb#5 -class Arel::Nodes::SelectCore < ::Arel::Nodes::Node - # @return [SelectCore] a new instance of SelectCore - # - # source://activerecord//lib/arel/nodes/select_core.rb#9 - def initialize(relation = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/select_core.rb#52 - def ==(other); end - - # Returns the value of attribute comment. - # - # source://activerecord//lib/arel/nodes/select_core.rb#6 - def comment; end - - # Sets the attribute comment - # - # @param value the value to set the attribute comment to. - # - # source://activerecord//lib/arel/nodes/select_core.rb#6 - def comment=(_arg0); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/select_core.rb#52 - def eql?(other); end - - # source://activerecord//lib/arel/nodes/select_core.rb#24 - def from; end - - # source://activerecord//lib/arel/nodes/select_core.rb#28 - def from=(value); end - - # source://activerecord//lib/arel/nodes/select_core.rb#24 - def froms; end - - # source://activerecord//lib/arel/nodes/select_core.rb#28 - def froms=(value); end - - # Returns the value of attribute groups. - # - # source://activerecord//lib/arel/nodes/select_core.rb#6 - def groups; end - - # Sets the attribute groups - # - # @param value the value to set the attribute groups to. - # - # source://activerecord//lib/arel/nodes/select_core.rb#6 - def groups=(_arg0); end - - # source://activerecord//lib/arel/nodes/select_core.rb#45 - def hash; end - - # Returns the value of attribute havings. - # - # source://activerecord//lib/arel/nodes/select_core.rb#7 - def havings; end - - # Sets the attribute havings - # - # @param value the value to set the attribute havings to. - # - # source://activerecord//lib/arel/nodes/select_core.rb#7 - def havings=(_arg0); end - - # Returns the value of attribute optimizer_hints. - # - # source://activerecord//lib/arel/nodes/select_core.rb#7 - def optimizer_hints; end - - # Sets the attribute optimizer_hints - # - # @param value the value to set the attribute optimizer_hints to. - # - # source://activerecord//lib/arel/nodes/select_core.rb#7 - def optimizer_hints=(_arg0); end - - # Returns the value of attribute projections. - # - # source://activerecord//lib/arel/nodes/select_core.rb#6 - def projections; end - - # Sets the attribute projections - # - # @param value the value to set the attribute projections to. - # - # source://activerecord//lib/arel/nodes/select_core.rb#6 - def projections=(_arg0); end - - # Returns the value of attribute set_quantifier. - # - # source://activerecord//lib/arel/nodes/select_core.rb#7 - def set_quantifier; end - - # Sets the attribute set_quantifier - # - # @param value the value to set the attribute set_quantifier to. - # - # source://activerecord//lib/arel/nodes/select_core.rb#7 - def set_quantifier=(_arg0); end - - # Returns the value of attribute source. - # - # source://activerecord//lib/arel/nodes/select_core.rb#7 - def source; end - - # Sets the attribute source - # - # @param value the value to set the attribute source to. - # - # source://activerecord//lib/arel/nodes/select_core.rb#7 - def source=(_arg0); end - - # Returns the value of attribute wheres. - # - # source://activerecord//lib/arel/nodes/select_core.rb#6 - def wheres; end - - # Sets the attribute wheres - # - # @param value the value to set the attribute wheres to. - # - # source://activerecord//lib/arel/nodes/select_core.rb#6 - def wheres=(_arg0); end - - # Returns the value of attribute windows. - # - # source://activerecord//lib/arel/nodes/select_core.rb#6 - def windows; end - - # Sets the attribute windows - # - # @param value the value to set the attribute windows to. - # - # source://activerecord//lib/arel/nodes/select_core.rb#6 - def windows=(_arg0); end - - private - - # source://activerecord//lib/arel/nodes/select_core.rb#35 - def initialize_copy(other); end -end - -# source://activerecord//lib/arel/nodes/select_statement.rb#5 -class Arel::Nodes::SelectStatement < ::Arel::Nodes::NodeExpression - # @return [SelectStatement] a new instance of SelectStatement - # - # source://activerecord//lib/arel/nodes/select_statement.rb#9 - def initialize(relation = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/select_statement.rb#29 - def ==(other); end - - # Returns the value of attribute cores. - # - # source://activerecord//lib/arel/nodes/select_statement.rb#6 - def cores; end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/select_statement.rb#29 - def eql?(other); end - - # source://activerecord//lib/arel/nodes/select_statement.rb#25 - def hash; end - - # Returns the value of attribute limit. - # - # source://activerecord//lib/arel/nodes/select_statement.rb#7 - def limit; end - - # Sets the attribute limit - # - # @param value the value to set the attribute limit to. - # - # source://activerecord//lib/arel/nodes/select_statement.rb#7 - def limit=(_arg0); end - - # Returns the value of attribute lock. - # - # source://activerecord//lib/arel/nodes/select_statement.rb#7 - def lock; end - - # Sets the attribute lock - # - # @param value the value to set the attribute lock to. - # - # source://activerecord//lib/arel/nodes/select_statement.rb#7 - def lock=(_arg0); end - - # Returns the value of attribute offset. - # - # source://activerecord//lib/arel/nodes/select_statement.rb#7 - def offset; end - - # Sets the attribute offset - # - # @param value the value to set the attribute offset to. - # - # source://activerecord//lib/arel/nodes/select_statement.rb#7 - def offset=(_arg0); end - - # Returns the value of attribute orders. - # - # source://activerecord//lib/arel/nodes/select_statement.rb#7 - def orders; end - - # Sets the attribute orders - # - # @param value the value to set the attribute orders to. - # - # source://activerecord//lib/arel/nodes/select_statement.rb#7 - def orders=(_arg0); end - - # Returns the value of attribute with. - # - # source://activerecord//lib/arel/nodes/select_statement.rb#7 - def with; end - - # Sets the attribute with - # - # @param value the value to set the attribute with to. - # - # source://activerecord//lib/arel/nodes/select_statement.rb#7 - def with=(_arg0); end - - private - - # source://activerecord//lib/arel/nodes/select_statement.rb#19 - def initialize_copy(other); end -end - -# source://activerecord//lib/arel/nodes/sql_literal.rb#5 -class Arel::Nodes::SqlLiteral < ::String - include ::Arel::Expressions - include ::Arel::Predications - include ::Arel::AliasPredication - include ::Arel::OrderPredications - - # source://activerecord//lib/arel/nodes/sql_literal.rb#11 - def encode_with(coder); end - - # source://activerecord//lib/arel/nodes/sql_literal.rb#15 - def fetch_attribute; end -end - -# source://activerecord//lib/arel/nodes/string_join.rb#5 -class Arel::Nodes::StringJoin < ::Arel::Nodes::Join - # @return [StringJoin] a new instance of StringJoin - # - # source://activerecord//lib/arel/nodes/string_join.rb#6 - def initialize(left, right = T.unsafe(nil)); end -end - -# source://activerecord//lib/arel/nodes/infix_operation.rb#38 -class Arel::Nodes::Subtraction < ::Arel::Nodes::InfixOperation - # @return [Subtraction] a new instance of Subtraction - # - # source://activerecord//lib/arel/nodes/infix_operation.rb#39 - def initialize(left, right); end -end - -# source://activerecord//lib/arel/nodes/function.rb#42 -class Arel::Nodes::Sum < ::Arel::Nodes::Function; end - -# source://activerecord//lib/arel/nodes/table_alias.rb#5 -class Arel::Nodes::TableAlias < ::Arel::Nodes::Binary - # source://activerecord//lib/arel/nodes/table_alias.rb#10 - def [](name); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/table_alias.rb#26 - def able_to_type_cast?; 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/binary.rb#6 - def table_alias; end - - # source://activerecord//lib/arel/nodes/table_alias.rb#14 - def table_name; end - - # source://activerecord//lib/arel/nodes/table_alias.rb#18 - def type_cast_for_database(attr_name, value); end - - # source://activerecord//lib/arel/nodes/table_alias.rb#22 - def type_for_attribute(name); end -end - -# source://activerecord//lib/arel/nodes/true.rb#5 -class Arel::Nodes::True < ::Arel::Nodes::NodeExpression - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/true.rb#10 - def ==(other); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/true.rb#10 - def eql?(other); end - - # source://activerecord//lib/arel/nodes/true.rb#6 - def hash; end -end - -# source://activerecord//lib/arel/nodes/unary.rb#5 -class Arel::Nodes::Unary < ::Arel::Nodes::NodeExpression - # @return [Unary] a new instance of Unary - # - # source://activerecord//lib/arel/nodes/unary.rb#9 - def initialize(expr); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/unary.rb#18 - def ==(other); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/unary.rb#18 - def eql?(other); end - - # Returns the value of attribute expr. - # - # source://activerecord//lib/arel/nodes/unary.rb#6 - def expr; end - - # Sets the attribute expr - # - # @param value the value to set the attribute expr to. - # - # source://activerecord//lib/arel/nodes/unary.rb#6 - def expr=(_arg0); end - - # source://activerecord//lib/arel/nodes/unary.rb#14 - def hash; end - - # Returns the value of attribute expr. - # - # source://activerecord//lib/arel/nodes/unary.rb#6 - def value; end -end - -# source://activerecord//lib/arel/nodes/unary_operation.rb#5 -class Arel::Nodes::UnaryOperation < ::Arel::Nodes::Unary - # @return [UnaryOperation] a new instance of UnaryOperation - # - # source://activerecord//lib/arel/nodes/unary_operation.rb#8 - def initialize(operator, operand); end - - # Returns the value of attribute operator. - # - # source://activerecord//lib/arel/nodes/unary_operation.rb#6 - def operator; end -end - -# source://activerecord//lib/arel/nodes/binary.rb#123 -class Arel::Nodes::Union < ::Arel::Nodes::Binary; end - -# source://activerecord//lib/arel/nodes/binary.rb#123 -class Arel::Nodes::UnionAll < ::Arel::Nodes::Binary; end - -# source://activerecord//lib/arel/nodes/unqualified_column.rb#5 -class Arel::Nodes::UnqualifiedColumn < ::Arel::Nodes::Unary - # source://activerecord//lib/arel/nodes/unary.rb#6 - def attribute; end - - # source://activerecord//lib/arel/nodes/unary.rb#6 - def attribute=(_arg0); end - - # source://activerecord//lib/arel/nodes/unqualified_column.rb#13 - def column; end - - # source://activerecord//lib/arel/nodes/unqualified_column.rb#17 - def name; end - - # source://activerecord//lib/arel/nodes/unqualified_column.rb#9 - def relation; end -end - -# source://activerecord//lib/arel/nodes/update_statement.rb#5 -class Arel::Nodes::UpdateStatement < ::Arel::Nodes::Node - # @return [UpdateStatement] a new instance of UpdateStatement - # - # source://activerecord//lib/arel/nodes/update_statement.rb#8 - def initialize(relation = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/update_statement.rb#31 - def ==(other); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/update_statement.rb#31 - def eql?(other); end - - # Returns the value of attribute groups. - # - # source://activerecord//lib/arel/nodes/update_statement.rb#6 - def groups; end - - # Sets the attribute groups - # - # @param value the value to set the attribute groups to. - # - # source://activerecord//lib/arel/nodes/update_statement.rb#6 - def groups=(_arg0); end - - # source://activerecord//lib/arel/nodes/update_statement.rb#27 - def hash; end - - # Returns the value of attribute havings. - # - # source://activerecord//lib/arel/nodes/update_statement.rb#6 - def havings; end - - # Sets the attribute havings - # - # @param value the value to set the attribute havings to. - # - # source://activerecord//lib/arel/nodes/update_statement.rb#6 - def havings=(_arg0); end - - # Returns the value of attribute key. - # - # source://activerecord//lib/arel/nodes/update_statement.rb#6 - def key; end - - # Sets the attribute key - # - # @param value the value to set the attribute key to. - # - # source://activerecord//lib/arel/nodes/update_statement.rb#6 - def key=(_arg0); end - - # Returns the value of attribute limit. - # - # source://activerecord//lib/arel/nodes/update_statement.rb#6 - def limit; end - - # Sets the attribute limit - # - # @param value the value to set the attribute limit to. - # - # source://activerecord//lib/arel/nodes/update_statement.rb#6 - def limit=(_arg0); end - - # Returns the value of attribute offset. - # - # source://activerecord//lib/arel/nodes/update_statement.rb#6 - def offset; end - - # Sets the attribute offset - # - # @param value the value to set the attribute offset to. - # - # source://activerecord//lib/arel/nodes/update_statement.rb#6 - def offset=(_arg0); end - - # Returns the value of attribute orders. - # - # source://activerecord//lib/arel/nodes/update_statement.rb#6 - def orders; end - - # Sets the attribute orders - # - # @param value the value to set the attribute orders to. - # - # source://activerecord//lib/arel/nodes/update_statement.rb#6 - def orders=(_arg0); end - - # Returns the value of attribute relation. - # - # source://activerecord//lib/arel/nodes/update_statement.rb#6 - def relation; end - - # Sets the attribute relation - # - # @param value the value to set the attribute relation to. - # - # source://activerecord//lib/arel/nodes/update_statement.rb#6 - def relation=(_arg0); end - - # Returns the value of attribute values. - # - # source://activerecord//lib/arel/nodes/update_statement.rb#6 - def values; end - - # Sets the attribute values - # - # @param value the value to set the attribute values to. - # - # source://activerecord//lib/arel/nodes/update_statement.rb#6 - def values=(_arg0); end - - # Returns the value of attribute wheres. - # - # source://activerecord//lib/arel/nodes/update_statement.rb#6 - def wheres; end - - # Sets the attribute wheres - # - # @param value the value to set the attribute wheres to. - # - # source://activerecord//lib/arel/nodes/update_statement.rb#6 - def wheres=(_arg0); end - - private - - # source://activerecord//lib/arel/nodes/update_statement.rb#21 - def initialize_copy(other); end -end - -# source://activerecord//lib/arel/nodes/values_list.rb#5 -class Arel::Nodes::ValuesList < ::Arel::Nodes::Unary - # source://activerecord//lib/arel/nodes/unary.rb#6 - def rows; end -end - -# source://activerecord//lib/arel/nodes/case.rb#49 -class Arel::Nodes::When < ::Arel::Nodes::Binary; end - -# source://activerecord//lib/arel/nodes/window.rb#5 -class Arel::Nodes::Window < ::Arel::Nodes::Node - # @return [Window] a new instance of Window - # - # source://activerecord//lib/arel/nodes/window.rb#8 - def initialize; end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/window.rb#59 - def ==(other); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/nodes/window.rb#59 - def eql?(other); end - - # source://activerecord//lib/arel/nodes/window.rb#30 - def frame(expr); end - - # Returns the value of attribute framing. - # - # source://activerecord//lib/arel/nodes/window.rb#6 - def framing; end - - # Sets the attribute framing - # - # @param value the value to set the attribute framing to. - # - # source://activerecord//lib/arel/nodes/window.rb#6 - def framing=(_arg0); end - - # source://activerecord//lib/arel/nodes/window.rb#55 - def hash; end - - # source://activerecord//lib/arel/nodes/window.rb#14 - def order(*expr); end - - # Returns the value of attribute orders. - # - # source://activerecord//lib/arel/nodes/window.rb#6 - def orders; end - - # Sets the attribute orders - # - # @param value the value to set the attribute orders to. - # - # source://activerecord//lib/arel/nodes/window.rb#6 - def orders=(_arg0); end - - # source://activerecord//lib/arel/nodes/window.rb#22 - def partition(*expr); end - - # Returns the value of attribute partitions. - # - # source://activerecord//lib/arel/nodes/window.rb#6 - def partitions; end - - # Sets the attribute partitions - # - # @param value the value to set the attribute partitions to. - # - # source://activerecord//lib/arel/nodes/window.rb#6 - def partitions=(_arg0); end - - # source://activerecord//lib/arel/nodes/window.rb#42 - def range(expr = T.unsafe(nil)); end - - # source://activerecord//lib/arel/nodes/window.rb#34 - def rows(expr = T.unsafe(nil)); end - - private - - # source://activerecord//lib/arel/nodes/window.rb#50 - def initialize_copy(other); end -end - -# source://activerecord//lib/arel/nodes/with.rb#5 -class Arel::Nodes::With < ::Arel::Nodes::Unary - # source://activerecord//lib/arel/nodes/unary.rb#6 - def children; end -end - -# source://activerecord//lib/arel/nodes/with.rb#9 -class Arel::Nodes::WithRecursive < ::Arel::Nodes::With; end - -# source://activerecord//lib/arel/order_predications.rb#4 -module Arel::OrderPredications - # source://activerecord//lib/arel/order_predications.rb#5 - def asc; end - - # source://activerecord//lib/arel/order_predications.rb#9 - def desc; end -end - -# source://activerecord//lib/arel/predications.rb#4 -module Arel::Predications - # source://activerecord//lib/arel/predications.rb#37 - def between(other); end - - # source://activerecord//lib/arel/predications.rb#213 - def concat(other); end - - # source://activerecord//lib/arel/predications.rb#217 - def contains(other); end - - # source://activerecord//lib/arel/predications.rb#145 - def does_not_match(other, escape = T.unsafe(nil), case_sensitive = T.unsafe(nil)); end - - # source://activerecord//lib/arel/predications.rb#157 - def does_not_match_all(others, escape = T.unsafe(nil)); end - - # source://activerecord//lib/arel/predications.rb#153 - def does_not_match_any(others, escape = T.unsafe(nil)); end - - # source://activerecord//lib/arel/predications.rb#149 - def does_not_match_regexp(other, case_sensitive = T.unsafe(nil)); end - - # source://activerecord//lib/arel/predications.rb#17 - def eq(other); end - - # source://activerecord//lib/arel/predications.rb#33 - def eq_all(others); end - - # source://activerecord//lib/arel/predications.rb#29 - def eq_any(others); end - - # source://activerecord//lib/arel/predications.rb#173 - def gt(right); end - - # source://activerecord//lib/arel/predications.rb#181 - def gt_all(others); end - - # source://activerecord//lib/arel/predications.rb#177 - def gt_any(others); end - - # source://activerecord//lib/arel/predications.rb#161 - def gteq(right); end - - # source://activerecord//lib/arel/predications.rb#169 - def gteq_all(others); end - - # source://activerecord//lib/arel/predications.rb#165 - def gteq_any(others); end - - # source://activerecord//lib/arel/predications.rb#63 - def in(other); end - - # source://activerecord//lib/arel/predications.rb#78 - def in_all(others); end - - # source://activerecord//lib/arel/predications.rb#74 - def in_any(others); end - - # source://activerecord//lib/arel/predications.rb#25 - def is_distinct_from(other); end - - # source://activerecord//lib/arel/predications.rb#21 - def is_not_distinct_from(other); end - - # source://activerecord//lib/arel/predications.rb#185 - def lt(right); end - - # source://activerecord//lib/arel/predications.rb#193 - def lt_all(others); end - - # source://activerecord//lib/arel/predications.rb#189 - def lt_any(others); end - - # source://activerecord//lib/arel/predications.rb#197 - def lteq(right); end - - # source://activerecord//lib/arel/predications.rb#205 - def lteq_all(others); end - - # source://activerecord//lib/arel/predications.rb#201 - def lteq_any(others); end - - # source://activerecord//lib/arel/predications.rb#129 - def matches(other, escape = T.unsafe(nil), case_sensitive = T.unsafe(nil)); end - - # source://activerecord//lib/arel/predications.rb#141 - def matches_all(others, escape = T.unsafe(nil), case_sensitive = T.unsafe(nil)); end - - # source://activerecord//lib/arel/predications.rb#137 - def matches_any(others, escape = T.unsafe(nil), case_sensitive = T.unsafe(nil)); end - - # source://activerecord//lib/arel/predications.rb#133 - def matches_regexp(other, case_sensitive = T.unsafe(nil)); end - - # source://activerecord//lib/arel/predications.rb#82 - def not_between(other); end - - # source://activerecord//lib/arel/predications.rb#5 - def not_eq(other); end - - # source://activerecord//lib/arel/predications.rb#13 - def not_eq_all(others); end - - # source://activerecord//lib/arel/predications.rb#9 - def not_eq_any(others); end - - # source://activerecord//lib/arel/predications.rb#110 - def not_in(other); end - - # source://activerecord//lib/arel/predications.rb#125 - def not_in_all(others); end - - # source://activerecord//lib/arel/predications.rb#121 - def not_in_any(others); end - - # source://activerecord//lib/arel/predications.rb#221 - def overlaps(other); end - - # source://activerecord//lib/arel/predications.rb#225 - def quoted_array(others); end - - # source://activerecord//lib/arel/predications.rb#209 - def when(right); end - - private - - # source://activerecord//lib/arel/predications.rb#237 - def grouping_all(method_id, others, *extras); end - - # source://activerecord//lib/arel/predications.rb#230 - def grouping_any(method_id, others, *extras); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/predications.rb#246 - def infinity?(value); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/predications.rb#254 - def open_ended?(value); end - - # source://activerecord//lib/arel/predications.rb#242 - def quoted_node(other); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/predications.rb#250 - def unboundable?(value); end -end - -# source://activerecord//lib/arel/select_manager.rb#4 -class Arel::SelectManager < ::Arel::TreeManager - include ::Arel::Crud - - # @return [SelectManager] a new instance of SelectManager - # - # source://activerecord//lib/arel/select_manager.rb#9 - def initialize(table = T.unsafe(nil)); end - - # source://activerecord//lib/arel/select_manager.rb#48 - def as(other); end - - # source://activerecord//lib/arel/select_manager.rb#252 - def comment(*values); end - - # source://activerecord//lib/arel/select_manager.rb#24 - def constraints; end - - # source://activerecord//lib/arel/select_manager.rb#154 - def distinct(value = T.unsafe(nil)); end - - # source://activerecord//lib/arel/select_manager.rb#163 - def distinct_on(value); end - - # source://activerecord//lib/arel/select_manager.rb#213 - def except(other); end - - # Produces an Arel::Nodes::Exists node - # - # source://activerecord//lib/arel/select_manager.rb#44 - def exists; end - - # source://activerecord//lib/arel/select_manager.rb#85 - def from(table); end - - # source://activerecord//lib/arel/select_manager.rb#98 - def froms; end - - # source://activerecord//lib/arel/select_manager.rb#74 - def group(*columns); end - - # source://activerecord//lib/arel/select_manager.rb#119 - def having(expr); end - - # source://activerecord//lib/arel/select_manager.rb#209 - def intersect(other); end - - # source://activerecord//lib/arel/select_manager.rb#102 - def join(relation, klass = T.unsafe(nil)); end - - # source://activerecord//lib/arel/select_manager.rb#244 - def join_sources; end - - # source://activerecord//lib/arel/select_manager.rb#218 - def lateral(table_name = T.unsafe(nil)); end - - # source://activerecord//lib/arel/select_manager.rb#19 - def limit; end - - # source://activerecord//lib/arel/select_manager.rb#234 - def limit=(limit); end - - # source://activerecord//lib/arel/select_manager.rb#52 - def lock(locking = T.unsafe(nil)); end - - # source://activerecord//lib/arel/select_manager.rb#65 - def locked; end - - # source://activerecord//lib/arel/select_manager.rb#213 - def minus(other); end - - # source://activerecord//lib/arel/select_manager.rb#28 - def offset; end - - # source://activerecord//lib/arel/select_manager.rb#32 - def offset=(amount); end - - # source://activerecord//lib/arel/select_manager.rb#69 - def on(*exprs); end - - # source://activerecord//lib/arel/select_manager.rb#147 - def optimizer_hints(*hints); end - - # source://activerecord//lib/arel/select_manager.rb#172 - def order(*expr); end - - # source://activerecord//lib/arel/select_manager.rb#180 - def orders; end - - # source://activerecord//lib/arel/select_manager.rb#115 - def outer_join(relation); end - - # source://activerecord//lib/arel/select_manager.rb#130 - def project(*projections); end - - # source://activerecord//lib/arel/select_manager.rb#139 - def projections; end - - # source://activerecord//lib/arel/select_manager.rb#143 - def projections=(projections); end - - # source://activerecord//lib/arel/select_manager.rb#32 - def skip(amount); end - - # source://activerecord//lib/arel/select_manager.rb#248 - def source; end - - # source://activerecord//lib/arel/select_manager.rb#234 - def take(limit); end - - # source://activerecord//lib/arel/select_manager.rb#19 - def taken; end - - # source://activerecord//lib/arel/select_manager.rb#198 - def union(operation, other = T.unsafe(nil)); end - - # source://activerecord//lib/arel/select_manager.rb#184 - def where(expr); end - - # source://activerecord//lib/arel/select_manager.rb#192 - def where_sql(engine = T.unsafe(nil)); end - - # source://activerecord//lib/arel/select_manager.rb#124 - def window(name); end - - # source://activerecord//lib/arel/select_manager.rb#223 - def with(*subqueries); end - - private - - # source://activerecord//lib/arel/select_manager.rb#258 - def collapse(exprs); end - - # source://activerecord//lib/arel/select_manager.rb#14 - def initialize_copy(other); end -end - -# source://activerecord//lib/arel/select_manager.rb#7 -Arel::SelectManager::STRING_OR_SYMBOL_CLASS = T.let(T.unsafe(nil), Array) - -# source://activerecord//lib/arel/table.rb#4 -class Arel::Table - include ::Arel::FactoryMethods - include ::Arel::AliasPredication - - # @return [Table] a new instance of Table - # - # source://activerecord//lib/arel/table.rb#16 - 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 - def ==(other); end - - # source://activerecord//lib/arel/table.rb#82 - def [](name, table = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/table.rb#110 - def able_to_type_cast?; end - - # source://activerecord//lib/arel/table.rb#30 - def alias(name = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/table.rb#95 - def eql?(other); end - - # source://activerecord//lib/arel/table.rb#34 - def from; end - - # source://activerecord//lib/arel/table.rb#54 - def group(*columns); end - - # source://activerecord//lib/arel/table.rb#88 - def hash; end - - # source://activerecord//lib/arel/table.rb#78 - def having(expr); end - - # source://activerecord//lib/arel/table.rb#38 - def join(relation, klass = T.unsafe(nil)); end - - # Returns the value of attribute name. - # - # source://activerecord//lib/arel/table.rb#11 - def name; end - - # Sets the attribute name - # - # @param value the value to set the attribute name to. - # - # source://activerecord//lib/arel/table.rb#11 - def name=(_arg0); end - - # source://activerecord//lib/arel/table.rb#58 - def order(*expr); end - - # source://activerecord//lib/arel/table.rb#50 - def outer_join(relation); end - - # source://activerecord//lib/arel/table.rb#66 - def project(*things); end - - # source://activerecord//lib/arel/table.rb#74 - def skip(amount); end - - # Returns the value of attribute table_alias. - # - # source://activerecord//lib/arel/table.rb#11 - 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 - def take(amount); end - - # source://activerecord//lib/arel/table.rb#102 - def type_cast_for_database(attr_name, value); end - - # source://activerecord//lib/arel/table.rb#106 - def type_for_attribute(name); end - - # source://activerecord//lib/arel/table.rb#62 - def where(condition); end - - private - - # Returns the value of attribute type_caster. - # - # source://activerecord//lib/arel/table.rb#115 - def type_caster; end - - class << self - # Returns the value of attribute engine. - # - # source://activerecord//lib/arel/table.rb#9 - def engine; end - - # Sets the attribute engine - # - # @param value the value to set the attribute engine to. - # - # source://activerecord//lib/arel/table.rb#9 - def engine=(_arg0); end - end -end - -# source://activerecord//lib/arel/tree_manager.rb#4 -class Arel::TreeManager - include ::Arel::FactoryMethods - - # Returns the value of attribute ast. - # - # source://activerecord//lib/arel/tree_manager.rb#41 - def ast; end - - # source://activerecord//lib/arel/tree_manager.rb#43 - def to_dot; end - - # source://activerecord//lib/arel/tree_manager.rb#49 - def to_sql(engine = T.unsafe(nil)); end - - private - - # source://activerecord//lib/arel/tree_manager.rb#55 - def initialize_copy(other); end -end - -# source://activerecord//lib/arel/tree_manager.rb#7 -module Arel::TreeManager::StatementMethods - # source://activerecord//lib/arel/tree_manager.rb#27 - def key; end - - # source://activerecord//lib/arel/tree_manager.rb#23 - def key=(key); end - - # source://activerecord//lib/arel/tree_manager.rb#13 - def offset(offset); end - - # source://activerecord//lib/arel/tree_manager.rb#18 - def order(*expr); end - - # source://activerecord//lib/arel/tree_manager.rb#8 - def take(limit); end - - # source://activerecord//lib/arel/tree_manager.rb#35 - def where(expr); end - - # source://activerecord//lib/arel/tree_manager.rb#31 - def wheres=(exprs); end -end - -# source://activerecord//lib/arel/update_manager.rb#4 -class Arel::UpdateManager < ::Arel::TreeManager - include ::Arel::TreeManager::StatementMethods - - # @return [UpdateManager] a new instance of UpdateManager - # - # source://activerecord//lib/arel/update_manager.rb#7 - def initialize(table = T.unsafe(nil)); end - - # source://activerecord//lib/arel/update_manager.rb#32 - def group(columns); end - - # source://activerecord//lib/arel/update_manager.rb#43 - def having(expr); end - - # source://activerecord//lib/arel/update_manager.rb#18 - def set(values); end - - # UPDATE +table+ - # - # source://activerecord//lib/arel/update_manager.rb#13 - def table(table); end -end - -# source://activerecord//lib/arel.rb#29 -Arel::VERSION = T.let(T.unsafe(nil), String) - -# source://activerecord//lib/arel/visitors/visitor.rb#4 -module Arel::Visitors; end - -# source://activerecord//lib/arel/visitors/dot.rb#5 -class Arel::Visitors::Dot < ::Arel::Visitors::Visitor - # @return [Dot] a new instance of Dot - # - # source://activerecord//lib/arel/visitors/dot.rb#19 - def initialize; end - - # source://activerecord//lib/arel/visitors/dot.rb#28 - def accept(object, collector); end - - private - - # source://activerecord//lib/arel/visitors/dot.rb#260 - def edge(name); end - - # source://activerecord//lib/arel/visitors/dot.rb#278 - def quote(string); end - - # source://activerecord//lib/arel/visitors/dot.rb#282 - def to_dot; end - - # source://activerecord//lib/arel/visitors/dot.rb#246 - def visit(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#215 - def visit_ActiveModel_Attribute(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#183 - def visit_Arel_Attributes_Attribute(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#188 - def visit_Arel_Nodes_And(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#44 - def visit_Arel_Nodes_Binary(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#211 - def visit_Arel_Nodes_BindParam(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#236 - def visit_Arel_Nodes_Case(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#172 - def visit_Arel_Nodes_Casted(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#232 - def visit_Arel_Nodes_Comment(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#77 - def visit_Arel_Nodes_Count(o); end - - # intentionally left blank - # - # source://activerecord//lib/arel/visitors/dot.rb#103 - def visit_Arel_Nodes_CurrentRow(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#159 - def visit_Arel_Nodes_DeleteStatement(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#103 - def visit_Arel_Nodes_Distinct(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#109 - def visit_Arel_Nodes_Extract(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#34 - def visit_Arel_Nodes_Function(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#177 - def visit_Arel_Nodes_HomogeneousIn(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#54 - def visit_Arel_Nodes_InfixOperation(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#121 - def visit_Arel_Nodes_InsertStatement(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#114 - def visit_Arel_Nodes_NamedFunction(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#96 - def visit_Arel_Nodes_NamedWindow(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#60 - def visit_Arel_Nodes_NotRegexp(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#68 - def visit_Arel_Nodes_Ordering(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#60 - def visit_Arel_Nodes_Regexp(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#128 - def visit_Arel_Nodes_SelectCore(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#140 - def visit_Arel_Nodes_SelectStatement(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#196 - def visit_Arel_Nodes_SqlLiteral(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#86 - def visit_Arel_Nodes_StringJoin(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#72 - def visit_Arel_Nodes_TableAlias(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#40 - def visit_Arel_Nodes_Unary(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#49 - def visit_Arel_Nodes_UnaryOperation(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#149 - def visit_Arel_Nodes_UpdateStatement(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#82 - def visit_Arel_Nodes_ValuesList(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#90 - def visit_Arel_Nodes_Window(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#188 - def visit_Arel_Nodes_With(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#168 - def visit_Arel_Table(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#225 - def visit_Array(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#196 - def visit_BigDecimal(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#196 - def visit_Date(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#196 - def visit_DateTime(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#196 - def visit_FalseClass(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#196 - def visit_Float(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#219 - def visit_Hash(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#196 - def visit_Integer(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#196 - def visit_NilClass(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#225 - def visit_Set(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#196 - def visit_String(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#196 - def visit_Symbol(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#196 - def visit_Time(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#196 - def visit_TrueClass(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#188 - def visit__children(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#103 - def visit__no_edges(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#60 - def visit__regexp(o); end - - # source://activerecord//lib/arel/visitors/dot.rb#242 - def visit_edge(o, method); end - - # source://activerecord//lib/arel/visitors/dot.rb#268 - def with_node(node); end -end - -# source://activerecord//lib/arel/visitors/dot.rb#16 -class Arel::Visitors::Dot::Edge < ::Struct; end - -# source://activerecord//lib/arel/visitors/dot.rb#6 -class Arel::Visitors::Dot::Node - # @return [Node] a new instance of Node - # - # source://activerecord//lib/arel/visitors/dot.rb#9 - def initialize(name, id, fields = T.unsafe(nil)); end - - # Returns the value of attribute fields. - # - # source://activerecord//lib/arel/visitors/dot.rb#7 - def fields; end - - # Sets the attribute fields - # - # @param value the value to set the attribute fields to. - # - # source://activerecord//lib/arel/visitors/dot.rb#7 - def fields=(_arg0); end - - # Returns the value of attribute id. - # - # source://activerecord//lib/arel/visitors/dot.rb#7 - def id; end - - # Sets the attribute id - # - # @param value the value to set the attribute id to. - # - # source://activerecord//lib/arel/visitors/dot.rb#7 - def id=(_arg0); end - - # Returns the value of attribute name. - # - # source://activerecord//lib/arel/visitors/dot.rb#7 - def name; end - - # Sets the attribute name - # - # @param value the value to set the attribute name to. - # - # source://activerecord//lib/arel/visitors/dot.rb#7 - def name=(_arg0); end -end - -# source://activerecord//lib/arel/visitors/mysql.rb#5 -class Arel::Visitors::MySQL < ::Arel::Visitors::ToSql - private - - # 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 - 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 - 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 - 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 - def visit_Arel_Nodes_Concat(o, collector); end - - # source://activerecord//lib/arel/visitors/mysql.rb#48 - def visit_Arel_Nodes_IsDistinctFrom(o, collector); end - - # source://activerecord//lib/arel/visitors/mysql.rb#42 - def visit_Arel_Nodes_IsNotDistinctFrom(o, collector); end - - # source://activerecord//lib/arel/visitors/mysql.rb#57 - def visit_Arel_Nodes_NotRegexp(o, collector); end - - # no-op - # - # source://activerecord//lib/arel/visitors/mysql.rb#62 - def visit_Arel_Nodes_NullsFirst(o, collector); end - - # source://activerecord//lib/arel/visitors/mysql.rb#53 - def visit_Arel_Nodes_Regexp(o, collector); end - - # source://activerecord//lib/arel/visitors/mysql.rb#28 - def visit_Arel_Nodes_SelectCore(o, collector); end - - # :'( - # To retrieve all rows from a certain offset up to the end of the result set, - # 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 - def visit_Arel_Nodes_SelectStatement(o, collector); end - - # source://activerecord//lib/arel/visitors/mysql.rb#12 - def visit_Arel_Nodes_UnqualifiedColumn(o, collector); end -end - -# source://activerecord//lib/arel/visitors/postgresql.rb#5 -class Arel::Visitors::PostgreSQL < ::Arel::Visitors::ToSql - private - - # source://activerecord//lib/arel/visitors/postgresql.rb#84 - def bind_block; end - - # Utilized by GroupingSet, Cube & RollUp visitors to - # handle grouping aggregation semantics - # - # source://activerecord//lib/arel/visitors/postgresql.rb#99 - def grouping_array_or_grouping_element(o, collector); end - - # Used by Lateral visitor to enclose select queries in parentheses - # - # source://activerecord//lib/arel/visitors/postgresql.rb#87 - def grouping_parentheses(o, collector); end - - # source://activerecord//lib/arel/visitors/postgresql.rb#49 - def visit_Arel_Nodes_Cube(o, collector); end - - # source://activerecord//lib/arel/visitors/postgresql.rb#39 - def visit_Arel_Nodes_DistinctOn(o, collector); end - - # source://activerecord//lib/arel/visitors/postgresql.rb#18 - def visit_Arel_Nodes_DoesNotMatch(o, collector); end - - # source://activerecord//lib/arel/visitors/postgresql.rb#44 - def visit_Arel_Nodes_GroupingElement(o, collector); end - - # source://activerecord//lib/arel/visitors/postgresql.rb#59 - def visit_Arel_Nodes_GroupingSet(o, collector); end - - # source://activerecord//lib/arel/visitors/postgresql.rb#75 - def visit_Arel_Nodes_IsDistinctFrom(o, collector); end - - # source://activerecord//lib/arel/visitors/postgresql.rb#69 - def visit_Arel_Nodes_IsNotDistinctFrom(o, collector); end - - # source://activerecord//lib/arel/visitors/postgresql.rb#64 - def visit_Arel_Nodes_Lateral(o, collector); end - - # source://activerecord//lib/arel/visitors/postgresql.rb#7 - def visit_Arel_Nodes_Matches(o, collector); end - - # source://activerecord//lib/arel/visitors/postgresql.rb#34 - def visit_Arel_Nodes_NotRegexp(o, collector); end - - # source://activerecord//lib/arel/visitors/postgresql.rb#29 - def visit_Arel_Nodes_Regexp(o, collector); end - - # source://activerecord//lib/arel/visitors/postgresql.rb#54 - def visit_Arel_Nodes_RollUp(o, collector); end -end - -# source://activerecord//lib/arel/visitors/postgresql.rb#81 -Arel::Visitors::PostgreSQL::BIND_BLOCK = T.let(T.unsafe(nil), Proc) - -# source://activerecord//lib/arel/visitors/sqlite.rb#5 -class Arel::Visitors::SQLite < ::Arel::Visitors::ToSql - private - - # source://activerecord//lib/arel/visitors/sqlite.rb#21 - def visit_Arel_Nodes_False(o, collector); end - - # source://activerecord//lib/arel/visitors/sqlite.rb#31 - def visit_Arel_Nodes_IsDistinctFrom(o, collector); end - - # source://activerecord//lib/arel/visitors/sqlite.rb#25 - def visit_Arel_Nodes_IsNotDistinctFrom(o, collector); end - - # Locks are not supported in SQLite - # - # source://activerecord//lib/arel/visitors/sqlite.rb#8 - def visit_Arel_Nodes_Lock(o, collector); end - - # source://activerecord//lib/arel/visitors/sqlite.rb#12 - def visit_Arel_Nodes_SelectStatement(o, collector); end - - # source://activerecord//lib/arel/visitors/sqlite.rb#17 - def visit_Arel_Nodes_True(o, collector); end -end - -# source://activerecord//lib/arel/visitors/to_sql.rb#11 -class Arel::Visitors::ToSql < ::Arel::Visitors::Visitor - # @return [ToSql] a new instance of ToSql - # - # source://activerecord//lib/arel/visitors/to_sql.rb#12 - def initialize(connection); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#17 - def compile(node, collector = T.unsafe(nil)); end - - private - - # source://activerecord//lib/arel/visitors/to_sql.rb#906 - def aggregate(name, o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#740 - def bind_block; end - - # FIXME: we should probably have a 2-pass visitor for this - # - # source://activerecord//lib/arel/visitors/to_sql.rb#869 - def build_subselect(key, o); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#933 - 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 - def collect_optimizer_hints(o, collector); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/visitors/to_sql.rb#844 - def has_group_by_and_having?(o); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/visitors/to_sql.rb#836 - def has_join_sources?(o); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/visitors/to_sql.rb#840 - def has_limit_or_offset_or_orders?(o); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#883 - def infix_value(o, collector, value); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#889 - def infix_value_with_paren(o, collector, value, suppress_parens = T.unsafe(nil)); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#824 - def inject_join(list, collector, join_str); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#920 - def is_distinct_from(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#818 - 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 - 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 - def prepare_update_statement(o); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#794 - def quote(value); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#804 - def quote_column_name(name); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#799 - def quote_table_name(name); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#809 - def sanitize_as_sql_comment(value); end - - # @return [Boolean] - # - # source://activerecord//lib/arel/visitors/to_sql.rb#832 - def unboundable?(value); end - - # @raise [UnsupportedVisitError] - # - # source://activerecord//lib/arel/visitors/to_sql.rb#759 - def unsupported(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#742 - def visit_ActiveModel_Attribute(o, collector); end - - # @raise [UnsupportedVisitError] - # - # source://activerecord//lib/arel/visitors/to_sql.rb#759 - def visit_ActiveSupport_Multibyte_Chars(o, collector); end - - # @raise [UnsupportedVisitError] - # - # source://activerecord//lib/arel/visitors/to_sql.rb#759 - def visit_ActiveSupport_StringInquirer(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#732 - def visit_Arel_Attributes_Attribute(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#611 - def visit_Arel_Nodes_And(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#693 - def visit_Arel_Nodes_As(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#361 - def visit_Arel_Nodes_Ascending(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#630 - def visit_Arel_Nodes_Assignment(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#418 - def visit_Arel_Nodes_Avg(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#428 - 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 - def visit_Arel_Nodes_BindParam(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#699 - def visit_Arel_Nodes_Case(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#84 - def visit_Arel_Nodes_Casted(o, collector); end - - # 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 - def visit_Arel_Nodes_Count(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 - def visit_Arel_Nodes_Descending(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#187 - def visit_Arel_Nodes_Distinct(o, collector); end - - # @raise [NotImplementedError] - # - # 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 - def visit_Arel_Nodes_DoesNotMatch(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#723 - def visit_Arel_Nodes_Else(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#643 - def visit_Arel_Nodes_Equality(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#218 - def visit_Arel_Nodes_Except(o, collector); end - - # 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 - def visit_Arel_Nodes_Extract(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#93 - def visit_Arel_Nodes_False(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#248 - def visit_Arel_Nodes_Filter(o, collector); end - - # 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 - def visit_Arel_Nodes_FullOuterJoin(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#446 - def visit_Arel_Nodes_GreaterThan(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#434 - def visit_Arel_Nodes_GreaterThanOrEqual(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#380 - def visit_Arel_Nodes_Group(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#324 - def visit_Arel_Nodes_Grouping(o, collector); end - - # 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 - def visit_Arel_Nodes_In(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#778 - def visit_Arel_Nodes_InfixOperation(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#550 - def visit_Arel_Nodes_InnerJoin(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#51 - def visit_Arel_Nodes_InsertStatement(o, collector); end - - # 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 - def visit_Arel_Nodes_IsDistinctFrom(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#658 - def visit_Arel_Nodes_IsNotDistinctFrom(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#506 - def visit_Arel_Nodes_JoinSource(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#470 - def visit_Arel_Nodes_LessThan(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#458 - def visit_Arel_Nodes_LessThanOrEqual(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#315 - def visit_Arel_Nodes_Limit(o, collector); end - - # 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 - def visit_Arel_Nodes_Matches(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#410 - def visit_Arel_Nodes_Max(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#414 - def visit_Arel_Nodes_Min(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#384 - 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 - def visit_Arel_Nodes_Not(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#678 - def visit_Arel_Nodes_NotEqual(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#595 - def visit_Arel_Nodes_NotIn(o, collector); end - - # @raise [NotImplementedError] - # - # source://activerecord//lib/arel/visitors/to_sql.rb#521 - 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 - def visit_Arel_Nodes_NullsFirst(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#375 - 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 - 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 - def visit_Arel_Nodes_Or(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#536 - def visit_Arel_Nodes_OuterJoin(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#297 - def visit_Arel_Nodes_Over(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#273 - def visit_Arel_Nodes_Preceding(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#84 - def visit_Arel_Nodes_Quoted(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#264 - def visit_Arel_Nodes_Range(o, collector); end - - # @raise [NotImplementedError] - # - # source://activerecord//lib/arel/visitors/to_sql.rb#517 - def visit_Arel_Nodes_Regexp(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#543 - def visit_Arel_Nodes_RightOuterJoin(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#255 - def visit_Arel_Nodes_Rows(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#146 - def visit_Arel_Nodes_SelectCore(o, collector); end - - # The Oracle enhanced adapter uses this private method, - # see https://github.com/rsim/oracle-enhanced/issues/2186 - # - # source://activerecord//lib/arel/visitors/to_sql.rb#140 - def visit_Arel_Nodes_SelectOptions(o, collector); end - - # 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 - def visit_Arel_Nodes_SqlLiteral(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#525 - def visit_Arel_Nodes_StringJoin(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#406 - def visit_Arel_Nodes_Sum(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#422 - 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 - def visit_Arel_Nodes_UnaryOperation(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#205 - def visit_Arel_Nodes_Union(o, collector); end - - # 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 - def visit_Arel_Nodes_UnqualifiedColumn(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#39 - def visit_Arel_Nodes_UpdateStatement(o, collector); end - - # 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 - def visit_Arel_Nodes_When(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#229 - def visit_Arel_Nodes_Window(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#195 - def visit_Arel_Nodes_With(o, collector); end - - # 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 - def visit_Arel_SelectManager(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#571 - def visit_Arel_Table(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#789 - def visit_Array(o, collector); end - - # @raise [UnsupportedVisitError] - # - # source://activerecord//lib/arel/visitors/to_sql.rb#759 - def visit_BigDecimal(o, collector); end - - # @raise [UnsupportedVisitError] - # - # source://activerecord//lib/arel/visitors/to_sql.rb#759 - def visit_Class(o, collector); end - - # @raise [UnsupportedVisitError] - # - # source://activerecord//lib/arel/visitors/to_sql.rb#759 - def visit_Date(o, collector); end - - # @raise [UnsupportedVisitError] - # - # source://activerecord//lib/arel/visitors/to_sql.rb#759 - def visit_DateTime(o, collector); end - - # @raise [UnsupportedVisitError] - # - # source://activerecord//lib/arel/visitors/to_sql.rb#759 - def visit_FalseClass(o, collector); end - - # @raise [UnsupportedVisitError] - # - # source://activerecord//lib/arel/visitors/to_sql.rb#759 - def visit_Float(o, collector); end - - # @raise [UnsupportedVisitError] - # - # source://activerecord//lib/arel/visitors/to_sql.rb#759 - def visit_Hash(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#755 - def visit_Integer(o, collector); end - - # @raise [UnsupportedVisitError] - # - # source://activerecord//lib/arel/visitors/to_sql.rb#759 - def visit_NilClass(o, collector); end - - # source://activerecord//lib/arel/visitors/to_sql.rb#789 - def visit_Set(o, collector); end - - # @raise [UnsupportedVisitError] - # - # source://activerecord//lib/arel/visitors/to_sql.rb#759 - def visit_String(o, collector); end - - # @raise [UnsupportedVisitError] - # - # source://activerecord//lib/arel/visitors/to_sql.rb#759 - def visit_Symbol(o, collector); end - - # @raise [UnsupportedVisitError] - # - # source://activerecord//lib/arel/visitors/to_sql.rb#759 - def visit_Time(o, collector); end - - # @raise [UnsupportedVisitError] - # - # source://activerecord//lib/arel/visitors/to_sql.rb#759 - def visit_TrueClass(o, collector); end -end - -# source://activerecord//lib/arel/visitors/to_sql.rb#737 -Arel::Visitors::ToSql::BIND_BLOCK = T.let(T.unsafe(nil), Proc) - -# source://activerecord//lib/arel/visitors/to_sql.rb#5 -class Arel::Visitors::UnsupportedVisitError < ::StandardError - # @return [UnsupportedVisitError] a new instance of UnsupportedVisitError - # - # source://activerecord//lib/arel/visitors/to_sql.rb#6 - def initialize(object); end -end - -# source://activerecord//lib/arel/visitors/visitor.rb#5 -class Arel::Visitors::Visitor - # @return [Visitor] a new instance of Visitor - # - # source://activerecord//lib/arel/visitors/visitor.rb#6 - def initialize; end - - # source://activerecord//lib/arel/visitors/visitor.rb#10 - def accept(object, collector = T.unsafe(nil)); end - - private - - # Returns the value of attribute dispatch. - # - # source://activerecord//lib/arel/visitors/visitor.rb#15 - def dispatch; end - - # source://activerecord//lib/arel/visitors/visitor.rb#23 - def get_dispatch_cache; end - - # source://activerecord//lib/arel/visitors/visitor.rb#27 - def visit(object, collector = T.unsafe(nil)); end - - class << self - # source://activerecord//lib/arel/visitors/visitor.rb#17 - def dispatch_cache; end - end -end - -# source://activerecord//lib/arel/window_predications.rb#4 -module Arel::WindowPredications - # source://activerecord//lib/arel/window_predications.rb#5 - def over(expr = T.unsafe(nil)); end -end diff --git a/sorbet/rbi/gems/activestorage@7.0.4.2.rbi b/sorbet/rbi/gems/activestorage@7.0.4.2.rbi deleted file mode 100644 index f145703..0000000 --- a/sorbet/rbi/gems/activestorage@7.0.4.2.rbi +++ /dev/null @@ -1,3366 +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.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#940 - def _before_commit_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#940 - def _commit_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#940 - def _create_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#940 - def _destroy_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#940 - def _find_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#940 - def _initialize_callbacks; end - - # source://activerecord/7.0.4.2/lib/active_record/reflection.rb#11 - def _reflections; end - - # source://activerecord/7.0.4.2/lib/active_record/reflection.rb#11 - def _reflections?; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#940 - def _rollback_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#928 - def _run_before_commit_callbacks(&block); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#928 - def _run_commit_callbacks(&block); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#928 - def _run_create_callbacks(&block); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#928 - def _run_destroy_callbacks(&block); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#928 - def _run_find_callbacks(&block); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#928 - def _run_initialize_callbacks(&block); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#928 - def _run_rollback_callbacks(&block); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#928 - def _run_save_callbacks(&block); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#928 - def _run_touch_callbacks(&block); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#928 - def _run_update_callbacks(&block); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#928 - def _run_validate_callbacks(&block); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#928 - def _run_validation_callbacks(&block); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#940 - def _save_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#940 - def _touch_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#940 - def _update_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#940 - def _validate_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#940 - def _validation_callbacks; end - - # source://activemodel/7.0.4.2/lib/active_model/validations.rb#52 - def _validators; end - - # source://activemodel/7.0.4.2/lib/active_model/validations.rb#52 - def _validators?; end - - # source://activerecord/7.0.4.2/lib/active_record/reflection.rb#12 - def aggregate_reflections; end - - # source://activerecord/7.0.4.2/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.4.2/lib/active_model/attribute_methods.rb#73 - def attribute_aliases; end - - # source://activemodel/7.0.4.2/lib/active_model/attribute_methods.rb#73 - def attribute_aliases?; end - - # source://activemodel/7.0.4.2/lib/active_model/attribute_methods.rb#74 - def attribute_method_matchers; end - - # source://activemodel/7.0.4.2/lib/active_model/attribute_methods.rb#74 - def attribute_method_matchers?; end - - # source://activerecord/7.0.4.2/lib/active_record/reflection.rb#13 - def automatic_scope_inversing; end - - # source://activerecord/7.0.4.2/lib/active_record/reflection.rb#13 - def automatic_scope_inversing?; end - - # source://activerecord/7.0.4.2/lib/active_record/integration.rb#16 - def cache_timestamp_format; end - - # source://activerecord/7.0.4.2/lib/active_record/integration.rb#16 - def cache_timestamp_format?; end - - # source://activerecord/7.0.4.2/lib/active_record/integration.rb#24 - def cache_versioning; end - - # source://activerecord/7.0.4.2/lib/active_record/integration.rb#24 - def cache_versioning?; end - - # source://activerecord/7.0.4.2/lib/active_record/integration.rb#32 - def collection_cache_versioning; end - - # source://activerecord/7.0.4.2/lib/active_record/integration.rb#32 - def collection_cache_versioning?; end - - # source://activerecord/7.0.4.2/lib/active_record/model_schema.rb#171 - def column_for_attribute(*_arg0, **_arg1, &_arg2); end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#74 - def default_connection_handler; end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#74 - def default_connection_handler?; end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#76 - def default_role; end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#76 - def default_role?; end - - # source://activerecord/7.0.4.2/lib/active_record/scoping/default.rb#20 - def default_scope_override; end - - # source://activerecord/7.0.4.2/lib/active_record/scoping/default.rb#19 - def default_scopes; end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#78 - def default_shard; end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#78 - def default_shard?; end - - # source://activerecord/7.0.4.2/lib/active_record/enum.rb#116 - def defined_enums; end - - # source://activerecord/7.0.4.2/lib/active_record/enum.rb#116 - def defined_enums?; end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#26 - def destroy_association_async_job; end - - # source://activerecord/7.0.4.2/lib/active_record/encryption/encryptable_record.rb#11 - def encrypted_attributes; end - - # source://activerecord/7.0.4.2/lib/active_record/encryption/encryptable_record.rb#11 - def encrypted_attributes=(_arg0); end - - # source://activerecord/7.0.4.2/lib/active_record/encryption/encryptable_record.rb#11 - def encrypted_attributes?; end - - # source://activemodel/7.0.4.2/lib/active_model/serializers/json.rb#15 - def include_root_in_json; end - - # source://activemodel/7.0.4.2/lib/active_model/serializers/json.rb#15 - def include_root_in_json?; end - - # source://activerecord/7.0.4.2/lib/active_record/locking/optimistic.rb#56 - def lock_optimistically; end - - # source://activerecord/7.0.4.2/lib/active_record/locking/optimistic.rb#56 - def lock_optimistically?; end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#20 - def logger; end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#20 - def logger?; end - - # source://activemodel/7.0.4.2/lib/active_model/naming.rb#244 - def model_name(*_arg0, **_arg1, &_arg2); end - - # source://activerecord/7.0.4.2/lib/active_record/nested_attributes.rb#15 - def nested_attributes_options; end - - # source://activerecord/7.0.4.2/lib/active_record/nested_attributes.rb#15 - def nested_attributes_options?; end - - # source://activerecord/7.0.4.2/lib/active_record/attribute_methods/dirty.rb#18 - def partial_inserts; end - - # source://activerecord/7.0.4.2/lib/active_record/attribute_methods/dirty.rb#18 - def partial_inserts?; end - - # source://activerecord/7.0.4.2/lib/active_record/attribute_methods/dirty.rb#17 - def partial_updates; end - - # source://activerecord/7.0.4.2/lib/active_record/attribute_methods/dirty.rb#17 - def partial_updates?; end - - # source://activerecord/7.0.4.2/lib/active_record/model_schema.rb#156 - def pluralize_table_names; end - - # source://activerecord/7.0.4.2/lib/active_record/model_schema.rb#156 - def pluralize_table_names?; end - - # source://activerecord/7.0.4.2/lib/active_record/model_schema.rb#151 - def primary_key_prefix_type; end - - # source://activerecord/7.0.4.2/lib/active_record/model_schema.rb#151 - def primary_key_prefix_type?; end - - # source://activerecord/7.0.4.2/lib/active_record/timestamp.rb#47 - def record_timestamps; end - - # source://activerecord/7.0.4.2/lib/active_record/timestamp.rb#47 - def record_timestamps=(_arg0); end - - # source://activerecord/7.0.4.2/lib/active_record/timestamp.rb#47 - def record_timestamps?; end - - # source://activerecord/7.0.4.2/lib/active_record/signed_id.rb#13 - def signed_id_verifier_secret; end - - # source://activerecord/7.0.4.2/lib/active_record/signed_id.rb#13 - def signed_id_verifier_secret?; end - - # source://activerecord/7.0.4.2/lib/active_record/attribute_methods/time_zone_conversion.rb#71 - def skip_time_zone_conversion_for_attributes; end - - # source://activerecord/7.0.4.2/lib/active_record/attribute_methods/time_zone_conversion.rb#71 - def skip_time_zone_conversion_for_attributes?; end - - # source://activerecord/7.0.4.2/lib/active_record/inheritance.rb#42 - def store_full_class_name; end - - # source://activerecord/7.0.4.2/lib/active_record/inheritance.rb#42 - def store_full_class_name?; end - - # source://activerecord/7.0.4.2/lib/active_record/inheritance.rb#46 - def store_full_sti_class; end - - # source://activerecord/7.0.4.2/lib/active_record/inheritance.rb#46 - def store_full_sti_class?; end - - # source://activerecord/7.0.4.2/lib/active_record/model_schema.rb#152 - def table_name_prefix; end - - # source://activerecord/7.0.4.2/lib/active_record/model_schema.rb#152 - def table_name_prefix?; end - - # source://activerecord/7.0.4.2/lib/active_record/model_schema.rb#153 - def table_name_suffix; end - - # source://activerecord/7.0.4.2/lib/active_record/model_schema.rb#153 - def table_name_suffix?; end - - # source://activerecord/7.0.4.2/lib/active_record/attribute_methods/time_zone_conversion.rb#70 - def time_zone_aware_attributes; end - - # source://activerecord/7.0.4.2/lib/active_record/attribute_methods/time_zone_conversion.rb#70 - def time_zone_aware_attributes?; end - - # source://activerecord/7.0.4.2/lib/active_record/attribute_methods/time_zone_conversion.rb#72 - def time_zone_aware_types; end - - # source://activerecord/7.0.4.2/lib/active_record/attribute_methods/time_zone_conversion.rb#72 - def time_zone_aware_types?; end - - # source://activerecord/7.0.4.2/lib/active_record/model_schema.rb#171 - def type_for_attribute(*_arg0, **_arg1, &_arg2); end - - # source://activemodel/7.0.4.2/lib/active_model/validations.rb#48 - def validation_context; end - - private - - # source://activemodel/7.0.4.2/lib/active_model/validations.rb#48 - def validation_context=(_arg0); end - - class << self - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://activerecord/7.0.4.2/lib/active_record/readonly_attributes.rb#8 - def _attr_readonly; end - - # source://activerecord/7.0.4.2/lib/active_record/readonly_attributes.rb#8 - def _attr_readonly=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/readonly_attributes.rb#8 - def _attr_readonly?; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#932 - def _before_commit_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#936 - def _before_commit_callbacks=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#932 - def _commit_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#936 - def _commit_callbacks=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#932 - def _create_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#936 - def _create_callbacks=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#932 - def _destroy_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#936 - def _destroy_callbacks=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#932 - def _find_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#936 - def _find_callbacks=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#932 - def _initialize_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#936 - def _initialize_callbacks=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/reflection.rb#11 - def _reflections; end - - # source://activerecord/7.0.4.2/lib/active_record/reflection.rb#11 - def _reflections=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/reflection.rb#11 - def _reflections?; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#932 - def _rollback_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#936 - def _rollback_callbacks=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#932 - def _save_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#936 - def _save_callbacks=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#932 - def _touch_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#936 - def _touch_callbacks=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#932 - def _update_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#936 - def _update_callbacks=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#932 - def _validate_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#936 - def _validate_callbacks=(value); end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#932 - def _validation_callbacks; end - - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#936 - def _validation_callbacks=(value); end - - # source://activemodel/7.0.4.2/lib/active_model/validations.rb#52 - def _validators; end - - # source://activemodel/7.0.4.2/lib/active_model/validations.rb#52 - def _validators=(value); end - - # source://activemodel/7.0.4.2/lib/active_model/validations.rb#52 - def _validators?; end - - # source://activemodel/7.0.4.2/lib/active_model/callbacks.rb#144 - def after_create(*args, **options, &block); end - - # source://activemodel/7.0.4.2/lib/active_model/callbacks.rb#144 - def after_destroy(*args, **options, &block); end - - # source://activemodel/7.0.4.2/lib/active_model/callbacks.rb#144 - def after_find(*args, **options, &block); end - - # source://activemodel/7.0.4.2/lib/active_model/callbacks.rb#144 - def after_initialize(*args, **options, &block); end - - # source://activemodel/7.0.4.2/lib/active_model/callbacks.rb#144 - def after_save(*args, **options, &block); end - - # source://activemodel/7.0.4.2/lib/active_model/callbacks.rb#144 - def after_touch(*args, **options, &block); end - - # source://activemodel/7.0.4.2/lib/active_model/callbacks.rb#144 - def after_update(*args, **options, &block); end - - # source://activerecord/7.0.4.2/lib/active_record/reflection.rb#12 - def aggregate_reflections; end - - # source://activerecord/7.0.4.2/lib/active_record/reflection.rb#12 - def aggregate_reflections=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/reflection.rb#12 - def aggregate_reflections?; end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#82 - def application_record_class?; end - - # source://activemodel/7.0.4.2/lib/active_model/callbacks.rb#137 - def around_create(*args, **options, &block); end - - # source://activemodel/7.0.4.2/lib/active_model/callbacks.rb#137 - def around_destroy(*args, **options, &block); end - - # source://activemodel/7.0.4.2/lib/active_model/callbacks.rb#137 - def around_save(*args, **options, &block); end - - # source://activemodel/7.0.4.2/lib/active_model/callbacks.rb#137 - def around_update(*args, **options, &block); end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#129 - def asynchronous_queries_session; end - - # source://activerecord/7.0.4.2/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.4.2/lib/active_model/attribute_methods.rb#73 - def attribute_aliases; end - - # source://activemodel/7.0.4.2/lib/active_model/attribute_methods.rb#73 - def attribute_aliases=(value); end - - # source://activemodel/7.0.4.2/lib/active_model/attribute_methods.rb#73 - def attribute_aliases?; end - - # source://activemodel/7.0.4.2/lib/active_model/attribute_methods.rb#74 - def attribute_method_matchers; end - - # source://activemodel/7.0.4.2/lib/active_model/attribute_methods.rb#74 - def attribute_method_matchers=(value); end - - # source://activemodel/7.0.4.2/lib/active_model/attribute_methods.rb#74 - def attribute_method_matchers?; end - - # source://activerecord/7.0.4.2/lib/active_record/attributes.rb#11 - def attributes_to_define_after_schema_loads; end - - # source://activerecord/7.0.4.2/lib/active_record/attributes.rb#11 - def attributes_to_define_after_schema_loads=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/attributes.rb#11 - def attributes_to_define_after_schema_loads?; end - - # source://activerecord/7.0.4.2/lib/active_record/reflection.rb#13 - def automatic_scope_inversing; end - - # source://activerecord/7.0.4.2/lib/active_record/reflection.rb#13 - def automatic_scope_inversing=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/reflection.rb#13 - def automatic_scope_inversing?; end - - # source://activemodel/7.0.4.2/lib/active_model/callbacks.rb#130 - def before_create(*args, **options, &block); end - - # source://activemodel/7.0.4.2/lib/active_model/callbacks.rb#130 - def before_destroy(*args, **options, &block); end - - # source://activemodel/7.0.4.2/lib/active_model/callbacks.rb#130 - def before_save(*args, **options, &block); end - - # source://activemodel/7.0.4.2/lib/active_model/callbacks.rb#130 - def before_update(*args, **options, &block); end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#68 - def belongs_to_required_by_default; end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#68 - def belongs_to_required_by_default=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#68 - def belongs_to_required_by_default?; end - - # source://activerecord/7.0.4.2/lib/active_record/integration.rb#16 - def cache_timestamp_format; end - - # source://activerecord/7.0.4.2/lib/active_record/integration.rb#16 - def cache_timestamp_format=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/integration.rb#16 - def cache_timestamp_format?; end - - # source://activerecord/7.0.4.2/lib/active_record/integration.rb#24 - def cache_versioning; end - - # source://activerecord/7.0.4.2/lib/active_record/integration.rb#24 - def cache_versioning=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/integration.rb#24 - def cache_versioning?; end - - # source://activerecord/7.0.4.2/lib/active_record/integration.rb#32 - def collection_cache_versioning; end - - # source://activerecord/7.0.4.2/lib/active_record/integration.rb#32 - def collection_cache_versioning=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/integration.rb#32 - def collection_cache_versioning?; end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#56 - def configurations; end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#50 - def configurations=(config); end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#201 - def connected_to_stack; end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#215 - def connection_class; end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#211 - def connection_class=(b); end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#219 - def connection_class?; end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#223 - def connection_class_for_self; end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#94 - def connection_handler; end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#98 - def connection_handler=(handler); end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#102 - def connection_handlers; end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#111 - def connection_handlers=(handlers); end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#188 - def current_preventing_writes; end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#147 - def current_role; end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#169 - def current_shard; end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#74 - def default_connection_handler; end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#74 - def default_connection_handler=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#74 - def default_connection_handler?; end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#76 - def default_role; end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#76 - def default_role=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#76 - def default_role?; end - - # source://activerecord/7.0.4.2/lib/active_record/scoping/default.rb#20 - def default_scope_override; end - - # source://activerecord/7.0.4.2/lib/active_record/scoping/default.rb#20 - def default_scope_override=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/scoping/default.rb#19 - def default_scopes; end - - # source://activerecord/7.0.4.2/lib/active_record/scoping/default.rb#19 - def default_scopes=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#78 - def default_shard; end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#78 - def default_shard=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#78 - def default_shard?; end - - # source://activerecord/7.0.4.2/lib/active_record/enum.rb#116 - def defined_enums; end - - # source://activerecord/7.0.4.2/lib/active_record/enum.rb#116 - def defined_enums=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/enum.rb#116 - def defined_enums?; end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#26 - def destroy_association_async_job; end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#26 - def destroy_association_async_job=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/encryption/encryptable_record.rb#11 - def encrypted_attributes; end - - # source://activerecord/7.0.4.2/lib/active_record/encryption/encryptable_record.rb#11 - def encrypted_attributes=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/encryption/encryptable_record.rb#11 - def encrypted_attributes?; end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#66 - def enumerate_columns_in_select_statements; end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#66 - def enumerate_columns_in_select_statements=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#66 - def enumerate_columns_in_select_statements?; end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#72 - def has_many_inversing; end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#72 - def has_many_inversing=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#72 - def has_many_inversing?; end - - # source://activerecord/7.0.4.2/lib/active_record/model_schema.rb#158 - def immutable_strings_by_default; end - - # source://activerecord/7.0.4.2/lib/active_record/model_schema.rb#158 - def immutable_strings_by_default=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/model_schema.rb#158 - def immutable_strings_by_default?; end - - # source://activerecord/7.0.4.2/lib/active_record/model_schema.rb#157 - def implicit_order_column; end - - # source://activerecord/7.0.4.2/lib/active_record/model_schema.rb#157 - def implicit_order_column=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/model_schema.rb#157 - def implicit_order_column?; end - - # source://activemodel/7.0.4.2/lib/active_model/serializers/json.rb#15 - def include_root_in_json; end - - # source://activemodel/7.0.4.2/lib/active_model/serializers/json.rb#15 - def include_root_in_json=(value); end - - # source://activemodel/7.0.4.2/lib/active_model/serializers/json.rb#15 - def include_root_in_json?; end - - # source://activerecord/7.0.4.2/lib/active_record/model_schema.rb#160 - def inheritance_column; end - - # source://activerecord/7.0.4.2/lib/active_record/model_schema.rb#311 - def inheritance_column=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/model_schema.rb#160 - def inheritance_column?; end - - # source://activerecord/7.0.4.2/lib/active_record/model_schema.rb#155 - def internal_metadata_table_name; end - - # source://activerecord/7.0.4.2/lib/active_record/model_schema.rb#155 - def internal_metadata_table_name=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/model_schema.rb#155 - def internal_metadata_table_name?; end - - # source://activerecord/7.0.4.2/lib/active_record/store.rb#99 - def local_stored_attributes; end - - # source://activerecord/7.0.4.2/lib/active_record/store.rb#99 - def local_stored_attributes=(_arg0); end - - # source://activerecord/7.0.4.2/lib/active_record/locking/optimistic.rb#56 - def lock_optimistically; end - - # source://activerecord/7.0.4.2/lib/active_record/locking/optimistic.rb#56 - def lock_optimistically=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/locking/optimistic.rb#56 - def lock_optimistically?; end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#20 - def logger; end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#20 - def logger=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#20 - def logger?; end - - # source://activerecord/7.0.4.2/lib/active_record/nested_attributes.rb#15 - def nested_attributes_options; end - - # source://activerecord/7.0.4.2/lib/active_record/nested_attributes.rb#15 - def nested_attributes_options=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/nested_attributes.rb#15 - def nested_attributes_options?; end - - # source://activerecord/7.0.4.2/lib/active_record/attribute_methods/dirty.rb#18 - def partial_inserts; end - - # source://activerecord/7.0.4.2/lib/active_record/attribute_methods/dirty.rb#18 - def partial_inserts=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/attribute_methods/dirty.rb#18 - def partial_inserts?; end - - # source://activerecord/7.0.4.2/lib/active_record/attribute_methods/dirty.rb#17 - def partial_updates; end - - # source://activerecord/7.0.4.2/lib/active_record/attribute_methods/dirty.rb#17 - def partial_updates=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/attribute_methods/dirty.rb#17 - def partial_updates?; end - - # source://activerecord/7.0.4.2/lib/active_record/model_schema.rb#156 - def pluralize_table_names; end - - # source://activerecord/7.0.4.2/lib/active_record/model_schema.rb#156 - def pluralize_table_names=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/model_schema.rb#156 - def pluralize_table_names?; end - - # source://activerecord/7.0.4.2/lib/active_record/model_schema.rb#151 - def primary_key_prefix_type; end - - # source://activerecord/7.0.4.2/lib/active_record/model_schema.rb#151 - def primary_key_prefix_type=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/model_schema.rb#151 - def primary_key_prefix_type?; end - - # source://activerecord/7.0.4.2/lib/active_record/timestamp.rb#47 - def record_timestamps; end - - # source://activerecord/7.0.4.2/lib/active_record/timestamp.rb#47 - def record_timestamps=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/timestamp.rb#47 - def record_timestamps?; end - - # source://activerecord/7.0.4.2/lib/active_record/model_schema.rb#154 - def schema_migrations_table_name; end - - # source://activerecord/7.0.4.2/lib/active_record/model_schema.rb#154 - def schema_migrations_table_name=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/model_schema.rb#154 - def schema_migrations_table_name?; end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#80 - def shard_selector; end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#80 - def shard_selector=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#80 - def shard_selector?; end - - # source://activerecord/7.0.4.2/lib/active_record/signed_id.rb#13 - def signed_id_verifier_secret; end - - # source://activerecord/7.0.4.2/lib/active_record/signed_id.rb#13 - def signed_id_verifier_secret=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/signed_id.rb#13 - def signed_id_verifier_secret?; end - - # source://activerecord/7.0.4.2/lib/active_record/attribute_methods/time_zone_conversion.rb#71 - def skip_time_zone_conversion_for_attributes; end - - # source://activerecord/7.0.4.2/lib/active_record/attribute_methods/time_zone_conversion.rb#71 - def skip_time_zone_conversion_for_attributes=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/attribute_methods/time_zone_conversion.rb#71 - def skip_time_zone_conversion_for_attributes?; end - - # source://activerecord/7.0.4.2/lib/active_record/inheritance.rb#42 - def store_full_class_name; end - - # source://activerecord/7.0.4.2/lib/active_record/inheritance.rb#42 - def store_full_class_name=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/inheritance.rb#42 - def store_full_class_name?; end - - # source://activerecord/7.0.4.2/lib/active_record/inheritance.rb#46 - def store_full_sti_class; end - - # source://activerecord/7.0.4.2/lib/active_record/inheritance.rb#46 - def store_full_sti_class=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/inheritance.rb#46 - def store_full_sti_class?; end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#70 - def strict_loading_by_default; end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#70 - def strict_loading_by_default=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#70 - def strict_loading_by_default?; end - - # source://activerecord/7.0.4.2/lib/active_record/core.rb#238 - def strict_loading_violation!(owner:, reflection:); end - - # source://activerecord/7.0.4.2/lib/active_record/model_schema.rb#152 - def table_name_prefix; end - - # source://activerecord/7.0.4.2/lib/active_record/model_schema.rb#152 - def table_name_prefix=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/model_schema.rb#152 - def table_name_prefix?; end - - # source://activerecord/7.0.4.2/lib/active_record/model_schema.rb#153 - def table_name_suffix; end - - # source://activerecord/7.0.4.2/lib/active_record/model_schema.rb#153 - def table_name_suffix=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/model_schema.rb#153 - def table_name_suffix?; end - - # source://activerecord/7.0.4.2/lib/active_record/attribute_methods/time_zone_conversion.rb#70 - def time_zone_aware_attributes; end - - # source://activerecord/7.0.4.2/lib/active_record/attribute_methods/time_zone_conversion.rb#70 - def time_zone_aware_attributes=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/attribute_methods/time_zone_conversion.rb#70 - def time_zone_aware_attributes?; end - - # source://activerecord/7.0.4.2/lib/active_record/attribute_methods/time_zone_conversion.rb#72 - def time_zone_aware_types; end - - # source://activerecord/7.0.4.2/lib/active_record/attribute_methods/time_zone_conversion.rb#72 - def time_zone_aware_types=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/attribute_methods/time_zone_conversion.rb#72 - def time_zone_aware_types?; end - - private - - # source://activerecord/7.0.4.2/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.4.2/lib/rails/engine.rb#405 - def railtie_helpers_paths; end - - # source://railties/7.0.4.2/lib/rails/engine.rb#394 - def railtie_namespace; end - - # source://railties/7.0.4.2/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.4.2/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.4.2/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.4.2/lib/active_job/queue_name.rb#56 - def queue_name; end - - # source://activesupport/7.0.4.2/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#72 - def audio?; end - - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#107 - def audio_stream; end - - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#80 - def computed_height; end - - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#115 - def container; end - - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#57 - def display_aspect_ratio; end - - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#94 - 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#90 - def encoded_height; end - - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#86 - def encoded_width; end - - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#140 - 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#119 - def probe; end - - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#123 - def probe_from(file); end - - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#68 - def rotated?; end - - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#111 - def streams; end - - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#99 - def tags; end - - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#76 - def video?; end - - # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#103 - 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#10 -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.4.2/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.4.2/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#10 -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.4.2/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.4.2/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.4.2/lib/active_record/autosave_association.rb#160 - def autosave_associated_records_for_blob(*args); end - - # source://activerecord/7.0.4.2/lib/active_record/autosave_association.rb#160 - def autosave_associated_records_for_record(*args); end - - # source://activesupport/7.0.4.2/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.4.2/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.4.2/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.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activerecord/7.0.4.2/lib/active_record/reflection.rb#11 - def _reflections; end - - # source://activemodel/7.0.4.2/lib/active_model/validations.rb#52 - def _validators; end - - # source://activerecord/7.0.4.2/lib/active_record/enum.rb#116 - def defined_enums; end - - # source://activerecord/7.0.4.2/lib/active_record/scoping/named.rb#174 - def with_all_variant_records(*args, **_arg1); end - end -end - -module ActiveStorage::Attachment::GeneratedAssociationMethods - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/association.rb#103 - def blob; end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/association.rb#111 - def blob=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/belongs_to.rb#132 - def blob_changed?; end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/belongs_to.rb#136 - def blob_previously_changed?; end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/singular_association.rb#28 - def build_blob(*args, &block); end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/singular_association.rb#32 - def create_blob(*args, &block); end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/singular_association.rb#36 - def create_blob!(*args, &block); end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/association.rb#103 - def record; end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/association.rb#111 - def record=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/belongs_to.rb#132 - def record_changed?; end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/belongs_to.rb#136 - def record_previously_changed?; end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/singular_association.rb#19 - def reload_blob; end - - # source://activerecord/7.0.4.2/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.4.2/lib/action_view/layouts.rb#328 - def _layout(lookup_context, formats); end - - def _layout_from_proc; end - - class << self - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://actionpack/7.0.4.2/lib/action_controller/metal/etag_with_template_digest.rb#27 - def etag_with_template_digest; end - - # source://actionpack/7.0.4.2/lib/action_controller/metal.rb#210 - def middleware_stack; end - end -end - -class ActiveStorage::BaseJob < ::ActiveJob::Base; end - -class ActiveStorage::Blob < ::ActiveStorage::Record - include ::ActiveStorage::Blob::GeneratedAttributeMethods - include ::ActiveStorage::Blob::GeneratedAssociationMethods - include ::ActiveStorage::Blob::Analyzable - include ::ActiveStorage::Blob::Identifiable - include ::ActiveStorage::Blob::Representable - include ::ActionText::Attachable - extend ::ActionText::Attachable::ClassMethods - - # source://actiontext/7.0.4.2/lib/action_text/engine.rb#43 - def attachable_plain_text_representation(caption = T.unsafe(nil)); end - - def audio?; end - - # source://activerecord/7.0.4.2/lib/active_record/autosave_association.rb#160 - def autosave_associated_records_for_attachments(*args); end - - # source://activerecord/7.0.4.2/lib/active_record/autosave_association.rb#160 - def autosave_associated_records_for_preview_image_attachment(*args); end - - # source://activerecord/7.0.4.2/lib/active_record/autosave_association.rb#160 - def autosave_associated_records_for_preview_image_blob(*args); end - - # source://activerecord/7.0.4.2/lib/active_record/autosave_association.rb#160 - def autosave_associated_records_for_variant_records(*args); end - - def compose(keys); end - def content_type=(value); end - def content_type_for_serving; end - def custom_metadata; end - def custom_metadata=(metadata); end - def delete; end - def download(&block); end - def download_chunk(range); end - def filename; end - def forced_disposition_for_serving; end - def image?; end - def key; end - def mirror_later; end - def open(tmpdir: T.unsafe(nil), &block); end - - # source://actiontext/7.0.4.2/lib/action_text/engine.rb#39 - def previewable_attachable?; end - - def purge; end - def purge_later; end - - # source://activerecord/7.0.4.2/lib/active_record/secure_token.rb#39 - def regenerate_key; end - - def service; end - def service_headers_for_direct_upload; end - def service_url_for_direct_upload(expires_in: T.unsafe(nil)); end - def services; end - def services=(_arg0); end - def services?; end - def signed_id(purpose: T.unsafe(nil), expires_in: T.unsafe(nil)); end - def text?; end - - # source://actiontext/7.0.4.2/lib/action_text/engine.rb#47 - def to_trix_content_attachment_partial_path; end - - def unfurl(io, identify: T.unsafe(nil)); end - def upload(io, identify: T.unsafe(nil)); end - def upload_without_unfurling(io); end - def url(expires_in: T.unsafe(nil), disposition: T.unsafe(nil), filename: T.unsafe(nil), **options); end - - # source://activerecord/7.0.4.2/lib/active_record/autosave_association.rb#160 - def validate_associated_records_for_attachments(*args); end - - # source://activerecord/7.0.4.2/lib/active_record/autosave_association.rb#160 - def validate_associated_records_for_variant_records(*args); end - - def video?; end - - private - - def allowed_inline?; end - def compute_checksum_in_chunks(io); end - def extract_content_type(io); end - def forcibly_serve_as_binary?; end - def service_metadata; end - def update_service_metadata; end - def web_image?; end - - class << self - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activerecord/7.0.4.2/lib/active_record/reflection.rb#11 - def _reflections; end - - # source://activemodel/7.0.4.2/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.4.2/lib/active_record/attributes.rb#11 - def attributes_to_define_after_schema_loads; end - - def build_after_unfurling(io:, filename:, key: T.unsafe(nil), content_type: T.unsafe(nil), metadata: T.unsafe(nil), service_name: T.unsafe(nil), identify: T.unsafe(nil), record: T.unsafe(nil)); end - def combine_signed_id_purposes(purpose); end - def compose(blobs, filename:, content_type: T.unsafe(nil), metadata: T.unsafe(nil)); end - def create_after_unfurling!(io:, filename:, key: T.unsafe(nil), content_type: T.unsafe(nil), metadata: T.unsafe(nil), service_name: T.unsafe(nil), identify: T.unsafe(nil), record: T.unsafe(nil)); end - def create_and_upload!(io:, filename:, key: T.unsafe(nil), content_type: T.unsafe(nil), metadata: T.unsafe(nil), service_name: T.unsafe(nil), identify: T.unsafe(nil), record: T.unsafe(nil)); end - def create_before_direct_upload!(filename:, byte_size:, checksum:, key: T.unsafe(nil), content_type: T.unsafe(nil), metadata: T.unsafe(nil), service_name: T.unsafe(nil), record: T.unsafe(nil)); end - - # source://activerecord/7.0.4.2/lib/active_record/enum.rb#116 - def defined_enums; end - - def find_signed(id, record: T.unsafe(nil), purpose: T.unsafe(nil)); end - def find_signed!(id, record: T.unsafe(nil), purpose: T.unsafe(nil)); end - def generate_unique_secure_token(length: T.unsafe(nil)); end - def scope_for_strict_loading; end - def service; end - def service=(value); end - def service?; end - def services; end - def services=(value); end - def services?; end - def signed_id_verifier; end - - # source://activerecord/7.0.4.2/lib/active_record/scoping/named.rb#174 - def unattached(*args, **_arg1); end - - # source://activerecord/7.0.4.2/lib/active_record/scoping/named.rb#174 - def with_attached_preview_image(*args, **_arg1); end - end -end - -module ActiveStorage::Blob::Analyzable - def analyze; end - def analyze_later; end - def analyzed?; end - - private - - def analyzer; end - def analyzer_class; end - def extract_metadata_via_analyzer; end -end - -module ActiveStorage::Blob::GeneratedAssociationMethods - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/collection_association.rb#62 - def attachment_ids; end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/collection_association.rb#72 - def attachment_ids=(ids); end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/association.rb#103 - def attachments; end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/association.rb#111 - def attachments=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/singular_association.rb#28 - def build_preview_image_attachment(*args, &block); end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/singular_association.rb#28 - def build_preview_image_blob(*args, &block); end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/singular_association.rb#32 - def create_preview_image_attachment(*args, &block); end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/singular_association.rb#36 - def create_preview_image_attachment!(*args, &block); end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/singular_association.rb#32 - def create_preview_image_blob(*args, &block); end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/singular_association.rb#36 - def create_preview_image_blob!(*args, &block); end - - # source://activestorage//lib/active_storage/attached/model.rb#55 - def preview_image; end - - # source://activestorage//lib/active_storage/attached/model.rb#60 - def preview_image=(attachable); end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/association.rb#103 - def preview_image_attachment; end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/association.rb#111 - def preview_image_attachment=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/association.rb#103 - def preview_image_blob; end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/association.rb#111 - def preview_image_blob=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/singular_association.rb#19 - def reload_preview_image_attachment; end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/singular_association.rb#19 - def reload_preview_image_blob; end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/collection_association.rb#62 - def variant_record_ids; end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/collection_association.rb#72 - def variant_record_ids=(ids); end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/association.rb#103 - def variant_records; end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/association.rb#111 - def variant_records=(value); end -end - -module ActiveStorage::Blob::GeneratedAttributeMethods; end -ActiveStorage::Blob::INVALID_VARIABLE_CONTENT_TYPES_DEPRECATED_IN_RAILS_7 = T.let(T.unsafe(nil), Array) -ActiveStorage::Blob::INVALID_VARIABLE_CONTENT_TYPES_TO_SERVE_AS_BINARY_DEPRECATED_IN_RAILS_7 = T.let(T.unsafe(nil), Array) - -module ActiveStorage::Blob::Identifiable - def identified?; end - def identify; end - def identify_without_saving; end - - private - - def download_identifiable_chunk; end - def identify_content_type; end -end - -ActiveStorage::Blob::MINIMUM_TOKEN_LENGTH = T.let(T.unsafe(nil), Integer) - -module ActiveStorage::Blob::Representable - extend ::ActiveSupport::Concern - - def preview(transformations); end - def previewable?; end - def representable?; end - def representation(transformations); end - def variable?; end - def variant(transformations); end - - private - - def default_variant_format; end - def default_variant_transformations; end - def format; end - def variant_class; end -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.4.2/lib/action_view/layouts.rb#328 - def _layout(lookup_context, formats); end - - def _layout_from_proc; end - - class << self - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://actionpack/7.0.4.2/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.4.2/lib/action_view/layouts.rb#328 - def _layout(lookup_context, formats); end - - def _layout_from_proc; end - - class << self - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://actionpack/7.0.4.2/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.4.2/lib/active_support/current_attributes.rb#118 - def url_options; end - - # source://activesupport/7.0.4.2/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.4.2/lib/action_view/layouts.rb#328 - def _layout(lookup_context, formats); end - - def _layout_from_proc; end - def blob_args; end - def direct_upload_json(blob); end - - class << self - # source://actionpack/7.0.4.2/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.4.2/lib/action_view/layouts.rb#328 - def _layout(lookup_context, formats); end - - def _layout_from_proc; 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.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://actionpack/7.0.4.2/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.4.2/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}[rdoc-ref:ActiveRecord::FixtureSet] documentation. -# -# === YAML -# -# Like other Active Record-backed models, -# {ActiveStorage::Attachment}[rdoc-ref:ActiveStorage::Attachment] and -# {ActiveStorage::Blob}[rdoc-ref:ActiveStorage::Blob] records inherit from -# {ActiveRecord::Base}[rdoc-ref: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#41 -class ActiveStorage::FixtureSet - include ::ActiveSupport::Testing::FileFixtures - include ::ActiveRecord::SecureToken - extend ::ActiveRecord::SecureToken::ClassMethods - - # source://activesupport/7.0.4.2/lib/active_support/testing/file_fixtures.rb#20 - def file_fixture_path; end - - # source://activesupport/7.0.4.2/lib/active_support/testing/file_fixtures.rb#20 - def file_fixture_path?; end - - # source://activestorage//lib/active_storage/fixture_set.rb#67 - 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#63 - def blob(filename:, **attributes); end - - # source://activesupport/7.0.4.2/lib/active_support/testing/file_fixtures.rb#20 - def file_fixture_path; end - - # source://activesupport/7.0.4.2/lib/active_support/testing/file_fixtures.rb#20 - def file_fixture_path=(value); end - - # source://activesupport/7.0.4.2/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.4.2/lib/active_job/queue_name.rb#56 - def queue_name; end - - # source://activesupport/7.0.4.2/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.4.2/lib/active_job/queue_name.rb#56 - def queue_name; end - - # source://activesupport/7.0.4.2/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.4.2/lib/active_model/validations.rb#52 - def _validators; end - - # source://activerecord/7.0.4.2/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::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.4.2/lib/action_view/layouts.rb#328 - def _layout(lookup_context, formats); end - - def _layout_from_proc; end - def blob_scope; end - def set_representation; end - - class << self - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://actionpack/7.0.4.2/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.4.2/lib/action_view/layouts.rb#328 - def _layout(lookup_context, formats); end - - def _layout_from_proc; end - - class << self - # source://actionpack/7.0.4.2/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.4.2/lib/action_view/layouts.rb#328 - def _layout(lookup_context, formats); end - - def _layout_from_proc; end - - class << self - # source://actionpack/7.0.4.2/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), String) - -# 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.4.2/lib/active_record/autosave_association.rb#160 - def autosave_associated_records_for_blob(*args); end - - # source://activerecord/7.0.4.2/lib/active_record/autosave_association.rb#160 - def autosave_associated_records_for_image_attachment(*args); end - - # source://activerecord/7.0.4.2/lib/active_record/autosave_association.rb#160 - def autosave_associated_records_for_image_blob(*args); end - - class << self - # source://activesupport/7.0.4.2/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activerecord/7.0.4.2/lib/active_record/reflection.rb#11 - def _reflections; end - - # source://activemodel/7.0.4.2/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.4.2/lib/active_record/enum.rb#116 - def defined_enums; end - - # source://activerecord/7.0.4.2/lib/active_record/scoping/named.rb#174 - def with_attached_image(*args, **_arg1); end - end -end - -module ActiveStorage::VariantRecord::GeneratedAssociationMethods - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/association.rb#103 - def blob; end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/association.rb#111 - def blob=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/belongs_to.rb#132 - def blob_changed?; end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/belongs_to.rb#136 - def blob_previously_changed?; end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/singular_association.rb#28 - def build_blob(*args, &block); end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/singular_association.rb#28 - def build_image_attachment(*args, &block); end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/singular_association.rb#28 - def build_image_blob(*args, &block); end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/singular_association.rb#32 - def create_blob(*args, &block); end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/singular_association.rb#36 - def create_blob!(*args, &block); end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/singular_association.rb#32 - def create_image_attachment(*args, &block); end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/singular_association.rb#36 - def create_image_attachment!(*args, &block); end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/singular_association.rb#32 - def create_image_blob(*args, &block); end - - # source://activerecord/7.0.4.2/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.4.2/lib/active_record/associations/builder/association.rb#103 - def image_attachment; end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/association.rb#111 - def image_attachment=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/association.rb#103 - def image_blob; end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/association.rb#111 - def image_blob=(value); end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/singular_association.rb#19 - def reload_blob; end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/singular_association.rb#19 - def reload_image_attachment; end - - # source://activerecord/7.0.4.2/lib/active_record/associations/builder/singular_association.rb#19 - def reload_image_blob; end -end - -module ActiveStorage::VariantRecord::GeneratedAttributeMethods; end - -class ActiveStorage::VariantWithRecord - def initialize(blob, variation); end - - 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/activesupport@7.0.4.2.rbi b/sorbet/rbi/gems/activesupport@7.0.4.2.rbi deleted file mode 100644 index 50695ef..0000000 --- a/sorbet/rbi/gems/activesupport@7.0.4.2.rbi +++ /dev/null @@ -1,19219 +0,0 @@ -# typed: false - -# DO NOT EDIT MANUALLY -# 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 -module ActiveSupport - extend ::ActiveSupport::LazyLoadHooks - extend ::ActiveSupport::Autoload - - # source://activesupport//lib/active_support/json/decoding.rb#9 - def parse_json_times; end - - # source://activesupport//lib/active_support/json/decoding.rb#9 - def parse_json_times=(val); end - - # source://activesupport//lib/active_support.rb#94 - def test_order; end - - # source://activesupport//lib/active_support.rb#94 - def test_order=(val); end - - # source://activesupport//lib/active_support.rb#95 - def test_parallelization_threshold; end - - # source://activesupport//lib/active_support.rb#95 - def test_parallelization_threshold=(val); end - - class << self - # source://activesupport//lib/active_support.rb#99 - def cache_format_version; end - - # source://activesupport//lib/active_support.rb#103 - def cache_format_version=(value); end - - # source://activesupport//lib/active_support.rb#88 - def eager_load!; end - - # source://activesupport//lib/active_support.rb#97 - def error_reporter; end - - # source://activesupport//lib/active_support.rb#97 - def error_reporter=(_arg0); end - - # source://activesupport//lib/active_support/json/encoding.rb#8 - def escape_html_entities_in_json(*_arg0, **_arg1, &_arg2); end - - # 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. - # - # source://activesupport//lib/active_support/gem_version.rb#5 - def gem_version; end - - # source://activesupport//lib/active_support/json/encoding.rb#8 - def json_encoder(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/json/encoding.rb#8 - def json_encoder=(arg); end - - # source://activesupport//lib/active_support/json/decoding.rb#9 - def parse_json_times; end - - # source://activesupport//lib/active_support/json/decoding.rb#9 - def parse_json_times=(val); end - - # source://activesupport//lib/active_support.rb#94 - def test_order; end - - # source://activesupport//lib/active_support.rb#94 - def test_order=(val); end - - # source://activesupport//lib/active_support.rb#95 - def test_parallelization_threshold; end - - # source://activesupport//lib/active_support.rb#95 - def test_parallelization_threshold=(val); end - - # source://activesupport//lib/active_support/json/encoding.rb#8 - def time_precision(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/json/encoding.rb#8 - def time_precision=(arg); end - - # source://activesupport//lib/active_support.rb#107 - def to_time_preserves_timezone; end - - # source://activesupport//lib/active_support.rb#111 - def to_time_preserves_timezone=(value); end - - # source://activesupport//lib/active_support/json/encoding.rb#8 - def use_standard_json_time_format(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/json/encoding.rb#8 - def use_standard_json_time_format=(arg); end - - # source://activesupport//lib/active_support.rb#115 - def utc_to_local_returns_utc_offset_times; end - - # source://activesupport//lib/active_support.rb#119 - def utc_to_local_returns_utc_offset_times=(value); end - - # 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 lets you define actions to resolve an error. -# -# 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 -module ActiveSupport::ActionableError - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveSupport::ActionableError::ClassMethods - - class << self - # source://activesupport//lib/active_support/actionable_error.rb#18 - def actions(error); end - - # source://activesupport//lib/active_support/actionable_error.rb#27 - def dispatch(error, name); end - end - - module GeneratedClassMethods - def _actions; end - def _actions=(value); end - def _actions?; end - end - - module GeneratedInstanceMethods - def _actions; end - def _actions=(value); end - def _actions?; end - end -end - -# source://activesupport//lib/active_support/actionable_error.rb#33 -module ActiveSupport::ActionableError::ClassMethods - # Defines an action that can resolve the error. - # - # class PendingMigrationError < MigrationError - # include ActiveSupport::ActionableError - # - # action "Run pending migrations" do - # ActiveRecord::Tasks::DatabaseTasks.migrate - # end - # end - # - # source://activesupport//lib/active_support/actionable_error.rb#43 - def action(name, &block); end -end - -# source://activesupport//lib/active_support/actionable_error.rb#12 -class ActiveSupport::ActionableError::NonActionable < ::StandardError; end - -# Wrapping an array in an +ArrayInquirer+ gives a friendlier way to check -# its string-like contents: -# -# variants = ActiveSupport::ArrayInquirer.new([:phone, :tablet]) -# -# variants.phone? # => true -# variants.tablet? # => true -# variants.desktop? # => false -# -# source://activesupport//lib/active_support/array_inquirer.rb#24 -class ActiveSupport::ArrayInquirer < ::Array - # Passes each element of +candidates+ collection to ArrayInquirer collection. - # The method returns true if any element from the ArrayInquirer collection - # is equal to the stringified or symbolized form of any element in the +candidates+ collection. - # - # If +candidates+ collection is not given, method returns true. - # - # variants = ActiveSupport::ArrayInquirer.new([:phone, :tablet]) - # - # variants.any? # => true - # variants.any?(:phone, :tablet) # => true - # variants.any?('phone', 'desktop') # => true - # variants.any?(:desktop, :watch) # => false - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/array_inquirer.rb#25 - def any?(*candidates); end - - private - - # source://activesupport//lib/active_support/array_inquirer.rb#40 - def method_missing(name, *args); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/array_inquirer.rb#36 - def respond_to_missing?(name, include_private = T.unsafe(nil)); end -end - -# 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 -# it is automatically guessed based on the filename) -# and also define a set of constants that needs to be -# eager loaded: -# -# module MyLib -# extend ActiveSupport::Autoload -# -# autoload :Model -# -# eager_autoload do -# autoload :Cache -# end -# end -# -# Then your library can be eager loaded by simply calling: -# -# MyLib.eager_load! -# -# source://activesupport//lib/active_support/dependencies/autoload.rb#27 -module ActiveSupport::Autoload - # source://activesupport//lib/active_support/dependencies/autoload.rb#37 - def autoload(const_name, path = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/dependencies/autoload.rb#57 - def autoload_at(path); end - - # source://activesupport//lib/active_support/dependencies/autoload.rb#50 - 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 - def eager_autoload; end - - # source://activesupport//lib/active_support/dependencies/autoload.rb#71 - def eager_load!; end - - class << self - # source://activesupport//lib/active_support/dependencies/autoload.rb#28 - def extended(base); end - end -end - -# 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 -# silencers are used to remove the noisy lines, so that only the most relevant -# lines remain. -# -# Filters are used to modify lines of data, while silencers are used to remove -# lines entirely. The typical filter use case is to remove lengthy path -# information from the start of each line, and view file paths relevant to the -# app directory instead of the file system root. The typical silencer use case -# is to exclude the output of a noisy library from the backtrace, so that you -# can focus on the rest. -# -# bc = ActiveSupport::BacktraceCleaner.new -# bc.add_filter { |line| line.gsub(Rails.root.to_s, '') } # strip the Rails.root prefix -# 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) -# 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 -# BacktraceCleaner so that it does not filter or modify the paths of any lines -# of the backtrace, you can call BacktraceCleaner#remove_filters! -# These two methods will give you a completely untouched backtrace. -# -# Inspired by the Quiet Backtrace gem by thoughtbot. -# -# source://activesupport//lib/active_support/backtrace_cleaner.rb#31 -class ActiveSupport::BacktraceCleaner - # @return [BacktraceCleaner] a new instance of BacktraceCleaner - # - # source://activesupport//lib/active_support/backtrace_cleaner.rb#32 - 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, '') } - # - # source://activesupport//lib/active_support/backtrace_cleaner.rb#60 - def add_filter(&block); end - - # Adds a silencer from the block provided. If the silencer returns +true+ - # for a given line, it will be excluded from the clean backtrace. - # - # # 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 - 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 - def clean(backtrace, 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 - 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 - 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 - def remove_silencers!; end - - private - - # source://activesupport//lib/active_support/backtrace_cleaner.rb#90 - def add_gem_filter; end - - # source://activesupport//lib/active_support/backtrace_cleaner.rb#99 - def add_gem_silencer; end - - # source://activesupport//lib/active_support/backtrace_cleaner.rb#103 - def add_stdlib_silencer; end - - # source://activesupport//lib/active_support/backtrace_cleaner.rb#107 - def filter_backtrace(backtrace); end - - # source://activesupport//lib/active_support/backtrace_cleaner.rb#123 - def noise(backtrace); end - - # source://activesupport//lib/active_support/backtrace_cleaner.rb#115 - def silence(backtrace); end -end - -# source://activesupport//lib/active_support/backtrace_cleaner.rb#88 -ActiveSupport::BacktraceCleaner::FORMATTED_GEMS_PATTERN = T.let(T.unsafe(nil), Regexp) - -# source://activesupport//lib/active_support/benchmarkable.rb#7 -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 - # or possible bottlenecks to get a time reading for the operation. For - # example, let's say you thought your file processing method was taking too - # long; you could wrap it in a benchmark block. - # - # <% benchmark 'Process data files' do %> - # <%= expensive_files_operation %> - # <% end %> - # - # That would add something like "Process data files (345.2ms)" to the log, - # which you can then use to compare timings when optimizing your code. - # - # You may give an optional logger level (:debug, :info, - # :warn, :error) as the :level option. The - # default logger level value is :info. - # - # <% benchmark 'Low-level files', level: :debug do %> - # <%= lowlevel_files_operation %> - # <% end %> - # - # Finally, you can pass true as the third argument to silence all log - # activity (other than the timing information) from inside the block. This - # is great for boiling down a noisy block to just a single statement that - # produces one log line: - # - # <% benchmark 'Process data files', level: :info, silence: true do %> - # <%= expensive_and_chatty_files_operation %> - # <% end %> - # - # source://activesupport//lib/active_support/benchmarkable.rb#37 - def benchmark(message = T.unsafe(nil), options = T.unsafe(nil), &block); end -end - -# source://activesupport//lib/active_support/core_ext/big_decimal/conversions.rb#7 -module ActiveSupport::BigDecimalWithDefaultFormat - # source://activesupport//lib/active_support/core_ext/big_decimal/conversions.rb#8 - def to_s(format = T.unsafe(nil)); end -end - -# See ActiveSupport::Cache::Store for documentation. -# -# source://activesupport//lib/active_support/cache.rb#16 -module ActiveSupport::Cache - class << self - # Expands out the +key+ argument into a key that can be used for the - # cache store. Optionally accepts a namespace, and all keys will be - # scoped within that namespace. - # - # If the +key+ argument provided is an array, or responds to +to_a+, then - # each of elements in the array will be turned into parameters/keys and - # concatenated into a single key. For example: - # - # ActiveSupport::Cache.expand_cache_key([:foo, :bar]) # => "foo/bar" - # ActiveSupport::Cache.expand_cache_key([:foo, :bar], "namespace") # => "namespace/foo/bar" - # - # The +key+ argument can also respond to +cache_key+ or +to_param+. - # - # source://activesupport//lib/active_support/cache.rb#100 - 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 - 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 - def format_version=(_arg0); end - - # Creates a new Store object according to the given options. - # - # If no arguments are passed to this method, then a new - # ActiveSupport::Cache::MemoryStore object will be returned. - # - # If you pass a Symbol as the first argument, then a corresponding cache - # store class under the ActiveSupport::Cache namespace will be created. - # For example: - # - # ActiveSupport::Cache.lookup_store(:memory_store) - # # => returns a new ActiveSupport::Cache::MemoryStore object - # - # ActiveSupport::Cache.lookup_store(:mem_cache_store) - # # => returns a new ActiveSupport::Cache::MemCacheStore object - # - # Any additional arguments will be passed to the corresponding cache store - # class's constructor: - # - # ActiveSupport::Cache.lookup_store(:file_store, '/tmp/cache') - # # => same as: ActiveSupport::Cache::FileStore.new('/tmp/cache') - # - # If the first argument is not a Symbol, then it will simply be returned: - # - # ActiveSupport::Cache.lookup_store(MyOwnCacheStore.new) - # # => returns MyOwnCacheStore.new - # - # source://activesupport//lib/active_support/cache.rb#68 - def lookup_store(store = T.unsafe(nil), *parameters); end - - private - - # source://activesupport//lib/active_support/cache.rb#112 - 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 - def retrieve_store_class(store); end - end -end - -# source://activesupport//lib/active_support/cache.rb#833 -module ActiveSupport::Cache::Coders - class << self - # source://activesupport//lib/active_support/cache.rb#839 - def [](version); end - end -end - -# source://activesupport//lib/active_support/cache.rb#851 -module ActiveSupport::Cache::Coders::Loader - extend ::ActiveSupport::Cache::Coders::Loader - - # source://activesupport//lib/active_support/cache.rb#854 - def load(payload); 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.rb#836 -ActiveSupport::Cache::Coders::MARK_70_COMPRESSED = T.let(T.unsafe(nil), String) - -# 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.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.rb#878 - def dump(entry); end - - # source://activesupport//lib/active_support/cache.rb#882 - def dump_compressed(entry, threshold); end -end - -# source://activesupport//lib/active_support/cache.rb#887 -module ActiveSupport::Cache::Coders::Rails70Coder - include ::ActiveSupport::Cache::Coders::Loader - extend ::ActiveSupport::Cache::Coders::Loader - extend ::ActiveSupport::Cache::Coders::Rails70Coder - - # source://activesupport//lib/active_support/cache.rb#891 - def dump(entry); end - - # source://activesupport//lib/active_support/cache.rb#895 - def dump_compressed(entry, threshold); end -end - -# source://activesupport//lib/active_support/cache/redis_cache_store.rb#26 -module ActiveSupport::Cache::ConnectionPoolLike - # @yield [_self] - # @yieldparam _self [ActiveSupport::Cache::ConnectionPoolLike] the object that the method was called on - # - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#27 - def with; end -end - -# source://activesupport//lib/active_support/cache.rb#27 -ActiveSupport::Cache::DEFAULT_COMPRESS_LIMIT = T.let(T.unsafe(nil), Integer) - -# 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 -# mismatches. -# -# 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 -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 - 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 - def bytesize; end - - # source://activesupport//lib/active_support/cache.rb#978 - def compressed(compress_threshold); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/cache.rb#974 - 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 - def dup_value!; end - - # Checks if the entry is expired. The +expires_in+ parameter can override - # the value set when the entry was created. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/cache.rb#945 - def expired?; end - - # source://activesupport//lib/active_support/cache.rb#949 - def expires_at; end - - # source://activesupport//lib/active_support/cache.rb#953 - def expires_at=(value); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/cache.rb#1002 - def local?; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/cache.rb#939 - def mismatched?(version); end - - # source://activesupport//lib/active_support/cache.rb#1018 - def pack; end - - # source://activesupport//lib/active_support/cache.rb#935 - def value; end - - # Returns the value of attribute version. - # - # source://activesupport//lib/active_support/cache.rb#923 - def version; end - - private - - # source://activesupport//lib/active_support/cache.rb#1025 - def uncompress(value); end - - class << self - # source://activesupport//lib/active_support/cache.rb#918 - def unpack(members); end - end -end - -# A cache store implementation which stores everything on the filesystem. -# -# FileStore implements the Strategy::LocalCache strategy which implements -# an in-memory cache inside of a block. -# -# source://activesupport//lib/active_support/cache/file_store.rb#13 -class ActiveSupport::Cache::FileStore < ::ActiveSupport::Cache::Store - # @return [FileStore] a new instance of FileStore - # - # source://activesupport//lib/active_support/cache/file_store.rb#21 - def initialize(cache_path, **options); end - - # Returns the value of attribute cache_path. - # - # source://activesupport//lib/active_support/cache/file_store.rb#14 - 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 - 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 - 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. - # - # source://activesupport//lib/active_support/cache/file_store.rb#57 - def decrement(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/cache/file_store.rb#61 - 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. - # - # source://activesupport//lib/active_support/cache/file_store.rb#51 - def increment(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end - - private - - # Delete empty directories in the cache. - # - # source://activesupport//lib/active_support/cache/file_store.rb#160 - def delete_empty_directories(dir); end - - # source://activesupport//lib/active_support/cache/file_store.rb#98 - def delete_entry(key, **options); end - - # Make sure a file path's directories exist. - # - # source://activesupport//lib/active_support/cache/file_store.rb#169 - def ensure_cache_path(path); end - - # Translate a file path into a key. - # - # source://activesupport//lib/active_support/cache/file_store.rb#154 - 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 - 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. - # - # source://activesupport//lib/active_support/cache/file_store.rb#187 - def modify_value(name, amount, options); end - - # Translate a key into a file path. - # - # source://activesupport//lib/active_support/cache/file_store.rb#127 - def normalize_key(key, options); end - - # source://activesupport//lib/active_support/cache/file_store.rb#73 - def read_entry(key, **options); end - - # source://activesupport//lib/active_support/cache/file_store.rb#80 - def read_serialized_entry(key, **_arg1); end - - # source://activesupport//lib/active_support/cache/file_store.rb#173 - def search_dir(dir, &callback); end - - # source://activesupport//lib/active_support/cache/file_store.rb#87 - def write_entry(key, entry, **options); end - - # source://activesupport//lib/active_support/cache/file_store.rb#91 - def write_serialized_entry(key, payload, **options); end - - class << self - # Advertise cache versioning support. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/cache/file_store.rb#27 - def supports_cache_versioning?; end - end -end - -# source://activesupport//lib/active_support/cache/file_store.rb#16 -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 -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 -ActiveSupport::Cache::FileStore::FILEPATH_MAX_SIZE = T.let(T.unsafe(nil), Integer) - -# source://activesupport//lib/active_support/cache/file_store.rb#19 -ActiveSupport::Cache::FileStore::GITKEEP_FILES = T.let(T.unsafe(nil), Array) - -# A cache store implementation which stores everything into memory in the -# 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 -# to share cache data with each other and this may not be the most -# appropriate cache in that scenario. -# -# This cache has a bounded size specified by the +:size+ options to the -# initializer (default is 32Mb). When the cache exceeds the allotted size, -# a cleanup will occur which tries to prune the cache down to three quarters -# of the maximum size by removing the least recently used entries. -# -# Unlike other Cache store implementations, MemoryStore does not compress -# values by default. MemoryStore does not benefit from compression as much -# as other Store implementations, as it does not send data over a network. -# However, when compression is enabled, it still pays the full cost of -# compression in terms of cpu use. -# -# MemoryStore is thread-safe. -# -# source://activesupport//lib/active_support/cache/memory_store.rb#26 -class ActiveSupport::Cache::MemoryStore < ::ActiveSupport::Cache::Store - # @return [MemoryStore] a new instance of MemoryStore - # - # source://activesupport//lib/active_support/cache/memory_store.rb#48 - 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 - 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 - def clear(options = T.unsafe(nil)); end - - # Decrement an integer value in the cache. - # - # source://activesupport//lib/active_support/cache/memory_store.rb#117 - 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 - def delete_matched(matcher, options = T.unsafe(nil)); end - - # Increment an integer value in the cache. - # - # source://activesupport//lib/active_support/cache/memory_store.rb#112 - def increment(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/cache/memory_store.rb#133 - 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 - 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 - 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 - def synchronize(&block); end - - private - - # source://activesupport//lib/active_support/cache/memory_store.rb#150 - 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 - def delete_entry(key, **options); end - - # source://activesupport//lib/active_support/cache/memory_store.rb#191 - def modify_value(name, amount, options); end - - # source://activesupport//lib/active_support/cache/memory_store.rb#154 - def read_entry(key, **options); end - - # source://activesupport//lib/active_support/cache/memory_store.rb#166 - def write_entry(key, entry, **options); end - - class << self - # Advertise cache versioning support. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/cache/memory_store.rb#62 - def supports_cache_versioning?; end - end -end - -# source://activesupport//lib/active_support/cache/memory_store.rb#27 -module ActiveSupport::Cache::MemoryStore::DupCoder - extend ::ActiveSupport::Cache::MemoryStore::DupCoder - - # source://activesupport//lib/active_support/cache/memory_store.rb#30 - def dump(entry); end - - # source://activesupport//lib/active_support/cache/memory_store.rb#35 - def dump_compressed(entry, threshold); end - - # source://activesupport//lib/active_support/cache/memory_store.rb#41 - 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) - -# source://activesupport//lib/active_support/cache.rb#817 -module ActiveSupport::Cache::NullCoder - extend ::ActiveSupport::Cache::NullCoder - - # source://activesupport//lib/active_support/cache.rb#820 - def dump(entry); end - - # source://activesupport//lib/active_support/cache.rb#824 - def dump_compressed(entry, threshold); end - - # source://activesupport//lib/active_support/cache.rb#828 - def load(payload); end -end - -# 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. -# -# This cache does implement the local cache strategy, so values will actually -# 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 -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#75 - def clear(**options); 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#87 - 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 - - private - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#147 - def delete_entry(key, **_arg1); end - - # source://activesupport//lib/active_support/cache/null_store.rb#36 - def read_entry(key, **s); end - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#108 - def read_serialized_entry(key, raw: T.unsafe(nil), **options); end - - # source://activesupport//lib/active_support/cache/null_store.rb#43 - def write_entry(key, entry, **_arg2); end - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#138 - def write_serialized_entry(key, payload, **_arg2); end - - class << self - # Advertise cache versioning support. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/cache/null_store.rb#16 - 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 -ActiveSupport::Cache::OPTION_ALIASES = T.let(T.unsafe(nil), Hash) - -# Redis cache store. -# -# Deployment note: Take care to use a *dedicated Redis cache* rather -# than pointing this at your existing Redis server. It won't cope well -# with mixed usage patterns and it won't expire cache entries by default. -# -# Redis cache server setup guide: https://redis.io/topics/lru-cache -# -# * Supports vanilla Redis, hiredis, and Redis::Distributed. -# * Supports Memcached-like sharding across Redises with Redis::Distributed. -# * Fault tolerant. If the Redis server is unavailable, no exceptions are -# raised. Cache fetches are all misses and writes are dropped. -# * Local cache. Hot in-memory primary cache within block/middleware scope. -# * +read_multi+ and +write_multi+ support for Redis mget/mset. Use Redis::Distributed -# 4.0.1+ for distributed mget support. -# * +delete_matched+ support for Redis KEYS globs. -# -# source://activesupport//lib/active_support/cache/redis_cache_store.rb#52 -class ActiveSupport::Cache::RedisCacheStore < ::ActiveSupport::Cache::Store - include ::ActiveSupport::Cache::Strategy::LocalCache - - # Creates a new Redis cache store. - # - # Handles four options: :redis block, :redis instance, single :url - # string, and multiple :url strings. - # - # Option Class Result - # :redis Proc -> options[:redis].call - # :redis Object -> options[:redis] - # :url String -> Redis.new(url: …) - # :url Array -> Redis::Distributed.new([{ url: … }, { url: … }, …]) - # - # No namespace is set by default. Provide one if the Redis cache - # server is shared with other apps: namespace: 'myapp-cache'. - # - # Compression is enabled by default with a 1kB threshold, so cached - # values larger than 1kB are automatically compressed. Disable by - # passing compress: false or change the threshold by passing - # compress_threshold: 4.kilobytes. - # - # No expiry is set on cache entries by default. Redis is expected to - # be configured with an eviction policy that automatically deletes - # least-recently or -frequently used keys when it reaches max memory. - # See https://redis.io/topics/lru-cache for cache server setup. - # - # Race condition TTL is not set by default. This can be used to avoid - # "thundering herd" cache writes when hot cache entries are expired. - # See ActiveSupport::Cache::Store#fetch for more. - # - # @return [RedisCacheStore] a new instance of RedisCacheStore - # - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#149 - def initialize(namespace: T.unsafe(nil), compress: T.unsafe(nil), compress_threshold: T.unsafe(nil), coder: T.unsafe(nil), expires_in: T.unsafe(nil), race_condition_ttl: T.unsafe(nil), error_handler: T.unsafe(nil), **redis_options); end - - # Cache Store API implementation. - # - # Removes expired entries. Handled natively by Redis least-recently-/ - # least-frequently-used expiry, so manual cleanup is not supported. - # - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#81 - def cleanup(**options); end - - # Clear the entire cache on all Redis servers. Safe to use on - # shared servers if the cache is namespaced. - # - # Failsafe: Raises errors. - # - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#75 - def clear(**options); end - - # Cache Store API implementation. - # - # Decrement a cached value. This method uses the Redis decr atomic - # operator and can only be used on values written with the +:raw+ option. - # Calling it on a value not stored with +:raw+ will initialize that value - # to zero. - # - # Failsafe: Raises errors. - # - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#100 - def decrement(name, amount = T.unsafe(nil), **options); end - - # Cache Store API implementation. - # - # Supports Redis KEYS glob patterns: - # - # h?llo matches hello, hallo and hxllo - # h*llo matches hllo and heeeello - # h[ae]llo matches hello and hallo, but not hillo - # h[^e]llo matches hallo, hbllo, ... but not hello - # h[a-b]llo matches hallo and hbllo - # - # Use \ to escape special characters if you want to match them verbatim. - # - # See https://redis.io/commands/KEYS for more. - # - # Failsafe: Raises errors. - # - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#87 - def delete_matched(matcher, options = T.unsafe(nil)); end - - # Cache Store API implementation. - # - # Increment a cached value. This method uses the Redis incr atomic - # operator and can only be used on values written with the +:raw+ option. - # Calling it on a value not stored with +:raw+ will initialize that value - # to zero. - # - # Failsafe: Raises errors. - # - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#93 - def increment(name, amount = T.unsafe(nil), **options); end - - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#174 - def inspect; end - - # Returns the value of attribute max_key_bytesize. - # - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#120 - def max_key_bytesize; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#304 - def mget_capable?; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#309 - def mset_capable?; end - - # Cache Store API implementation. - # - # Read multiple values at once. Returns a hash of requested keys -> - # fetched values. - # - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#183 - def read_multi(*names); end - - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#161 - def redis; end - - # Returns the value of attribute redis_options. - # - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#119 - def redis_options; end - - # Get info from redis servers. - # - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#300 - def stats; end - - private - - # Delete an entry from the cache. - # - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#147 - def delete_entry(key, **_arg1); end - - # Deletes multiple entries in the cache. Returns the number of entries deleted. - # - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#408 - def delete_multi_entries(entries, **_options); end - - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#443 - def deserialize_entry(payload, raw: T.unsafe(nil), **_arg2); end - - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#465 - def failsafe(method, returning: T.unsafe(nil)); end - - # Truncate keys that exceed 1kB. - # - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#429 - def normalize_key(key, options); end - - # Store provider interface: - # Read an entry from the cache. - # - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#328 - def read_entry(key, **options); end - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#122 - def read_multi_entries(keys, **options); end - - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#346 - def read_multi_mget(*names); end - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#108 - def read_serialized_entry(key, raw: T.unsafe(nil), **options); end - - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#459 - def serialize_entries(entries, **options); end - - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#451 - def serialize_entry(entry, raw: T.unsafe(nil), **options); end - - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#315 - def set_redis_capabilities; end - - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#433 - def truncate_key(key); end - - # Write an entry to the cache. - # - # Requires Redis 2.6.12+ for extended SET options. - # - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#371 - def write_entry(key, entry, raw: T.unsafe(nil), **options); end - - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#394 - def write_key_expiry(client, key, options); end - - # Nonstandard store provider API to write multiple values at once. - # - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#413 - def write_multi_entries(entries, expires_in: T.unsafe(nil), **options); end - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#138 - def write_serialized_entry(key, payload, **_arg2); end - - class << self - # Factory method to create a new Redis instance. - # - # Handles four options: :redis block, :redis instance, single :url - # string, and multiple :url strings. - # - # Option Class Result - # :redis Proc -> options[:redis].call - # :redis Object -> options[:redis] - # :url String -> Redis.new(url: …) - # :url Array -> Redis::Distributed.new([{ url: … }, { url: … }, …]) - # - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#91 - def build_redis(redis: T.unsafe(nil), url: T.unsafe(nil), **redis_options); end - - # Advertise cache versioning support. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#73 - def supports_cache_versioning?; end - - private - - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#114 - def build_redis_client(**redis_options); end - - # source://activesupport//lib/active_support/cache/redis_cache_store.rb#108 - def build_redis_distributed_client(urls:, **redis_options); end - end -end - -# source://activesupport//lib/active_support/cache/redis_cache_store.rb#62 -ActiveSupport::Cache::RedisCacheStore::DEFAULT_ERROR_HANDLER = T.let(T.unsafe(nil), Proc) - -# source://activesupport//lib/active_support/cache/redis_cache_store.rb#55 -ActiveSupport::Cache::RedisCacheStore::DEFAULT_REDIS_OPTIONS = T.let(T.unsafe(nil), Hash) - -# Keys are truncated with the ActiveSupport digest if they exceed 1kB -# -# source://activesupport//lib/active_support/cache/redis_cache_store.rb#53 -ActiveSupport::Cache::RedisCacheStore::MAX_KEY_BYTESIZE = T.let(T.unsafe(nil), Integer) - -# The maximum number of entries to receive per SCAN call. -# -# source://activesupport//lib/active_support/cache/redis_cache_store.rb#69 -ActiveSupport::Cache::RedisCacheStore::SCAN_BATCH_SIZE = T.let(T.unsafe(nil), Integer) - -# 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. -# ActiveSupport::Cache::MemCacheStore. MemCacheStore is currently the most -# popular cache store for large production websites. -# -# Some implementations may not support all methods beyond the basic cache -# methods of #fetch, #write, #read, #exist?, and #delete. -# -# ActiveSupport::Cache::Store can store any Ruby object that is supported by -# its +coder+'s +dump+ and +load+ methods. -# -# cache = ActiveSupport::Cache::MemoryStore.new -# -# cache.read('city') # => nil -# cache.write('city', "Duckburgh") -# cache.read('city') # => "Duckburgh" -# -# cache.write('not serializable', Proc.new {}) # => TypeError -# -# Keys are always translated into Strings and are case sensitive. When an -# object is specified as a key and has a +cache_key+ method defined, this -# method will be called to define the key. Otherwise, the +to_param+ -# method will be called. Hashes and Arrays can also be used as keys. The -# elements will be delimited by slashes, and the elements within a Hash -# will be sorted by key so they are consistent. -# -# cache.read('city') == cache.read(:city) # => true -# -# Nil values can be cached. -# -# If your cache is on a shared infrastructure, you can define a namespace -# for your cache entries. If a namespace is defined, it will be prefixed on -# to every key. The namespace can be either a static value or a Proc. If it -# is a Proc, it will be invoked when each key is evaluated so that you can -# use application logic to invalidate keys. -# -# 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 -class ActiveSupport::Cache::Store - # Creates a new cache. - # - # ==== Options - # - # * +:namespace+ - Sets the namespace for the cache. This option is - # especially useful if your application shares a cache with other - # applications. - # * +:coder+ - Replaces the default cache entry serialization mechanism - # with a custom one. The +coder+ must respond to +dump+ and +load+. - # Using a custom coder disables automatic compression. - # - # 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 - def initialize(options = T.unsafe(nil)); end - - # Cleans up the cache by removing expired entries. - # - # Options are passed to the underlying cache implementation. - # - # Some implementations may not support this method. - # - # @raise [NotImplementedError] - # - # source://activesupport//lib/active_support/cache.rb#582 - def cleanup(options = T.unsafe(nil)); end - - # Clears the entire cache. Be careful with this method since it could - # affect other processes if shared cache is being used. - # - # The options hash is passed to the underlying cache implementation. - # - # Some implementations may not support this method. - # - # @raise [NotImplementedError] - # - # source://activesupport//lib/active_support/cache.rb#592 - def clear(options = T.unsafe(nil)); end - - # Decrements an integer value in the cache. - # - # Options are passed to the underlying cache implementation. - # - # Some implementations may not support this method. - # - # @raise [NotImplementedError] - # - # source://activesupport//lib/active_support/cache.rb#573 - 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. - # - # Options are passed to the underlying cache implementation. - # - # source://activesupport//lib/active_support/cache.rb#514 - def delete(name, options = T.unsafe(nil)); end - - # Deletes all entries with keys matching the pattern. - # - # Options are passed to the underlying cache implementation. - # - # Some implementations may not support this method. - # - # @raise [NotImplementedError] - # - # source://activesupport//lib/active_support/cache.rb#555 - def delete_matched(matcher, options = T.unsafe(nil)); end - - # Deletes multiple entries in the cache. - # - # Options are passed to the underlying cache implementation. - # - # source://activesupport//lib/active_support/cache.rb#525 - def delete_multi(names, options = T.unsafe(nil)); end - - # Returns +true+ if the cache contains an entry for the given key. - # - # Options are passed to the underlying cache implementation. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/cache.rb#537 - def exist?(name, options = T.unsafe(nil)); end - - # Fetches data from the cache, using the given key. If there is data in - # the cache with the given key, then that data is returned. - # - # If there is no such data in the cache (a cache miss), then +nil+ will be - # returned. However, if a block has been passed, that block will be passed - # the key and executed in the event of a cache miss. The return value of the - # block will be written to the cache under the given cache key, and that - # return value will be returned. - # - # cache.write('today', 'Monday') - # cache.fetch('today') # => "Monday" - # - # cache.fetch('city') # => nil - # cache.fetch('city') do - # 'Duckburgh' - # end - # cache.fetch('city') # => "Duckburgh" - # - # ==== Options - # - # Internally, +fetch+ calls #read_entry, and calls #write_entry on a cache - # miss. Thus, +fetch+ supports the same options as #read and #write. - # Additionally, +fetch+ supports the following options: - # - # * force: true - Forces a cache "miss," meaning we treat the - # cache value as missing even if it's present. Passing a block is - # required when +force+ is true so this always results in a cache write. - # - # cache.write('today', 'Monday') - # cache.fetch('today', force: true) { 'Tuesday' } # => 'Tuesday' - # cache.fetch('today', force: true) # => ArgumentError - # - # The +:force+ option is useful when you're calling some other method to - # ask whether you should force a cache write. Otherwise, it's clearer to - # just call +write+. - # - # * skip_nil: true - Prevents caching a nil result: - # - # cache.fetch('foo') { nil } - # cache.fetch('bar', skip_nil: true) { nil } - # cache.exist?('foo') # => true - # cache.exist?('bar') # => false - # - # * +:race_condition_ttl+ - Specifies the number of seconds during which - # an expired value can be reused while a new value is being generated. - # This can be used to prevent race conditions when cache entries expire, - # by preventing multiple processes from simultaneously regenerating the - # same entry (also known as the dog pile effect). - # - # When a process encounters a cache entry that has expired less than - # +:race_condition_ttl+ seconds ago, it will bump the expiration time by - # +:race_condition_ttl+ seconds before generating a new value. During - # this extended time window, while the process generates a new value, - # other processes will continue to use the old value. After the first - # process writes the new value, other processes will then use it. - # - # If the first process errors out while generating a new value, another - # process can try to generate a new value after the extended time window - # has elapsed. - # - # # Set all values to expire after one minute. - # cache = ActiveSupport::Cache::MemoryStore.new(expires_in: 1.minute) - # - # cache.write('foo', 'original value') - # val_1 = nil - # val_2 = nil - # sleep 60 - # - # Thread.new do - # val_1 = cache.fetch('foo', race_condition_ttl: 10.seconds) do - # sleep 1 - # 'new value 1' - # end - # end - # - # Thread.new do - # val_2 = cache.fetch('foo', race_condition_ttl: 10.seconds) do - # 'new value 2' - # end - # end - # - # cache.fetch('foo') # => "original value" - # sleep 10 # First thread extended the life of cache by another 10 seconds - # cache.fetch('foo') # => "new value 1" - # val_1 # => "new value 1" - # val_2 # => "original value" - # - # source://activesupport//lib/active_support/cache.rb#321 - def fetch(name, options = T.unsafe(nil), &block); end - - # Fetches data from the cache, using the given keys. If there is data in - # the cache with the given keys, then that data is returned. Otherwise, - # the supplied block is called for each key for which there was no data, - # and the result will be written to the cache and returned. - # Therefore, you need to pass a block that returns the data to be written - # to the cache. If you do not want to write the cache when the cache is - # not found, use #read_multi. - # - # Returns a hash with the data for each of the names. For example: - # - # cache.write("bim", "bam") - # cache.fetch_multi("bim", "unknown_key") do |key| - # "Fallback value for key: #{key}" - # end - # # => { "bim" => "bam", - # # "unknown_key" => "Fallback value for key: unknown_key" } - # - # Options are passed to the underlying cache implementation. For example: - # - # cache.fetch_multi("fizz", expires_in: 5.seconds) do |key| - # "buzz" - # end - # # => {"fizz"=>"buzz"} - # cache.read("fizz") - # # => "buzz" - # sleep(6) - # cache.read("fizz") - # # => nil - # - # @raise [ArgumentError] - # - # source://activesupport//lib/active_support/cache.rb#447 - def fetch_multi(*names); end - - # Increments an integer value in the cache. - # - # Options are passed to the underlying cache implementation. - # - # Some implementations may not support this method. - # - # @raise [NotImplementedError] - # - # source://activesupport//lib/active_support/cache.rb#564 - def increment(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/cache.rb#176 - def logger; end - - # source://activesupport//lib/active_support/cache.rb#176 - def logger=(val); end - - # Silences the logger within a block. - # - # source://activesupport//lib/active_support/cache.rb#227 - def mute; end - - # source://activesupport//lib/active_support/cache.rb#546 - def new_entry(value, options = T.unsafe(nil)); end - - # Returns the value of attribute options. - # - # source://activesupport//lib/active_support/cache.rb#178 - def options; 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. - # - # Note, if data was written with the :expires_in or - # :version options, both of these conditions are applied before - # the data is returned. - # - # ==== Options - # - # * +: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 - def read(name, options = T.unsafe(nil)); end - - # Reads multiple values at once from the cache. Options can be passed - # in the last argument. - # - # Some cache implementation may optimize this method. - # - # Returns a hash mapping the names provided to the values found. - # - # source://activesupport//lib/active_support/cache.rb#395 - def read_multi(*names); end - - # Returns the value of attribute silence. - # - # source://activesupport//lib/active_support/cache.rb#178 - def silence; end - - # Silences the logger. - # - # source://activesupport//lib/active_support/cache.rb#221 - def silence!; end - - # Returns the value of attribute silence. - # - # source://activesupport//lib/active_support/cache.rb#178 - def silence?; end - - # Writes the value to the cache with the key. The value must be supported - # by the +coder+'s +dump+ and +load+ methods. - # - # By default, cache entries larger than 1kB are compressed. Compression - # allows more data to be stored in the same memory footprint, leading to - # fewer cache evictions and higher hit rates. - # - # ==== Options - # - # * compress: false - Disables compression of the cache entry. - # - # * +:compress_threshold+ - The compression threshold, specified in bytes. - # \Cache entries larger than this threshold will be compressed. Defaults - # to +1.kilobyte+. - # - # * +:expires_in+ - Sets a relative expiration time for the cache entry, - # specified in seconds. +:expire_in+ and +:expired_in+ are aliases for - # +:expires_in+. - # - # cache = ActiveSupport::Cache::MemoryStore.new(expires_in: 5.minutes) - # cache.write(key, value, expires_in: 1.minute) # Set a lower value for one entry - # - # * +:expires_at+ - Sets an absolute expiration time for the cache entry. - # - # cache = ActiveSupport::Cache::MemoryStore.new - # cache.write(key, value, expires_at: Time.now.at_end_of_hour) - # - # * +:version+ - Specifies a version for the cache entry. When reading - # from the cache, 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#502 - 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 - def write_multi(hash, options = T.unsafe(nil)); end - - private - - # source://activesupport//lib/active_support/cache.rb#597 - def default_coder; end - - # Deletes an entry from the cache implementation. Subclasses must - # implement this method. - # - # @raise [NotImplementedError] - # - # source://activesupport//lib/active_support/cache.rb#674 - 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 - def delete_multi_entries(entries, **options); end - - # source://activesupport//lib/active_support/cache.rb#641 - 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 - def expanded_key(key); end - - # source://activesupport//lib/active_support/cache.rb#768 - def expanded_version(key); end - - # source://activesupport//lib/active_support/cache.rb#802 - def get_entry_value(entry, name, options); end - - # source://activesupport//lib/active_support/cache.rb#786 - 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 - - # 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 - 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 - def merged_options(call_options); end - - # Prefix the key with a namespace string: - # - # namespace_key 'foo', namespace: 'cache' - # # => 'cache:foo' - # - # With a namespace block: - # - # namespace_key 'foo', namespace: -> { 'cache' } - # # => 'cache:foo' - # - # source://activesupport//lib/active_support/cache.rb#725 - 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. - # - # source://activesupport//lib/active_support/cache.rb#712 - def normalize_key(key, options = T.unsafe(nil)); end - - # Normalize aliased options to their canonical form - # - # source://activesupport//lib/active_support/cache.rb#699 - def normalize_options(options); end - - # source://activesupport//lib/active_support/cache.rb#764 - def normalize_version(key, options = T.unsafe(nil)); end - - # Reads an entry from the cache implementation. Subclasses must implement - # this method. - # - # @raise [NotImplementedError] - # - # source://activesupport//lib/active_support/cache.rb#622 - 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 - def read_multi_entries(names, **options); end - - # source://activesupport//lib/active_support/cache.rb#807 - def save_block_result_to_cache(name, options); end - - # source://activesupport//lib/active_support/cache.rb#632 - def serialize_entry(entry, **options); end - - # Writes an entry to the cache implementation. Subclasses must implement - # this method. - # - # @raise [NotImplementedError] - # - # source://activesupport//lib/active_support/cache.rb#628 - 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 - def write_multi_entries(hash, **options); end - - class << self - # source://activesupport//lib/active_support/cache.rb#176 - def logger; end - - # source://activesupport//lib/active_support/cache.rb#176 - def logger=(val); end - - private - - # source://activesupport//lib/active_support/cache.rb#190 - def ensure_connection_pool_added!; end - - # source://activesupport//lib/active_support/cache.rb#183 - def retrieve_pool_options(options); end - end -end - -# source://activesupport//lib/active_support/cache.rb#34 -module ActiveSupport::Cache::Strategy; end - -# 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 -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#75 - def clear(**options); 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#87 - 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 - - # 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 - def middleware; end - - # Use a local cache for the duration of block. - # - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#63 - def with_local_cache(&block); end - - private - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#170 - def bypass_local_cache(&block); end - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#147 - def delete_entry(key, **_arg1); end - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#166 - def local_cache; end - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#162 - def local_cache_key; end - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#122 - def read_multi_entries(keys, **options); end - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#108 - def read_serialized_entry(key, raw: T.unsafe(nil), **options); end - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#174 - def use_temporary_local_cache(temporary_cache); end - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#152 - def write_cache_value(name, value, **options); end - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#138 - 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 -module ActiveSupport::Cache::Strategy::LocalCache::LocalCacheRegistry - extend ::ActiveSupport::Cache::Strategy::LocalCache::LocalCacheRegistry - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#18 - def cache_for(local_cache_key); end - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#23 - def set_cache_for(local_cache_key, value); end -end - -# 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 -class ActiveSupport::Cache::Strategy::LocalCache::LocalStore - # @return [LocalStore] a new instance of LocalStore - # - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#32 - def initialize; end - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#36 - def clear(options = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#53 - def delete_entry(key); end - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#57 - def fetch_entry(key); end - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#40 - def read_entry(key); end - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#44 - def read_multi_entries(keys); end - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#48 - def write_entry(key, entry); end -end - -# -- -# This class wraps up local storage for middlewares. Only the middleware method should -# construct them. -# -# source://activesupport//lib/active_support/cache/strategy/local_cache_middleware.rb#13 -class ActiveSupport::Cache::Strategy::LocalCache::Middleware - # @return [Middleware] a new instance of Middleware - # - # source://activesupport//lib/active_support/cache/strategy/local_cache_middleware.rb#16 - def initialize(name, local_cache_key); end - - # source://activesupport//lib/active_support/cache/strategy/local_cache_middleware.rb#27 - def call(env); end - - # source://activesupport//lib/active_support/cache/strategy/local_cache_middleware.rb#14 - def local_cache_key; end - - # source://activesupport//lib/active_support/cache/strategy/local_cache_middleware.rb#14 - def name; end - - # source://activesupport//lib/active_support/cache/strategy/local_cache_middleware.rb#22 - def new(app); end -end - -# These options mean something to all cache implementations. Individual cache -# implementations may support additional options. -# -# source://activesupport//lib/active_support/cache.rb#25 -ActiveSupport::Cache::UNIVERSAL_OPTIONS = T.let(T.unsafe(nil), Array) - -# 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 -class ActiveSupport::CachingKeyGenerator - # @return [CachingKeyGenerator] a new instance of CachingKeyGenerator - # - # source://activesupport//lib/active_support/key_generator.rb#48 - def initialize(key_generator); end - - # Returns a derived key suitable for use. - # - # source://activesupport//lib/active_support/key_generator.rb#54 - def generate_key(*args); end -end - -# 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 -# needing to override or redefine methods of the base class. -# -# Mixing in this module allows you to define the events in the object's -# life cycle that will support callbacks (via ClassMethods#define_callbacks), -# set the instance methods, procs, or callback objects to be called (via -# ClassMethods#set_callback), and run the installed callbacks at the -# appropriate times (via +run_callbacks+). -# -# By default callbacks are halted by throwing +:abort+. -# See ClassMethods#define_callbacks for details. -# -# Three kinds of callbacks are supported: before callbacks, run before a -# certain event; after callbacks, run after the event; and around callbacks, -# blocks that surround the event, triggering it when they yield. Callback code -# can be contained in instance methods, procs or lambdas, or callback objects -# that respond to certain predetermined methods. See ClassMethods#set_callback -# for details. -# -# class Record -# include ActiveSupport::Callbacks -# define_callbacks :save -# -# def save -# run_callbacks :save do -# puts "- save" -# end -# end -# end -# -# class PersonRecord < Record -# set_callback :save, :before, :saving_message -# def saving_message -# puts "saving..." -# end -# -# set_callback :save, :after do |object| -# puts "saved" -# end -# end -# -# person = PersonRecord.new -# person.save -# -# Output: -# saving... -# - save -# saved -# -# source://activesupport//lib/active_support/callbacks.rb#63 -module ActiveSupport::Callbacks - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveSupport::Callbacks::ClassMethods - mixes_in_class_methods ::ActiveSupport::DescendantsTracker - - # Runs the callbacks for the given event. - # - # Calls the before and around callbacks in the order they were set, yields - # the block (if given one), and then runs the after callbacks in reverse - # order. - # - # If the callback chain was halted, returns +false+. Otherwise returns the - # result of the block, +nil+ if no callbacks have been set, or +true+ - # if callbacks have been set but no block is given. - # - # run_callbacks :save do - # save - # end - # - # -- - # - # As this method is used in many places, and often wraps large portions of - # user code, it has an additional design goal of minimizing its impact on - # the visible call stack. An exception from inside a :before or :after - # callback can be as noisy as it likes -- but when control has passed - # 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 - - private - - # A hook invoked every time a before callback is halted. - # This can be overridden in ActiveSupport::Callbacks implementors in order - # to provide better debugging/logging. - # - # source://activesupport//lib/active_support/callbacks.rb#147 - def halted_callback_hook(filter, name); end - - module GeneratedClassMethods - def __callbacks; end - def __callbacks=(value); end - def __callbacks?; end - end - - module GeneratedInstanceMethods - def __callbacks; end - def __callbacks?; end - end -end - -# source://activesupport//lib/active_support/callbacks.rb#71 -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 -module ActiveSupport::Callbacks::CallTemplate - class << self - # Filters support: - # - # Symbols:: A method to call. - # Procs:: A proc to call with the object. - # Objects:: An object with a before_foo method on it to call. - # - # All of these objects are converted into a CallTemplate and handled - # the same after this point. - # - # source://activesupport//lib/active_support/callbacks.rb#533 - def build(filter, callback); end - end -end - -# source://activesupport//lib/active_support/callbacks.rb#434 -class ActiveSupport::Callbacks::CallTemplate::InstanceExec0 - # @return [InstanceExec0] a new instance of InstanceExec0 - # - # source://activesupport//lib/active_support/callbacks.rb#435 - def initialize(block); end - - # source://activesupport//lib/active_support/callbacks.rb#439 - def expand(target, value, block); end - - # source://activesupport//lib/active_support/callbacks.rb#449 - def inverted_lambda; end - - # source://activesupport//lib/active_support/callbacks.rb#443 - def make_lambda; end -end - -# source://activesupport//lib/active_support/callbacks.rb#456 -class ActiveSupport::Callbacks::CallTemplate::InstanceExec1 - # @return [InstanceExec1] a new instance of InstanceExec1 - # - # source://activesupport//lib/active_support/callbacks.rb#457 - def initialize(block); end - - # source://activesupport//lib/active_support/callbacks.rb#461 - def expand(target, value, block); end - - # source://activesupport//lib/active_support/callbacks.rb#471 - def inverted_lambda; end - - # source://activesupport//lib/active_support/callbacks.rb#465 - def make_lambda; end -end - -# source://activesupport//lib/active_support/callbacks.rb#478 -class ActiveSupport::Callbacks::CallTemplate::InstanceExec2 - # @return [InstanceExec2] a new instance of InstanceExec2 - # - # source://activesupport//lib/active_support/callbacks.rb#479 - def initialize(block); end - - # @raise [ArgumentError] - # - # source://activesupport//lib/active_support/callbacks.rb#483 - def expand(target, value, block); end - - # source://activesupport//lib/active_support/callbacks.rb#495 - def inverted_lambda; end - - # source://activesupport//lib/active_support/callbacks.rb#488 - def make_lambda; end -end - -# source://activesupport//lib/active_support/callbacks.rb#376 -class ActiveSupport::Callbacks::CallTemplate::MethodCall - # @return [MethodCall] a new instance of MethodCall - # - # source://activesupport//lib/active_support/callbacks.rb#377 - def initialize(method); end - - # Return the parts needed to make this call, with the given - # input values. - # - # Returns an array of the form: - # - # [target, block, method, *arguments] - # - # This array can be used as such: - # - # target.send(method, *arguments, &block) - # - # The actual invocation is left up to the caller to minimize - # call stack pollution. - # - # source://activesupport//lib/active_support/callbacks.rb#394 - def expand(target, value, block); end - - # source://activesupport//lib/active_support/callbacks.rb#404 - def inverted_lambda; end - - # source://activesupport//lib/active_support/callbacks.rb#398 - def make_lambda; end -end - -# source://activesupport//lib/active_support/callbacks.rb#411 -class ActiveSupport::Callbacks::CallTemplate::ObjectCall - # @return [ObjectCall] a new instance of ObjectCall - # - # source://activesupport//lib/active_support/callbacks.rb#412 - def initialize(target, method); end - - # source://activesupport//lib/active_support/callbacks.rb#417 - def expand(target, value, block); end - - # source://activesupport//lib/active_support/callbacks.rb#427 - def inverted_lambda; end - - # source://activesupport//lib/active_support/callbacks.rb#421 - def make_lambda; end -end - -# source://activesupport//lib/active_support/callbacks.rb#503 -class ActiveSupport::Callbacks::CallTemplate::ProcCall - # @return [ProcCall] a new instance of ProcCall - # - # source://activesupport//lib/active_support/callbacks.rb#504 - def initialize(target); end - - # source://activesupport//lib/active_support/callbacks.rb#508 - def expand(target, value, block); end - - # source://activesupport//lib/active_support/callbacks.rb#518 - def inverted_lambda; end - - # source://activesupport//lib/active_support/callbacks.rb#512 - def make_lambda; end -end - -# source://activesupport//lib/active_support/callbacks.rb#280 -class ActiveSupport::Callbacks::Callback - # @return [Callback] a new instance of Callback - # - # source://activesupport//lib/active_support/callbacks.rb#295 - def initialize(name, filter, kind, options, chain_config); end - - # Wraps code with filter - # - # source://activesupport//lib/active_support/callbacks.rb#330 - def apply(callback_sequence); end - - # Returns the value of attribute chain_config. - # - # source://activesupport//lib/active_support/callbacks.rb#293 - def chain_config; end - - # source://activesupport//lib/active_support/callbacks.rb#344 - def current_scopes; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/callbacks.rb#320 - def duplicates?(other); end - - # Returns the value of attribute filter. - # - # source://activesupport//lib/active_support/callbacks.rb#293 - def filter; end - - # Returns the value of attribute kind. - # - # source://activesupport//lib/active_support/callbacks.rb#292 - 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 - def kind=(_arg0); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/callbacks.rb#316 - def matches?(_kind, _filter); end - - # source://activesupport//lib/active_support/callbacks.rb#304 - def merge_conditional_options(chain, if_option:, unless_option:); end - - # Returns the value of attribute name. - # - # source://activesupport//lib/active_support/callbacks.rb#292 - 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 - def name=(_arg0); end - - private - - # source://activesupport//lib/active_support/callbacks.rb#352 - def check_conditionals(conditionals); end - - # source://activesupport//lib/active_support/callbacks.rb#367 - def conditions_lambdas; end - - class << self - # source://activesupport//lib/active_support/callbacks.rb#281 - def build(chain, filter, kind, options); end - end -end - -# source://activesupport//lib/active_support/callbacks.rb#349 -ActiveSupport::Callbacks::Callback::EMPTY_ARRAY = T.let(T.unsafe(nil), Array) - -# source://activesupport//lib/active_support/callbacks.rb#603 -class ActiveSupport::Callbacks::CallbackChain - include ::Enumerable - - # @return [CallbackChain] a new instance of CallbackChain - # - # source://activesupport//lib/active_support/callbacks.rb#608 - def initialize(name, config); end - - # source://activesupport//lib/active_support/callbacks.rb#654 - def append(*callbacks); end - - # source://activesupport//lib/active_support/callbacks.rb#633 - def clear; end - - # source://activesupport//lib/active_support/callbacks.rb#645 - def compile; end - - # Returns the value of attribute config. - # - # source://activesupport//lib/active_support/callbacks.rb#606 - def config; end - - # source://activesupport//lib/active_support/callbacks.rb#628 - def delete(o); end - - # source://activesupport//lib/active_support/callbacks.rb#619 - def each(&block); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/callbacks.rb#621 - def empty?; end - - # source://activesupport//lib/active_support/callbacks.rb#620 - def index(o); end - - # source://activesupport//lib/active_support/callbacks.rb#623 - def insert(index, o); end - - # Returns the value of attribute name. - # - # source://activesupport//lib/active_support/callbacks.rb#606 - def name; end - - # source://activesupport//lib/active_support/callbacks.rb#658 - def prepend(*callbacks); end - - protected - - # Returns the value of attribute chain. - # - # source://activesupport//lib/active_support/callbacks.rb#663 - def chain; end - - private - - # source://activesupport//lib/active_support/callbacks.rb#666 - def append_one(callback); end - - # source://activesupport//lib/active_support/callbacks.rb#683 - def default_terminator; end - - # source://activesupport//lib/active_support/callbacks.rb#639 - def initialize_copy(other); end - - # source://activesupport//lib/active_support/callbacks.rb#672 - def prepend_one(callback); end - - # source://activesupport//lib/active_support/callbacks.rb#678 - def remove_duplicates(callback); end -end - -# Execute before and after filters in a sequence instead of -# chaining them with nested lambda calls, see: -# https://github.com/rails/rails/issues/18011 -# -# source://activesupport//lib/active_support/callbacks.rb#556 -class ActiveSupport::Callbacks::CallbackSequence - # @return [CallbackSequence] a new instance of CallbackSequence - # - # source://activesupport//lib/active_support/callbacks.rb#557 - 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 - def after(&after); end - - # source://activesupport//lib/active_support/callbacks.rb#576 - def around(call_template, user_conditions); end - - # source://activesupport//lib/active_support/callbacks.rb#566 - def before(&before); end - - # source://activesupport//lib/active_support/callbacks.rb#590 - def expand_call_template(arg, block); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/callbacks.rb#586 - def final?; end - - # source://activesupport//lib/active_support/callbacks.rb#598 - def invoke_after(arg); end - - # source://activesupport//lib/active_support/callbacks.rb#594 - def invoke_before(arg); end - - # Returns the value of attribute nested. - # - # source://activesupport//lib/active_support/callbacks.rb#584 - def nested; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/callbacks.rb#580 - def skip?(arg); end -end - -# source://activesupport//lib/active_support/callbacks.rb#695 -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 - def __update_callbacks(name); end - - # Define sets of events in the object life cycle that support callbacks. - # - # define_callbacks :validate - # define_callbacks :initialize, :save, :destroy - # - # ===== Options - # - # * :terminator - Determines when a before filter will halt the - # callback chain, preventing following before and around callbacks from - # being called and the event from being triggered. - # This should be a lambda to be executed. - # The current object and the result lambda of the callback will be provided - # to the terminator lambda. - # - # define_callbacks :validate, terminator: ->(target, result_lambda) { result_lambda.call == false } - # - # In this example, if any before validate callbacks returns +false+, - # any successive before and around callback is not executed. - # - # The default terminator halts the chain when a callback throws +:abort+. - # - # * :skip_after_callbacks_if_terminated - Determines if after - # callbacks should be terminated by the :terminator option. By - # default after callbacks are executed no matter if callback chain was - # terminated or not. This option has no effect if :terminator - # option is set to +nil+. - # - # * :scope - Indicates which methods should be executed when an - # object is used as a callback. - # - # class Audit - # def before(caller) - # puts 'Audit: before is called' - # end - # - # def before_save(caller) - # puts 'Audit: before_save is called' - # end - # end - # - # class Account - # include ActiveSupport::Callbacks - # - # define_callbacks :save - # set_callback :save, :before, Audit.new - # - # def save - # run_callbacks :save do - # puts 'save in main' - # end - # end - # end - # - # In the above case whenever you save an account the method - # Audit#before will be called. On the other hand - # - # define_callbacks :save, scope: [:kind, :name] - # - # would trigger Audit#before_save instead. That's constructed - # by calling #{kind}_#{name} on the given instance. In this - # case "kind" is "before" and "name" is "save". In this context +:kind+ - # and +:name+ have special meanings: +:kind+ refers to the kind of - # callback (before/after/around) and +:name+ refers to the method on - # which callbacks are being defined. - # - # A declaration like - # - # define_callbacks :save, scope: [:name] - # - # would call Audit#save. - # - # ===== Notes - # - # +names+ passed to +define_callbacks+ must not end with - # !, ? or =. - # - # Calling +define_callbacks+ multiple times with the same +names+ will - # overwrite previous callbacks registered with +set_callback+. - # - # source://activesupport//lib/active_support/callbacks.rb#917 - def define_callbacks(*names); end - - # source://activesupport//lib/active_support/callbacks.rb#696 - def normalize_callback_params(filters, block); end - - # Remove all set callbacks for the given event. - # - # source://activesupport//lib/active_support/callbacks.rb#827 - def reset_callbacks(name); end - - # Install a callback for the given event. - # - # set_callback :save, :before, :before_method - # set_callback :save, :after, :after_method, if: :condition - # set_callback :save, :around, ->(r, block) { stuff; result = block.call; stuff } - # - # The second argument indicates whether the callback is to be run +:before+, - # +:after+, or +:around+ the event. If omitted, +:before+ is assumed. This - # means the first example above can also be written as: - # - # set_callback :save, :before_method - # - # 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+. - # - # 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 - # an argument. - # - # Before and around callbacks are called in the order that they are set; - # after callbacks are called in the reverse order. - # - # Around callbacks can access the return value from the event, if it - # wasn't halted, from the +yield+ call. - # - # ===== Options - # - # * :if - A symbol or an array of symbols, each naming an instance - # method or a proc; the callback will be called only when they all return - # a true value. - # - # If a proc is given, its body is evaluated in the context of the - # current object. It can also optionally accept the current object as - # an argument. - # * :unless - A symbol or an array of symbols, each naming an - # instance method or a proc; the callback will be called only when they - # all return a false value. - # - # If a proc is given, its body is evaluated in the context of the - # current object. It can also optionally accept the current object as - # an argument. - # * :prepend - If +true+, the callback will be prepended to the - # existing chain rather than appended. - # - # source://activesupport//lib/active_support/callbacks.rb#756 - def set_callback(name, *filter_list, &block); end - - # Skip a previously set callback. Like +set_callback+, :if or - # :unless options may be passed in order to control when the - # callback is skipped. - # - # class Writer < PersonRecord - # attr_accessor :age - # skip_callback :save, :before, :saving_message, if: -> { age > 18 } - # end - # - # When if option returns true, callback is skipped. - # - # writer = Writer.new - # writer.age = 20 - # writer.save - # - # Output: - # - save - # saved - # - # When if option returns false, callback is NOT skipped. - # - # young_writer = Writer.new - # young_writer.age = 17 - # young_writer.save - # - # Output: - # saving... - # - save - # saved - # - # 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 - def skip_callback(name, *filter_list, &block); end - - protected - - # source://activesupport//lib/active_support/callbacks.rb#948 - def get_callbacks(name); end - - # source://activesupport//lib/active_support/callbacks.rb#952 - def set_callbacks(name, callbacks); end -end - -# source://activesupport//lib/active_support/callbacks.rb#150 -module ActiveSupport::Callbacks::Conditionals; end - -# source://activesupport//lib/active_support/callbacks.rb#151 -class ActiveSupport::Callbacks::Conditionals::Value - # @return [Value] a new instance of Value - # - # source://activesupport//lib/active_support/callbacks.rb#152 - def initialize(&block); end - - # source://activesupport//lib/active_support/callbacks.rb#155 - def call(target, value); end -end - -# source://activesupport//lib/active_support/callbacks.rb#159 -module ActiveSupport::Callbacks::Filters; end - -# source://activesupport//lib/active_support/callbacks.rb#212 -class ActiveSupport::Callbacks::Filters::After - class << self - # source://activesupport//lib/active_support/callbacks.rb#213 - def build(callback_sequence, user_callback, user_conditions, chain_config); end - - private - - # source://activesupport//lib/active_support/callbacks.rb#255 - def conditional(callback_sequence, user_callback, user_conditions); end - - # source://activesupport//lib/active_support/callbacks.rb#244 - def halting(callback_sequence, user_callback); end - - # source://activesupport//lib/active_support/callbacks.rb#229 - def halting_and_conditional(callback_sequence, user_callback, user_conditions); end - - # source://activesupport//lib/active_support/callbacks.rb#269 - def simple(callback_sequence, user_callback); end - end -end - -# source://activesupport//lib/active_support/callbacks.rb#162 -class ActiveSupport::Callbacks::Filters::Before - class << self - # source://activesupport//lib/active_support/callbacks.rb#163 - def build(callback_sequence, user_callback, user_conditions, chain_config, filter, name); end - - private - - # source://activesupport//lib/active_support/callbacks.rb#192 - def halting(callback_sequence, user_callback, halted_lambda, filter, name); end - - # source://activesupport//lib/active_support/callbacks.rb#173 - 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 -class ActiveSupport::Callbacks::Filters::Environment < ::Struct - # Returns the value of attribute halted - # - # @return [Object] the current value of halted - def halted; end - - # Sets the attribute halted - # - # @param value [Object] the value to set the attribute halted to. - # @return [Object] the newly set value - def halted=(_); 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 - - # Returns the value of attribute value - # - # @return [Object] the current value of value - def value; end - - # Sets the attribute value - # - # @param value [Object] the value to set the attribute value to. - # @return [Object] the newly set value - def value=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://activesupport//lib/active_support/code_generator.rb#4 -class ActiveSupport::CodeGenerator - # @return [CodeGenerator] a new instance of CodeGenerator - # - # source://activesupport//lib/active_support/code_generator.rb#48 - def initialize(owner, path, line); end - - # source://activesupport//lib/active_support/code_generator.rb#55 - def define_cached_method(name, namespace:, as: T.unsafe(nil), &block); end - - # source://activesupport//lib/active_support/code_generator.rb#59 - def execute; end - - class << self - # source://activesupport//lib/active_support/code_generator.rb#36 - def batch(owner, path, line); end - end -end - -# source://activesupport//lib/active_support/code_generator.rb#5 -class ActiveSupport::CodeGenerator::MethodSet - # @return [MethodSet] a new instance of MethodSet - # - # source://activesupport//lib/active_support/code_generator.rb#8 - def initialize(namespace); end - - # source://activesupport//lib/active_support/code_generator.rb#25 - def apply(owner, path, line); end - - # source://activesupport//lib/active_support/code_generator.rb#14 - def define_cached_method(name, as: T.unsafe(nil)); end -end - -# source://activesupport//lib/active_support/code_generator.rb#6 -ActiveSupport::CodeGenerator::MethodSet::METHOD_CACHES = T.let(T.unsafe(nil), Hash) - -# source://activesupport//lib/active_support/core_ext/range/compare_range.rb#4 -module ActiveSupport::CompareWithRange - # Extends the default Range#=== to support range comparisons. - # (1..5) === (1..5) # => true - # (1..5) === (2..3) # => true - # (1..5) === (1...6) # => true - # (1..5) === (2..6) # => false - # - # The native Range#=== behavior is untouched. - # ('a'..'f') === ('c') # => true - # (5..9) === (11) # => false - # - # The given range must be fully bounded, with both start and end. - # - # source://activesupport//lib/active_support/core_ext/range/compare_range.rb#16 - def ===(value); end - - # Extends the default Range#include? to support range comparisons. - # (1..5).include?(1..5) # => true - # (1..5).include?(2..3) # => true - # (1..5).include?(1...6) # => true - # (1..5).include?(2..6) # => false - # - # The native Range#include? behavior is untouched. - # ('a'..'f').include?('c') # => true - # (5..9).include?(11) # => false - # - # The given range must be fully bounded, with both start and end. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/range/compare_range.rb#41 - def include?(value); end -end - -# A typical module looks like this: -# -# module M -# def self.included(base) -# base.extend ClassMethods -# base.class_eval do -# scope :disabled, -> { where(disabled: true) } -# end -# end -# -# module ClassMethods -# ... -# end -# end -# -# By using ActiveSupport::Concern the above module could instead be -# written as: -# -# require "active_support/concern" -# -# module M -# extend ActiveSupport::Concern -# -# included do -# scope :disabled, -> { where(disabled: true) } -# end -# -# class_methods do -# ... -# end -# end -# -# Moreover, it gracefully handles module dependencies. Given a +Foo+ module -# and a +Bar+ module which depends on the former, we would typically write the -# following: -# -# module Foo -# def self.included(base) -# base.class_eval do -# def self.method_injected_by_foo -# ... -# end -# end -# end -# end -# -# module Bar -# def self.included(base) -# base.method_injected_by_foo -# end -# end -# -# class Host -# include Foo # We need to include this dependency for Bar -# include Bar # Bar is the module that Host really needs -# end -# -# But why should +Host+ care about +Bar+'s dependencies, namely +Foo+? We -# could try to hide these from +Host+ directly including +Foo+ in +Bar+: -# -# module Bar -# include Foo -# def self.included(base) -# base.method_injected_by_foo -# end -# end -# -# class Host -# include Bar -# end -# -# Unfortunately this won't work, since when +Foo+ is included, its base -# is the +Bar+ module, not the +Host+ class. With ActiveSupport::Concern, -# module dependencies are properly resolved: -# -# require "active_support/concern" -# -# module Foo -# extend ActiveSupport::Concern -# included do -# def self.method_injected_by_foo -# ... -# end -# end -# end -# -# module Bar -# extend ActiveSupport::Concern -# include Foo -# -# included do -# self.method_injected_by_foo -# end -# end -# -# class Host -# include Bar # It works, now Bar takes care of its dependencies -# end -# -# === Prepending concerns -# -# Just like include, concerns also support prepend with a corresponding -# prepended do callback. module ClassMethods or class_methods do are -# prepended as well. -# -# prepend is also used for any dependencies. -# -# source://activesupport//lib/active_support/concern.rb#110 -module ActiveSupport::Concern - # source://activesupport//lib/active_support/concern.rb#127 - def append_features(base); end - - # Define class methods from given block. - # You can define private class methods as well. - # - # module Example - # extend ActiveSupport::Concern - # - # class_methods do - # def foo; puts 'foo'; end - # - # private - # def bar; puts 'bar'; end - # end - # end - # - # class Buzz - # include Example - # end - # - # Buzz.foo # => "foo" - # Buzz.bar # => private method 'bar' called for Buzz:Class(NoMethodError) - # - # source://activesupport//lib/active_support/concern.rb#207 - 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 - def included(base = T.unsafe(nil), &block); end - - # source://activesupport//lib/active_support/concern.rb#140 - 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 - def prepended(base = T.unsafe(nil), &block); end - - class << self - # source://activesupport//lib/active_support/concern.rb#123 - def extended(base); end - end -end - -# source://activesupport//lib/active_support/concern.rb#111 -class ActiveSupport::Concern::MultipleIncludedBlocks < ::StandardError - # @return [MultipleIncludedBlocks] a new instance of MultipleIncludedBlocks - # - # source://activesupport//lib/active_support/concern.rb#112 - def initialize; end -end - -# source://activesupport//lib/active_support/concern.rb#117 -class ActiveSupport::Concern::MultiplePrependBlocks < ::StandardError - # @return [MultiplePrependBlocks] a new instance of MultiplePrependBlocks - # - # source://activesupport//lib/active_support/concern.rb#118 - def initialize; end -end - -# source://activesupport//lib/active_support/concurrency/share_lock.rb#7 -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 -class ActiveSupport::Concurrency::LoadInterlockAwareMonitor < ::Monitor - # Enters an exclusive section, but allows dependency loading while blocked - # - # source://activesupport//lib/active_support/concurrency/load_interlock_aware_monitor.rb#15 - def mon_enter; end - - # source://activesupport//lib/active_support/concurrency/load_interlock_aware_monitor.rb#20 - 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#10 -ActiveSupport::Concurrency::LoadInterlockAwareMonitor::EXCEPTION_NEVER = T.let(T.unsafe(nil), Hash) - -# A share/exclusive lock, otherwise known as a read/write lock. -# -# https://en.wikipedia.org/wiki/Readers%E2%80%93writer_lock -# -# source://activesupport//lib/active_support/concurrency/share_lock.rb#11 -class ActiveSupport::Concurrency::ShareLock - include ::MonitorMixin - - # @return [ShareLock] a new instance of ShareLock - # - # source://activesupport//lib/active_support/concurrency/share_lock.rb#50 - def initialize; end - - # Execute the supplied block while holding the Exclusive lock. If - # +no_wait+ is set and the lock is not immediately available, - # returns +nil+ without yielding. Otherwise, returns the result of - # the block. - # - # See +start_exclusive+ for other options. - # - # source://activesupport//lib/active_support/concurrency/share_lock.rb#148 - def exclusive(purpose: T.unsafe(nil), compatible: T.unsafe(nil), after_compatible: T.unsafe(nil), no_wait: T.unsafe(nil)); end - - # We track Thread objects, instead of just using counters, because - # we need exclusive locks to be reentrant, and we need to be able - # to upgrade share locks to exclusive. - # - # source://activesupport//lib/active_support/concurrency/share_lock.rb#18 - def raw_state; end - - # Execute the supplied block while holding the Share lock. - # - # source://activesupport//lib/active_support/concurrency/share_lock.rb#159 - def sharing; end - - # Returns false if +no_wait+ is set and the lock is not - # immediately available. Otherwise, returns true after the lock - # has been acquired. - # - # +purpose+ and +compatible+ work together; while this thread is - # waiting for the exclusive lock, it will yield its share (if any) - # to any other attempt whose +purpose+ appears in this attempt's - # +compatible+ list. This allows a "loose" upgrade, which, being - # less strict, prevents some classes of deadlocks. - # - # For many resources, loose upgrades are sufficient: if a thread - # is awaiting a lock, it is not running any other code. With - # +purpose+ matching, it is possible to yield only to other - # threads whose activity will not interfere. - # - # source://activesupport//lib/active_support/concurrency/share_lock.rb#76 - def start_exclusive(purpose: T.unsafe(nil), compatible: T.unsafe(nil), no_wait: T.unsafe(nil)); end - - # source://activesupport//lib/active_support/concurrency/share_lock.rb#114 - def start_sharing; end - - # Relinquish the exclusive lock. Must only be called by the thread - # that called start_exclusive (and currently holds the lock). - # - # source://activesupport//lib/active_support/concurrency/share_lock.rb#96 - def stop_exclusive(compatible: T.unsafe(nil)); end - - # source://activesupport//lib/active_support/concurrency/share_lock.rb#131 - def stop_sharing; end - - # Temporarily give up all held Share locks while executing the - # supplied block, allowing any +compatible+ exclusive lock request - # to proceed. - # - # source://activesupport//lib/active_support/concurrency/share_lock.rb#171 - def yield_shares(purpose: T.unsafe(nil), compatible: T.unsafe(nil), block_share: T.unsafe(nil)); end - - private - - # Must be called within synchronize - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/concurrency/share_lock.rb#204 - def busy_for_exclusive?(purpose); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/concurrency/share_lock.rb#209 - def busy_for_sharing?(purpose); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/concurrency/share_lock.rb#214 - def eligible_waiters?(compatible); end - - # source://activesupport//lib/active_support/concurrency/share_lock.rb#218 - def wait_for(method, &block); end -end - -# Configurable provides a config method to store and retrieve -# configuration options as an OrderedOptions. -# -# source://activesupport//lib/active_support/configurable.rb#9 -module ActiveSupport::Configurable - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActiveSupport::Configurable::ClassMethods - - # Reads and writes attributes from a configuration OrderedOptions. - # - # require "active_support/configurable" - # - # class User - # include ActiveSupport::Configurable - # end - # - # user = User::User.new - # - # user.config.allowed_access = true - # user.config.level = 1 - # - # user.config.allowed_access # => true - # user.config.level # => 1 - # - # source://activesupport//lib/active_support/configurable.rb#145 - def config; end -end - -# source://activesupport//lib/active_support/configurable.rb#27 -module ActiveSupport::Configurable::ClassMethods - # source://activesupport//lib/active_support/configurable.rb#28 - def config; end - - # @yield [config] - # - # source://activesupport//lib/active_support/configurable.rb#37 - def configure; end - - private - - # Allows you to add shortcut so that you don't have to refer to attribute - # through config. Also look at the example for config to contrast. - # - # Defines both class and instance config accessors. - # - # class User - # include ActiveSupport::Configurable - # config_accessor :allowed_access - # end - # - # User::User.allowed_access # => nil - # User::User.allowed_access = false - # User::User.allowed_access # => false - # - # user = User::User.new - # user.allowed_access # => false - # user.allowed_access = true - # user.allowed_access # => true - # - # User::User.allowed_access # => false - # - # The attribute name must be a valid method name in Ruby. - # - # class User - # include ActiveSupport::Configurable - # config_accessor :"1_Badname" - # end - # # => NameError: invalid config attribute name - # - # To omit the instance writer method, pass instance_writer: false. - # To omit the instance reader method, pass instance_reader: false. - # - # class User - # include ActiveSupport::Configurable - # config_accessor :allowed_access, instance_reader: false, instance_writer: false - # end - # - # User::User.allowed_access = false - # User::User.allowed_access # => false - # - # User::User.new.allowed_access = true # => NoMethodError - # User::User.new.allowed_access # => NoMethodError - # - # Or pass instance_accessor: false, to omit both instance methods. - # - # class User - # include ActiveSupport::Configurable - # config_accessor :allowed_access, instance_accessor: false - # end - # - # User::User.allowed_access = false - # User::User.allowed_access # => false - # - # User::User.new.allowed_access = true # => NoMethodError - # User::User.new.allowed_access # => NoMethodError - # - # Also you can pass default or a block to set up the attribute with a default value. - # - # class User - # include ActiveSupport::Configurable - # config_accessor :allowed_access, default: false - # config_accessor :hair_colors do - # [:brown, :black, :blonde, :red] - # end - # end - # - # User::User.allowed_access # => false - # User::User.hair_colors # => [:brown, :black, :blonde, :red] - # - # source://activesupport//lib/active_support/configurable.rb#109 - def config_accessor(*names, instance_reader: T.unsafe(nil), instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil)); end -end - -# source://activesupport//lib/active_support/configurable.rb#12 -class ActiveSupport::Configurable::Configuration < ::ActiveSupport::InheritableOptions - # source://activesupport//lib/active_support/configurable.rb#13 - 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 - def compile_methods!(keys); end - end -end - -# Reads a YAML configuration file, evaluating any ERB, then -# parsing the resulting YAML. -# -# Warns in case of YAML confusing characters, like invisible -# non-breaking spaces. -# -# source://activesupport//lib/active_support/configuration_file.rb#9 -class ActiveSupport::ConfigurationFile - # @return [ConfigurationFile] a new instance of ConfigurationFile - # - # source://activesupport//lib/active_support/configuration_file.rb#12 - def initialize(content_path); end - - # source://activesupport//lib/active_support/configuration_file.rb#21 - def parse(context: T.unsafe(nil), **options); end - - private - - # source://activesupport//lib/active_support/configuration_file.rb#35 - def read(content_path); end - - # source://activesupport//lib/active_support/configuration_file.rb#46 - def render(context); end - - class << self - # source://activesupport//lib/active_support/configuration_file.rb#17 - def parse(content_path, **options); end - end -end - -# source://activesupport//lib/active_support/configuration_file.rb#10 -class ActiveSupport::ConfigurationFile::FormatError < ::StandardError; end - -# 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. -# -# The following full app-like example demonstrates how to use a Current class to -# facilitate easy access to the global, per-request attributes without passing them deeply -# around everywhere: -# -# # app/models/current.rb -# class Current < ActiveSupport::CurrentAttributes -# attribute :account, :user -# attribute :request_id, :user_agent, :ip_address -# -# resets { Time.zone = nil } -# -# def user=(user) -# super -# self.account = user.account -# Time.zone = user.time_zone -# end -# end -# -# # app/controllers/concerns/authentication.rb -# module Authentication -# extend ActiveSupport::Concern -# -# included do -# before_action :authenticate -# end -# -# private -# def authenticate -# if authenticated_user = User::User.find_by(id: cookies.encrypted[:user_id]) -# Current.user = authenticated_user -# else -# redirect_to new_session_url -# end -# end -# end -# -# # app/controllers/concerns/set_current_request_details.rb -# module SetCurrentRequestDetails -# extend ActiveSupport::Concern -# -# included do -# before_action do -# Current.request_id = request.uuid -# Current.user_agent = request.user_agent -# Current.ip_address = request.ip -# end -# end -# end -# -# class ApplicationController < ActionController::Base -# include Authentication -# include SetCurrentRequestDetails -# end -# -# class MessagesController < ApplicationController -# def create -# Current.account.messages.create(message_params) -# end -# end -# -# class Message < ApplicationRecord -# belongs_to :creator, default: -> { Current.user } -# after_create { |message| Event.create(record: message) } -# end -# -# class Event < ApplicationRecord -# before_create do -# self.request_id = Current.request_id -# self.user_agent = Current.user_agent -# self.ip_address = Current.ip_address -# end -# end -# -# A word of caution: It's easy to overdo a global singleton like Current and tangle your model as a result. -# Current should only be used for a few, top-level globals, like account, user, and request details. -# 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 -class ActiveSupport::CurrentAttributes - include ::ActiveSupport::Callbacks - extend ::ActiveSupport::Callbacks::ClassMethods - extend ::ActiveSupport::DescendantsTracker - - # @return [CurrentAttributes] a new instance of CurrentAttributes - # - # source://activesupport//lib/active_support/current_attributes.rb#188 - def initialize; end - - # source://activesupport//lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport//lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://activesupport//lib/active_support/callbacks.rb#940 - def _reset_callbacks; end - - # source://activesupport//lib/active_support/callbacks.rb#928 - def _run_reset_callbacks(&block); end - - # Returns the value of attribute attributes. - # - # source://activesupport//lib/active_support/current_attributes.rb#186 - 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 - 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 - def reset; end - - # Expose one or more attributes within a block. Old values are returned after the block concludes. - # Example demonstrating the common use of needing to set Current attributes outside the request-cycle: - # - # class Chat::PublicationJob < ApplicationJob - # def perform(attributes, room_number, creator) - # Current.set(person: creator) do - # Chat::Publisher.publish(attributes: attributes, room_number: room_number) - # end - # end - # end - # - # source://activesupport//lib/active_support/current_attributes.rb#202 - def set(set_attributes); end - - private - - # source://activesupport//lib/active_support/current_attributes.rb#218 - def assign_attributes(new_attributes); end - - # source://activesupport//lib/active_support/current_attributes.rb#222 - def compute_attributes(keys); end - - class << self - # source://activesupport//lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport//lib/active_support/callbacks.rb#68 - def __callbacks=(value); end - - # source://activesupport//lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://activesupport//lib/active_support/callbacks.rb#932 - def _reset_callbacks; end - - # source://activesupport//lib/active_support/callbacks.rb#936 - def _reset_callbacks=(value); end - - # Calls this block 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 - - # Declares one or more attributes that will be given both class and instance accessor methods. - # - # source://activesupport//lib/active_support/current_attributes.rb#100 - def attribute(*names); end - - # Calls this block 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#153 - 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 - def instance; end - - # source://activesupport//lib/active_support/current_attributes.rb#147 - def reset(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/current_attributes.rb#149 - def reset_all; end - - # Calls this block 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#147 - def set(*_arg0, **_arg1, &_arg2); end - - private - - # source://activesupport//lib/active_support/current_attributes.rb#163 - def current_instances; end - - # source://activesupport//lib/active_support/current_attributes.rb#167 - def current_instances_key; end - - # source://activesupport//lib/active_support/current_attributes.rb#159 - def generated_attribute_methods; end - - # source://activesupport//lib/active_support/current_attributes.rb#171 - def method_missing(name, *args, **_arg2, &block); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/current_attributes.rb#181 - def respond_to_missing?(name, _); end - end -end - -# source://activesupport//lib/active_support/dependencies/interlock.rb#6 -module ActiveSupport::Dependencies - class << self - # source://activesupport//lib/active_support/dependencies.rb#62 - def _autoloaded_tracked_classes; end - - # source://activesupport//lib/active_support/dependencies.rb#62 - def _autoloaded_tracked_classes=(_arg0); end - - # source://activesupport//lib/active_support/dependencies.rb#56 - def _eager_load_paths; end - - # source://activesupport//lib/active_support/dependencies.rb#56 - def _eager_load_paths=(_arg0); end - - # source://activesupport//lib/active_support/dependencies.rb#49 - def autoload_once_paths; end - - # source://activesupport//lib/active_support/dependencies.rb#49 - def autoload_once_paths=(_arg0); end - - # source://activesupport//lib/active_support/dependencies.rb#43 - def autoload_paths; end - - # source://activesupport//lib/active_support/dependencies.rb#43 - def autoload_paths=(_arg0); end - - # source://activesupport//lib/active_support/dependencies.rb#69 - def autoloader; end - - # source://activesupport//lib/active_support/dependencies.rb#69 - def autoloader=(_arg0); end - - # Private method that reloads constants autoloaded by the main autoloader. - # - # Rails.application.reloader.reload! is the public interface for application - # reload. That involves more things, like deleting unloaded classes from the - # internal state of the descendants tracker, or reloading routes. - # - # source://activesupport//lib/active_support/dependencies.rb#76 - def clear; end - - # Private method that helps configuring the autoloaders. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/dependencies.rb#94 - def eager_load?(path); end - - # source://activesupport//lib/active_support/dependencies.rb#10 - def interlock; end - - # source://activesupport//lib/active_support/dependencies.rb#10 - def interlock=(_arg0); end - - # Execute the supplied block while holding an exclusive lock, - # preventing any other thread from being inside a #run_interlock - # block at the same time. - # - # source://activesupport//lib/active_support/dependencies.rb#24 - def load_interlock(&block); end - - # Execute the supplied block without interference from any - # concurrent loads. - # - # source://activesupport//lib/active_support/dependencies.rb#17 - def run_interlock(&block); end - - # Private method used by require_dependency. - # - # source://activesupport//lib/active_support/dependencies.rb#84 - def search_for_file(relpath); end - - # Execute the supplied block while holding an exclusive lock, - # preventing any other thread from being inside a #run_interlock - # block at the same time. - # - # source://activesupport//lib/active_support/dependencies.rb#31 - def unload_interlock(&block); end - end -end - -# source://activesupport//lib/active_support/dependencies/interlock.rb#7 -class ActiveSupport::Dependencies::Interlock - # @return [Interlock] a new instance of Interlock - # - # source://activesupport//lib/active_support/dependencies/interlock.rb#8 - def initialize; end - - # source://activesupport//lib/active_support/dependencies/interlock.rb#32 - def done_running; end - - # source://activesupport//lib/active_support/dependencies/interlock.rb#24 - def done_unloading; end - - # source://activesupport//lib/active_support/dependencies/interlock.rb#12 - def loading(&block); end - - # source://activesupport//lib/active_support/dependencies/interlock.rb#40 - def permit_concurrent_loads(&block); end - - # source://activesupport//lib/active_support/dependencies/interlock.rb#44 - def raw_state(&block); end - - # source://activesupport//lib/active_support/dependencies/interlock.rb#36 - def running(&block); end - - # source://activesupport//lib/active_support/dependencies/interlock.rb#28 - def start_running; end - - # source://activesupport//lib/active_support/dependencies/interlock.rb#20 - def start_unloading; end - - # source://activesupport//lib/active_support/dependencies/interlock.rb#16 - def unloading(&block); end -end - -# source://activesupport//lib/active_support/dependencies/require_dependency.rb#3 -module ActiveSupport::Dependencies::RequireDependency - # Warning: This method is obsolete. The semantics of the autoloader - # match Ruby's and you do not need to be defensive with load order anymore. - # Just refer to classes and modules normally. - # - # Engines that do not control the mode in which their parent application runs - # should call +require_dependency+ where needed in case the runtime mode is - # +:classic+. - # - # source://activesupport//lib/active_support/dependencies/require_dependency.rb#11 - 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. -# -# source://activesupport//lib/active_support/deprecation.rb#8 -class ActiveSupport::Deprecation - include ::Singleton - include ::ActiveSupport::Deprecation::InstanceDelegator - include ::ActiveSupport::Deprecation::Behavior - include ::ActiveSupport::Deprecation::Reporting - include ::ActiveSupport::Deprecation::Disallowed - include ::ActiveSupport::Deprecation::MethodWrapper - extend ::Singleton::SingletonClassMethods - extend ::ActiveSupport::Deprecation::InstanceDelegator::ClassMethods - extend ::ActiveSupport::Deprecation::InstanceDelegator::OverrideDelegators - - # It accepts two parameters on initialization. The first is a version of library - # and the second is a library name. - # - # ActiveSupport::Deprecation.new('2.0', 'MyLibrary') - # - # @return [Deprecation] a new instance of Deprecation - # - # source://activesupport//lib/active_support/deprecation.rb#41 - 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 - 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 - def deprecation_horizon=(_arg0); end - - class << self - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 - def allow(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 - def behavior(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 - def behavior=(arg); end - - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 - def debug(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 - def debug=(arg); end - - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 - def deprecate_methods(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 - def deprecation_horizon(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 - def deprecation_horizon=(arg); end - - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#31 - 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 - def disallowed_behavior(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 - def disallowed_behavior=(arg); end - - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 - def disallowed_warnings(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 - def disallowed_warnings=(arg); end - - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 - def gem_name(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 - def gem_name=(arg); end - - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 - def silence(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 - def silenced(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 - def silenced=(arg); end - - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#26 - def warn(message = T.unsafe(nil), callstack = T.unsafe(nil)); end - end -end - -# Behavior module allows to determine how to display deprecation messages. -# You can create a custom behavior or set any from the +DEFAULT_BEHAVIORS+ -# constant. Available behaviors are: -# -# [+raise+] Raise ActiveSupport::DeprecationException. -# [+stderr+] Log all deprecation warnings to $stderr. -# [+log+] Log all deprecation warnings to +Rails.logger+. -# [+notify+] Use +ActiveSupport::Notifications+ to notify +deprecation.rails+. -# [+silence+] Do nothing. On Rails, set config.active_support.report_deprecations = false to disable all behaviors. -# -# 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 -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 - def behavior; end - - # Sets the behavior to the specified value. Can be a single value, array, - # or an object that responds to +call+. - # - # Available behaviors: - # - # [+raise+] Raise ActiveSupport::DeprecationException. - # [+stderr+] Log all deprecation warnings to $stderr. - # [+log+] Log all deprecation warnings to +Rails.logger+. - # [+notify+] Use +ActiveSupport::Notifications+ to notify +deprecation.rails+. - # [+silence+] Do nothing. - # - # 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. - # - # ActiveSupport::Deprecation.behavior = :stderr - # ActiveSupport::Deprecation.behavior = [:stderr, :log] - # ActiveSupport::Deprecation.behavior = MyCustomHandler - # ActiveSupport::Deprecation.behavior = ->(message, callstack, deprecation_horizon, gem_name) { - # # custom stuff - # } - # - # If you are using Rails, you can set config.active_support.report_deprecations = false to disable - # all deprecation behaviors. This is similar to the +silence+ option but more performant. - # - # source://activesupport//lib/active_support/deprecation/behaviors.rb#99 - def behavior=(behavior); end - - # Whether to print a backtrace along with the warning. - # - # source://activesupport//lib/active_support/deprecation/behaviors.rb#63 - def debug; end - - # Whether to print a backtrace along with the warning. - # - # source://activesupport//lib/active_support/deprecation/behaviors.rb#63 - 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 - def disallowed_behavior; end - - # Sets the behavior for disallowed deprecations (those configured by - # ActiveSupport::Deprecation.disallowed_warnings=) to the specified - # value. As with +behavior=+, this can be a single value, array, or an - # object that responds to +call+. - # - # source://activesupport//lib/active_support/deprecation/behaviors.rb#107 - def disallowed_behavior=(behavior); end - - private - - # source://activesupport//lib/active_support/deprecation/behaviors.rb#112 - def arity_coerce(behavior); end -end - -# Default warning behaviors per Rails.env. -# -# source://activesupport//lib/active_support/deprecation/behaviors.rb#13 -ActiveSupport::Deprecation::DEFAULT_BEHAVIORS = T.let(T.unsafe(nil), Hash) - -# DeprecatedConstantAccessor transforms a constant into a deprecated one by -# 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. -# -# 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 -# etc. -# -# 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) -# include ActiveSupport::Deprecation::DeprecatedConstantAccessor -# deprecate_constant 'PLANETS', 'PLANETS_POST_2006' -# -# 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 -module ActiveSupport::Deprecation::DeprecatedConstantAccessor - class << self - # @private - # - # source://activesupport//lib/active_support/deprecation/constant_accessor.rb#29 - 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. -# -# 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.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 -class ActiveSupport::Deprecation::DeprecatedConstantProxy < ::Module - # @return [DeprecatedConstantProxy] a new instance of DeprecatedConstantProxy - # - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#131 - def initialize(old_const, new_const, deprecator = T.unsafe(nil), message: T.unsafe(nil)); end - - # Returns the class of the new constant. - # - # PLANETS_POST_2006 = %w(mercury venus earth mars jupiter saturn uranus neptune) - # PLANETS = ActiveSupport::Deprecation::DeprecatedConstantProxy.new('PLANETS', 'PLANETS_POST_2006') - # PLANETS.class # => Array - # - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#157 - def class; end - - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#150 - def hash(*_arg0, **_arg1, &_arg2); end - - # Don't give a deprecation warning on inspect since test/unit and error - # logs rely on it for diagnostics. - # - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#144 - def inspect; end - - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#150 - def instance_methods(*_arg0, **_arg1, &_arg2); end - - # 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#150 - def respond_to?(*_arg0, **_arg1, &_arg2); end - - private - - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#166 - def const_missing(name); end - - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#171 - def method_missing(called, *args, &block); end - - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#162 - def target; end - - class << self - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#124 - 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. -# -# class Example -# def initialize -# @request = ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy.new(self, :request, :@request) -# @_request = :special_request -# end -# -# def request -# @_request -# end -# -# def old_request -# @request -# end -# end -# -# example = Example.new -# # => # -# -# example.old_request.to_s -# # => DEPRECATION WARNING: @request is deprecated! Call request.to_s instead of -# @request.to_s -# (Backtrace information…) -# "special_request" -# -# example.request.to_s -# # => "special_request" -# -# source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#88 -class ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy < ::ActiveSupport::Deprecation::DeprecationProxy - # @return [DeprecatedInstanceVariableProxy] a new instance of DeprecatedInstanceVariableProxy - # - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#89 - def initialize(instance, method, var = T.unsafe(nil), deprecator = T.unsafe(nil)); end - - private - - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#97 - def target; end - - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#101 - 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. -# -# deprecated_object = ActiveSupport::Deprecation::DeprecatedObjectProxy.new(Object.new, "This object is now deprecated") -# # => # -# -# deprecated_object.to_s -# DEPRECATION WARNING: This object is now deprecated. -# (Backtrace) -# # => "#" -# -# source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#39 -class ActiveSupport::Deprecation::DeprecatedObjectProxy < ::ActiveSupport::Deprecation::DeprecationProxy - # @return [DeprecatedObjectProxy] a new instance of DeprecatedObjectProxy - # - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#40 - def initialize(object, message, deprecator = T.unsafe(nil)); end - - private - - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#47 - def target; end - - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#51 - def warn(callstack, called, args); end -end - -# source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#5 -class ActiveSupport::Deprecation::DeprecationProxy - # Don't give a deprecation warning on inspect since test/unit and error - # logs rely on it for diagnostics. - # - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#17 - def inspect; end - - private - - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#22 - def method_missing(called, *args, &block); end - - class << self - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#6 - def new(*args, &block); end - end -end - -# source://activesupport//lib/active_support/deprecation/disallowed.rb#5 -module ActiveSupport::Deprecation::Disallowed - # Returns the configured criteria used to identify deprecation messages - # which should be treated as disallowed. - # - # source://activesupport//lib/active_support/deprecation/disallowed.rb#21 - def disallowed_warnings; end - - # Sets the criteria used to identify deprecation messages which should be - # disallowed. Can be an array containing strings, symbols, or regular - # expressions. (Symbols are treated as strings). These are compared against - # the text of the generated deprecation warning. - # - # Additionally the scalar symbol +:all+ may be used to treat all - # deprecations as disallowed. - # - # Deprecations matching a substring or regular expression will be handled - # using the configured +ActiveSupport::Deprecation.disallowed_behavior+ - # rather than +ActiveSupport::Deprecation.behavior+ - # - # source://activesupport//lib/active_support/deprecation/disallowed.rb#17 - def disallowed_warnings=(_arg0); end - - private - - # @return [Boolean] - # - # source://activesupport//lib/active_support/deprecation/disallowed.rb#26 - def deprecation_disallowed?(message); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/deprecation/disallowed.rb#40 - def explicitly_allowed?(message); end -end - -# source://activesupport//lib/active_support/deprecation/instance_delegator.rb#7 -module ActiveSupport::Deprecation::InstanceDelegator - mixes_in_class_methods ::ActiveSupport::Deprecation::InstanceDelegator::ClassMethods - mixes_in_class_methods ::ActiveSupport::Deprecation::InstanceDelegator::OverrideDelegators - - class << self - # @private - # - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#8 - def included(base); end - end -end - -# source://activesupport//lib/active_support/deprecation/instance_delegator.rb#14 -module ActiveSupport::Deprecation::InstanceDelegator::ClassMethods - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#15 - def include(included_module); 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 -module ActiveSupport::Deprecation::InstanceDelegator::OverrideDelegators - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#31 - 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 - def warn(message = T.unsafe(nil), callstack = T.unsafe(nil)); end -end - -# source://activesupport//lib/active_support/deprecation/method_wrappers.rb#8 -module ActiveSupport::Deprecation::MethodWrapper - # Declare that a method has been deprecated. - # - # class Fred - # def aaa; end - # def bbb; end - # def ccc; end - # def ddd; end - # def eee; end - # end - # - # Using the default deprecator: - # ActiveSupport::Deprecation.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) - # # => 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) - # # => 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) - # # => 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 - def deprecate_methods(target_module, *method_names); end -end - -# source://activesupport//lib/active_support/deprecation/reporting.rb#7 -module ActiveSupport::Deprecation::Reporting - # Allow previously disallowed deprecation warnings within the block. - # allowed_warnings can be an array containing strings, symbols, or regular - # 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+ - # - # 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 = [ - # "something broke" - # ] - # - # ActiveSupport::Deprecation.warn('something broke!') - # # => ActiveSupport::DeprecationException - # - # ActiveSupport::Deprecation.allow ['something broke'] do - # ActiveSupport::Deprecation.warn('something broke!') - # end - # # => nil - # - # ActiveSupport::Deprecation.allow ['something broke'], if: Rails.env.production? do - # ActiveSupport::Deprecation.warn('something broke!') - # end - # # => ActiveSupport::DeprecationException for dev/test, nil for production - # - # source://activesupport//lib/active_support/deprecation/reporting.rb#72 - def allow(allowed_warnings = T.unsafe(nil), if: T.unsafe(nil), &block); end - - # source://activesupport//lib/active_support/deprecation/reporting.rb#86 - def deprecation_warning(deprecated_method_name, message = T.unsafe(nil), caller_backtrace = T.unsafe(nil)); end - - # Name of gem where method is deprecated - # - # source://activesupport//lib/active_support/deprecation/reporting.rb#11 - def gem_name; end - - # Name of gem where method is deprecated - # - # source://activesupport//lib/active_support/deprecation/reporting.rb#11 - def gem_name=(_arg0); end - - # Silence deprecation warnings within the block. - # - # ActiveSupport::Deprecation.warn('something broke!') - # # => "DEPRECATION WARNING: something broke! (called from your_code.rb:1)" - # - # ActiveSupport::Deprecation.silence do - # ActiveSupport::Deprecation.warn('something broke!') - # end - # # => nil - # - # source://activesupport//lib/active_support/deprecation/reporting.rb#40 - def silence(&block); end - - # source://activesupport//lib/active_support/deprecation/reporting.rb#82 - def silenced; end - - # Whether to print a message (silent mode) - # - # source://activesupport//lib/active_support/deprecation/reporting.rb#9 - def silenced=(_arg0); end - - # Outputs a deprecation warning to the output configured by - # ActiveSupport::Deprecation.behavior. - # - # ActiveSupport::Deprecation.warn('something broke!') - # # => "DEPRECATION WARNING: something broke! (called from your_code.rb:1)" - # - # source://activesupport//lib/active_support/deprecation/reporting.rb#18 - def warn(message = T.unsafe(nil), callstack = T.unsafe(nil)); end - - private - - # source://activesupport//lib/active_support/deprecation/reporting.rb#137 - def _extract_callstack(callstack); end - - # Outputs a deprecation warning message - # - # deprecated_method_warning(:method_name) - # # => "method_name is deprecated and will be removed from Rails #{deprecation_horizon}" - # deprecated_method_warning(:method_name, :another_method) - # # => "method_name is deprecated and will be removed from Rails #{deprecation_horizon} (use another_method instead)" - # 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 - def deprecated_method_warning(method_name, message = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/deprecation/reporting.rb#116 - def deprecation_caller_message(callstack); end - - # source://activesupport//lib/active_support/deprecation/reporting.rb#111 - def deprecation_message(callstack, message = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/deprecation/reporting.rb#127 - def extract_callstack(callstack); end - - # source://activesupport//lib/active_support/deprecation/reporting.rb#152 - def ignored_callstack(path); end -end - -# source://activesupport//lib/active_support/deprecation/reporting.rb#150 -ActiveSupport::Deprecation::Reporting::RAILS_GEM_ROOT = T.let(T.unsafe(nil), String) - -# Raised when ActiveSupport::Deprecation::Behavior#behavior is set with :raise. -# You would set :raise, as a behavior to raise errors and proactively report exceptions from deprecations. -# -# source://activesupport//lib/active_support/deprecation/behaviors.rb#8 -class ActiveSupport::DeprecationException < ::StandardError; end - -# This module provides an internal implementation to track descendants -# which is faster than iterating through ObjectSpace. -# -# source://activesupport//lib/active_support/descendants_tracker.rb#9 -module ActiveSupport::DescendantsTracker - # source://activesupport//lib/active_support/descendants_tracker.rb#88 - 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 - def clear(classes); end - - # source://activesupport//lib/active_support/descendants_tracker.rb#62 - def descendants(klass); end - - # source://activesupport//lib/active_support/descendants_tracker.rb#11 - def direct_descendants(klass); end - - # source://activesupport//lib/active_support/descendants_tracker.rb#50 - def disable_clear!; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/descendants_tracker.rb#77 - def native?; end - - # source://activesupport//lib/active_support/descendants_tracker.rb#58 - def subclasses(klass); end - end -end - -# source://activesupport//lib/active_support/digest.rb#6 -class ActiveSupport::Digest - class << self - # source://activesupport//lib/active_support/digest.rb#8 - def hash_digest_class; end - - # @raise [ArgumentError] - # - # source://activesupport//lib/active_support/digest.rb#12 - def hash_digest_class=(klass); end - - # source://activesupport//lib/active_support/digest.rb#17 - def hexdigest(arg); end - end -end - -# 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 -class ActiveSupport::Duration - # @return [Duration] a new instance of Duration - # - # source://activesupport//lib/active_support/duration.rb#223 - 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 - def %(other); end - - # Multiplies this Duration by a Numeric and returns a new Duration. - # - # source://activesupport//lib/active_support/duration.rb#281 - 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 - def +(other); end - - # source://activesupport//lib/active_support/duration.rb#320 - 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 - def -(other); end - - # source://activesupport//lib/active_support/duration.rb#316 - def -@; end - - # Divides this Duration by a Numeric and returns a new Duration. - # - # source://activesupport//lib/active_support/duration.rb#292 - 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 - 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 - def ==(other); end - - # source://activesupport//lib/active_support/duration.rb#475 - 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 - 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 - def ago(time = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/duration.rb#453 - 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 - def before(time = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/duration.rb#239 - def coerce(other); end - - # source://activesupport//lib/active_support/duration.rb#461 - def encode_with(coder); end - - # Returns +true+ if +other+ is also a Duration instance, which has the - # same parts as this one. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/duration.rb#420 - 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 - def from_now(time = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/duration.rb#424 - 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 - 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 - 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 - 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 - def in_months; end - - # Returns the number of seconds that this Duration represents. - # - # 1.minute.to_i # => 60 - # 1.hour.to_i # => 3600 - # 1.day.to_i # => 86400 - # - # Note that this conversion makes some assumptions about the - # duration of some periods, e.g. months are always 1/12 of year - # and years are 365.2425 days: - # - # # equivalent to (1.year / 12).to_i - # 1.month.to_i # => 2629746 - # - # # equivalent to 365.2425.days.to_i - # 1.year.to_i # => 31556952 - # - # In such cases, Ruby's core - # Date[https://ruby-doc.org/stdlib/libdoc/date/rdoc/Date.html] and - # 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 - 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 - 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 - def in_years; end - - # source://activesupport//lib/active_support/duration.rb#457 - def init_with(coder); end - - # source://activesupport//lib/active_support/duration.rb#444 - def inspect; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/duration.rb#329 - def instance_of?(klass); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/duration.rb#324 - 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 - def iso8601(precision: T.unsafe(nil)); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/duration.rb#324 - def kind_of?(klass); end - - # Returns a copy of the parts hash that defines the duration - # - # source://activesupport//lib/active_support/duration.rb#235 - 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 - def since(time = T.unsafe(nil)); end - - # Returns the number of seconds that this Duration represents. - # - # 1.minute.to_i # => 60 - # 1.hour.to_i # => 3600 - # 1.day.to_i # => 86400 - # - # Note that this conversion makes some assumptions about the - # duration of some periods, e.g. months are always 1/12 of year - # and years are 365.2425 days: - # - # # equivalent to (1.year / 12).to_i - # 1.month.to_i # => 2629746 - # - # # equivalent to 365.2425.days.to_i - # 1.year.to_i # => 31556952 - # - # In such cases, Ruby's core - # Date[https://ruby-doc.org/stdlib/libdoc/date/rdoc/Date.html] and - # 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 - def to_i; end - - # Returns the amount of seconds a duration covers as a string. - # For more information check to_i method. - # - # 1.day.to_s # => "86400" - # - # source://activesupport//lib/active_support/duration.rb#347 - 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 - def until(time = T.unsafe(nil)); end - - # Returns the value of attribute value. - # - # source://activesupport//lib/active_support/duration.rb#132 - def value; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/duration.rb#471 - def variable?; end - - private - - # source://activesupport//lib/active_support/duration.rb#506 - def method_missing(method, *args, &block); end - - # @raise [TypeError] - # - # source://activesupport//lib/active_support/duration.rb#510 - def raise_type_error(other); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/duration.rb#502 - def respond_to_missing?(method, _); end - - # source://activesupport//lib/active_support/duration.rb#480 - def sum(sign, time = T.unsafe(nil)); end - - class << self - # source://activesupport//lib/active_support/duration.rb#148 - def ===(other); end - - # Creates a new Duration from a seconds value that is converted - # to the individual parts: - # - # ActiveSupport::Duration.build(31556952).parts # => {:years=>1} - # ActiveSupport::Duration.build(2716146).parts # => {:months=>1, :days=>1} - # - # source://activesupport//lib/active_support/duration.rb#188 - def build(value); end - - # source://activesupport//lib/active_support/duration.rb#166 - def days(value); end - - # source://activesupport//lib/active_support/duration.rb#162 - def hours(value); end - - # source://activesupport//lib/active_support/duration.rb#158 - def minutes(value); end - - # source://activesupport//lib/active_support/duration.rb#174 - def months(value); end - - # Creates a new Duration from string formatted according to ISO 8601 Duration. - # - # See {ISO 8601}[https://en.wikipedia.org/wiki/ISO_8601#Durations] for more information. - # 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 - def parse(iso8601duration); end - - # source://activesupport//lib/active_support/duration.rb#154 - def seconds(value); end - - # source://activesupport//lib/active_support/duration.rb#170 - def weeks(value); end - - # source://activesupport//lib/active_support/duration.rb#178 - def years(value); end - - private - - # source://activesupport//lib/active_support/duration.rb#216 - def calculate_total_seconds(parts); end - end -end - -# Parses a string formatted according to ISO 8601 Duration into the hash. -# -# See {ISO 8601}[https://en.wikipedia.org/wiki/ISO_8601#Durations] for more information. -# -# This parser allows negative parts to be present in pattern. -# -# source://activesupport//lib/active_support/duration/iso8601_parser.rb#12 -class ActiveSupport::Duration::ISO8601Parser - # @return [ISO8601Parser] a new instance of ISO8601Parser - # - # source://activesupport//lib/active_support/duration/iso8601_parser.rb#34 - def initialize(string); end - - # Returns the value of attribute mode. - # - # source://activesupport//lib/active_support/duration/iso8601_parser.rb#32 - def mode; end - - # Sets the attribute mode - # - # @param value the value to set the attribute mode to. - # - # source://activesupport//lib/active_support/duration/iso8601_parser.rb#32 - def mode=(_arg0); end - - # source://activesupport//lib/active_support/duration/iso8601_parser.rb#41 - def parse!; end - - # Returns the value of attribute parts. - # - # source://activesupport//lib/active_support/duration/iso8601_parser.rb#31 - def parts; end - - # Returns the value of attribute scanner. - # - # source://activesupport//lib/active_support/duration/iso8601_parser.rb#31 - def scanner; end - - # Returns the value of attribute sign. - # - # source://activesupport//lib/active_support/duration/iso8601_parser.rb#32 - def sign; end - - # Sets the attribute sign - # - # @param value the value to set the attribute sign to. - # - # source://activesupport//lib/active_support/duration/iso8601_parser.rb#32 - def sign=(_arg0); end - - private - - # @return [Boolean] - # - # source://activesupport//lib/active_support/duration/iso8601_parser.rb#83 - def finished?; end - - # Parses number which can be a float with either comma or period. - # - # source://activesupport//lib/active_support/duration/iso8601_parser.rb#88 - def number; end - - # @raise [ParsingError] - # - # source://activesupport//lib/active_support/duration/iso8601_parser.rb#96 - def raise_parsing_error(reason = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/duration/iso8601_parser.rb#92 - def scan(pattern); end - - # Checks for various semantic errors as stated in ISO 8601 standard. - # - # source://activesupport//lib/active_support/duration/iso8601_parser.rb#101 - def validate!; end -end - -# source://activesupport//lib/active_support/duration/iso8601_parser.rb#17 -ActiveSupport::Duration::ISO8601Parser::COMMA = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/duration/iso8601_parser.rb#22 -ActiveSupport::Duration::ISO8601Parser::DATE_COMPONENT = T.let(T.unsafe(nil), Regexp) - -# source://activesupport//lib/active_support/duration/iso8601_parser.rb#28 -ActiveSupport::Duration::ISO8601Parser::DATE_COMPONENTS = T.let(T.unsafe(nil), Array) - -# source://activesupport//lib/active_support/duration/iso8601_parser.rb#20 -ActiveSupport::Duration::ISO8601Parser::DATE_MARKER = T.let(T.unsafe(nil), Regexp) - -# source://activesupport//lib/active_support/duration/iso8601_parser.rb#25 -ActiveSupport::Duration::ISO8601Parser::DATE_TO_PART = T.let(T.unsafe(nil), Hash) - -# source://activesupport//lib/active_support/duration/iso8601_parser.rb#16 -ActiveSupport::Duration::ISO8601Parser::PERIOD = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/duration/iso8601_parser.rb#15 -ActiveSupport::Duration::ISO8601Parser::PERIOD_OR_COMMA = T.let(T.unsafe(nil), Regexp) - -# source://activesupport//lib/active_support/duration/iso8601_parser.rb#13 -class ActiveSupport::Duration::ISO8601Parser::ParsingError < ::ArgumentError; end - -# source://activesupport//lib/active_support/duration/iso8601_parser.rb#19 -ActiveSupport::Duration::ISO8601Parser::SIGN_MARKER = T.let(T.unsafe(nil), Regexp) - -# source://activesupport//lib/active_support/duration/iso8601_parser.rb#23 -ActiveSupport::Duration::ISO8601Parser::TIME_COMPONENT = T.let(T.unsafe(nil), Regexp) - -# source://activesupport//lib/active_support/duration/iso8601_parser.rb#29 -ActiveSupport::Duration::ISO8601Parser::TIME_COMPONENTS = T.let(T.unsafe(nil), Array) - -# source://activesupport//lib/active_support/duration/iso8601_parser.rb#21 -ActiveSupport::Duration::ISO8601Parser::TIME_MARKER = T.let(T.unsafe(nil), Regexp) - -# source://activesupport//lib/active_support/duration/iso8601_parser.rb#26 -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 -class ActiveSupport::Duration::ISO8601Serializer - # @return [ISO8601Serializer] a new instance of ISO8601Serializer - # - # source://activesupport//lib/active_support/duration/iso8601_serializer.rb#11 - def initialize(duration, precision: T.unsafe(nil)); end - - # Builds and returns output string. - # - # source://activesupport//lib/active_support/duration/iso8601_serializer.rb#17 - def serialize; end - - private - - # source://activesupport//lib/active_support/duration/iso8601_serializer.rb#58 - def format_seconds(seconds); end - - # Return pair of duration's parts and whole duration sign. - # Parts are summarized (as they can become repetitive due to addition, etc). - # 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 - def normalize; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/duration/iso8601_serializer.rb#54 - def week_mixed_with_date?(parts); end -end - -# source://activesupport//lib/active_support/duration/iso8601_serializer.rb#9 -ActiveSupport::Duration::ISO8601Serializer::DATE_COMPONENTS = T.let(T.unsafe(nil), Array) - -# source://activesupport//lib/active_support/duration.rb#129 -ActiveSupport::Duration::PARTS = T.let(T.unsafe(nil), Array) - -# source://activesupport//lib/active_support/duration.rb#119 -ActiveSupport::Duration::PARTS_IN_SECONDS = T.let(T.unsafe(nil), Hash) - -# source://activesupport//lib/active_support/duration.rb#114 -ActiveSupport::Duration::SECONDS_PER_DAY = T.let(T.unsafe(nil), Integer) - -# source://activesupport//lib/active_support/duration.rb#113 -ActiveSupport::Duration::SECONDS_PER_HOUR = T.let(T.unsafe(nil), Integer) - -# source://activesupport//lib/active_support/duration.rb#112 -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 -ActiveSupport::Duration::SECONDS_PER_MONTH = T.let(T.unsafe(nil), Integer) - -# source://activesupport//lib/active_support/duration.rb#115 -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 -ActiveSupport::Duration::SECONDS_PER_YEAR = T.let(T.unsafe(nil), Integer) - -# source://activesupport//lib/active_support/duration.rb#14 -class ActiveSupport::Duration::Scalar < ::Numeric - # @return [Scalar] a new instance of Scalar - # - # source://activesupport//lib/active_support/duration.rb#18 - def initialize(value); end - - # source://activesupport//lib/active_support/duration.rb#84 - def %(other); end - - # source://activesupport//lib/active_support/duration.rb#65 - def *(other); end - - # source://activesupport//lib/active_support/duration.rb#40 - def +(other); end - - # source://activesupport//lib/active_support/duration.rb#52 - def -(other); end - - # source://activesupport//lib/active_support/duration.rb#26 - def -@; end - - # source://activesupport//lib/active_support/duration.rb#76 - def /(other); end - - # source://activesupport//lib/active_support/duration.rb#30 - def <=>(other); end - - # source://activesupport//lib/active_support/duration.rb#22 - def coerce(other); end - - # source://activesupport//lib/active_support/duration.rb#16 - def to_f(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/duration.rb#16 - def to_i(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/duration.rb#16 - def to_s(*_arg0, **_arg1, &_arg2); end - - # Returns the value of attribute value. - # - # source://activesupport//lib/active_support/duration.rb#15 - def value; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/duration.rb#92 - def variable?; end - - private - - # source://activesupport//lib/active_support/duration.rb#97 - def calculate(op, other); end - - # @raise [TypeError] - # - # source://activesupport//lib/active_support/duration.rb#107 - def raise_type_error(other); end -end - -# source://activesupport//lib/active_support/duration.rb#130 -ActiveSupport::Duration::VARIABLE_PARTS = T.let(T.unsafe(nil), Array) - -# source://activesupport//lib/active_support/core_ext/range/each.rb#6 -module ActiveSupport::EachTimeWithZone - # source://activesupport//lib/active_support/core_ext/range/each.rb#7 - def each(&block); end - - # source://activesupport//lib/active_support/core_ext/range/each.rb#12 - def step(n = T.unsafe(nil), &block); end - - private - - # @raise [TypeError] - # - # source://activesupport//lib/active_support/core_ext/range/each.rb#18 - def ensure_iteration_allowed; end -end - -# source://activesupport//lib/active_support/encrypted_configuration.rb#10 -class ActiveSupport::EncryptedConfiguration < ::ActiveSupport::EncryptedFile - # @return [EncryptedConfiguration] a new instance of EncryptedConfiguration - # - # source://activesupport//lib/active_support/encrypted_configuration.rb#14 - def initialize(config_path:, key_path:, env_key:, raise_if_missing_key:); end - - # source://activesupport//lib/active_support/encrypted_configuration.rb#11 - def [](*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/encrypted_configuration.rb#32 - def config; end - - # source://activesupport//lib/active_support/encrypted_configuration.rb#11 - def fetch(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/core_ext/module/delegation.rb#302 - def method_missing(method, *args, **_arg2, &block); end - - # Allow a config to be started without a file present - # - # source://activesupport//lib/active_support/encrypted_configuration.rb#20 - def read; end - - # source://activesupport//lib/active_support/encrypted_configuration.rb#26 - def write(contents); end - - private - - # source://activesupport//lib/active_support/encrypted_configuration.rb#37 - def deep_transform(hash); end - - # source://activesupport//lib/active_support/encrypted_configuration.rb#51 - def deserialize(config); end - - # source://activesupport//lib/active_support/encrypted_configuration.rb#47 - def options; end - - # source://activesupport//lib/active_support/core_ext/module/delegation.rb#294 - def respond_to_missing?(name, include_private = T.unsafe(nil)); end -end - -# source://activesupport//lib/active_support/encrypted_file.rb#8 -class ActiveSupport::EncryptedFile - # @return [EncryptedFile] a new instance of 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 - def change(&block); end - - # Returns the value of attribute content_path. - # - # source://activesupport//lib/active_support/encrypted_file.rb#40 - def content_path; end - - # Returns the value of attribute env_key. - # - # source://activesupport//lib/active_support/encrypted_file.rb#40 - def env_key; end - - # Returns the encryption key, first trying the environment variable - # specified by +env_key+, then trying the key file specified by +key_path+. - # If +raise_if_missing_key+ is true, raises MissingKeyError if the - # environment variable is not set and the key file does not exist. - # - # source://activesupport//lib/active_support/encrypted_file.rb#52 - def key; end - - # Returns the value of attribute key_path. - # - # source://activesupport//lib/active_support/encrypted_file.rb#40 - def key_path; end - - # Returns the value of attribute raise_if_missing_key. - # - # source://activesupport//lib/active_support/encrypted_file.rb#40 - def raise_if_missing_key; end - - # Reads the file and returns the decrypted content. - # - # Raises: - # - MissingKeyError if the key is missing and +raise_if_missing_key+ is true. - # - MissingContentError if the encrypted file does not exist or otherwise - # if the key is missing. - # - ActiveSupport::MessageEncryptor::InvalidMessage if the content cannot be - # decrypted or verified. - # - # source://activesupport//lib/active_support/encrypted_file.rb#64 - def read; end - - # source://activesupport//lib/active_support/encrypted_file.rb#72 - def write(contents); end - - private - - # @raise [InvalidKeyLengthError] - # - # source://activesupport//lib/active_support/encrypted_file.rb#125 - def check_key_length; end - - # source://activesupport//lib/active_support/encrypted_file.rb#103 - def decrypt(contents); end - - # source://activesupport//lib/active_support/encrypted_file.rb#98 - def encrypt(contents); end - - # source://activesupport//lib/active_support/encrypted_file.rb#107 - def encryptor; end - - # @raise [MissingKeyError] - # - # source://activesupport//lib/active_support/encrypted_file.rb#121 - def handle_missing_key; end - - # source://activesupport//lib/active_support/encrypted_file.rb#112 - def read_env_key; end - - # source://activesupport//lib/active_support/encrypted_file.rb#116 - def read_key_file; end - - # source://activesupport//lib/active_support/encrypted_file.rb#83 - def writing(contents); end - - class << self - # source://activesupport//lib/active_support/encrypted_file.rb#35 - def expected_key_length; end - - # source://activesupport//lib/active_support/encrypted_file.rb#31 - def generate_key; end - end -end - -# source://activesupport//lib/active_support/encrypted_file.rb#29 -ActiveSupport::EncryptedFile::CIPHER = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/encrypted_file.rb#23 -class ActiveSupport::EncryptedFile::InvalidKeyLengthError < ::RuntimeError - # @return [InvalidKeyLengthError] a new instance of InvalidKeyLengthError - # - # source://activesupport//lib/active_support/encrypted_file.rb#24 - def initialize; end -end - -# source://activesupport//lib/active_support/encrypted_file.rb#9 -class ActiveSupport::EncryptedFile::MissingContentError < ::RuntimeError - # @return [MissingContentError] a new instance of MissingContentError - # - # source://activesupport//lib/active_support/encrypted_file.rb#10 - def initialize(content_path); end -end - -# source://activesupport//lib/active_support/encrypted_file.rb#15 -class ActiveSupport::EncryptedFile::MissingKeyError < ::RuntimeError - # @return [MissingKeyError] a new instance of MissingKeyError - # - # source://activesupport//lib/active_support/encrypted_file.rb#16 - def initialize(key_path:, env_key:); end -end - -# source://activesupport//lib/active_support/core_ext/enumerable.rb#4 -module ActiveSupport::EnumerableCoreExt; end - -# source://activesupport//lib/active_support/core_ext/enumerable.rb#5 -module ActiveSupport::EnumerableCoreExt::Constants - private - - # source://activesupport//lib/active_support/core_ext/enumerable.rb#7 - def const_missing(name); end -end - -# HACK: For performance reasons, Enumerable shouldn't have any constants of its own. -# So we move SoleItemExpectedError into ActiveSupport::EnumerableCoreExt. -# -# source://activesupport//lib/active_support/core_ext/enumerable.rb#25 -ActiveSupport::EnumerableCoreExt::SoleItemExpectedError = Enumerable::SoleItemExpectedError - -# source://activesupport//lib/active_support/environment_inquirer.rb#6 -class ActiveSupport::EnvironmentInquirer < ::ActiveSupport::StringInquirer - # @return [EnvironmentInquirer] a new instance of EnvironmentInquirer - # - # source://activesupport//lib/active_support/environment_inquirer.rb#8 - def initialize(env); end - - def development?; end - def production?; end - def test?; end -end - -# source://activesupport//lib/active_support/environment_inquirer.rb#7 -ActiveSupport::EnvironmentInquirer::DEFAULT_ENVIRONMENTS = T.let(T.unsafe(nil), Array) - -# +ActiveSupport::ErrorReporter+ is a common interface for error reporting services. -# -# To rescue and report any unhandled error, you can use the +handle+ method: -# -# Rails.error.handle do -# do_something! -# end -# -# 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+ -# -# Rails.error.record do -# do_something! -# end -# -# Both methods can be restricted to only handle a specific exception 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::User.anonymous }) do -# User::User.find_by(params) -# end -# -# source://activesupport//lib/active_support/error_reporter.rb#41 -class ActiveSupport::ErrorReporter - # @return [ErrorReporter] a new instance of ErrorReporter - # - # source://activesupport//lib/active_support/error_reporter.rb#46 - def initialize(*subscribers, logger: T.unsafe(nil)); end - - # Report any unhandled exception, and swallow it. - # - # 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 - - # Returns the value of attribute logger. - # - # source://activesupport//lib/active_support/error_reporter.rb#44 - 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 - 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 - - # When the block based +handle+ and +record+ methods are not suitable, you can directly use +report+ - # - # Rails.error.report(error, handled: true) - # - # source://activesupport//lib/active_support/error_reporter.rb#95 - def report(error, handled:, severity: T.unsafe(nil), context: T.unsafe(nil)); end - - # Update the execution context that is accessible to error subscribers - # - # Rails.error.set_context(section: "checkout", user_id: @user.id) - # - # See +ActiveSupport::ExecutionContext.set+ - # - # source://activesupport//lib/active_support/error_reporter.rb#88 - def set_context(*_arg0, **_arg1, &_arg2); end - - # Register a new error subscriber. The subscriber must respond to - # - # report(Exception, handled: Boolean, context: Hash) - # - # The +report+ method +should+ never raise an error. - # - # source://activesupport//lib/active_support/error_reporter.rb#76 - def subscribe(subscriber); end -end - -# source://activesupport//lib/active_support/error_reporter.rb#42 -ActiveSupport::ErrorReporter::SEVERITIES = T.let(T.unsafe(nil), Array) - -# Allows you to "listen" to changes in a file system. -# The evented file updater does not hit disk when checking for updates. -# Instead, it uses platform-specific file system events to trigger a change -# in state. -# -# The file checker takes an array of files to watch or a hash specifying directories -# and file extensions to watch. It also takes a block that is called when -# EventedFileUpdateChecker#execute is run or when EventedFileUpdateChecker#execute_if_updated -# is run and there have been changes to the file system. -# -# Example: -# -# checker = ActiveSupport::EventedFileUpdateChecker.new(["/tmp/foo"]) { puts "changed" } -# checker.updated? -# # => false -# checker.execute_if_updated -# # => nil -# -# FileUtils.touch("/tmp/foo") -# -# checker.updated? -# # => true -# checker.execute_if_updated -# # => "changed" -# -# source://activesupport//lib/active_support/evented_file_update_checker.rb#35 -class ActiveSupport::EventedFileUpdateChecker - # @return [EventedFileUpdateChecker] a new instance of EventedFileUpdateChecker - # - # source://activesupport//lib/active_support/evented_file_update_checker.rb#36 - def initialize(files, dirs = T.unsafe(nil), &block); end - - # source://activesupport//lib/active_support/evented_file_update_checker.rb#55 - def execute; end - - # source://activesupport//lib/active_support/evented_file_update_checker.rb#60 - def execute_if_updated; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/evented_file_update_checker.rb#46 - def updated?; end -end - -# source://activesupport//lib/active_support/evented_file_update_checker.rb#68 -class ActiveSupport::EventedFileUpdateChecker::Core - # @return [Core] a new instance of Core - # - # source://activesupport//lib/active_support/evented_file_update_checker.rb#71 - def initialize(files, dirs); end - - # source://activesupport//lib/active_support/evented_file_update_checker.rb#129 - def changed(modified, added, removed); end - - # source://activesupport//lib/active_support/evented_file_update_checker.rb#163 - def common_path(paths); end - - # source://activesupport//lib/active_support/evented_file_update_checker.rb#157 - def directories_to_watch; end - - # source://activesupport//lib/active_support/evented_file_update_checker.rb#90 - def finalizer; end - - # source://activesupport//lib/active_support/evented_file_update_checker.rb#123 - def normalize_dirs!; end - - # source://activesupport//lib/active_support/evented_file_update_checker.rb#114 - def restart; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/evented_file_update_checker.rb#119 - def restart?; end - - # source://activesupport//lib/active_support/evented_file_update_checker.rb#103 - def start; end - - # source://activesupport//lib/active_support/evented_file_update_checker.rb#110 - def stop; end - - # source://activesupport//lib/active_support/evented_file_update_checker.rb#97 - def thread_safely; end - - # Returns the value of attribute updated. - # - # source://activesupport//lib/active_support/evented_file_update_checker.rb#69 - def updated; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/evented_file_update_checker.rb#135 - def watching?(file); end -end - -# source://activesupport//lib/active_support/execution_context.rb#4 -module ActiveSupport::ExecutionContext - class << self - # source://activesupport//lib/active_support/execution_context.rb#34 - def []=(key, value); end - - # source://activesupport//lib/active_support/execution_context.rb#7 - def after_change(&block); end - - # source://activesupport//lib/active_support/execution_context.rb#43 - def clear; end - - # Updates the execution context. If a block is given, it resets the provided keys to their - # previous value once the block exits. - # - # source://activesupport//lib/active_support/execution_context.rb#13 - def set(**options); end - - # source://activesupport//lib/active_support/execution_context.rb#39 - def to_h; end - - private - - # source://activesupport//lib/active_support/execution_context.rb#48 - def store; end - end -end - -# source://activesupport//lib/active_support/execution_wrapper.rb#8 -class ActiveSupport::ExecutionWrapper - include ::ActiveSupport::Callbacks - extend ::ActiveSupport::Callbacks::ClassMethods - extend ::ActiveSupport::DescendantsTracker - - # source://activesupport//lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport//lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://activesupport//lib/active_support/callbacks.rb#940 - def _complete_callbacks; end - - # source://activesupport//lib/active_support/callbacks.rb#940 - def _run_callbacks; end - - # source://activesupport//lib/active_support/callbacks.rb#928 - def _run_complete_callbacks(&block); end - - # source://activesupport//lib/active_support/callbacks.rb#928 - def _run_run_callbacks(&block); end - - # source://activesupport//lib/active_support/execution_wrapper.rb#142 - def complete; end - - # Complete this in-flight execution. This method *must* be called - # exactly once on the result of any call to +run!+. - # - # Where possible, prefer +wrap+. - # - # source://activesupport//lib/active_support/execution_wrapper.rb#136 - def complete!; end - - # source://activesupport//lib/active_support/execution_wrapper.rb#128 - def run; end - - # source://activesupport//lib/active_support/execution_wrapper.rb#123 - def run!; end - - private - - # source://activesupport//lib/active_support/execution_wrapper.rb#147 - def hook_state; end - - class << self - # source://activesupport//lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport//lib/active_support/callbacks.rb#68 - def __callbacks=(value); end - - # source://activesupport//lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://activesupport//lib/active_support/callbacks.rb#932 - def _complete_callbacks; end - - # source://activesupport//lib/active_support/callbacks.rb#936 - def _complete_callbacks=(value); end - - # source://activesupport//lib/active_support/callbacks.rb#932 - def _run_callbacks; end - - # source://activesupport//lib/active_support/callbacks.rb#936 - def _run_callbacks=(value); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/execution_wrapper.rb#119 - def active?; end - - # source://activesupport//lib/active_support/execution_wrapper.rb#115 - def active_key; end - - # source://activesupport//lib/active_support/execution_wrapper.rb#111 - def error_reporter; end - - # source://activesupport//lib/active_support/execution_wrapper.rb#101 - def perform; end - - # Register an object to be invoked during both the +run+ and - # +complete+ steps. - # - # +hook.complete+ will be passed the value returned from +hook.run+, - # and will only be invoked if +run+ has previously been called. - # (Mostly, this means it won't be invoked if an exception occurs in - # a preceding +to_run+ block; all ordinary +to_complete+ blocks are - # invoked in that situation.) - # - # source://activesupport//lib/active_support/execution_wrapper.rb#51 - def register_hook(hook, outer: T.unsafe(nil)); end - - # Run this execution. - # - # Returns an instance, whose +complete!+ method *must* be invoked - # after the work has been performed. - # - # Where possible, prefer +wrap+. - # - # source://activesupport//lib/active_support/execution_wrapper.rb#67 - def run!(reset: T.unsafe(nil)); end - - # source://activesupport//lib/active_support/execution_wrapper.rb#22 - def to_complete(*args, &block); end - - # source://activesupport//lib/active_support/execution_wrapper.rb#18 - def to_run(*args, &block); end - - # Perform the work in the supplied block as an execution. - # - # source://activesupport//lib/active_support/execution_wrapper.rb#87 - def wrap; end - end -end - -# source://activesupport//lib/active_support/execution_wrapper.rb#33 -class ActiveSupport::ExecutionWrapper::CompleteHook < ::Struct - # source://activesupport//lib/active_support/execution_wrapper.rb#34 - def after(target); end - - # source://activesupport//lib/active_support/execution_wrapper.rb#34 - def before(target); end - - # Returns the value of attribute hook - # - # @return [Object] the current value of hook - def hook; end - - # Sets the attribute hook - # - # @param value [Object] the value to set the attribute hook to. - # @return [Object] the newly set value - def hook=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://activesupport//lib/active_support/execution_wrapper.rb#11 -ActiveSupport::ExecutionWrapper::Null = T.let(T.unsafe(nil), Object) - -# source://activesupport//lib/active_support/execution_wrapper.rb#26 -class ActiveSupport::ExecutionWrapper::RunHook < ::Struct - # source://activesupport//lib/active_support/execution_wrapper.rb#27 - def before(target); end - - # Returns the value of attribute hook - # - # @return [Object] the current value of hook - def hook; end - - # Sets the attribute hook - # - # @param value [Object] the value to set the attribute hook to. - # @return [Object] the newly set value - def hook=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -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 -# and control reloading. The API depends on four methods: -# -# * +initialize+ which expects two parameters and one block as -# described below. -# -# * +updated?+ which returns a boolean if there were updates in -# the filesystem or not. -# -# * +execute+ which executes the given block on initialization -# and updates the latest watched files and timestamp. -# -# * +execute_if_updated+ which just executes the block if it was updated. -# -# 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 -# they are changed upon a new request. -# -# i18n_reloader = ActiveSupport::FileUpdateChecker.new(paths) do -# I18n.reload! -# end -# -# ActiveSupport::Reloader.to_prepare do -# i18n_reloader.execute_if_updated -# end -# -# source://activesupport//lib/active_support/file_update_checker.rb#33 -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 - # have directories as keys and the value is an array of extensions to be - # watched under that directory. - # - # This method must also receive a block that will be called once a path - # changes. The array of files and list of directories cannot be changed - # after FileUpdateChecker has been initialized. - # - # @return [FileUpdateChecker] a new instance of FileUpdateChecker - # - # source://activesupport//lib/active_support/file_update_checker.rb#42 - 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 - def execute; end - - # Execute the block given if updated. - # - # source://activesupport//lib/active_support/file_update_checker.rb#90 - def execute_if_updated; end - - # Check if any of the entries were updated. If so, the watched and/or - # updated_at values are cached until the block is executed via +execute+ - # or +execute_if_updated+. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/file_update_checker.rb#61 - def updated?; end - - private - - # source://activesupport//lib/active_support/file_update_checker.rb#156 - def compile_ext(array); end - - # source://activesupport//lib/active_support/file_update_checker.rb#142 - def compile_glob(hash); end - - # source://activesupport//lib/active_support/file_update_checker.rb#152 - def escape(key); end - - # This method returns the maximum mtime of the files in +paths+, or +nil+ - # if the array is empty. - # - # Files with a mtime in the future are ignored. Such abnormal situation - # can happen for example if the user changes the clock by hand. It is - # 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 - def max_mtime(paths); end - - # source://activesupport//lib/active_support/file_update_checker.rb#109 - def updated_at(paths); end - - # source://activesupport//lib/active_support/file_update_checker.rb#101 - 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 - def after_fork(&block); end - - # source://activesupport//lib/active_support/fork_tracker.rb#40 - def check!; end - - # source://activesupport//lib/active_support/fork_tracker.rb#48 - def hook!; end - - # source://activesupport//lib/active_support/fork_tracker.rb#64 - def unregister(callback); end - end -end - -# source://activesupport//lib/active_support/fork_tracker.rb#15 -module ActiveSupport::ForkTracker::CoreExt - # source://activesupport//lib/active_support/fork_tracker.rb#16 - def fork(*_arg0, **_arg1, &_arg2); end -end - -# source://activesupport//lib/active_support/fork_tracker.rb#31 -module ActiveSupport::ForkTracker::CoreExtPrivate - include ::ActiveSupport::ForkTracker::CoreExt -end - -# source://activesupport//lib/active_support/fork_tracker.rb#5 -module ActiveSupport::ForkTracker::ModernCoreExt - # source://activesupport//lib/active_support/fork_tracker.rb#6 - def _fork; end -end - -# A convenient wrapper for the zlib standard library that allows -# compression/decompression of strings with gzip. -# -# gzip = ActiveSupport::Gzip.compress('compress me!') -# # => "\x1F\x8B\b\x00o\x8D\xCDO\x00\x03K\xCE\xCF-(J-.V\xC8MU\x04\x00R>n\x83\f\x00\x00\x00" -# -# ActiveSupport::Gzip.decompress(gzip) -# # => "compress me!" -# -# source://activesupport//lib/active_support/gzip.rb#15 -module ActiveSupport::Gzip - class << self - # Compresses a string using gzip. - # - # source://activesupport//lib/active_support/gzip.rb#30 - def compress(source, level = T.unsafe(nil), strategy = T.unsafe(nil)); end - - # Decompresses a gzipped string. - # - # source://activesupport//lib/active_support/gzip.rb#25 - def decompress(source); end - end -end - -# source://activesupport//lib/active_support/gzip.rb#16 -class ActiveSupport::Gzip::Stream < ::StringIO - # @return [Stream] a new instance of Stream - # - # source://activesupport//lib/active_support/gzip.rb#17 - def initialize(*_arg0); end - - # source://activesupport//lib/active_support/gzip.rb#21 - def close; end -end - -# Implements a hash where keys :foo and "foo" are considered -# to be the same. -# -# rgb = ActiveSupport::HashWithIndifferentAccess.new -# -# rgb[:black] = '#000000' -# rgb[:black] # => '#000000' -# rgb['black'] # => '#000000' -# -# rgb['white'] = '#FFFFFF' -# rgb[:white] # => '#FFFFFF' -# rgb['white'] # => '#FFFFFF' -# -# Internally symbols are mapped to strings when used as keys in the entire -# writing interface (calling []=, merge, etc). This -# mapping belongs to the public interface. For example, given: -# -# hash = ActiveSupport::HashWithIndifferentAccess.new(a: 1) -# -# You are guaranteed that the key is returned as a string: -# -# hash.keys # => ["a"] -# -# Technically other types of keys are accepted: -# -# hash = ActiveSupport::HashWithIndifferentAccess.new(a: 1) -# hash[0] = 0 -# hash # => {"a"=>1, 0=>0} -# -# 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. -# -# Note that core extensions define Hash#with_indifferent_access: -# -# rgb = { black: '#000000', white: '#FFFFFF' }.with_indifferent_access -# -# which may be handy. -# -# 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#55 -class ActiveSupport::HashWithIndifferentAccess < ::Hash - # @return [HashWithIndifferentAccess] a new instance of HashWithIndifferentAccess - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#68 - def initialize(constructor = T.unsafe(nil)); end - - # Same as Hash#[] where the key passed as argument can be - # either a string or a symbol: - # - # counters = ActiveSupport::HashWithIndifferentAccess.new - # counters[:foo] = 1 - # - # counters['foo'] # => 1 - # counters[:foo] # => 1 - # counters[:zoo] # => nil - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#166 - def [](key); end - - # Assigns a new value to the hash: - # - # hash = ActiveSupport::HashWithIndifferentAccess.new - # hash[:key] = 'value' - # - # This value can be later fetched using either +:key+ or 'key'. - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#96 - def []=(key, value); end - - # Same as Hash#assoc where the key passed as argument can be - # either a string or a symbol: - # - # counters = ActiveSupport::HashWithIndifferentAccess.new - # counters[:foo] = 1 - # - # counters.assoc('foo') # => ["foo", 1] - # counters.assoc(:foo) # => ["foo", 1] - # counters.assoc(:zoo) # => nil - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#179 - def assoc(key); end - - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#357 - def compact; end - - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#311 - def deep_stringify_keys; end - - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#309 - def deep_stringify_keys!; end - - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#316 - def deep_symbolize_keys; end - - # Same as Hash#default where the key passed as argument can be - # either a string or a symbol: - # - # hash = ActiveSupport::HashWithIndifferentAccess.new(1) - # hash.default # => 1 - # - # hash = ActiveSupport::HashWithIndifferentAccess.new { |hash, key| key } - # hash.default # => nil - # hash.default('foo') # => 'foo' - # hash.default(:foo) # => 'foo' - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#221 - def default(*args); end - - # Removes the specified key from the hash. - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#295 - def delete(key); end - - # Same as Hash#dig where the key passed as argument can be - # either a string or a symbol: - # - # counters = ActiveSupport::HashWithIndifferentAccess.new - # counters[:foo] = { bar: 1 } - # - # counters.dig('foo', 'bar') # => 1 - # counters.dig(:foo, :bar) # => 1 - # counters.dig(:zoo) # => nil - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#206 - def dig(*args); end - - # Returns a shallow copy of the hash. - # - # hash = ActiveSupport::HashWithIndifferentAccess.new({ a: { b: 'b' } }) - # dup = hash.dup - # dup[:a][:c] = 'c' - # - # hash[:a][:c] # => "c" - # dup[:a][:c] # => "c" - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#256 - def dup; end - - # Returns a hash with indifferent access that includes everything except given keys. - # hash = { a: "x", b: "y", c: 10 }.with_indifferent_access - # 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 - def except(*keys); end - - # Returns +true+ so that Array#extract_options! finds members of - # this class. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#56 - def extractable_options?; end - - # Same as Hash#fetch where the key passed as argument can be - # either a string or a symbol: - # - # counters = ActiveSupport::HashWithIndifferentAccess.new - # counters[:foo] = 1 - # - # counters.fetch('foo') # => 1 - # counters.fetch(:bar, 0) # => 0 - # 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 - def fetch(key, *extras); end - - # Returns an array of the values at the specified indices, but also - # raises an exception when one of the keys can't be found. - # - # hash = ActiveSupport::HashWithIndifferentAccess.new - # hash[:a] = 'x' - # hash[:b] = 'y' - # hash.fetch_values('a', 'b') # => ["x", "y"] - # 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 - def fetch_values(*indices, &block); end - - # Checks the hash for a key matching the argument passed in: - # - # hash = ActiveSupport::HashWithIndifferentAccess.new - # hash['key'] = 'value' - # hash.key?(:key) # => true - # hash.key?('key') # => true - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#149 - def has_key?(key); end - - # Checks the hash for a key matching the argument passed in: - # - # hash = ActiveSupport::HashWithIndifferentAccess.new - # hash['key'] = 'value' - # hash.key?(:key) # => true - # hash.key?('key') # => true - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#149 - def include?(key); end - - # Checks the hash for a key matching the argument passed in: - # - # hash = ActiveSupport::HashWithIndifferentAccess.new - # hash['key'] = 'value' - # hash.key?(:key) # => true - # hash.key?('key') # => true - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#149 - def key?(key); end - - # Checks the hash for a key matching the argument passed in: - # - # hash = ActiveSupport::HashWithIndifferentAccess.new - # hash['key'] = 'value' - # hash.key?(:key) # => true - # hash.key?('key') # => true - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#149 - 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 - def merge(*hashes, &block); end - - # Updates the receiver in-place, merging in the hashes passed as arguments: - # - # hash_1 = ActiveSupport::HashWithIndifferentAccess.new - # hash_1[:key] = 'value' - # - # hash_2 = ActiveSupport::HashWithIndifferentAccess.new - # hash_2[:key] = 'New Value!' - # - # hash_1.update(hash_2) # => {"key"=>"New Value!"} - # - # hash = ActiveSupport::HashWithIndifferentAccess.new - # hash.update({ "a" => 1 }, { "b" => 2 }) # => { "a" => 1, "b" => 2 } - # - # The arguments can be either an - # 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 - # of the values end up in the receiver, but which one is unspecified. - # - # When given a block, the value for duplicated keys will be determined - # by the result of invoking the block with the duplicated key, the value - # in the receiver, and the value in +other_hash+. The rules for duplicated - # keys follow the semantics of indifferent access: - # - # hash_1[:key] = 10 - # 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 - def merge!(*other_hashes, &block); end - - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#64 - 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 - def reject(*args, &block); end - - # Replaces the contents of this hash with other_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 - def replace(other_hash); end - - # Like +merge+ but the other way around: Merges the receiver into the - # argument and returns a new hash with indifferent access as result: - # - # hash = ActiveSupport::HashWithIndifferentAccess.new - # 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 - 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 - def reverse_merge!(other_hash); end - - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#319 - def select(*args, &block); end - - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#347 - def slice(*keys); end - - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#352 - def slice!(*keys); end - - # Assigns a new value to the hash: - # - # hash = ActiveSupport::HashWithIndifferentAccess.new - # hash[:key] = 'value' - # - # This value can be later fetched using either +:key+ or 'key'. - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#96 - def store(key, value); end - - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#310 - def stringify_keys; end - - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#308 - def stringify_keys!; end - - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#314 - def symbolize_keys; end - - # Convert to a regular hash with string keys. - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#362 - def to_hash; end - - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#314 - def to_options; end - - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#317 - 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#339 - def transform_keys!; end - - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#329 - def transform_values(*args, &block); end - - # Updates the receiver in-place, merging in the hashes passed as arguments: - # - # hash_1 = ActiveSupport::HashWithIndifferentAccess.new - # hash_1[:key] = 'value' - # - # hash_2 = ActiveSupport::HashWithIndifferentAccess.new - # hash_2[:key] = 'New Value!' - # - # hash_1.update(hash_2) # => {"key"=>"New Value!"} - # - # hash = ActiveSupport::HashWithIndifferentAccess.new - # hash.update({ "a" => 1 }, { "b" => 2 }) # => { "a" => 1, "b" => 2 } - # - # The arguments can be either an - # 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 - # of the values end up in the receiver, but which one is unspecified. - # - # When given a block, the value for duplicated keys will be determined - # by the result of invoking the block with the duplicated key, the value - # in the receiver, and the value in +other_hash+. The rules for duplicated - # keys follow the semantics of indifferent access: - # - # hash_1[:key] = 10 - # 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 - def update(*other_hashes, &block); end - - # Returns an array of the values at the specified indices: - # - # hash = ActiveSupport::HashWithIndifferentAccess.new - # hash[:a] = 'x' - # hash[:b] = 'y' - # hash.values_at('a', 'b') # => ["x", "y"] - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#231 - def values_at(*keys); end - - # Like +merge+ but the other way around: Merges the receiver into the - # argument and returns a new hash with indifferent access as result: - # - # hash = ActiveSupport::HashWithIndifferentAccess.new - # 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 - 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 - def with_defaults!(other_hash); end - - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#60 - def with_indifferent_access; end - - # Returns a hash with indifferent access that includes everything except given keys. - # hash = { a: "x", b: "y", c: 10 }.with_indifferent_access - # 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 - def without(*keys); end - - private - - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#374 - def convert_key(key); end - - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#383 - def convert_value(value, conversion: T.unsafe(nil)); end - - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#400 - def set_defaults(target); end - - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#408 - def update_with_single_argument(other_hash, block); end - - class << self - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#83 - def [](*args); end - end -end - -# source://activesupport//lib/active_support/html_safe_translation.rb#4 -module ActiveSupport::HtmlSafeTranslation - extend ::ActiveSupport::HtmlSafeTranslation - - # source://activesupport//lib/active_support/html_safe_translation.rb#7 - def translate(key, **options); end - - private - - # source://activesupport//lib/active_support/html_safe_translation.rb#22 - def html_escape_translation_options(options); end - - # source://activesupport//lib/active_support/html_safe_translation.rb#35 - def html_safe_translation(translation); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/html_safe_translation.rb#18 - def html_safe_translation_key?(key); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/html_safe_translation.rb#30 - def i18n_option?(name); end -end - -# 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 -# 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 -# than English, please correct or add them yourself (explained below). -# -# source://activesupport//lib/active_support/inflector/inflections.rb#7 -module ActiveSupport::Inflector - extend ::ActiveSupport::Inflector - - # Converts strings to UpperCamelCase. - # If the +uppercase_first_letter+ parameter is set to false, then produces - # lowerCamelCase. - # - # Also converts '/' to '::' which is useful for converting - # paths to namespaces. - # - # camelize('active_model') # => "ActiveModel" - # camelize('active_model', false) # => "activeModel" - # camelize('active_model/errors') # => "ActiveModel::Errors" - # camelize('active_model/errors', false) # => "activeModel::Errors" - # - # As a rule of thumb you can think of +camelize+ as the inverse of - # #underscore, though there are cases where that does not hold: - # - # camelize(underscore('SSLError')) # => "SslError" - # - # source://activesupport//lib/active_support/inflector/methods.rb#69 - def camelize(term, uppercase_first_letter = T.unsafe(nil)); end - - # 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). - # - # classify('ham_and_eggs') # => "HamAndEgg" - # classify('posts') # => "Post" - # - # Singular names are not handled correctly: - # - # classify('calculus') # => "Calculu" - # - # source://activesupport//lib/active_support/inflector/methods.rb#208 - def classify(table_name); end - - # Tries to find a constant with the name specified in the argument string. - # - # constantize('Module') # => Module - # constantize('Foo::Bar') # => Foo::Bar - # - # The name is assumed to be the one of a top-level constant, no matter - # whether it starts with "::" or not. No lexical context is taken into - # account: - # - # C = 'outside' - # module M - # C = 'inside' - # C # => 'inside' - # constantize('C') # => 'outside', same as ::C - # end - # - # NameError is raised when the name is not in CamelCase or the constant is - # unknown. - # - # source://activesupport//lib/active_support/inflector/methods.rb#279 - 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#216 - def dasherize(underscored_word); end - - # Removes the rightmost segment from the constant expression in the string. - # - # deconstantize('Net::HTTP') # => "Net" - # deconstantize('::Net::HTTP') # => "::Net" - # deconstantize('String') # => "" - # deconstantize('::String') # => "" - # deconstantize('') # => "" - # - # See also #demodulize. - # - # source://activesupport//lib/active_support/inflector/methods.rb#246 - def deconstantize(path); end - - # Removes the module part from the expression in the string. - # - # demodulize('ActiveSupport::Inflector::Inflections') # => "Inflections" - # demodulize('Inflections') # => "Inflections" - # demodulize('::Inflections') # => "Inflections" - # demodulize('') # => "" - # - # See also #deconstantize. - # - # source://activesupport//lib/active_support/inflector/methods.rb#228 - def demodulize(path); 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'. - # - # foreign_key('Message') # => "message_id" - # foreign_key('Message', false) # => "messageid" - # foreign_key('Admin::Post') # => "post_id" - # - # source://activesupport//lib/active_support/inflector/methods.rb#257 - 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. - # - # Specifically, performs these transformations: - # - # * Applies human inflection rules to the argument. - # * Deletes leading underscores, if any. - # * Removes an "_id" suffix if present. - # * Replaces underscores with spaces, if any. - # * Downcases all words except acronyms. - # * Capitalizes the first word. - # The capitalization of the first word can be turned off by setting the - # +:capitalize+ option to false (default is true). - # - # The trailing '_id' can be kept and capitalized by setting the - # optional parameter +keep_id_suffix+ to true (default is false). - # - # humanize('employee_salary') # => "Employee salary" - # humanize('author_id') # => "Author" - # humanize('author_id', capitalize: false) # => "author" - # humanize('_id') # => "Id" - # humanize('author_id', keep_id_suffix: true) # => "Author id" - # - # If "SSL" was defined to be an acronym: - # - # humanize('ssl_error') # => "SSL error" - # - # source://activesupport//lib/active_support/inflector/methods.rb#132 - 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 - # additional inflector rules. If passed an optional locale, rules for other - # languages can be specified. If not specified, defaults to :en. - # Only rules for English are provided. - # - # ActiveSupport::Inflector.inflections(:en) do |inflect| - # inflect.uncountable 'rails' - # end - # - # source://activesupport//lib/active_support/inflector/inflections.rb#263 - def inflections(locale = T.unsafe(nil)); end - - # Returns the suffix that should be added to a number to denote the position - # in an ordered sequence such as 1st, 2nd, 3rd, 4th. - # - # ordinal(1) # => "st" - # ordinal(2) # => "nd" - # ordinal(1002) # => "nd" - # ordinal(1003) # => "rd" - # ordinal(-11) # => "th" - # ordinal(-1021) # => "st" - # - # source://activesupport//lib/active_support/inflector/methods.rb#324 - def ordinal(number); end - - # Turns a number into an ordinal string used to denote the position in an - # ordered sequence such as 1st, 2nd, 3rd, 4th. - # - # ordinalize(1) # => "1st" - # ordinalize(2) # => "2nd" - # ordinalize(1002) # => "1002nd" - # ordinalize(1003) # => "1003rd" - # ordinalize(-11) # => "-11th" - # ordinalize(-1021) # => "-1021st" - # - # source://activesupport//lib/active_support/inflector/methods.rb#337 - def ordinalize(number); end - - # Replaces special characters in a string so that it may be used as part of - # a 'pretty' URL. - # - # parameterize("Donald E. Knuth") # => "donald-e-knuth" - # parameterize("^très|Jolie-- ") # => "tres-jolie" - # - # To use a custom separator, override the +separator+ argument. - # - # parameterize("Donald E. Knuth", separator: '_') # => "donald_e_knuth" - # parameterize("^très|Jolie__ ", separator: '_') # => "tres_jolie" - # - # To preserve the case of the characters in a string, use the +preserve_case+ argument. - # - # parameterize("Donald E. Knuth", preserve_case: true) # => "Donald-E-Knuth" - # parameterize("^très|Jolie-- ", preserve_case: true) # => "tres-Jolie" - # - # It preserves dashes and underscores unless they are used as separators: - # - # parameterize("^très|Jolie__ ") # => "tres-jolie__" - # parameterize("^très|Jolie-- ", separator: "_") # => "tres_jolie--" - # parameterize("^très_Jolie-- ", separator: ".") # => "tres_jolie--" - # - # If the optional parameter +locale+ is specified, - # the word will be parameterized as a word of that language. - # 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 - 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. - # - # If passed an optional +locale+ parameter, the word will be - # pluralized using rules defined for that language. By default, - # this parameter is set to :en. - # - # pluralize('post') # => "posts" - # pluralize('octopus') # => "octopi" - # pluralize('sheep') # => "sheep" - # pluralize('words') # => "words" - # pluralize('CamelOctopus') # => "CamelOctopi" - # pluralize('ley', :es) # => "leyes" - # - # source://activesupport//lib/active_support/inflector/methods.rb#32 - def pluralize(word, locale = T.unsafe(nil)); end - - # Tries to find a constant with the name specified in the argument string. - # - # safe_constantize('Module') # => Module - # safe_constantize('Foo::Bar') # => Foo::Bar - # - # The name is assumed to be the one of a top-level constant, no matter - # whether it starts with "::" or not. No lexical context is taken into - # account: - # - # C = 'outside' - # module M - # C = 'inside' - # C # => 'inside' - # safe_constantize('C') # => 'outside', same as ::C - # end - # - # +nil+ is returned when the name is not in CamelCase or the constant (or - # part of it) is unknown. - # - # safe_constantize('blargle') # => nil - # safe_constantize('UnknownModule') # => nil - # safe_constantize('UnknownModule::Foo::Bar') # => nil - # - # source://activesupport//lib/active_support/inflector/methods.rb#305 - def safe_constantize(camel_cased_word); end - - # The reverse of #pluralize, returns the singular form of a word in a - # string. - # - # If passed an optional +locale+ parameter, the word will be - # singularized using rules defined for that language. By default, - # this parameter is set to :en. - # - # singularize('posts') # => "post" - # singularize('octopi') # => "octopus" - # singularize('sheep') # => "sheep" - # singularize('word') # => "word" - # singularize('CamelOctopi') # => "CamelOctopus" - # singularize('leyes', :es) # => "ley" - # - # source://activesupport//lib/active_support/inflector/methods.rb#49 - def singularize(word, locale = T.unsafe(nil)); end - - # 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#194 - 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. - # - # The trailing '_id','Id'.. can be kept and capitalized by setting the - # optional parameter +keep_id_suffix+ to true. - # By default, this parameter is false. - # - # +titleize+ is also aliased as +titlecase+. - # - # titleize('man from the boondocks') # => "Man From The Boondocks" - # titleize('x-men: the last stand') # => "X Men: The Last Stand" - # titleize('TheManWithoutAPast') # => "The Man Without A Past" - # 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#182 - def titleize(word, keep_id_suffix: T.unsafe(nil)); end - - # Replaces non-ASCII characters with an ASCII approximation, or if none - # exists, a replacement character which defaults to "?". - # - # transliterate('Ærøskøbing') - # # => "AEroskobing" - # - # Default approximations are provided for Western/Latin characters, - # e.g, "ø", "ñ", "é", "ß", etc. - # - # This method is I18n aware, so you can set up custom approximations for a - # locale. This can be useful, for example, to transliterate German's "ü" - # and "ö" to "ue" and "oe", or to add support for transliterating Russian - # to ASCII. - # - # In order to make your custom transliterations available, you must set - # them as the i18n.transliterate.rule i18n key: - # - # # Store the transliterations in locales/de.yml - # i18n: - # transliterate: - # rule: - # ü: "ue" - # ö: "oe" - # - # # Or set them using Ruby - # I18n.backend.store_translations(:de, i18n: { - # transliterate: { - # rule: { - # 'ü' => 'ue', - # 'ö' => 'oe' - # } - # } - # }) - # - # The value for i18n.transliterate.rule can be a simple Hash that - # maps characters to ASCII approximations as shown above, or, for more - # complex requirements, a Proc: - # - # I18n.backend.store_translations(:de, i18n: { - # transliterate: { - # rule: ->(string) { MyTransliterator.transliterate(string) } - # } - # }) - # - # Now you can have different transliterations for each locale: - # - # transliterate('Jürgen', locale: :en) - # # => "Jurgen" - # - # transliterate('Jürgen', locale: :de) - # # => "Juergen" - # - # Transliteration is restricted to UTF-8, US-ASCII, and GB18030 strings. - # Other encodings will raise an ArgumentError. - # - # @raise [ArgumentError] - # - # source://activesupport//lib/active_support/inflector/transliterate.rb#64 - def transliterate(string, replacement = T.unsafe(nil), locale: T.unsafe(nil)); end - - # Makes an underscored, lowercase form from the expression in the string. - # - # Changes '::' to '/' to convert namespaces to paths. - # - # underscore('ActiveModel') # => "active_model" - # underscore('ActiveModel::Errors') # => "active_model/errors" - # - # As a rule of thumb you can think of +underscore+ as the inverse of - # #camelize, though there are cases where that does not hold: - # - # camelize(underscore('SSLError')) # => "SslError" - # - # source://activesupport//lib/active_support/inflector/methods.rb#96 - def underscore(camel_cased_word); end - - # Converts just the first character 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 - def upcase_first(string); end - - private - - # Applies inflection rules for +singularize+ and +pluralize+. - # - # If passed an optional +locale+ parameter, the uncountables will be - # found for that locale. - # - # apply_inflections('post', inflections.plurals, :en) # => "posts" - # apply_inflections('posts', inflections.singulars, :en) # => "post" - # - # source://activesupport//lib/active_support/inflector/methods.rb#366 - def apply_inflections(word, rules, locale = T.unsafe(nil)); end - - # Mounts a regular expression, returned as a string to ease interpolation, - # that will match part by part the given constant. - # - # const_regexp("Foo::Bar::Baz") # => "Foo(::Bar(::Baz)?)?" - # const_regexp("::") # => "::" - # - # source://activesupport//lib/active_support/inflector/methods.rb#347 - 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) - -# 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 -# default locale is :en. Only rules for English are provided. -# -# ActiveSupport::Inflector.inflections(:en) do |inflect| -# inflect.plural /^(ox)$/i, '\1\2en' -# inflect.singular /^(ox)en/i, '\1' -# -# inflect.irregular 'cactus', 'cacti' -# -# inflect.uncountable 'equipment' -# end -# -# New rules are added at the top. So in the example above, the irregular -# rule for cactus will now be the first of the pluralization and -# 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 -class ActiveSupport::Inflector::Inflections - # @return [Inflections] a new instance of Inflections - # - # source://activesupport//lib/active_support/inflector/inflections.rb#78 - def initialize; end - - # Specifies a new acronym. An acronym must be specified as it will appear - # in a camelized string. An underscore string that contains the acronym - # will retain the acronym when passed to +camelize+, +humanize+, or - # +titleize+. A camelized string that contains the acronym will maintain - # the acronym when titleized or humanized, and will convert the acronym - # into a non-delimited single lowercase word when passed to +underscore+. - # - # acronym 'HTML' - # titleize 'html' # => 'HTML' - # camelize 'html' # => 'HTML' - # underscore 'MyHTML' # => 'my_html' - # - # The acronym, however, must occur as a delimited unit and not be part of - # another word for conversions to recognize it: - # - # acronym 'HTTP' - # camelize 'my_http_delimited' # => 'MyHTTPDelimited' - # camelize 'https' # => 'Https', not 'HTTPs' - # underscore 'HTTPS' # => 'http_s', not 'https' - # - # acronym 'HTTPS' - # camelize 'https' # => 'HTTPS' - # underscore 'HTTPS' # => 'https' - # - # Note: Acronyms that are passed to +pluralize+ will no longer be - # recognized, since the acronym will not occur as a delimited unit in the - # pluralized result. To work around this, you must specify the pluralized - # form as an acronym as well: - # - # acronym 'API' - # camelize(pluralize('api')) # => 'Apis' - # - # acronym 'APIs' - # camelize(pluralize('api')) # => 'APIs' - # - # +acronym+ may be used to specify any word that contains an acronym or - # otherwise needs to maintain a non-standard capitalization. The only - # restriction is that the word must begin with a capital letter. - # - # acronym 'RESTful' - # underscore 'RESTful' # => 'restful' - # underscore 'RESTfulController' # => 'restful_controller' - # titleize 'RESTfulController' # => 'RESTful Controller' - # camelize 'restful' # => 'RESTful' - # camelize 'restful_controller' # => 'RESTfulController' - # - # acronym 'McDonald' - # underscore 'McDonald' # => 'mcdonald' - # camelize 'mcdonald' # => 'McDonald' - # - # source://activesupport//lib/active_support/inflector/inflections.rb#140 - def acronym(word); end - - # Returns the value of attribute acronyms. - # - # source://activesupport//lib/active_support/inflector/inflections.rb#74 - def acronyms; end - - # source://activesupport//lib/active_support/inflector/inflections.rb#76 - def acronyms_camelize_regex; end - - # source://activesupport//lib/active_support/inflector/inflections.rb#76 - def acronyms_underscore_regex; end - - # Clears the loaded inflections within a given scope (default is - # :all). Give the scope as a symbol of the inflection type, the - # options are: :plurals, :singulars, :uncountables, - # :humans, :acronyms. - # - # clear :all - # clear :plurals - # - # source://activesupport//lib/active_support/inflector/inflections.rb#229 - def clear(scope = T.unsafe(nil)); end - - # Specifies a humanized form of a string by a regular expression rule or - # by a string mapping. When using a regular expression based replacement, - # the normal humanize formatting is called after the replacement. When a - # string is used, the human form should be specified as desired (example: - # 'The name', not 'the_name'). - # - # human /_cnt$/i, '\1_count' - # human 'legacy_col_person_name', 'Name' - # - # source://activesupport//lib/active_support/inflector/inflections.rb#218 - def human(rule, replacement); end - - # Returns the value of attribute humans. - # - # source://activesupport//lib/active_support/inflector/inflections.rb#74 - def humans; end - - # Specifies a new irregular that applies to both pluralization and - # singularization at the same time. This can only be used for strings, not - # regular expressions. You simply pass the irregular in singular and - # plural form. - # - # irregular 'cactus', 'cacti' - # irregular 'person', 'people' - # - # source://activesupport//lib/active_support/inflector/inflections.rb#172 - def irregular(singular, plural); end - - # Specifies a new pluralization rule and its replacement. The rule can - # either be a string or a regular expression. The replacement should - # always be a string that may include references to the matched data from - # the rule. - # - # source://activesupport//lib/active_support/inflector/inflections.rb#149 - def plural(rule, replacement); end - - # Returns the value of attribute plurals. - # - # source://activesupport//lib/active_support/inflector/inflections.rb#74 - def plurals; end - - # Specifies a new singularization rule and its replacement. The rule can - # either be a string or a regular expression. The replacement should - # always be a string that may include references to the matched data from - # the rule. - # - # source://activesupport//lib/active_support/inflector/inflections.rb#159 - def singular(rule, replacement); end - - # Returns the value of attribute singulars. - # - # source://activesupport//lib/active_support/inflector/inflections.rb#74 - def singulars; end - - # Specifies words that are uncountable and should not be inflected. - # - # uncountable 'money' - # uncountable 'money', 'information' - # uncountable %w( money information rice ) - # - # source://activesupport//lib/active_support/inflector/inflections.rb#206 - def uncountable(*words); end - - # Returns the value of attribute uncountables. - # - # source://activesupport//lib/active_support/inflector/inflections.rb#74 - def uncountables; end - - private - - # source://activesupport//lib/active_support/inflector/inflections.rb#248 - def define_acronym_regex_patterns; end - - # Private, for the test suite. - # - # source://activesupport//lib/active_support/inflector/inflections.rb#84 - def initialize_dup(orig); end - - class << self - # source://activesupport//lib/active_support/inflector/inflections.rb#63 - def instance(locale = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/inflector/inflections.rb#67 - def instance_or_fallback(locale); end - end -end - -# source://activesupport//lib/active_support/inflector/inflections.rb#31 -class ActiveSupport::Inflector::Inflections::Uncountables < ::Array - # @return [Uncountables] a new instance of Uncountables - # - # source://activesupport//lib/active_support/inflector/inflections.rb#32 - def initialize; end - - # source://activesupport//lib/active_support/inflector/inflections.rb#42 - def <<(*word); end - - # source://activesupport//lib/active_support/inflector/inflections.rb#46 - def add(words); end - - # source://activesupport//lib/active_support/inflector/inflections.rb#37 - def delete(entry); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/inflector/inflections.rb#53 - def uncountable?(str); end - - private - - # source://activesupport//lib/active_support/inflector/inflections.rb#58 - def to_regex(string); end -end - -# +InheritableOptions+ provides a constructor to build an OrderedOptions -# hash inherited from another hash. -# -# Use this if you already have some hash and you want to create a new one based on it. -# -# h = ActiveSupport::InheritableOptions.new({ girl: 'Mary', boy: 'John' }) -# h.girl # => 'Mary' -# h.boy # => 'John' -# -# source://activesupport//lib/active_support/ordered_options.rb#79 -class ActiveSupport::InheritableOptions < ::ActiveSupport::OrderedOptions - # @return [InheritableOptions] a new instance of InheritableOptions - # - # source://activesupport//lib/active_support/ordered_options.rb#80 - def initialize(parent = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/ordered_options.rb#91 - 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 - def [](key); end - - # source://activesupport//lib/active_support/isolated_execution_state.rb#36 - def []=(key, value); end - - # source://activesupport//lib/active_support/isolated_execution_state.rb#48 - def clear; end - - # source://activesupport//lib/active_support/isolated_execution_state.rb#44 - def delete(key); end - - # Returns the value of attribute isolation_level. - # - # source://activesupport//lib/active_support/isolated_execution_state.rb#13 - def isolation_level; end - - # source://activesupport//lib/active_support/isolated_execution_state.rb#15 - def isolation_level=(level); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/isolated_execution_state.rb#40 - def key?(key); end - - # source://activesupport//lib/active_support/isolated_execution_state.rb#52 - def share_with(other); end - - # source://activesupport//lib/active_support/isolated_execution_state.rb#28 - 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 - end -end - -# source://activesupport//lib/active_support/json/decoding.rb#11 -module ActiveSupport::JSON - class << self - # Parses a JSON string (JavaScript Object Notation) into a hash. - # See http://www.json.org for more info. - # - # ActiveSupport::JSON.decode("{\"team\":\"rails\",\"players\":\"36\"}") - # => {"team" => "rails", "players" => "36"} - # - # source://activesupport//lib/active_support/json/decoding.rb#22 - def decode(json); end - - # Dumps objects in JSON (JavaScript Object Notation). - # See http://www.json.org for more info. - # - # ActiveSupport::JSON.encode({ 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 - - # 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 - # depend on the ActiveSupport's JSON implementation, in case it changes - # in the future. - # - # begin - # obj = ActiveSupport::JSON.decode(some_string) - # rescue ActiveSupport::JSON.parse_error - # Rails.logger.warn("Attempted to decode invalid JSON: #{some_string}") - # end - # - # source://activesupport//lib/active_support/json/decoding.rb#42 - def parse_error; end - - private - - # source://activesupport//lib/active_support/json/decoding.rb#47 - def convert_dates_from(data); end - end -end - -# source://activesupport//lib/active_support/json/decoding.rb#14 -ActiveSupport::JSON::DATETIME_REGEX = T.let(T.unsafe(nil), Regexp) - -# matches YAML-formatted dates -# -# 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 -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 - 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 - def escape_html_entities_in_json=(_arg0); end - - # 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 - def json_encoder; end - - # 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 - 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 - 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 - 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 - 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 - def use_standard_json_time_format=(_arg0); end - end -end - -# source://activesupport//lib/active_support/json/encoding.rb#26 -class ActiveSupport::JSON::Encoding::JSONGemEncoder - # @return [JSONGemEncoder] a new instance of JSONGemEncoder - # - # source://activesupport//lib/active_support/json/encoding.rb#29 - def initialize(options = T.unsafe(nil)); end - - # Encode the given object into a JSON string - # - # source://activesupport//lib/active_support/json/encoding.rb#34 - def encode(value); end - - # Returns the value of attribute options. - # - # source://activesupport//lib/active_support/json/encoding.rb#27 - def options; end - - private - - # Convert an object into a "JSON-ready" representation composed of - # primitives like Hash, Array, String, Numeric, - # and +true+/+false+/+nil+. - # Recursively calls #as_json to the object to recursively build a - # fully JSON-ready object. - # - # This allows developers to implement #as_json without having to - # worry about what base types of objects they are allowed to return - # or having to remember to call #as_json recursively. - # - # Note: the +options+ hash passed to +object.to_json+ is only passed - # to +object.as_json+, not any of this method's recursive +#as_json+ - # calls. - # - # source://activesupport//lib/active_support/json/encoding.rb#89 - def jsonify(value); end - - # Encode a "jsonified" Ruby data structure using the JSON gem - # - # source://activesupport//lib/active_support/json/encoding.rb#109 - 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). -# -# 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 -# key in multiple incompatible contexts. -# -# source://activesupport//lib/active_support/key_generator.rb#11 -class ActiveSupport::KeyGenerator - # @return [KeyGenerator] a new instance of KeyGenerator - # - # source://activesupport//lib/active_support/key_generator.rb#26 - 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 - def generate_key(salt, key_size = T.unsafe(nil)); end - - class << self - # source://activesupport//lib/active_support/key_generator.rb#21 - def hash_digest_class; end - - # source://activesupport//lib/active_support/key_generator.rb#13 - def hash_digest_class=(klass); end - end -end - -# 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 -# configuration. Instead a hook is registered that applies configuration once -# 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. -# -# initializer 'active_record.initialize_timezone' do -# ActiveSupport.on_load(:active_record) do -# self.time_zone_aware_attributes = true -# self.default_timezone = :utc -# end -# end -# -# When the entirety of +ActiveRecord::Base+ has been -# evaluated then run_load_hooks is invoked. The very last line of -# +ActiveRecord::Base+ is: -# -# ActiveSupport.run_load_hooks(:active_record, ActiveRecord::Base) -# -# run_load_hooks will then execute all the hooks that were registered -# with the on_load method. In the case of the above example, it will -# execute the block of code that is in the +initializer+. -# -# Registering a hook that has already run results in that hook executing -# immediately. This allows hooks to be nested for code that relies on -# multiple lazily loaded components: -# -# initializer "action_text.renderer" do -# ActiveSupport.on_load(:action_controller_base) do -# ActiveSupport.on_load(:action_text_content) do -# self.default_renderer = Class.new(ActionController::Base).renderer -# end -# end -# end -# -# source://activesupport//lib/active_support/lazy_load_hooks.rb#41 -module ActiveSupport::LazyLoadHooks - # 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. - # - # Options: - # - # * :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 - def on_load(name, options = T.unsafe(nil), &block); end - - # Executes all blocks registered to +name+ via on_load, using +base+ as the - # evaluation context. - # - # ActiveSupport.run_load_hooks(:active_record, ActiveRecord::Base) - # - # 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 - def run_load_hooks(name, base = T.unsafe(nil)); end - - private - - # source://activesupport//lib/active_support/lazy_load_hooks.rb#89 - def execute_hook(name, base, options, block); end - - # source://activesupport//lib/active_support/lazy_load_hooks.rb#81 - def with_execution_control(name, block, once); end - - class << self - # source://activesupport//lib/active_support/lazy_load_hooks.rb#42 - def extended(base); end - end -end - -# 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. -# -# An example would be Active Record log subscriber responsible for logging -# queries: -# -# module ActiveRecord -# class LogSubscriber < ActiveSupport::LogSubscriber -# 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. -# -# 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. -# -# Being an ActiveSupport::Notifications consumer, -# 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: -# -# module ActiveRecord -# class LogSubscriber < ActiveSupport::LogSubscriber -# def sql(event) -# exception = event.payload[:exception] -# -# if exception -# exception_object = event.payload[:exception_object] -# -# error "[ERROR] #{event.payload[:name]}: #{exception.join(', ')} " \ -# "(#{exception_object.backtrace.first})" -# else -# # standard logger code -# end -# 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. -# -# source://activesupport//lib/active_support/log_subscriber.rb#66 -class ActiveSupport::LogSubscriber < ::ActiveSupport::Subscriber - # source://activesupport//lib/active_support/log_subscriber.rb#80 - def colorize_logging; end - - # source://activesupport//lib/active_support/log_subscriber.rb#80 - def colorize_logging=(val); end - - # source://activesupport//lib/active_support/log_subscriber.rb#129 - def debug(progname = T.unsafe(nil), &block); end - - # source://activesupport//lib/active_support/log_subscriber.rb#129 - 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#114 - def finish(name, id, payload); end - - # source://activesupport//lib/active_support/log_subscriber.rb#129 - def info(progname = T.unsafe(nil), &block); end - - # source://activesupport//lib/active_support/log_subscriber.rb#106 - def logger; end - - # source://activesupport//lib/active_support/log_subscriber.rb#120 - def publish_event(event); end - - # source://activesupport//lib/active_support/log_subscriber.rb#110 - def start(name, id, payload); end - - # source://activesupport//lib/active_support/log_subscriber.rb#129 - def unknown(progname = T.unsafe(nil), &block); end - - # source://activesupport//lib/active_support/log_subscriber.rb#129 - 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. - # - # 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#146 - def log_exception(name, e); end - - class << self - # source://activesupport//lib/active_support/log_subscriber.rb#80 - def colorize_logging; end - - # source://activesupport//lib/active_support/log_subscriber.rb#80 - def colorize_logging=(val); end - - # Flush all log_subscribers' logger. - # - # source://activesupport//lib/active_support/log_subscriber.rb#96 - def flush_all!; end - - # source://activesupport//lib/active_support/log_subscriber.rb#91 - def log_subscribers; end - - # source://activesupport//lib/active_support/log_subscriber.rb#83 - 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 - def logger=(_arg0); end - - private - - # source://activesupport//lib/active_support/log_subscriber.rb#101 - def fetch_public_methods(subscriber, inherit_all); end - end -end - -# Colors -# -# source://activesupport//lib/active_support/log_subscriber.rb#71 -ActiveSupport::LogSubscriber::BLACK = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/log_subscriber.rb#75 -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) - -# 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#77 -ActiveSupport::LogSubscriber::CYAN = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/log_subscriber.rb#73 -ActiveSupport::LogSubscriber::GREEN = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/log_subscriber.rb#76 -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) - -# source://activesupport//lib/active_support/log_subscriber.rb#78 -ActiveSupport::LogSubscriber::WHITE = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/log_subscriber.rb#74 -ActiveSupport::LogSubscriber::YELLOW = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/logger.rb#8 -class ActiveSupport::Logger < ::Logger - include ::ActiveSupport::LoggerSilence - include ::ActiveSupport::LoggerThreadSafeLevel - - # @return [Logger] a new instance of Logger - # - # source://activesupport//lib/active_support/logger.rb#80 - def initialize(*args, **kwargs); 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 - - 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) - # ActiveSupport::Logger.logger_outputs_to?(logger, STDOUT) - # # => true - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/logger.rb#16 - def logger_outputs_to?(logger, *sources); 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 - end -end - -# Simple formatter which only displays the message. -# -# source://activesupport//lib/active_support/logger.rb#87 -class ActiveSupport::Logger::SimpleFormatter < ::Logger::Formatter - # This method is invoked when a log event occurs - # - # source://activesupport//lib/active_support/logger.rb#88 - def call(severity, timestamp, progname, msg); end -end - -# source://activesupport//lib/active_support/logger_silence.rb#8 -module ActiveSupport::LoggerSilence - extend ::ActiveSupport::Concern - include ::ActiveSupport::LoggerThreadSafeLevel - - # Silences the logger for the duration of the block. - # - # source://activesupport//lib/active_support/logger_silence.rb#17 - def silence(severity = T.unsafe(nil)); end -end - -# source://activesupport//lib/active_support/logger_thread_safe_level.rb#9 -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 - def debug?; end - - # source://activesupport//lib/active_support/logger_thread_safe_level.rb#14 - def error?; end - - # source://activesupport//lib/active_support/logger_thread_safe_level.rb#14 - def fatal?; end - - # source://activesupport//lib/active_support/logger_thread_safe_level.rb#14 - def info?; end - - # source://activesupport//lib/active_support/logger_thread_safe_level.rb#36 - def level; end - - # source://activesupport//lib/active_support/logger_thread_safe_level.rb#20 - def local_level; end - - # source://activesupport//lib/active_support/logger_thread_safe_level.rb#24 - 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 - def log_at(level); end - - # source://activesupport//lib/active_support/logger_thread_safe_level.rb#14 - def unknown?; end - - # source://activesupport//lib/active_support/logger_thread_safe_level.rb#14 - def warn?; end -end - -# MessageEncryptor is a simple way to encrypt values which get stored -# somewhere you don't trust. -# -# The cipher text and initialization vector are base64 encoded and returned -# to you. -# -# This can be used in situations similar to the MessageVerifier, but -# where you don't want users to be able to determine the value of the payload. -# -# len = ActiveSupport::MessageEncryptor.key_len -# salt = SecureRandom.random_bytes(len) -# key = ActiveSupport::KeyGenerator.new('password').generate_key(salt, len) # => "\x89\xE0\x156\xAC..." -# crypt = ActiveSupport::MessageEncryptor.new(key) # => # -# encrypted_data = crypt.encrypt_and_sign('my secret data') # => "NlFBTTMwOUV5UlA1QlNEN2xkY2d6eThYWWh..." -# crypt.decrypt_and_verify(encrypted_data) # => "my secret data" -# -# The +decrypt_and_verify+ method will raise an -# ActiveSupport::MessageEncryptor::InvalidMessage exception if the data -# provided cannot be decrypted or verified. -# -# crypt.decrypt_and_verify('not encrypted data') # => ActiveSupport::MessageEncryptor::InvalidMessage -# -# === Confining messages to a specific purpose -# -# By default any message can be used throughout your app. But they can also be -# confined to a specific +:purpose+. -# -# token = crypt.encrypt_and_sign("this is the chair", purpose: :login) -# -# Then that same purpose must be passed when verifying to get the data back out: -# -# crypt.decrypt_and_verify(token, purpose: :login) # => "this is the chair" -# crypt.decrypt_and_verify(token, purpose: :shipping) # => nil -# crypt.decrypt_and_verify(token) # => nil -# -# Likewise, if a message has no purpose it won't be returned when verifying with -# a specific purpose. -# -# token = crypt.encrypt_and_sign("the conversation is lively") -# crypt.decrypt_and_verify(token, purpose: :scare_tactics) # => nil -# crypt.decrypt_and_verify(token) # => "the conversation is lively" -# -# === Making messages expire -# -# 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+. -# -# crypt.encrypt_and_sign(parcel, expires_in: 1.month) -# crypt.encrypt_and_sign(doowad, expires_at: Time.now.end_of_year) -# -# Then the messages can be verified and returned up to the expire time. -# Thereafter, verifying returns +nil+. -# -# === Rotating keys -# -# MessageEncryptor also supports rotating out old configurations by falling -# back to a stack of encryptors. Call +rotate+ to build and add an encryptor -# so +decrypt_and_verify+ will also try the fallback. -# -# By default any rotated encryptors use the values of the primary -# encryptor unless specified otherwise. -# -# You'd give your encryptor the new defaults: -# -# crypt = ActiveSupport::MessageEncryptor.new(@secret, cipher: "aes-256-gcm") -# -# 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. -# -# crypt.rotate old_secret # Fallback to an old secret instead of @secret. -# crypt.rotate cipher: "aes-256-cbc" # Fallback to an old cipher instead of aes-256-gcm. -# -# Though if both the secret and the cipher was changed at the same time, -# the above should be combined into: -# -# crypt.rotate old_secret, cipher: "aes-256-cbc" -# -# source://activesupport//lib/active_support/message_encryptor.rb#87 -class ActiveSupport::MessageEncryptor - 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 - # bits. If you are using a user-entered secret, you can generate a suitable - # 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. - # - # 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+. - # - # @return [MessageEncryptor] a new instance of MessageEncryptor - # - # source://activesupport//lib/active_support/messages/rotator.rb#6 - def initialize(*secrets, on_rotation: T.unsafe(nil), **options); end - - # 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 - - # 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 - - 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 - - # @return [Boolean] - # - # source://activesupport//lib/active_support/message_encryptor.rb#218 - def aead_mode?; end - - # source://activesupport//lib/active_support/message_encryptor.rb#212 - def new_cipher; end - - # source://activesupport//lib/active_support/message_encryptor.rb#222 - def resolve_verifier; end - - # Returns the value of attribute verifier. - # - # source://activesupport//lib/active_support/message_encryptor.rb#216 - def verifier; end - - class << self - # source://activesupport//lib/active_support/message_encryptor.rb#93 - 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 - def key_len(cipher = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/message_encryptor.rb#90 - def use_authenticated_message_encryption; end - - # source://activesupport//lib/active_support/message_encryptor.rb#90 - def use_authenticated_message_encryption=(val); end - end -end - -# source://activesupport//lib/active_support/message_encryptor.rb#122 -class ActiveSupport::MessageEncryptor::InvalidMessage < ::StandardError; end - -# source://activesupport//lib/active_support/message_encryptor.rb#102 -module ActiveSupport::MessageEncryptor::NullSerializer - class << self - # source://activesupport//lib/active_support/message_encryptor.rb#107 - def dump(value); end - - # source://activesupport//lib/active_support/message_encryptor.rb#103 - 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#113 - def verify(value); end - end -end - -# source://activesupport//lib/active_support/message_encryptor.rb#123 -ActiveSupport::MessageEncryptor::OpenSSLCipherError = OpenSSL::Cipher::CipherError - -# +MessageVerifier+ makes it easy to generate and verify messages which are -# signed to prevent tampering. -# -# 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]) -# -# In the authentication filter: -# -# id, time = @verifier.verify(cookies[:remember_me]) -# if Time.now < time -# self.current_user = 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 -# -# By default any message can be used throughout your app. But they can also be -# confined to a specific +:purpose+. -# -# token = @verifier.generate("this is the chair", purpose: :login) -# -# 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: :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 -# -# 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" -# -# @verifier.verify(token, purpose: :scare_tactics) # => ActiveSupport::MessageVerifier::InvalidSignature -# @verifier.verify(token) # => "the conversation is lively" -# -# === Making messages expire -# -# 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) -# -# Then the messages can be verified and returned up to the expire time. -# Thereafter, the +verified+ method returns +nil+ while +verify+ raises -# ActiveSupport::MessageVerifier::InvalidSignature. -# -# === Rotating keys -# -# MessageVerifier also supports rotating out old configurations by falling -# back to a stack of verifiers. Call +rotate+ to build and add a verifier so -# either +verified+ or +verify+ will also try verifying with the fallback. -# -# By default any rotated verifiers use the values of the primary -# verifier unless specified otherwise. -# -# You'd give your verifier the new defaults: -# -# verifier = ActiveSupport::MessageVerifier.new(@secret, digest: "SHA512", serializer: JSON) -# -# 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. -# -# Though the above would most likely be combined into one rotation: -# -# verifier.rotate old_secret, digest: "SHA256", serializer: Marshal -# -# source://activesupport//lib/active_support/message_verifier.rb#102 -class ActiveSupport::MessageVerifier - include ::ActiveSupport::Messages::Rotator - include ::ActiveSupport::Messages::Rotator::Verifier - - # @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 - - # 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" - # - # 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 - - # 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.valid_message?(signed_message) # => true - # - # tampered_message = signed_message.chop # editing the message invalidates the signature - # verifier.valid_message?(tampered_message) # => false - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/message_verifier.rb#126 - def valid_message?(signed_message); end - - # Decodes the signed message using the +MessageVerifier+'s secret. - # - # verifier = ActiveSupport::MessageVerifier.new 's3Krit' - # - # signed_message = verifier.generate 'a private message' - # verifier.verified(signed_message) # => 'a private message' - # - # Returns +nil+ if the message was not signed with the same secret. - # - # other_verifier = ActiveSupport::MessageVerifier.new 'd1ff3r3nt-s3Krit' - # other_verifier.verified(signed_message) # => nil - # - # Returns +nil+ if the message is not Base64-encoded. - # - # invalid_message = "f--46a0120593880c733a53b6dad75b42ddc1c8996d" - # verifier.verified(invalid_message) # => nil - # - # Raises any error raised while decoding the signed message. - # - # 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 - - # Decodes the signed message using the +MessageVerifier+'s secret. - # - # verifier = ActiveSupport::MessageVerifier.new 's3Krit' - # signed_message = verifier.generate 'a private message' - # - # verifier.verify(signed_message) # => 'a private 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.verify(signed_message) # => ActiveSupport::MessageVerifier::InvalidSignature - # - # source://activesupport//lib/active_support/message_verifier.rb#177 - def verify(*args, **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 - def digest_length_in_hex; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/message_verifier.rb#233 - 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#202 - def generate_digest(data); end - - # source://activesupport//lib/active_support/message_verifier.rb#221 - def get_data_and_digest_from(signed_message); end - - # source://activesupport//lib/active_support/message_verifier.rb#214 - def separator_index_for(signed_message); end -end - -# source://activesupport//lib/active_support/message_verifier.rb#105 -class ActiveSupport::MessageVerifier::InvalidSignature < ::StandardError; end - -# source://activesupport//lib/active_support/message_verifier.rb#107 -ActiveSupport::MessageVerifier::SEPARATOR = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/message_verifier.rb#108 -ActiveSupport::MessageVerifier::SEPARATOR_LENGTH = T.let(T.unsafe(nil), Integer) - -# source://activesupport//lib/active_support/messages/metadata.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/metadata.rb#8 - def initialize(message, expires_at = T.unsafe(nil), purpose = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/messages/metadata.rb#13 - def as_json(options = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/messages/metadata.rb#58 - def verify(purpose); end - - private - - # @return [Boolean] - # - # source://activesupport//lib/active_support/messages/metadata.rb#67 - def fresh?; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/messages/metadata.rb#63 - def match?(purpose); end - - # source://activesupport//lib/active_support/messages/metadata.rb#71 - def parse_expires_at(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#18 - def wrap(message, expires_at: T.unsafe(nil), expires_in: T.unsafe(nil), purpose: T.unsafe(nil)); end - - private - - # source://activesupport//lib/active_support/messages/metadata.rb#53 - def decode(message); end - - # source://activesupport//lib/active_support/messages/metadata.rb#49 - def encode(message); end - - # source://activesupport//lib/active_support/messages/metadata.rb#39 - def extract_metadata(message); end - - # source://activesupport//lib/active_support/messages/metadata.rb#31 - def pick_expiry(expires_at, expires_in); end - end -end - -# source://activesupport//lib/active_support/messages/rotation_configuration.rb#5 -class ActiveSupport::Messages::RotationConfiguration - # @return [RotationConfiguration] a new instance of RotationConfiguration - # - # source://activesupport//lib/active_support/messages/rotation_configuration.rb#8 - def initialize; end - - # Returns the value of attribute encrypted. - # - # source://activesupport//lib/active_support/messages/rotation_configuration.rb#6 - def encrypted; end - - # source://activesupport//lib/active_support/messages/rotation_configuration.rb#12 - def rotate(kind, *args, **options); end - - # Returns the value of attribute signed. - # - # source://activesupport//lib/active_support/messages/rotation_configuration.rb#6 - def signed; 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 - - # source://activesupport//lib/active_support/messages/rotator.rb#14 - def rotate(*secrets, **options); end - - private - - # source://activesupport//lib/active_support/messages/rotator.rb#47 - def run_rotations(on_rotation); 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/rotator.rb#21 - def decrypt_and_verify(*args, on_rotation: T.unsafe(nil), **options); end - - private - - # source://activesupport//lib/active_support/messages/rotator.rb#28 - def build_rotation(secret = T.unsafe(nil), sign_secret = T.unsafe(nil), options); 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/rotator.rb#36 - def verified(*args, on_rotation: T.unsafe(nil), **options); end - - private - - # source://activesupport//lib/active_support/messages/rotator.rb#41 - def build_rotation(secret = T.unsafe(nil), options); end -end - -# source://activesupport//lib/active_support/multibyte.rb#4 -module ActiveSupport::Multibyte - class << self - # Returns the current proxy class. - # - # source://activesupport//lib/active_support/multibyte.rb#19 - def proxy_class; end - - # The proxy class returned when calling mb_chars. You can use this accessor - # to configure your own proxy class so you can support other encodings. See - # the ActiveSupport::Multibyte::Chars implementation for an example how to - # do this. - # - # ActiveSupport::Multibyte.proxy_class = CharsForUTF32 - # - # source://activesupport//lib/active_support/multibyte.rb#14 - def proxy_class=(klass); end - end -end - -# 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 -# methods in an encoding safe manner. All the normal String methods are also -# implemented on the proxy. -# -# String methods are proxied through the Chars object, and can be accessed -# through the +mb_chars+ method. Methods which would normally return a -# String object now return a Chars object so methods can be chained. -# -# 'The Perfect String '.mb_chars.downcase.strip -# # => # -# -# Chars objects are perfectly interchangeable with String objects as long as -# no explicit class checks are made. If certain methods do explicitly check -# the class, call +to_s+ before you pass chars objects to them. -# -# bad.explicit_checking_method 'T'.mb_chars.downcase.to_s -# -# The default Chars implementation assumes that the encoding of the string -# is UTF-8, if you want to handle different encodings you can write your own -# multibyte string handler and configure it through -# ActiveSupport::Multibyte.proxy_class. -# -# class CharsForUTF32 -# def size -# @wrapped_string.size / 4 -# end -# -# def self.accepts?(string) -# string.length % 4 == 0 -# end -# end -# -# ActiveSupport::Multibyte.proxy_class = CharsForUTF32 -# -# source://activesupport//lib/active_support/multibyte/chars.rb#45 -class ActiveSupport::Multibyte::Chars - include ::Comparable - - # Creates a new Chars instance by wrapping _string_. - # - # @return [Chars] a new instance of Chars - # - # source://activesupport//lib/active_support/multibyte/chars.rb#54 - def initialize(string); end - - # source://activesupport//lib/active_support/multibyte/chars.rb#51 - def <=>(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/multibyte/chars.rb#51 - def =~(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/multibyte/chars.rb#51 - def acts_like_string?(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/multibyte/chars.rb#159 - def as_json(options = T.unsafe(nil)); end - - # Performs composition on all the characters. - # - # 'é'.length # => 1 - # 'é'.mb_chars.compose.to_s.length # => 1 - # - # source://activesupport//lib/active_support/multibyte/chars.rb#138 - def compose; end - - # Performs canonical decomposition on all the characters. - # - # 'é'.length # => 1 - # 'é'.mb_chars.decompose.to_s.length # => 2 - # - # source://activesupport//lib/active_support/multibyte/chars.rb#130 - def decompose; end - - # Returns the number of grapheme clusters in the string. - # - # 'क्षि'.mb_chars.length # => 4 - # 'क्षि'.mb_chars.grapheme_length # => 2 - # - # source://activesupport//lib/active_support/multibyte/chars.rb#146 - def grapheme_length; end - - # Limits the byte size of the string to a number of bytes without breaking - # characters. Usable when the storage for a string is limited for some - # reason. - # - # 'こんにちは'.mb_chars.limit(7).to_s # => "こん" - # - # source://activesupport//lib/active_support/multibyte/chars.rb#113 - def limit(limit); end - - # source://activesupport//lib/active_support/multibyte/chars.rb#51 - def match?(*_arg0, **_arg1, &_arg2); end - - # Forward all undefined methods to the wrapped string. - # - # source://activesupport//lib/active_support/multibyte/chars.rb#60 - 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 - def reverse; end - - # source://activesupport//lib/active_support/multibyte/chars.rb#164 - def reverse!(*args); end - - # Works like String#slice!, but returns an instance of - # Chars, or +nil+ if the string was not modified. The string will not be - # modified if the range given is out of bounds - # - # string = 'Welcome' - # string.mb_chars.slice!(3) # => # - # string # => 'Welome' - # string.mb_chars.slice!(0..3) # => # - # string # => 'me' - # - # source://activesupport//lib/active_support/multibyte/chars.rb#94 - def slice!(*args); end - - # Works just like String#split, with the exception that the items - # in the resulting list are Chars instances instead of String. This makes - # chaining methods easier. - # - # '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 - def split(*args); end - - # Replaces all ISO-8859-1 or CP1252 characters by their UTF-8 equivalent - # resulting in a valid UTF-8 string. - # - # 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 - def tidy_bytes(force = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/multibyte/chars.rb#164 - def tidy_bytes!(*args); end - - # Capitalizes the first letter of every word, when possible. - # - # "É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 - def titlecase; end - - # Capitalizes the first letter of every word, when possible. - # - # "É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 - def titleize; end - - # Returns the value of attribute wrapped_string. - # - # source://activesupport//lib/active_support/multibyte/chars.rb#47 - def to_s; end - - # Returns the value of attribute wrapped_string. - # - # source://activesupport//lib/active_support/multibyte/chars.rb#47 - def to_str; end - - # Returns the value of attribute wrapped_string. - # - # source://activesupport//lib/active_support/multibyte/chars.rb#47 - def wrapped_string; end - - private - - # source://activesupport//lib/active_support/multibyte/chars.rb#171 - def chars(string); end - - # Returns +true+ if _obj_ responds to the given method. Private methods - # are included in the search only if the optional second parameter - # evaluates to +true+. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/multibyte/chars.rb#72 - def respond_to_missing?(method, include_private); end -end - -# source://activesupport//lib/active_support/multibyte/unicode.rb#5 -module ActiveSupport::Multibyte::Unicode - extend ::ActiveSupport::Multibyte::Unicode - - # Compose decomposed characters to the composed form. - # - # source://activesupport//lib/active_support/multibyte/unicode.rb#21 - def compose(codepoints); end - - # Decompose composed characters to the decomposed form. - # - # source://activesupport//lib/active_support/multibyte/unicode.rb#12 - def decompose(type, codepoints); end - - # Replaces all ISO-8859-1 or CP1252 characters by their UTF-8 equivalent - # resulting in a valid UTF-8 string. - # - # 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 - def tidy_bytes(string, force = T.unsafe(nil)); end - - private - - # source://activesupport//lib/active_support/multibyte/unicode.rb#65 - def recode_windows1252_chars(string); end -end - -# The Unicode version that is supported by the implementation -# -# source://activesupport//lib/active_support/multibyte/unicode.rb#9 -ActiveSupport::Multibyte::Unicode::UNICODE_VERSION = T.let(T.unsafe(nil), String) - -# = \Notifications -# -# ActiveSupport::Notifications provides an instrumentation API for -# Ruby. -# -# == Instrumenters -# -# To instrument an event you just need to do: -# -# ActiveSupport::Notifications.instrument('render', extra: :information) do -# render plain: 'Foo' -# end -# -# That first executes the block and then notifies all subscribers once done. -# -# In the example above +render+ is the name of the event, and the rest is called -# the _payload_. The payload is a mechanism that allows instrumenters to pass -# extra information to subscribers. Payloads consist of a hash whose contents -# are arbitrary and generally depend on the event. -# -# == Subscribers -# -# You can consume those events and the information they provide by registering -# a subscriber. -# -# ActiveSupport::Notifications.subscribe('render') do |name, start, finish, id, payload| -# name # => String, name of the event (such as 'render' from above) -# start # => Time, when the instrumented block started execution -# finish # => Time, when the instrumented block ended execution -# id # => String, unique ID for the instrumenter that fired the event -# payload # => Hash, the payload -# end -# -# Here, the +start+ and +finish+ values represent wall-clock time. If you are -# concerned about accuracy, you can register a monotonic subscriber. -# -# ActiveSupport::Notifications.monotonic_subscribe('render') do |name, start, finish, id, payload| -# name # => String, name of the event (such as 'render' from above) -# start # => Monotonic time, when the instrumented block started execution -# finish # => Monotonic time, when the instrumented block ended execution -# id # => String, unique ID for the instrumenter that fired the event -# payload # => Hash, the payload -# end -# -# The +start+ and +finish+ values above represent monotonic time. -# -# For instance, let's store all "render" events in an array: -# -# events = [] -# -# ActiveSupport::Notifications.subscribe('render') do |*args| -# events << ActiveSupport::Notifications::Event.new(*args) -# end -# -# That code returns right away, you are just subscribing to "render" events. -# The block is saved and will be called whenever someone instruments "render": -# -# ActiveSupport::Notifications.instrument('render', extra: :information) do -# render plain: 'Foo' -# end -# -# event = events.first -# event.name # => "render" -# event.duration # => 10 (in milliseconds) -# event.payload # => { extra: :information } -# -# The block in the subscribe call gets the name of the event, start -# timestamp, end timestamp, a string with a unique identifier for that event's instrumenter -# (something like "535801666f04d0298cd6"), and a hash with the payload, in -# that order. -# -# If an exception happens during that particular instrumentation the payload will -# have a key :exception with an array of two elements as value: a string with -# the name of the exception class, and the exception message. -# The :exception_object key of the payload will have the exception -# itself as the value: -# -# event.payload[:exception] # => ["ArgumentError", "Invalid value"] -# event.payload[:exception_object] # => # -# -# As the earlier example depicts, the class ActiveSupport::Notifications::Event -# is able to take the arguments as they come and provide an object-oriented -# interface to that data. -# -# It is also possible to pass an object which responds to call method -# as the second parameter to the subscribe method instead of a block: -# -# module ActionController -# class PageRequest -# def call(name, started, finished, unique_id, payload) -# Rails.logger.debug ['notification:', name, started, finished, unique_id, payload].join(' ') -# end -# end -# end -# -# ActiveSupport::Notifications.subscribe('process_action.action_controller', ActionController::PageRequest.new) -# -# resulting in the following output within the logs including a hash with the payload: -# -# notification: process_action.action_controller 2012-04-13 01:08:35 +0300 2012-04-13 01:08:35 +0300 af358ed7fab884532ec7 { -# controller: "Devise::SessionsController", -# action: "new", -# params: {"action"=>"new", "controller"=>"devise/sessions"}, -# format: :html, -# method: "GET", -# path: "/login/sign_in", -# status: 200, -# view_runtime: 279.3080806732178, -# db_runtime: 40.053 -# } -# -# You can also subscribe to all events whose name matches a certain regexp: -# -# ActiveSupport::Notifications.subscribe(/render/) do |*args| -# ... -# end -# -# and even pass no argument to subscribe, in which case you are subscribing -# to all events. -# -# == Temporary Subscriptions -# -# Sometimes you do not want to subscribe to an event for the entire life of -# the application. There are two ways to unsubscribe. -# -# WARNING: The instrumentation framework is designed for long-running subscribers, -# use this feature sparingly because it wipes some internal caches and that has -# a negative impact on performance. -# -# === Subscribe While a Block Runs -# -# You can subscribe to some event temporarily while some block runs. For -# example, in -# -# callback = lambda {|*args| ... } -# ActiveSupport::Notifications.subscribed(callback, "sql.active_record") do -# ... -# end -# -# the callback will be called for all "sql.active_record" events instrumented -# during the execution of the block. The callback is unsubscribed automatically -# after that. -# -# To record +started+ and +finished+ values with monotonic time, -# specify the optional :monotonic option to the -# subscribed method. The :monotonic option is set -# to +false+ by default. -# -# callback = lambda {|name, started, finished, unique_id, payload| ... } -# ActiveSupport::Notifications.subscribed(callback, "sql.active_record", monotonic: true) do -# ... -# end -# -# === Manual Unsubscription -# -# The +subscribe+ method returns a subscriber object: -# -# subscriber = ActiveSupport::Notifications.subscribe("render") do |*args| -# ... -# end -# -# To prevent that block from being called anymore, just unsubscribe passing -# that reference: -# -# ActiveSupport::Notifications.unsubscribe(subscriber) -# -# You can also unsubscribe by passing the name of the subscriber object. Note -# that this will unsubscribe all subscriptions with the given name: -# -# ActiveSupport::Notifications.unsubscribe("render") -# -# Subscribers using a regexp or other pattern-matching object will remain subscribed -# to all events that match their original pattern, unless those events match a string -# passed to +unsubscribe+: -# -# subscriber = ActiveSupport::Notifications.subscribe(/render/) { } -# ActiveSupport::Notifications.unsubscribe('render_template.action_view') -# subscriber.matches?('render_template.action_view') # => false -# subscriber.matches?('render_partial.action_view') # => true -# -# == Default Queue -# -# 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 -module ActiveSupport::Notifications - class << self - # source://activesupport//lib/active_support/notifications.rb#204 - def instrument(name, payload = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/notifications.rb#268 - def instrumenter; end - - # Performs the same functionality as #subscribe, but the +start+ and - # +finish+ block arguments are in monotonic time instead of wall-clock - # time. Monotonic time will not jump forward or backward (due to NTP or - # Daylights Savings). Use +monotonic_subscribe+ when accuracy of time - # duration is important. For example, computing elapsed time between - # two events. - # - # source://activesupport//lib/active_support/notifications.rb#253 - def monotonic_subscribe(pattern = T.unsafe(nil), callback = T.unsafe(nil), &block); end - - # Returns the value of attribute notifier. - # - # source://activesupport//lib/active_support/notifications.rb#194 - def notifier; end - - # Sets the attribute notifier - # - # @param value the value to set the attribute notifier to. - # - # source://activesupport//lib/active_support/notifications.rb#194 - def notifier=(_arg0); end - - # source://activesupport//lib/active_support/notifications.rb#196 - def publish(name, *args); end - - # source://activesupport//lib/active_support/notifications.rb#200 - def publish_event(event); end - - # Subscribe to a given event name with the passed +block+. - # - # You can subscribe to events by passing a String to match exact event - # names, or by passing a Regexp to match all events that match a pattern. - # - # ActiveSupport::Notifications.subscribe(/render/) do |*args| - # @event = ActiveSupport::Notifications::Event.new(*args) - # end - # - # The +block+ will receive five parameters with information about the event: - # - # ActiveSupport::Notifications.subscribe('render') do |name, start, finish, id, payload| - # name # => String, name of the event (such as 'render' from above) - # start # => Time, when the instrumented block started execution - # finish # => Time, when the instrumented block ended execution - # id # => String, unique ID for the instrumenter that fired the event - # payload # => Hash, the payload - # end - # - # If the block passed to the method only takes one parameter, - # it will yield an event object to the block: - # - # ActiveSupport::Notifications.subscribe(/render/) do |event| - # @event = event - # end - # - # Raises an error if invalid event name type is passed: - # - # ActiveSupport::Notifications.subscribe(:render) {|*args| ...} - # #=> ArgumentError (pattern must be specified as a String, Regexp or empty) - # - # source://activesupport//lib/active_support/notifications.rb#243 - def subscribe(pattern = T.unsafe(nil), callback = T.unsafe(nil), &block); end - - # source://activesupport//lib/active_support/notifications.rb#257 - def subscribed(callback, pattern = T.unsafe(nil), monotonic: T.unsafe(nil), &block); end - - # source://activesupport//lib/active_support/notifications.rb#264 - def unsubscribe(subscriber_or_name); end - - private - - # source://activesupport//lib/active_support/notifications.rb#273 - def registry; end - end -end - -# source://activesupport//lib/active_support/notifications/instrumenter.rb#58 -class ActiveSupport::Notifications::Event - # @return [Event] a new instance of Event - # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#62 - 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!+ - # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#116 - def allocations; end - - # Returns the value of attribute children. - # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#59 - def children; end - - # Returns the CPU time (in milliseconds) passed since the call to - # +start!+ and the call to +finish!+ - # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#104 - def cpu_time; end - - # Returns the difference in milliseconds between when the execution of the - # event started and when it ended. - # - # ActiveSupport::Notifications.subscribe('wait') do |*args| - # @event = ActiveSupport::Notifications::Event.new(*args) - # end - # - # ActiveSupport::Notifications.instrument('wait') do - # sleep 1 - # end - # - # @event.duration # => 1000.138 - # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#132 - def duration; end - - # Returns the value of attribute end. - # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#59 - def end; end - - # Record information at the time this event finishes - # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#96 - def finish!; end - - # Returns the idle time time (in milliseconds) passed since the call to - # +start!+ and the call to +finish!+ - # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#110 - def idle_time; end - - # Returns the value of attribute name. - # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#59 - def name; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#140 - def parent_of?(event); end - - # Returns the value of attribute payload. - # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#60 - 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 - def payload=(_arg0); end - - # source://activesupport//lib/active_support/notifications/instrumenter.rb#75 - def record; end - - # Record information at the time this event starts - # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#89 - def start!; end - - # Returns the value of attribute time. - # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#59 - def time; end - - # Returns the value of attribute transaction_id. - # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#59 - def transaction_id; end - - private - - # source://activesupport//lib/active_support/notifications/instrumenter.rb#145 - def now; end - - # Likely on JRuby, TruffleRuby - # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#162 - def now_allocations; end - - # source://activesupport//lib/active_support/notifications/instrumenter.rb#152 - def now_cpu; end -end - -# This is a default queue implementation that ships with Notifications. -# It just pushes events to all registered log subscribers. -# -# This class is thread safe. All methods are reentrant. -# -# source://activesupport//lib/active_support/notifications/fanout.rb#24 -class ActiveSupport::Notifications::Fanout - include ::Mutex_m - - # @return [Fanout] a new instance of Fanout - # - # source://activesupport//lib/active_support/notifications/fanout.rb#27 - def initialize; end - - # source://activesupport//lib/active_support/notifications/fanout.rb#75 - 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#108 - def listeners_for(name); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/notifications/fanout.rb#117 - def listening?(name); end - - # source://mutex_m/0.1.1/mutex_m.rb#93 - def lock; end - - # source://mutex_m/0.1.1/mutex_m.rb#83 - def locked?; end - - # source://activesupport//lib/active_support/notifications/fanout.rb#79 - def publish(name, *args); end - - # source://activesupport//lib/active_support/notifications/fanout.rb#83 - def publish_event(event); end - - # source://activesupport//lib/active_support/notifications/fanout.rb#71 - def start(name, id, payload); 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://mutex_m/0.1.1/mutex_m.rb#78 - def synchronize(&block); end - - # source://mutex_m/0.1.1/mutex_m.rb#88 - def try_lock; end - - # source://mutex_m/0.1.1/mutex_m.rb#98 - def unlock; end - - # source://activesupport//lib/active_support/notifications/fanout.rb#51 - def unsubscribe(subscriber_or_name); end - - # This is a sync queue, so there is no waiting. - # - # source://activesupport//lib/active_support/notifications/fanout.rb#122 - def wait; end -end - -# source://activesupport//lib/active_support/notifications/fanout.rb#125 -module ActiveSupport::Notifications::Fanout::Subscribers - class << self - # source://activesupport//lib/active_support/notifications/fanout.rb#126 - def new(pattern, listener, monotonic); end - end -end - -# source://activesupport//lib/active_support/notifications/fanout.rb#257 -class ActiveSupport::Notifications::Fanout::Subscribers::EventObject < ::ActiveSupport::Notifications::Fanout::Subscribers::Evented - # source://activesupport//lib/active_support/notifications/fanout.rb#265 - def finish(name, id, payload); end - - # source://activesupport//lib/active_support/notifications/fanout.rb#273 - def publish_event(event); end - - # source://activesupport//lib/active_support/notifications/fanout.rb#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 -class ActiveSupport::Notifications::Fanout::Subscribers::Evented - # @return [Evented] a new instance of Evented - # - # source://activesupport//lib/active_support/notifications/fanout.rb#185 - 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 pattern. - # - # source://activesupport//lib/active_support/notifications/fanout.rb#183 - def pattern; end - - # source://activesupport//lib/active_support/notifications/fanout.rb#192 - def publish(name, *args); end - - # source://activesupport//lib/active_support/notifications/fanout.rb#198 - def publish_event(event); end - - # source://activesupport//lib/active_support/notifications/fanout.rb#206 - def start(name, id, payload); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/notifications/fanout.rb#214 - def subscribed_to?(name); end - - # source://activesupport//lib/active_support/notifications/fanout.rb#218 - def unsubscribe!(name); end -end - -# source://activesupport//lib/active_support/notifications/fanout.rb#145 -class ActiveSupport::Notifications::Fanout::Subscribers::Matcher - # @return [Matcher] a new instance of Matcher - # - # source://activesupport//lib/active_support/notifications/fanout.rb#158 - def initialize(pattern); end - - # source://activesupport//lib/active_support/notifications/fanout.rb#167 - def ===(name); end - - # Returns the value of attribute exclusions. - # - # source://activesupport//lib/active_support/notifications/fanout.rb#146 - def exclusions; end - - # Returns the value of attribute pattern. - # - # source://activesupport//lib/active_support/notifications/fanout.rb#146 - def pattern; end - - # source://activesupport//lib/active_support/notifications/fanout.rb#163 - def unsubscribe!(name); end - - class << self - # source://activesupport//lib/active_support/notifications/fanout.rb#148 - def wrap(pattern); end - end -end - -# source://activesupport//lib/active_support/notifications/fanout.rb#171 -class ActiveSupport::Notifications::Fanout::Subscribers::Matcher::AllMessages - # source://activesupport//lib/active_support/notifications/fanout.rb#172 - def ===(name); end - - # source://activesupport//lib/active_support/notifications/fanout.rb#176 - 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 -end - -# source://activesupport//lib/active_support/notifications/fanout.rb#223 -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#224 - def publish(name, *args); end - - # source://activesupport//lib/active_support/notifications/fanout.rb#228 - def start(name, id, payload); end -end - -# source://activesupport//lib/active_support/notifications/fanout.rb#10 -class ActiveSupport::Notifications::InstrumentationSubscriberError < ::RuntimeError - # @return [InstrumentationSubscriberError] a new instance of InstrumentationSubscriberError - # - # source://activesupport//lib/active_support/notifications/fanout.rb#13 - def initialize(exceptions); end - - # Returns the value of attribute exceptions. - # - # source://activesupport//lib/active_support/notifications/fanout.rb#11 - def exceptions; end -end - -# Instrumenters are stored in a thread local. -# -# source://activesupport//lib/active_support/notifications/instrumenter.rb#8 -class ActiveSupport::Notifications::Instrumenter - # @return [Instrumenter] a new instance of Instrumenter - # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#11 - def initialize(notifier); end - - # Send a finish notification with +name+ and +payload+. - # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#44 - def finish(name, payload); end - - # source://activesupport//lib/active_support/notifications/instrumenter.rb#48 - def finish_with_state(listeners_state, name, payload); end - - # Returns the value of attribute id. - # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#9 - def id; end - - # Given a block, instrument it by measuring the time taken to execute - # and publish it. Without a block, simply send a message via the - # 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 - def instrument(name, payload = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/notifications/instrumenter.rb#34 - 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 - def start(name, payload); end - - private - - # source://activesupport//lib/active_support/notifications/instrumenter.rb#53 - def unique_id; end -end - -# source://activesupport//lib/active_support/number_helper.rb#4 -module ActiveSupport::NumberHelper - extend ::ActiveSupport::Autoload - extend ::ActiveSupport::NumberHelper - - # Formats a +number+ into a currency string (e.g., $13.65). You - # can customize the format in the +options+ hash. - # - # The currency unit and number formatting of the current locale will be used - # unless otherwise specified in the provided options. No currency conversion - # is performed. If the user is given a way to change their locale, they will - # also be able to change the relative value of the currency displayed with - # this helper. If your application will ever support multiple locales, you - # may want to specify a constant :locale option or consider - # using a library capable of currency conversion. - # - # ==== Options - # - # * :locale - Sets the locale to be used for formatting - # (defaults to current locale). - # * :precision - Sets the level of precision (defaults - # to 2). - # * :round_mode - Determine how rounding is performed - # (defaults to :default. See BigDecimal::mode) - # * :unit - Sets the denomination of the currency - # (defaults to "$"). - # * :separator - Sets the separator between the units - # (defaults to "."). - # * :delimiter - Sets the thousands delimiter (defaults - # to ","). - # * :format - Sets the format for non-negative numbers - # (defaults to "%u%n"). Fields are %u for the - # currency, and %n for the number. - # * :negative_format - Sets the format for negative - # numbers (defaults to prepending a hyphen to the formatted - # number given by :format). Accepts the same fields - # than :format, except %n is here the - # absolute value of the number. - # * :strip_insignificant_zeros - If +true+ removes - # insignificant zeros after the decimal separator (defaults to - # +false+). - # - # ==== Examples - # - # number_to_currency(1234567890.50) # => "$1,234,567,890.50" - # number_to_currency(1234567890.506) # => "$1,234,567,890.51" - # number_to_currency(1234567890.506, precision: 3) # => "$1,234,567,890.506" - # number_to_currency(1234567890.506, locale: :fr) # => "1 234 567 890,51 €" - # number_to_currency('123a456') # => "$123a456" - # - # number_to_currency(-0.456789, precision: 0) - # # => "$0" - # number_to_currency(-1234567890.50, negative_format: '(%u%n)') - # # => "($1,234,567,890.50)" - # number_to_currency(1234567890.50, unit: '£', separator: ',', delimiter: '') - # # => "£1234567890,50" - # number_to_currency(1234567890.50, unit: '£', separator: ',', delimiter: '', format: '%n %u') - # # => "1234567890,50 £" - # number_to_currency(1234567890.50, strip_insignificant_zeros: true) - # # => "$1,234,567,890.5" - # number_to_currency(1234567890.50, precision: 0, round_mode: :up) - # # => "$1,234,567,891" - # - # source://activesupport//lib/active_support/number_helper.rb#114 - def number_to_currency(number, options = T.unsafe(nil)); end - - # Formats a +number+ with grouped thousands using +delimiter+ - # (e.g., 12,324). You can customize the format in the +options+ - # hash. - # - # ==== Options - # - # * :locale - Sets the locale to be used for formatting - # (defaults to current locale). - # * :delimiter - Sets the thousands delimiter (defaults - # to ","). - # * :separator - Sets the separator between the - # fractional and integer digits (defaults to "."). - # * :delimiter_pattern - Sets a custom regular expression used for - # deriving the placement of delimiter. Helpful when using currency formats - # like INR. - # - # ==== Examples - # - # number_to_delimited(12345678) # => "12,345,678" - # number_to_delimited('123456') # => "123,456" - # number_to_delimited(12345678.05) # => "12,345,678.05" - # number_to_delimited(12345678, delimiter: '.') # => "12.345.678" - # number_to_delimited(12345678, delimiter: ',') # => "12,345,678" - # number_to_delimited(12345678.05, separator: ' ') # => "12,345,678 05" - # number_to_delimited(12345678.05, locale: :fr) # => "12 345 678,05" - # number_to_delimited('112a') # => "112a" - # number_to_delimited(98765432.98, delimiter: ' ', separator: ',') - # # => "98 765 432,98" - # number_to_delimited("123456.78", - # delimiter_pattern: /(\d+?)(?=(\d\d)+(\d)(?!\d))/) - # # => "1,23,456.78" - # - # source://activesupport//lib/active_support/number_helper.rb#189 - def number_to_delimited(number, options = T.unsafe(nil)); end - - # Pretty prints (formats and approximates) a number in a way it - # is more readable by humans (e.g.: 1200000000 becomes "1.2 - # Billion"). This is useful for numbers that can get very large - # (and too hard to read). - # - # See number_to_human_size if you want to print a file - # size. - # - # You can also define your own unit-quantifier names if you want - # to use other decimal units (e.g.: 1500 becomes "1.5 - # kilometers", 0.150 becomes "150 milliliters", etc). You may - # define a wide range of unit quantifiers, even fractional ones - # (centi, deci, mili, etc). - # - # ==== Options - # - # * :locale - Sets the locale to be used for formatting - # (defaults to current locale). - # * :precision - Sets the precision of the number - # (defaults to 3). - # * :round_mode - Determine how rounding is performed - # (defaults to :default. See BigDecimal::mode) - # * :significant - If +true+, precision will be the number - # of significant_digits. If +false+, the number of fractional - # digits (defaults to +true+) - # * :separator - Sets the separator between the - # fractional and integer digits (defaults to "."). - # * :delimiter - Sets the thousands delimiter (defaults - # to ""). - # * :strip_insignificant_zeros - If +true+ removes - # insignificant zeros after the decimal separator (defaults to - # +true+) - # * :units - A Hash of unit quantifier names. Or a - # string containing an i18n scope where to find this hash. It - # might have the following keys: - # * *integers*: :unit, :ten, - # :hundred, :thousand, :million, - # :billion, :trillion, - # :quadrillion - # * *fractionals*: :deci, :centi, - # :mili, :micro, :nano, - # :pico, :femto - # * :format - Sets the format of the output string - # (defaults to "%n %u"). The field types are: - # * %u - The quantifier (ex.: 'thousand') - # * %n - The number - # - # ==== Examples - # - # number_to_human(123) # => "123" - # number_to_human(1234) # => "1.23 Thousand" - # number_to_human(12345) # => "12.3 Thousand" - # number_to_human(1234567) # => "1.23 Million" - # number_to_human(1234567890) # => "1.23 Billion" - # number_to_human(1234567890123) # => "1.23 Trillion" - # number_to_human(1234567890123456) # => "1.23 Quadrillion" - # number_to_human(1234567890123456789) # => "1230 Quadrillion" - # number_to_human(489939, precision: 2) # => "490 Thousand" - # number_to_human(489939, precision: 4) # => "489.9 Thousand" - # number_to_human(489939, precision: 2 - # , round_mode: :down) # => "480 Thousand" - # number_to_human(1234567, precision: 4, - # significant: false) # => "1.2346 Million" - # number_to_human(1234567, precision: 1, - # separator: ',', - # significant: false) # => "1,2 Million" - # - # number_to_human(500000000, precision: 5) # => "500 Million" - # number_to_human(12345012345, significant: false) # => "12.345 Billion" - # - # Non-significant zeros after the decimal separator are stripped - # out by default (set :strip_insignificant_zeros to - # +false+ to change that): - # - # number_to_human(12.00001) # => "12" - # number_to_human(12.00001, strip_insignificant_zeros: false) # => "12.0" - # - # ==== Custom Unit Quantifiers - # - # You can also use your own custom unit quantifiers: - # number_to_human(500000, units: { unit: 'ml', thousand: 'lt' }) # => "500 lt" - # - # If in your I18n locale you have: - # - # distance: - # centi: - # one: "centimeter" - # other: "centimeters" - # unit: - # one: "meter" - # other: "meters" - # thousand: - # one: "kilometer" - # other: "kilometers" - # billion: "gazillion-distance" - # - # Then you could do: - # - # number_to_human(543934, units: :distance) # => "544 kilometers" - # number_to_human(54393498, units: :distance) # => "54400 kilometers" - # number_to_human(54393498000, units: :distance) # => "54.4 gazillion-distance" - # number_to_human(343, units: :distance, precision: 1) # => "300 meters" - # number_to_human(1, units: :distance) # => "1 meter" - # number_to_human(0.34, units: :distance) # => "34 centimeters" - # - # source://activesupport//lib/active_support/number_helper.rb#391 - def number_to_human(number, options = T.unsafe(nil)); end - - # Formats the bytes in +number+ into a more understandable - # representation (e.g., giving it 1500 yields 1.46 KB). This - # method is useful for reporting file sizes to users. You can - # customize the format in the +options+ hash. - # - # See number_to_human if you want to pretty-print a - # generic number. - # - # ==== Options - # - # * :locale - Sets the locale to be used for formatting - # (defaults to current locale). - # * :precision - Sets the precision of the number - # (defaults to 3). - # * :round_mode - Determine how rounding is performed - # (defaults to :default. See BigDecimal::mode) - # * :significant - If +true+, precision will be the number - # of significant_digits. If +false+, the number of fractional - # digits (defaults to +true+) - # * :separator - Sets the separator between the - # fractional and integer digits (defaults to "."). - # * :delimiter - Sets the thousands delimiter (defaults - # to ""). - # * :strip_insignificant_zeros - If +true+ removes - # insignificant zeros after the decimal separator (defaults to - # +true+) - # - # ==== Examples - # - # number_to_human_size(123) # => "123 Bytes" - # number_to_human_size(1234) # => "1.21 KB" - # number_to_human_size(12345) # => "12.1 KB" - # number_to_human_size(1234567) # => "1.18 MB" - # number_to_human_size(1234567890) # => "1.15 GB" - # number_to_human_size(1234567890123) # => "1.12 TB" - # number_to_human_size(1234567890123456) # => "1.1 PB" - # number_to_human_size(1234567890123456789) # => "1.07 EB" - # number_to_human_size(1234567, precision: 2) # => "1.2 MB" - # number_to_human_size(483989, precision: 2) # => "470 KB" - # number_to_human_size(483989, precision: 2, round_mode: :up) # => "480 KB" - # number_to_human_size(1234567, precision: 2, separator: ',') # => "1,2 MB" - # number_to_human_size(1234567890123, precision: 5) # => "1.1228 TB" - # number_to_human_size(524288000, precision: 5) # => "500 MB" - # - # source://activesupport//lib/active_support/number_helper.rb#283 - def number_to_human_size(number, options = T.unsafe(nil)); end - - # Formats a +number+ as a percentage string (e.g., 65%). You can - # customize the format in the +options+ hash. - # - # ==== Options - # - # * :locale - Sets the locale to be used for formatting - # (defaults to current locale). - # * :precision - Sets the precision of the number - # (defaults to 3). Keeps the number's precision if +nil+. - # * :round_mode - Determine how rounding is performed - # (defaults to :default. See BigDecimal::mode) - # * :significant - If +true+, precision will be the number - # of significant_digits. If +false+, the number of fractional - # digits (defaults to +false+). - # * :separator - Sets the separator between the - # fractional and integer digits (defaults to "."). - # * :delimiter - Sets the thousands delimiter (defaults - # to ""). - # * :strip_insignificant_zeros - If +true+ removes - # insignificant zeros after the decimal separator (defaults to - # +false+). - # * :format - Specifies the format of the percentage - # string The number field is %n (defaults to "%n%"). - # - # ==== Examples - # - # number_to_percentage(100) # => "100.000%" - # number_to_percentage('98') # => "98.000%" - # number_to_percentage(100, precision: 0) # => "100%" - # number_to_percentage(1000, delimiter: '.', separator: ',') # => "1.000,000%" - # number_to_percentage(302.24398923423, precision: 5) # => "302.24399%" - # number_to_percentage(1000, locale: :fr) # => "1000,000%" - # number_to_percentage(1000, precision: nil) # => "1000%" - # number_to_percentage('98a') # => "98a%" - # number_to_percentage(100, format: '%n %') # => "100.000 %" - # number_to_percentage(302.24398923423, precision: 5, round_mode: :down) # => "302.24398%" - # - # source://activesupport//lib/active_support/number_helper.rb#154 - def number_to_percentage(number, options = T.unsafe(nil)); end - - # Formats a +number+ into a phone number (US by default e.g., (555) - # 123-9876). You can customize the format in the +options+ hash. - # - # ==== Options - # - # * :area_code - Adds parentheses around the area code. - # * :delimiter - Specifies the delimiter to use - # (defaults to "-"). - # * :extension - Specifies an extension to add to the - # end of the generated number. - # * :country_code - Sets the country code for the phone - # number. - # * :pattern - Specifies how the number is divided into three - # groups with the custom regexp to override the default format. - # ==== Examples - # - # number_to_phone(5551234) # => "555-1234" - # number_to_phone('5551234') # => "555-1234" - # number_to_phone(1235551234) # => "123-555-1234" - # number_to_phone(1235551234, area_code: true) # => "(123) 555-1234" - # number_to_phone(1235551234, delimiter: ' ') # => "123 555 1234" - # number_to_phone(1235551234, area_code: true, extension: 555) # => "(123) 555-1234 x 555" - # number_to_phone(1235551234, country_code: 1) # => "+1-123-555-1234" - # number_to_phone('123a456') # => "123a456" - # - # number_to_phone(1235551234, country_code: 1, extension: 1343, delimiter: '.') - # # => "+1.123.555.1234 x 1343" - # - # number_to_phone(75561234567, pattern: /(\d{1,4})(\d{4})(\d{4})$/, area_code: true) - # # => "(755) 6123-4567" - # number_to_phone(13312345678, pattern: /(\d{3})(\d{4})(\d{4})$/) - # # => "133-1234-5678" - # - # source://activesupport//lib/active_support/number_helper.rb#53 - def number_to_phone(number, options = T.unsafe(nil)); end - - # Formats a +number+ with the specified level of - # :precision (e.g., 112.32 has a precision of 2 if - # +:significant+ is +false+, and 5 if +:significant+ is +true+). - # You can customize the format in the +options+ hash. - # - # ==== Options - # - # * :locale - Sets the locale to be used for formatting - # (defaults to current locale). - # * :precision - Sets the precision of the number - # (defaults to 3). Keeps the number's precision if +nil+. - # * :round_mode - Determine how rounding is performed - # (defaults to :default. See BigDecimal::mode) - # * :significant - If +true+, precision will be the number - # of significant_digits. If +false+, the number of fractional - # digits (defaults to +false+). - # * :separator - Sets the separator between the - # fractional and integer digits (defaults to "."). - # * :delimiter - Sets the thousands delimiter (defaults - # to ""). - # * :strip_insignificant_zeros - If +true+ removes - # insignificant zeros after the decimal separator (defaults to - # +false+). - # - # ==== Examples - # - # number_to_rounded(111.2345) # => "111.235" - # number_to_rounded(111.2345, precision: 2) # => "111.23" - # number_to_rounded(13, precision: 5) # => "13.00000" - # number_to_rounded(389.32314, precision: 0) # => "389" - # number_to_rounded(111.2345, significant: true) # => "111" - # number_to_rounded(111.2345, precision: 1, significant: true) # => "100" - # number_to_rounded(13, precision: 5, significant: true) # => "13.000" - # number_to_rounded(13, precision: nil) # => "13" - # number_to_rounded(389.32314, precision: 0, round_mode: :up) # => "390" - # number_to_rounded(111.234, locale: :fr) # => "111,234" - # - # number_to_rounded(13, precision: 5, significant: true, strip_insignificant_zeros: true) - # # => "13" - # - # number_to_rounded(389.32314, precision: 4, significant: true) # => "389.3" - # number_to_rounded(1111.2345, precision: 2, separator: ',', delimiter: '.') - # # => "1.111,23" - # - # source://activesupport//lib/active_support/number_helper.rb#236 - def number_to_rounded(number, options = T.unsafe(nil)); end -end - -# source://activesupport//lib/active_support/number_helper/number_converter.rb#11 -class ActiveSupport::NumberHelper::NumberConverter - # @return [NumberConverter] a new instance of NumberConverter - # - # source://activesupport//lib/active_support/number_helper/number_converter.rb#123 - def initialize(number, options); end - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#128 - def execute; end - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 - def namespace; end - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 - def namespace=(_arg0); end - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 - def namespace?; end - - # Returns the value of attribute number. - # - # source://activesupport//lib/active_support/number_helper/number_converter.rb#18 - def number; end - - # Returns the value of attribute opts. - # - # source://activesupport//lib/active_support/number_helper/number_converter.rb#18 - def opts; end - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 - def validate_float; end - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 - def validate_float=(_arg0); end - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 - def validate_float?; end - - private - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#147 - def default_format_options; end - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#172 - def default_value(key); end - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#143 - def format_options; end - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#153 - def i18n_format_options; end - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#139 - def options; end - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#168 - def translate_in_locale(key, **i18n_options); end - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#164 - 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 - - class << self - # source://activesupport//lib/active_support/number_helper/number_converter.rb#119 - def convert(number, options); end - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 - def namespace; end - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 - def namespace=(value); end - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 - def namespace?; end - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 - def validate_float; end - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 - def validate_float=(value); end - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 - def validate_float?; end - end -end - -# source://activesupport//lib/active_support/number_helper/number_converter.rb#20 -ActiveSupport::NumberHelper::NumberConverter::DEFAULTS = T.let(T.unsafe(nil), Hash) - -# source://activesupport//lib/active_support/number_helper/number_to_currency_converter.rb#7 -class ActiveSupport::NumberHelper::NumberToCurrencyConverter < ::ActiveSupport::NumberHelper::NumberConverter - # source://activesupport//lib/active_support/number_helper/number_to_currency_converter.rb#10 - def convert; end - - private - - # source://activesupport//lib/active_support/number_helper/number_to_currency_converter.rb#38 - def i18n_opts; end - - # source://activesupport//lib/active_support/number_helper/number_to_currency_converter.rb#29 - def options; end - - class << self - # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 - def namespace; end - end -end - -# source://activesupport//lib/active_support/number_helper/number_to_delimited_converter.rb#7 -class ActiveSupport::NumberHelper::NumberToDelimitedConverter < ::ActiveSupport::NumberHelper::NumberConverter - # source://activesupport//lib/active_support/number_helper/number_to_delimited_converter.rb#12 - def convert; end - - private - - # source://activesupport//lib/active_support/number_helper/number_to_delimited_converter.rb#25 - def delimiter_pattern; end - - # source://activesupport//lib/active_support/number_helper/number_to_delimited_converter.rb#17 - def parts; end - - class << self - # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 - def validate_float; end - end -end - -# source://activesupport//lib/active_support/number_helper/number_to_delimited_converter.rb#10 -ActiveSupport::NumberHelper::NumberToDelimitedConverter::DEFAULT_DELIMITER_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://activesupport//lib/active_support/number_helper/number_to_human_converter.rb#7 -class ActiveSupport::NumberHelper::NumberToHumanConverter < ::ActiveSupport::NumberHelper::NumberConverter - # source://activesupport//lib/active_support/number_helper/number_to_human_converter.rb#15 - def convert; end - - private - - # source://activesupport//lib/active_support/number_helper/number_to_human_converter.rb#50 - def calculate_exponent(units); end - - # source://activesupport//lib/active_support/number_helper/number_to_human_converter.rb#38 - def determine_unit(units, exponent); end - - # source://activesupport//lib/active_support/number_helper/number_to_human_converter.rb#34 - def format; end - - # source://activesupport//lib/active_support/number_helper/number_to_human_converter.rb#55 - def unit_exponents(units); end - - class << self - # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 - def namespace; end - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 - def validate_float; end - end -end - -# source://activesupport//lib/active_support/number_helper/number_to_human_converter.rb#8 -ActiveSupport::NumberHelper::NumberToHumanConverter::DECIMAL_UNITS = T.let(T.unsafe(nil), Hash) - -# source://activesupport//lib/active_support/number_helper/number_to_human_converter.rb#10 -ActiveSupport::NumberHelper::NumberToHumanConverter::INVERTED_DECIMAL_UNITS = T.let(T.unsafe(nil), Hash) - -# source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#7 -class ActiveSupport::NumberHelper::NumberToHumanSizeConverter < ::ActiveSupport::NumberHelper::NumberConverter - # source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#13 - def convert; end - - private - - # source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#55 - def base; end - - # source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#31 - def conversion_format; end - - # source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#44 - def exponent; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#51 - def smaller_than_base?; end - - # source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#39 - def storage_unit_key; end - - # source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#35 - def unit; end - - class << self - # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 - def namespace; end - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 - def validate_float; end - end -end - -# source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#8 -ActiveSupport::NumberHelper::NumberToHumanSizeConverter::STORAGE_UNITS = T.let(T.unsafe(nil), Array) - -# source://activesupport//lib/active_support/number_helper/number_to_percentage_converter.rb#7 -class ActiveSupport::NumberHelper::NumberToPercentageConverter < ::ActiveSupport::NumberHelper::NumberConverter - # source://activesupport//lib/active_support/number_helper/number_to_percentage_converter.rb#10 - def convert; end - - class << self - # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 - def namespace; end - end -end - -# source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#7 -class ActiveSupport::NumberHelper::NumberToPhoneConverter < ::ActiveSupport::NumberHelper::NumberConverter - # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#8 - def convert; end - - private - - # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#15 - def convert_to_phone_number(number); end - - # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#23 - def convert_with_area_code(number); end - - # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#30 - def convert_without_area_code(number); end - - # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#46 - def country_code(code); end - - # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#42 - def delimiter; end - - # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#50 - def phone_ext(ext); end - - # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#54 - def regexp_pattern(default_pattern); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#38 - def start_with_delimiter?(number); end -end - -# source://activesupport//lib/active_support/number_helper/number_to_rounded_converter.rb#7 -class ActiveSupport::NumberHelper::NumberToRoundedConverter < ::ActiveSupport::NumberHelper::NumberConverter - # source://activesupport//lib/active_support/number_helper/number_to_rounded_converter.rb#11 - def convert; end - - private - - # source://activesupport//lib/active_support/number_helper/number_to_rounded_converter.rb#49 - def format_number(number); end - - # source://activesupport//lib/active_support/number_helper/number_to_rounded_converter.rb#45 - def strip_insignificant_zeros; end - - class << self - # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 - def namespace; end - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 - def validate_float; end - end -end - -# source://activesupport//lib/active_support/number_helper/rounding_helper.rb#5 -class ActiveSupport::NumberHelper::RoundingHelper - # @return [RoundingHelper] a new instance of RoundingHelper - # - # source://activesupport//lib/active_support/number_helper/rounding_helper.rb#8 - def initialize(options); end - - # source://activesupport//lib/active_support/number_helper/rounding_helper.rb#20 - def digit_count(number); end - - # Returns the value of attribute options. - # - # source://activesupport//lib/active_support/number_helper/rounding_helper.rb#6 - def options; end - - # source://activesupport//lib/active_support/number_helper/rounding_helper.rb#12 - def round(number); end - - private - - # source://activesupport//lib/active_support/number_helper/rounding_helper.rb#37 - def absolute_precision(number); end - - # source://activesupport//lib/active_support/number_helper/rounding_helper.rb#26 - def convert_to_decimal(number); end -end - -# source://activesupport//lib/active_support/core_ext/numeric/conversions.rb#7 -module ActiveSupport::NumericWithFormat - # Provides options for converting numbers into formatted strings. - # Options are provided for phone numbers, currency, percentage, - # precision, positional notation, file size, and pretty printing. - # - # This method is aliased to to_formatted_s. - # - # ==== Options - # - # For details on which formats use which options, see ActiveSupport::NumberHelper - # - # ==== Examples - # - # Phone Numbers: - # 5551234.to_fs(:phone) # => "555-1234" - # 1235551234.to_fs(:phone) # => "123-555-1234" - # 1235551234.to_fs(:phone, area_code: true) # => "(123) 555-1234" - # 1235551234.to_fs(:phone, delimiter: ' ') # => "123 555 1234" - # 1235551234.to_fs(:phone, area_code: true, extension: 555) # => "(123) 555-1234 x 555" - # 1235551234.to_fs(:phone, country_code: 1) # => "+1-123-555-1234" - # 1235551234.to_fs(:phone, country_code: 1, extension: 1343, delimiter: '.') - # # => "+1.123.555.1234 x 1343" - # - # Currency: - # 1234567890.50.to_fs(:currency) # => "$1,234,567,890.50" - # 1234567890.506.to_fs(:currency) # => "$1,234,567,890.51" - # 1234567890.506.to_fs(:currency, precision: 3) # => "$1,234,567,890.506" - # 1234567890.506.to_fs(:currency, round_mode: :down) # => "$1,234,567,890.50" - # 1234567890.506.to_fs(:currency, locale: :fr) # => "1 234 567 890,51 €" - # -1234567890.50.to_fs(:currency, negative_format: '(%u%n)') - # # => "($1,234,567,890.50)" - # 1234567890.50.to_fs(:currency, unit: '£', separator: ',', delimiter: '') - # # => "£1234567890,50" - # 1234567890.50.to_fs(:currency, unit: '£', separator: ',', delimiter: '', format: '%n %u') - # # => "1234567890,50 £" - # - # Percentage: - # 100.to_fs(:percentage) # => "100.000%" - # 100.to_fs(:percentage, precision: 0) # => "100%" - # 1000.to_fs(:percentage, delimiter: '.', separator: ',') # => "1.000,000%" - # 302.24398923423.to_fs(:percentage, precision: 5) # => "302.24399%" - # 302.24398923423.to_fs(:percentage, round_mode: :down) # => "302.243%" - # 1000.to_fs(:percentage, locale: :fr) # => "1 000,000%" - # 100.to_fs(:percentage, format: '%n %') # => "100.000 %" - # - # Delimited: - # 12345678.to_fs(:delimited) # => "12,345,678" - # 12345678.05.to_fs(:delimited) # => "12,345,678.05" - # 12345678.to_fs(:delimited, delimiter: '.') # => "12.345.678" - # 12345678.to_fs(:delimited, delimiter: ',') # => "12,345,678" - # 12345678.05.to_fs(:delimited, separator: ' ') # => "12,345,678 05" - # 12345678.05.to_fs(:delimited, locale: :fr) # => "12 345 678,05" - # 98765432.98.to_fs(:delimited, delimiter: ' ', separator: ',') - # # => "98 765 432,98" - # - # Rounded: - # 111.2345.to_fs(:rounded) # => "111.235" - # 111.2345.to_fs(:rounded, precision: 2) # => "111.23" - # 111.2345.to_fs(:rounded, precision: 2, round_mode: :up) # => "111.24" - # 13.to_fs(:rounded, precision: 5) # => "13.00000" - # 389.32314.to_fs(:rounded, precision: 0) # => "389" - # 111.2345.to_fs(:rounded, significant: true) # => "111" - # 111.2345.to_fs(:rounded, precision: 1, significant: true) # => "100" - # 13.to_fs(:rounded, precision: 5, significant: true) # => "13.000" - # 111.234.to_fs(:rounded, locale: :fr) # => "111,234" - # 13.to_fs(:rounded, precision: 5, significant: true, strip_insignificant_zeros: true) - # # => "13" - # 389.32314.to_fs(:rounded, precision: 4, significant: true) # => "389.3" - # 1111.2345.to_fs(:rounded, precision: 2, separator: ',', delimiter: '.') - # # => "1.111,23" - # - # Human-friendly size in Bytes: - # 123.to_fs(:human_size) # => "123 Bytes" - # 1234.to_fs(:human_size) # => "1.21 KB" - # 12345.to_fs(:human_size) # => "12.1 KB" - # 1234567.to_fs(:human_size) # => "1.18 MB" - # 1234567890.to_fs(:human_size) # => "1.15 GB" - # 1234567890123.to_fs(:human_size) # => "1.12 TB" - # 1234567890123456.to_fs(:human_size) # => "1.1 PB" - # 1234567890123456789.to_fs(:human_size) # => "1.07 EB" - # 1234567.to_fs(:human_size, precision: 2) # => "1.2 MB" - # 1234567.to_fs(:human_size, precision: 2, round_mode: :up) # => "1.3 MB" - # 483989.to_fs(:human_size, precision: 2) # => "470 KB" - # 1234567.to_fs(:human_size, precision: 2, separator: ',') # => "1,2 MB" - # 1234567890123.to_fs(:human_size, precision: 5) # => "1.1228 TB" - # 524288000.to_fs(:human_size, precision: 5) # => "500 MB" - # - # Human-friendly format: - # 123.to_fs(:human) # => "123" - # 1234.to_fs(:human) # => "1.23 Thousand" - # 12345.to_fs(:human) # => "12.3 Thousand" - # 1234567.to_fs(:human) # => "1.23 Million" - # 1234567890.to_fs(:human) # => "1.23 Billion" - # 1234567890123.to_fs(:human) # => "1.23 Trillion" - # 1234567890123456.to_fs(:human) # => "1.23 Quadrillion" - # 1234567890123456789.to_fs(:human) # => "1230 Quadrillion" - # 489939.to_fs(:human, precision: 2) # => "490 Thousand" - # 489939.to_fs(:human, precision: 2, round_mode: :down) # => "480 Thousand" - # 489939.to_fs(:human, precision: 4) # => "489.9 Thousand" - # 1234567.to_fs(:human, precision: 4, - # significant: false) # => "1.2346 Million" - # 1234567.to_fs(:human, precision: 1, - # separator: ',', - # significant: false) # => "1,2 Million" - # - # source://activesupport//lib/active_support/core_ext/numeric/conversions.rb#111 - def to_formatted_s(format = T.unsafe(nil), options = T.unsafe(nil)); end - - # Provides options for converting numbers into formatted strings. - # Options are provided for phone numbers, currency, percentage, - # precision, positional notation, file size, and pretty printing. - # - # This method is aliased to to_formatted_s. - # - # ==== Options - # - # For details on which formats use which options, see ActiveSupport::NumberHelper - # - # ==== Examples - # - # Phone Numbers: - # 5551234.to_fs(:phone) # => "555-1234" - # 1235551234.to_fs(:phone) # => "123-555-1234" - # 1235551234.to_fs(:phone, area_code: true) # => "(123) 555-1234" - # 1235551234.to_fs(:phone, delimiter: ' ') # => "123 555 1234" - # 1235551234.to_fs(:phone, area_code: true, extension: 555) # => "(123) 555-1234 x 555" - # 1235551234.to_fs(:phone, country_code: 1) # => "+1-123-555-1234" - # 1235551234.to_fs(:phone, country_code: 1, extension: 1343, delimiter: '.') - # # => "+1.123.555.1234 x 1343" - # - # Currency: - # 1234567890.50.to_fs(:currency) # => "$1,234,567,890.50" - # 1234567890.506.to_fs(:currency) # => "$1,234,567,890.51" - # 1234567890.506.to_fs(:currency, precision: 3) # => "$1,234,567,890.506" - # 1234567890.506.to_fs(:currency, round_mode: :down) # => "$1,234,567,890.50" - # 1234567890.506.to_fs(:currency, locale: :fr) # => "1 234 567 890,51 €" - # -1234567890.50.to_fs(:currency, negative_format: '(%u%n)') - # # => "($1,234,567,890.50)" - # 1234567890.50.to_fs(:currency, unit: '£', separator: ',', delimiter: '') - # # => "£1234567890,50" - # 1234567890.50.to_fs(:currency, unit: '£', separator: ',', delimiter: '', format: '%n %u') - # # => "1234567890,50 £" - # - # Percentage: - # 100.to_fs(:percentage) # => "100.000%" - # 100.to_fs(:percentage, precision: 0) # => "100%" - # 1000.to_fs(:percentage, delimiter: '.', separator: ',') # => "1.000,000%" - # 302.24398923423.to_fs(:percentage, precision: 5) # => "302.24399%" - # 302.24398923423.to_fs(:percentage, round_mode: :down) # => "302.243%" - # 1000.to_fs(:percentage, locale: :fr) # => "1 000,000%" - # 100.to_fs(:percentage, format: '%n %') # => "100.000 %" - # - # Delimited: - # 12345678.to_fs(:delimited) # => "12,345,678" - # 12345678.05.to_fs(:delimited) # => "12,345,678.05" - # 12345678.to_fs(:delimited, delimiter: '.') # => "12.345.678" - # 12345678.to_fs(:delimited, delimiter: ',') # => "12,345,678" - # 12345678.05.to_fs(:delimited, separator: ' ') # => "12,345,678 05" - # 12345678.05.to_fs(:delimited, locale: :fr) # => "12 345 678,05" - # 98765432.98.to_fs(:delimited, delimiter: ' ', separator: ',') - # # => "98 765 432,98" - # - # Rounded: - # 111.2345.to_fs(:rounded) # => "111.235" - # 111.2345.to_fs(:rounded, precision: 2) # => "111.23" - # 111.2345.to_fs(:rounded, precision: 2, round_mode: :up) # => "111.24" - # 13.to_fs(:rounded, precision: 5) # => "13.00000" - # 389.32314.to_fs(:rounded, precision: 0) # => "389" - # 111.2345.to_fs(:rounded, significant: true) # => "111" - # 111.2345.to_fs(:rounded, precision: 1, significant: true) # => "100" - # 13.to_fs(:rounded, precision: 5, significant: true) # => "13.000" - # 111.234.to_fs(:rounded, locale: :fr) # => "111,234" - # 13.to_fs(:rounded, precision: 5, significant: true, strip_insignificant_zeros: true) - # # => "13" - # 389.32314.to_fs(:rounded, precision: 4, significant: true) # => "389.3" - # 1111.2345.to_fs(:rounded, precision: 2, separator: ',', delimiter: '.') - # # => "1.111,23" - # - # Human-friendly size in Bytes: - # 123.to_fs(:human_size) # => "123 Bytes" - # 1234.to_fs(:human_size) # => "1.21 KB" - # 12345.to_fs(:human_size) # => "12.1 KB" - # 1234567.to_fs(:human_size) # => "1.18 MB" - # 1234567890.to_fs(:human_size) # => "1.15 GB" - # 1234567890123.to_fs(:human_size) # => "1.12 TB" - # 1234567890123456.to_fs(:human_size) # => "1.1 PB" - # 1234567890123456789.to_fs(:human_size) # => "1.07 EB" - # 1234567.to_fs(:human_size, precision: 2) # => "1.2 MB" - # 1234567.to_fs(:human_size, precision: 2, round_mode: :up) # => "1.3 MB" - # 483989.to_fs(:human_size, precision: 2) # => "470 KB" - # 1234567.to_fs(:human_size, precision: 2, separator: ',') # => "1,2 MB" - # 1234567890123.to_fs(:human_size, precision: 5) # => "1.1228 TB" - # 524288000.to_fs(:human_size, precision: 5) # => "500 MB" - # - # Human-friendly format: - # 123.to_fs(:human) # => "123" - # 1234.to_fs(:human) # => "1.23 Thousand" - # 12345.to_fs(:human) # => "12.3 Thousand" - # 1234567.to_fs(:human) # => "1.23 Million" - # 1234567890.to_fs(:human) # => "1.23 Billion" - # 1234567890123.to_fs(:human) # => "1.23 Trillion" - # 1234567890123456.to_fs(:human) # => "1.23 Quadrillion" - # 1234567890123456789.to_fs(:human) # => "1230 Quadrillion" - # 489939.to_fs(:human, precision: 2) # => "490 Thousand" - # 489939.to_fs(:human, precision: 2, round_mode: :down) # => "480 Thousand" - # 489939.to_fs(:human, precision: 4) # => "489.9 Thousand" - # 1234567.to_fs(:human, precision: 4, - # significant: false) # => "1.2346 Million" - # 1234567.to_fs(:human, precision: 1, - # separator: ',', - # significant: false) # => "1,2 Million" - # - # source://activesupport//lib/active_support/core_ext/numeric/conversions.rb#111 - def to_fs(format = T.unsafe(nil), options = T.unsafe(nil)); end -end - -# source://activesupport//lib/active_support/option_merger.rb#6 -class ActiveSupport::OptionMerger - # @return [OptionMerger] a new instance of OptionMerger - # - # source://activesupport//lib/active_support/option_merger.rb#11 - def initialize(context, options); end - - private - - # source://activesupport//lib/active_support/option_merger.rb#16 - def method_missing(method, *arguments, &block); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/option_merger.rb#34 - def respond_to_missing?(*arguments); end -end - -# DEPRECATED: ActiveSupport::OrderedHash implements a hash that preserves -# insertion order. -# -# oh = ActiveSupport::OrderedHash.new -# oh[:a] = 1 -# oh[:b] = 2 -# oh.keys # => [:a, :b], this order is guaranteed -# -# Also, maps the +omap+ feature for YAML files -# (See https://yaml.org/type/omap.html) to support ordered items -# when loading from yaml. -# -# ActiveSupport::OrderedHash is namespaced to prevent conflicts -# with other implementations. -# -# source://activesupport//lib/active_support/ordered_hash.rb#24 -class ActiveSupport::OrderedHash < ::Hash - # source://activesupport//lib/active_support/ordered_hash.rb#29 - def encode_with(coder); end - - # Returns true to make sure that this hash is extractable via Array#extract_options! - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/ordered_hash.rb#46 - def extractable_options?; end - - # source://activesupport//lib/active_support/ordered_hash.rb#41 - def nested_under_indifferent_access; end - - # source://activesupport//lib/active_support/ordered_hash.rb#37 - def reject(*args, &block); end - - # source://activesupport//lib/active_support/ordered_hash.rb#33 - def select(*args, &block); end - - # source://activesupport//lib/active_support/ordered_hash.rb#25 - def to_yaml_type; end -end - -# +OrderedOptions+ inherits from +Hash+ and provides dynamic accessor methods. -# -# With a +Hash+, key-value pairs are typically managed like this: -# -# h = {} -# h[:boy] = 'John' -# h[:girl] = 'Mary' -# h[:boy] # => 'John' -# h[:girl] # => 'Mary' -# h[:dog] # => nil -# -# Using +OrderedOptions+, the above code can be written as: -# -# h = ActiveSupport::OrderedOptions.new -# h.boy = 'John' -# h.girl = 'Mary' -# h.boy # => 'John' -# h.girl # => 'Mary' -# h.dog # => nil -# -# To raise an exception when the value is blank, append a -# bang to the key name, like: -# -# h.dog! # => raises KeyError: :dog is blank -# -# source://activesupport//lib/active_support/ordered_options.rb#31 -class ActiveSupport::OrderedOptions < ::Hash - # source://activesupport//lib/active_support/ordered_options.rb#39 - def [](key); end - - # source://activesupport//lib/active_support/ordered_options.rb#35 - def []=(key, value); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/ordered_options.rb#62 - def extractable_options?; end - - # source://activesupport//lib/active_support/ordered_options.rb#66 - def inspect; end - - # source://activesupport//lib/active_support/ordered_options.rb#43 - def method_missing(name, *args); end - - protected - - # preserve the original #[] method - def _get(_arg0); end - - private - - # @return [Boolean] - # - # source://activesupport//lib/active_support/ordered_options.rb#58 - def respond_to_missing?(name, include_private); end -end - -# +ParameterFilter+ allows you to specify keys for sensitive data from -# hash-like object and replace corresponding value. Filtering only certain -# sub-keys from a hash is possible by using the dot notation: -# 'credit_card.number'. If a proc is given, each key and value of a hash and -# all sub-hashes are passed to it, where the value or the key can be replaced -# using String#replace or similar methods. -# -# ActiveSupport::ParameterFilter.new([:password]) -# => replaces the value to all keys matching /password/i with "[FILTERED]" -# -# ActiveSupport::ParameterFilter.new([:foo, "bar"]) -# => replaces the value to all keys matching /foo|bar/i with "[FILTERED]" -# -# ActiveSupport::ParameterFilter.new([/\Apin\z/i, /\Apin_/i]) -# => replaces the value for the exact (case-insensitive) key 'pin' and all -# (case-insensitive) keys beginning with 'pin_', with "[FILTERED]". -# Does not match keys with 'pin' as a substring, such as 'shipping_id'. -# -# ActiveSupport::ParameterFilter.new(["credit_card.code"]) -# => replaces { credit_card: {code: "xxxx"} } with "[FILTERED]", does not -# change { file: { code: "xxxx"} } -# -# ActiveSupport::ParameterFilter.new([-> (k, v) do -# v.reverse! if /secret/i.match?(k) -# end]) -# => reverses the value to all keys matching /secret/i -# -# source://activesupport//lib/active_support/parameter_filter.rb#32 -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+. - # For +Proc+ filters, key, value, and optional original hash is passed to block arguments. - # - # ==== Options - # - # * :mask - A replaced object when filtered. Defaults to "[FILTERED]". - # - # @return [ParameterFilter] a new instance of ParameterFilter - # - # source://activesupport//lib/active_support/parameter_filter.rb#42 - 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#48 - 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#53 - def filter_param(key, value); end - - private - - # source://activesupport//lib/active_support/parameter_filter.rb#58 - def compiled_filter; end -end - -# source://activesupport//lib/active_support/parameter_filter.rb#62 -class ActiveSupport::ParameterFilter::CompiledFilter - # @return [CompiledFilter] a new instance of CompiledFilter - # - # source://activesupport//lib/active_support/parameter_filter.rb#96 - def initialize(regexps, deep_regexps, blocks, mask:); end - - # Returns the value of attribute blocks. - # - # source://activesupport//lib/active_support/parameter_filter.rb#94 - def blocks; end - - # source://activesupport//lib/active_support/parameter_filter.rb#103 - 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#94 - def deep_regexps; end - - # Returns the value of attribute regexps. - # - # source://activesupport//lib/active_support/parameter_filter.rb#94 - def regexps; end - - # source://activesupport//lib/active_support/parameter_filter.rb#113 - def value_for_key(key, value, parents = T.unsafe(nil), original_params = T.unsafe(nil)); end - - class << self - # source://activesupport//lib/active_support/parameter_filter.rb#63 - def compile(filters, mask:); end - end -end - -# source://activesupport//lib/active_support/parameter_filter.rb#33 -ActiveSupport::ParameterFilter::FILTERED = T.let(T.unsafe(nil), String) - -# NOTE: This approach has been deprecated for end-user code in favor of {thread_mattr_accessor}[rdoc-ref:Module#thread_mattr_accessor] and friends. -# Please use that approach instead. -# -# This module is used to encapsulate access to thread local variables. -# -# Instead of polluting the thread locals namespace: -# -# Thread.current[:connection_handler] -# -# you define a class that extends this module: -# -# module ActiveRecord -# class RuntimeRegistry -# extend ActiveSupport::PerThreadRegistry -# -# attr_accessor :connection_handler -# end -# end -# -# and invoke the declared instance accessors as class methods. So -# -# 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 -class ActiveSupport::ProxyObject < ::BasicObject - # Let ActiveSupport::ProxyObject at least raise exceptions. - # - # source://activesupport//lib/active_support/proxy_object.rb#11 - 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 -module ActiveSupport::RangeWithFormat - # Convert range to a formatted string. See RANGE_FORMATS for predefined formats. - # - # This method is aliased to to_formatted_s. - # - # range = (1..100) # => 1..100 - # - # range.to_s # => "1..100" - # range.to_fs(:db) # => "BETWEEN '1' AND '100'" - # - # == Adding your own range formats to to_s - # 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 - def to_formatted_s(format = T.unsafe(nil)); end - - # Convert range to a formatted string. See RANGE_FORMATS for predefined formats. - # - # This method is aliased to to_formatted_s. - # - # range = (1..100) # => 1..100 - # - # range.to_s # => "1..100" - # range.to_fs(:db) # => "BETWEEN '1' AND '100'" - # - # == Adding your own range formats to to_s - # 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 - def to_fs(format = T.unsafe(nil)); end -end - -# source://activesupport//lib/active_support/core_ext/range/conversions.rb#5 -ActiveSupport::RangeWithFormat::RANGE_FORMATS = T.let(T.unsafe(nil), Hash) - -# -- -# This class defines several callbacks: -# -# to_prepare -- Run once at application startup, and also from -# +to_run+. -# -# to_run -- Run before a work run that is reloading. If -# +reload_classes_only_on_change+ is true (the default), the class -# unload will have already occurred. -# -# to_complete -- Run after a work run that has reloaded. If -# +reload_classes_only_on_change+ is false, the class unload will -# have occurred after the work run, but before this callback. -# -# before_class_unload -- Run immediately before the classes are -# unloaded. -# -# after_class_unload -- Run immediately after the classes are -# unloaded. -# -# source://activesupport//lib/active_support/reloader.rb#27 -class ActiveSupport::Reloader < ::ActiveSupport::ExecutionWrapper - # @return [Reloader] a new instance of Reloader - # - # source://activesupport//lib/active_support/reloader.rb#91 - def initialize; end - - # source://activesupport//lib/active_support/callbacks.rb#940 - def _class_unload_callbacks; end - - # source://activesupport//lib/active_support/callbacks.rb#940 - def _prepare_callbacks; end - - # source://activesupport//lib/active_support/callbacks.rb#928 - def _run_class_unload_callbacks(&block); end - - # source://activesupport//lib/active_support/callbacks.rb#928 - def _run_prepare_callbacks(&block); end - - # source://activesupport//lib/active_support/reloader.rb#77 - def check; end - - # source://activesupport//lib/active_support/reloader.rb#77 - def check=(_arg0); end - - # source://activesupport//lib/active_support/reloader.rb#77 - def check?; end - - # source://activesupport//lib/active_support/reloader.rb#118 - def class_unload!(&block); end - - # source://activesupport//lib/active_support/reloader.rb#123 - def complete!; end - - # source://activesupport//lib/active_support/reloader.rb#76 - def executor; end - - # source://activesupport//lib/active_support/reloader.rb#76 - def executor=(_arg0); end - - # source://activesupport//lib/active_support/reloader.rb#76 - def executor?; end - - # Release the unload lock if it has been previously obtained - # - # source://activesupport//lib/active_support/reloader.rb#106 - 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 - def require_unload_lock!; end - - # source://activesupport//lib/active_support/reloader.rb#113 - def run!; end - - class << self - # source://activesupport//lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport//lib/active_support/callbacks.rb#932 - def _class_unload_callbacks; end - - # source://activesupport//lib/active_support/callbacks.rb#936 - def _class_unload_callbacks=(value); end - - # source://activesupport//lib/active_support/callbacks.rb#932 - def _prepare_callbacks; end - - # source://activesupport//lib/active_support/callbacks.rb#936 - 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 - 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 - def before_class_unload(*args, &block); end - - # source://activesupport//lib/active_support/reloader.rb#77 - def check; end - - # source://activesupport//lib/active_support/reloader.rb#79 - def check!; end - - # source://activesupport//lib/active_support/reloader.rb#77 - def check=(value); end - - # source://activesupport//lib/active_support/reloader.rb#77 - def check?; end - - # source://activesupport//lib/active_support/reloader.rb#76 - def executor; end - - # source://activesupport//lib/active_support/reloader.rb#76 - def executor=(value); end - - # source://activesupport//lib/active_support/reloader.rb#76 - def executor?; end - - # source://activesupport//lib/active_support/reloader.rb#87 - def prepare!; end - - # Initiate a manual reload - # - # source://activesupport//lib/active_support/reloader.rb#50 - def reload!; end - - # source://activesupport//lib/active_support/reloader.rb#83 - def reloaded!; end - - # source://activesupport//lib/active_support/reloader.rb#61 - 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 - 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 - end -end - -# Rescuable module adds support for easier exception handling. -# -# source://activesupport//lib/active_support/rescuable.rb#9 -module ActiveSupport::Rescuable - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveSupport::Rescuable::ClassMethods - - # 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 - 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 - def rescue_with_handler(exception); end - - module GeneratedClassMethods - def rescue_handlers; end - def rescue_handlers=(value); end - def rescue_handlers?; end - end - - module GeneratedInstanceMethods - def rescue_handlers; end - def rescue_handlers=(value); end - def rescue_handlers?; end - end -end - -# source://activesupport//lib/active_support/rescuable.rb#16 -module ActiveSupport::Rescuable::ClassMethods - # source://activesupport//lib/active_support/rescuable.rb#103 - def handler_for_rescue(exception, object: T.unsafe(nil)); end - - # Registers exception classes with a handler to be called by rescue_with_handler. - # - # rescue_from receives a series of exception classes or class - # names, and an exception handler specified by a trailing :with - # option containing the name of a method or a Proc object. Alternatively, a block - # can be given as the handler. - # - # Handlers that take one argument will be called with the exception, so - # that the exception can be inspected when dealing with it. - # - # Handlers are inherited. They are searched from right to left, from - # bottom to top, and up the hierarchy. The handler of the first class for - # which exception.is_a?(klass) holds true is the one invoked, if - # any. - # - # class ApplicationController < ActionController::Base - # rescue_from User::NotAuthorized, with: :deny_access - # rescue_from ActiveRecord::RecordInvalid, with: :show_record_errors - # - # rescue_from "MyApp::BaseError" do |exception| - # redirect_to root_url, alert: exception.message - # end - # - # private - # def deny_access - # head :forbidden - # end - # - # def show_record_errors(exception) - # redirect_back_or_to root_url, alert: exception.record.errors.full_messages.to_sentence - # end - # end - # - # Exceptions raised inside exception handlers are not propagated up. - # - # source://activesupport//lib/active_support/rescuable.rb#51 - def rescue_from(*klasses, with: T.unsafe(nil), &block); end - - # Matches an exception to a handler based on the exception class. - # - # If no handler matches the exception, check for a handler matching the - # (optional) +exception.cause+. If no handler matches the exception or its - # cause, this returns +nil+, so you can deal with unhandled exceptions. - # Be sure to re-raise unhandled exceptions if this is what you expect. - # - # begin - # # ... - # rescue => exception - # rescue_with_handler(exception) || raise - # end - # - # Returns the exception if it was handled and +nil+ if it was not. - # - # source://activesupport//lib/active_support/rescuable.rb#88 - def rescue_with_handler(exception, object: T.unsafe(nil), visited_exceptions: T.unsafe(nil)); end - - private - - # source://activesupport//lib/active_support/rescuable.rb#137 - def constantize_rescue_handler_class(class_or_name); end - - # source://activesupport//lib/active_support/rescuable.rb#122 - def find_rescue_handler(exception); end -end - -# source://activesupport//lib/active_support/ruby_features.rb#4 -module ActiveSupport::RubyFeatures; end - -# RUBY_VERSION >= "3.1" -# -# 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 -class ActiveSupport::SafeBuffer < ::String - # @return [SafeBuffer] a new instance of SafeBuffer - # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#200 - def initialize(str = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#253 - def %(args); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#246 - def *(*_arg0); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#242 - def +(other); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#214 - def <<(value); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#181 - def [](*args); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#234 - def []=(*args); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#283 - def capitalize(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 - def capitalize!(*args); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#283 - def chomp(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 - def chomp!(*args); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#283 - def chop(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 - def chop!(*args); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#210 - def clone_empty; end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#214 - def concat(value); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#283 - def delete(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 - def delete!(*args); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#283 - def delete_prefix(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 - def delete_prefix!(*args); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#283 - def delete_suffix(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 - def delete_suffix!(*args); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#283 - def downcase(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 - def downcase!(*args); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#276 - def encode_with(coder); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#297 - def gsub(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#308 - def gsub!(*args, &block); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#264 - def html_safe?; end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#222 - def insert(index, value); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#283 - def lstrip(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 - def lstrip!(*args); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#283 - def next(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 - def next!(*args); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#226 - def prepend(value); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#230 - def replace(value); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#283 - def reverse(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 - def reverse!(*args); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#283 - def rstrip(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 - def rstrip!(*args); end - - # @raise [SafeConcatError] - # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#195 - def safe_concat(value); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#283 - def scrub(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 - def scrub!(*args); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#283 - def slice(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 - def slice!(*args); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#283 - def squeeze(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 - def squeeze!(*args); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#283 - def strip(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 - def strip!(*args); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#297 - def sub(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#308 - def sub!(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#283 - def succ(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 - def succ!(*args); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#283 - def swapcase(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 - def swapcase!(*args); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#272 - def to_param; end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#268 - def to_s; end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#283 - def tr(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 - def tr!(*args); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#283 - def tr_s(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 - def tr_s!(*args); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#283 - def unicode_normalize(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 - def unicode_normalize!(*args); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#283 - def upcase(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 - def upcase!(*args); end - - private - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#323 - def explicit_html_escape_interpolated_argument(arg); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#327 - def implicit_html_escape_interpolated_argument(arg); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#205 - def initialize_copy(other); end - - def original_concat(*_arg0); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#350 - def set_block_back_references(block, match_data); 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 -class ActiveSupport::SafeBuffer::SafeConcatError < ::StandardError - # @return [SafeConcatError] a new instance of SafeConcatError - # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#176 - def initialize; end -end - -# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#163 -ActiveSupport::SafeBuffer::UNSAFE_STRING_METHODS = T.let(T.unsafe(nil), Array) - -# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#169 -ActiveSupport::SafeBuffer::UNSAFE_STRING_METHODS_WITH_BACKREF = T.let(T.unsafe(nil), Array) - -# The ActiveSupport::SecureCompareRotator is a wrapper around ActiveSupport::SecurityUtils.secure_compare -# and allows you to rotate a previously defined value to a new one. -# -# It can be used as follow: -# -# rotator = ActiveSupport::SecureCompareRotator.new('new_production_value') -# rotator.rotate('previous_production_value') -# rotator.secure_compare!('previous_production_value') -# -# One real use case example would be to rotate a basic auth credentials: -# -# class MyController < ApplicationController -# def authenticate_request -# rotator = ActiveSupport::SecureCompareRotator.new('new_password') -# rotator.rotate('old_password') -# -# authenticate_or_request_with_http_basic do |username, password| -# rotator.secure_compare!(password) -# rescue ActiveSupport::SecureCompareRotator::InvalidMatch -# false -# end -# end -# end -# -# source://activesupport//lib/active_support/secure_compare_rotator.rb#30 -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 - - private - - # source://activesupport//lib/active_support/secure_compare_rotator.rb#47 - def build_rotation(previous_value, _options); end -end - -# source://activesupport//lib/active_support/secure_compare_rotator.rb#34 -class ActiveSupport::SecureCompareRotator::InvalidMatch < ::StandardError; end - -# source://activesupport//lib/active_support/security_utils.rb#4 -module ActiveSupport::SecurityUtils - private - - # @raise [ArgumentError] - # - # source://activesupport//lib/active_support/security_utils.rb#11 - def fixed_length_secure_compare(a, b); end - - # Secure string comparison for strings of variable length. - # - # While a timing attack would not be able to discern the content of - # a secret compared via secure_compare, it is possible to determine - # the secret length. This should be considered when using secure_compare - # to compare weak, short secrets to user input. - # - # source://activesupport//lib/active_support/security_utils.rb#33 - def secure_compare(a, b); end - - class << self - # @raise [ArgumentError] - # - # source://activesupport//lib/active_support/security_utils.rb#11 - def fixed_length_secure_compare(a, b); end - - # Secure string comparison for strings of variable length. - # - # While a timing attack would not be able to discern the content of - # a secret compared via secure_compare, it is possible to determine - # the secret length. This should be considered when using secure_compare - # to compare weak, short secrets to user input. - # - # source://activesupport//lib/active_support/security_utils.rb#33 - def secure_compare(a, b); end - end -end - -# 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: -# -# Rails.env == 'production' -# -# you can call this: -# -# Rails.env.production? -# -# == Instantiating a new StringInquirer -# -# vehicle = ActiveSupport::StringInquirer.new('car') -# vehicle.car? # => true -# vehicle.bike? # => false -# -# source://activesupport//lib/active_support/string_inquirer.rb#19 -class ActiveSupport::StringInquirer < ::String - private - - # source://activesupport//lib/active_support/string_inquirer.rb#25 - def method_missing(method_name, *arguments); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/string_inquirer.rb#21 - def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end -end - -# ActiveSupport::Subscriber is an object set to consume -# ActiveSupport::Notifications. The subscriber dispatches notifications to -# a registered object based on its given namespace. -# -# An example would be an Active Record subscriber responsible for collecting -# statistics about queries: -# -# module ActiveRecord -# class StatsSubscriber < ActiveSupport::Subscriber -# attach_to :active_record -# -# def sql(event) -# Statsd.timing("sql.#{event.payload[:name]}", event.duration) -# 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. -# -# We can detach a subscriber as well: -# -# ActiveRecord::StatsSubscriber.detach_from(:active_record) -# -# source://activesupport//lib/active_support/subscriber.rb#30 -class ActiveSupport::Subscriber - # @return [Subscriber] a new instance of Subscriber - # - # source://activesupport//lib/active_support/subscriber.rb#128 - def initialize; end - - # source://activesupport//lib/active_support/subscriber.rb#143 - def finish(name, id, payload); end - - # source://activesupport//lib/active_support/subscriber.rb#126 - def patterns; end - - # source://activesupport//lib/active_support/subscriber.rb#152 - 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 - 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 - 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 - def method_added(event); end - - # source://activesupport//lib/active_support/subscriber.rb#76 - def subscribers; end - - private - - # source://activesupport//lib/active_support/subscriber.rb#83 - def add_event_subscriber(event); end - - # source://activesupport//lib/active_support/subscriber.rb#121 - def fetch_public_methods(subscriber, inherit_all); end - - # source://activesupport//lib/active_support/subscriber.rb#105 - def find_attached_subscriber; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/subscriber.rb#109 - def invalid_event?(event); end - - # Returns the value of attribute namespace. - # - # source://activesupport//lib/active_support/subscriber.rb#81 - def namespace; end - - # Returns the value of attribute notifier. - # - # source://activesupport//lib/active_support/subscriber.rb#81 - def notifier; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/subscriber.rb#117 - def pattern_subscribed?(pattern); end - - # source://activesupport//lib/active_support/subscriber.rb#113 - def prepare_pattern(event); end - - # source://activesupport//lib/active_support/subscriber.rb#94 - def remove_event_subscriber(event); end - - # Returns the value of attribute subscriber. - # - # source://activesupport//lib/active_support/subscriber.rb#81 - def subscriber; end - end -end - -# 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" -# -# If called without a block, a new logger will be returned with applied tags: -# -# logger = ActiveSupport::TaggedLogging.new(Logger.new(STDOUT)) -# logger.tagged("BCX").info "Stuff" # Logs "[BCX] Stuff" -# logger.tagged("BCX", "Jason").info "Stuff" # Logs "[BCX] [Jason] Stuff" -# logger.tagged("BCX").tagged("Jason").info "Stuff" # Logs "[BCX] [Jason] Stuff" -# -# This is used by the default Rails.logger as configured by Railties to make -# 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 -module ActiveSupport::TaggedLogging - # source://activesupport//lib/active_support/tagged_logging.rb#95 - def clear_tags!(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/tagged_logging.rb#108 - def flush; end - - # source://activesupport//lib/active_support/tagged_logging.rb#95 - def pop_tags(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/tagged_logging.rb#95 - def push_tags(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/tagged_logging.rb#97 - def tagged(*tags); end - - class << self - # source://activesupport//lib/active_support/tagged_logging.rb#81 - def new(logger); end - end -end - -# source://activesupport//lib/active_support/tagged_logging.rb#29 -module ActiveSupport::TaggedLogging::Formatter - # This method is invoked when a log event occurs. - # - # source://activesupport//lib/active_support/tagged_logging.rb#31 - def call(severity, timestamp, progname, msg); end - - # source://activesupport//lib/active_support/tagged_logging.rb#53 - def clear_tags!; end - - # source://activesupport//lib/active_support/tagged_logging.rb#57 - 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#42 - def push_tags(*tags); end - - # source://activesupport//lib/active_support/tagged_logging.rb#35 - def tagged(*tags); end - - # source://activesupport//lib/active_support/tagged_logging.rb#63 - def tags_text; end -end - -# source://activesupport//lib/active_support/tagged_logging.rb#73 -module ActiveSupport::TaggedLogging::LocalTagStorage - # Returns the value of attribute current_tags. - # - # source://activesupport//lib/active_support/tagged_logging.rb#74 - def current_tags; end - - # Sets the attribute current_tags - # - # @param value the value to set the attribute current_tags to. - # - # source://activesupport//lib/active_support/tagged_logging.rb#74 - def current_tags=(_arg0); end - - class << self - # @private - # - # source://activesupport//lib/active_support/tagged_logging.rb#76 - def extended(base); end - end -end - -# source://activesupport//lib/active_support/test_case.rb#19 -class ActiveSupport::TestCase < ::Minitest::Test - include ::ActiveSupport::Testing::SetupAndTeardown - include ::ActiveSupport::Testing::TaggedLogging - include ::ActiveSupport::Callbacks - include ::ActiveSupport::Testing::Assertions - include ::ActiveSupport::Testing::Deprecation - include ::ActiveSupport::Testing::TimeHelpers - include ::ActiveSupport::Testing::FileFixtures - include ::Turbo::TestAssertions - extend ::ActiveSupport::Callbacks::ClassMethods - extend ::ActiveSupport::DescendantsTracker - extend ::ActiveSupport::Testing::SetupAndTeardown::ClassMethods - extend ::ActiveSupport::Testing::Declarative - - # source://activesupport//lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport//lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://activesupport//lib/active_support/callbacks.rb#928 - def _run_setup_callbacks(&block); end - - # source://activesupport//lib/active_support/callbacks.rb#928 - def _run_teardown_callbacks(&block); end - - # source://activesupport//lib/active_support/callbacks.rb#940 - def _setup_callbacks; end - - # source://activesupport//lib/active_support/callbacks.rb#940 - def _teardown_callbacks; end - - # source://minitest/5.17.0/lib/minitest/assertions.rb#709 - def assert_no_match(matcher, obj, msg = T.unsafe(nil)); end - - # source://minitest/5.17.0/lib/minitest/assertions.rb#638 - def assert_not_empty(obj, msg = T.unsafe(nil)); end - - # source://minitest/5.17.0/lib/minitest/assertions.rb#649 - def assert_not_equal(exp, act, msg = T.unsafe(nil)); end - - # source://minitest/5.17.0/lib/minitest/assertions.rb#661 - def assert_not_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end - - # source://minitest/5.17.0/lib/minitest/assertions.rb#673 - def assert_not_in_epsilon(a, b, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end - - # source://minitest/5.17.0/lib/minitest/assertions.rb#680 - def assert_not_includes(collection, obj, msg = T.unsafe(nil)); end - - # source://minitest/5.17.0/lib/minitest/assertions.rb#691 - def assert_not_instance_of(cls, obj, msg = T.unsafe(nil)); end - - # source://minitest/5.17.0/lib/minitest/assertions.rb#701 - def assert_not_kind_of(cls, obj, msg = T.unsafe(nil)); end - - # source://minitest/5.17.0/lib/minitest/assertions.rb#719 - def assert_not_nil(obj, msg = T.unsafe(nil)); end - - # source://minitest/5.17.0/lib/minitest/assertions.rb#730 - def assert_not_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end - - # source://minitest/5.17.0/lib/minitest/assertions.rb#753 - def assert_not_predicate(o1, op, msg = T.unsafe(nil)); end - - # source://minitest/5.17.0/lib/minitest/assertions.rb#761 - def assert_not_respond_to(obj, meth, msg = T.unsafe(nil)); end - - # source://minitest/5.17.0/lib/minitest/assertions.rb#770 - def assert_not_same(exp, act, msg = T.unsafe(nil)); end - - # test/unit backwards compatibility methods - # - # source://minitest/5.17.0/lib/minitest/assertions.rb#396 - def assert_raise(*exp); end - - # source://turbo-rails/1.3.3/lib/turbo/test_assertions.rb#7 - def dom_class(*_arg0, **_arg1, &_arg2); end - - # source://turbo-rails/1.3.3/lib/turbo/test_assertions.rb#7 - def dom_id(*_arg0, **_arg1, &_arg2); 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 - def inspect; end - - # source://minitest/5.17.0/lib/minitest.rb#304 - def method_name; end - - class << self - # source://activesupport//lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport//lib/active_support/callbacks.rb#68 - def __callbacks=(value); end - - # source://activesupport//lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://activesupport//lib/active_support/callbacks.rb#932 - def _setup_callbacks; end - - # source://activesupport//lib/active_support/callbacks.rb#936 - def _setup_callbacks=(value); end - - # source://activesupport//lib/active_support/callbacks.rb#932 - def _teardown_callbacks; end - - # source://activesupport//lib/active_support/callbacks.rb#936 - def _teardown_callbacks=(value); 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=(value); end - - # source://activesupport//lib/active_support/testing/file_fixtures.rb#20 - def file_fixture_path?; end - - # Parallelizes the test suite. - # - # Takes a +workers+ argument that controls how many times the process - # is forked. For each process a new database will be created suffixed - # with the worker number. - # - # test-database-0 - # test-database-1 - # - # If ENV["PARALLEL_WORKERS"] is set the workers argument will be ignored - # and the environment variable will be used instead. This is useful for CI - # environments, or other environments where you may need more workers than - # you do for local testing. - # - # If the number of workers is set to +1+ or fewer, the tests will not be - # parallelized. - # - # If +workers+ is set to +:number_of_processors+, the number of workers will be - # set to the actual core count on the machine you are on. - # - # 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. - # - # parallelize(workers: :number_of_processors, with: :threads) - # - # The threaded parallelization uses minitest's parallel executor directly. - # The processes parallelization uses a Ruby DRb server. - # - # Because parallelization presents an overhead, it is only enabled when the - # 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 - 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 - # databases or any behavior that needs to be run after the process is forked - # but before the tests run. - # - # Note: this feature is not available with the threaded parallelization. - # - # In your +test_helper.rb+ add the following: - # - # class ActiveSupport::TestCase - # parallelize_setup do - # # create databases - # end - # end - # - # source://activesupport//lib/active_support/test_case.rb#101 - def parallelize_setup(&block); end - - # Clean up hook for parallel testing. This can be used to drop databases - # if your app uses multiple write/read databases or other clean up before - # the tests finish. This runs before the forked process is closed. - # - # Note: this feature is not available with the threaded parallelization. - # - # In your +test_helper.rb+ add the following: - # - # class ActiveSupport::TestCase - # parallelize_teardown do - # # drop databases - # end - # end - # - # source://activesupport//lib/active_support/test_case.rb#118 - def parallelize_teardown(&block); end - - # Returns the order in which test cases are run. - # - # ActiveSupport::TestCase.test_order # => :random - # - # Possible values are +:random+, +:parallel+, +:alpha+, +:sorted+. - # Defaults to +:random+. - # - # source://activesupport//lib/active_support/test_case.rb#42 - def test_order; end - - # Sets the order in which test cases are run. - # - # ActiveSupport::TestCase.test_order = :random # => :random - # - # Valid values are: - # * +:random+ (to run tests in random order) - # * +:parallel+ (to run tests in parallel) - # * +:sorted+ (to run tests alphabetically by method name) - # * +:alpha+ (equivalent to +:sorted+) - # - # source://activesupport//lib/active_support/test_case.rb#32 - def test_order=(new_order); end - end -end - -# source://activesupport//lib/active_support/test_case.rb#20 -ActiveSupport::TestCase::Assertion = Minitest::Assertion - -# source://activesupport//lib/active_support/testing/tagged_logging.rb#4 -module ActiveSupport::Testing; end - -# source://activesupport//lib/active_support/testing/assertions.rb#7 -module ActiveSupport::Testing::Assertions - # Assertion that the result of evaluating an expression is changed before - # and after invoking the passed in block. - # - # assert_changes 'Status.all_good?' do - # post :create, params: { status: { ok: false } } - # end - # - # You can pass the block as a string to be evaluated in the context of - # the block. A lambda can be passed for the block as well. - # - # assert_changes -> { Status.all_good? } do - # post :create, params: { status: { ok: false } } - # end - # - # The assertion is useful to test side effects. The passed block can be - # anything that can be converted to string with #to_s. - # - # assert_changes :@object do - # @object = 42 - # end - # - # The keyword arguments +:from+ and +:to+ can be given to specify the - # expected initial value and the expected value after the block was - # executed. - # - # assert_changes :@object, from: nil, to: :foo do - # @object = :foo - # end - # - # An error message can be specified. - # - # assert_changes -> { Status.all_good? }, 'Expected the status to be bad' do - # post :create, params: { status: { incident: true } } - # end - # - # source://activesupport//lib/active_support/testing/assertions.rb#175 - 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 - # result of what is evaluated in the yielded block. - # - # assert_difference 'Article.count' do - # post :create, params: { article: {...} } - # end - # - # An arbitrary expression is passed in and evaluated. - # - # assert_difference 'Article.last.comments(:reload).size' do - # post :create, params: { comment: {...} } - # end - # - # An arbitrary positive or negative difference can be specified. - # The default is 1. - # - # assert_difference 'Article.count', -1 do - # post :delete, params: { id: ... } - # end - # - # An array of expressions can also be passed in and evaluated. - # - # assert_difference [ 'Article.count', 'Post.count' ], 2 do - # post :create, params: { article: {...} } - # end - # - # A hash of expressions/numeric differences can also be passed in and evaluated. - # - # assert_difference ->{ Article.count } => 1, ->{ Notification.count } => 2 do - # post :create, params: { article: {...} } - # end - # - # A lambda or a list of lambdas can be passed in and evaluated: - # - # assert_difference ->{ Article.count }, 2 do - # post :create, params: { article: {...} } - # end - # - # assert_difference [->{ Article.count }, ->{ Post.count }], 2 do - # post :create, params: { article: {...} } - # end - # - # An error message can be specified. - # - # assert_difference 'Article.count', -1, 'An Article should be destroyed' do - # post :delete, params: { id: ... } - # end - # - # source://activesupport//lib/active_support/testing/assertions.rb#86 - def assert_difference(expression, *args, &block); end - - # Assertion that the result of evaluating an expression is not changed before - # and after invoking the passed in block. - # - # assert_no_changes 'Status.all_good?' do - # post :create, params: { status: { ok: true } } - # end - # - # Provide the optional keyword argument :from to specify the expected - # initial value. - # - # assert_no_changes -> { Status.all_good? }, from: true do - # post :create, params: { status: { ok: true } } - # end - # - # An error message can be specified. - # - # assert_no_changes -> { Status.all_good? }, 'Expected the status to be good' do - # post :create, params: { status: { ok: false } } - # end - # - # source://activesupport//lib/active_support/testing/assertions.rb#222 - 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 - # changed before and after invoking the passed in block. - # - # assert_no_difference 'Article.count' do - # post :create, params: { article: invalid_attributes } - # end - # - # A lambda can be passed in and evaluated. - # - # assert_no_difference -> { Article.count } do - # post :create, params: { article: invalid_attributes } - # end - # - # An error message can be specified. - # - # assert_no_difference 'Article.count', 'An Article should not be created' do - # post :create, params: { article: invalid_attributes } - # end - # - # An array of expressions can also be passed in and evaluated. - # - # assert_no_difference [ 'Article.count', -> { Post.count } ] do - # post :create, params: { article: invalid_attributes } - # end - # - # source://activesupport//lib/active_support/testing/assertions.rb#137 - 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. - # - # assert_not nil # => true - # assert_not false # => true - # assert_not 'foo' # => Expected "foo" to be nil or false - # - # An error message can be specified. - # - # assert_not foo, 'foo should be false' - # - # source://activesupport//lib/active_support/testing/assertions.rb#21 - def assert_not(object, message = T.unsafe(nil)); end - - # Assertion that the block should not raise an exception. - # - # Passes if evaluated code in the yielded block raises no exception. - # - # assert_nothing_raised do - # perform_service(param: 'no_exception') - # end - # - # source://activesupport//lib/active_support/testing/assertions.rb#33 - def assert_nothing_raised; end - - private - - # source://activesupport//lib/active_support/testing/assertions.rb#249 - def _assert_nothing_raised_or_warn(assertion, &block); end -end - -# source://activesupport//lib/active_support/testing/assertions.rb#8 -ActiveSupport::Testing::Assertions::UNTRACKED = T.let(T.unsafe(nil), Object) - -# Resolves a constant from a minitest spec name. -# -# Given the following spec-style test: -# -# describe WidgetsController, :index do -# describe "authenticated user" do -# describe "returns widgets" do -# it "has a controller that exists" do -# assert_kind_of WidgetsController, @controller -# end -# end -# end -# end -# -# The test will have the following name: -# -# "WidgetsController::index::authenticated user::returns widgets" -# -# The constant WidgetsController can be resolved from the name. -# The following code will resolve the constant: -# -# controller = determine_constant_from_test_name(name) do |constant| -# Class === constant && constant < ::ActionController::Metal -# end -# -# source://activesupport//lib/active_support/testing/constant_lookup.rb#32 -module ActiveSupport::Testing::ConstantLookup - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActiveSupport::Testing::ConstantLookup::ClassMethods -end - -# source://activesupport//lib/active_support/testing/constant_lookup.rb#35 -module ActiveSupport::Testing::ConstantLookup::ClassMethods - # source://activesupport//lib/active_support/testing/constant_lookup.rb#36 - def determine_constant_from_test_name(test_name); 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 - # spaces with underscores and defines the test method. - # - # test "verify something" do - # ... - # end - # - # source://activesupport//lib/active_support/testing/declarative.rb#13 - def test(name, &block); end -end - -# source://activesupport//lib/active_support/testing/deprecation.rb#7 -module ActiveSupport::Testing::Deprecation - # Asserts that a matching deprecation warning was emitted by the given deprecator during the execution of the yielded block. - # - # assert_deprecated(/foo/, CustomDeprecator) do - # CustomDeprecator.warn "foo should no longer be used" - # end - # - # The +match+ object may be a +Regexp+, or +String+ appearing in the message. - # - # assert_deprecated('foo', CustomDeprecator) do - # CustomDeprecator.warn "foo should no longer be used" - # end - # - # If the +match+ is omitted (or explicitly +nil+), any deprecation warning will match. - # - # assert_deprecated(nil, CustomDeprecator) do - # CustomDeprecator.warn "foo should no longer be used" - # end - # - # If no +deprecator+ is given, defaults to ActiveSupport::Deprecation. - # - # assert_deprecated do - # ActiveSupport::Deprecation.warn "foo should no longer be used" - # end - # - # source://activesupport//lib/active_support/testing/deprecation.rb#31 - 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 - # - # If no +deprecator+ is given, defaults to ActiveSupport::Deprecation. - # - # assert_not_deprecated do - # ActiveSupport::Deprecation.warn "message" # fails assertion - # end - # - # assert_not_deprecated do - # CustomDeprecator.warn "message" # passes assertion - # end - # - # source://activesupport//lib/active_support/testing/deprecation.rb#56 - def assert_not_deprecated(deprecator = T.unsafe(nil), &block); end - - # Returns an array of all the deprecation warnings emitted by the given - # +deprecator+ during the execution of the yielded block. - # - # collect_deprecations(CustomDeprecator) do - # CustomDeprecator.warn "message" - # end # => ["message"] - # - # If no +deprecator+ is given, defaults to ActiveSupport::Deprecation. - # - # collect_deprecations do - # CustomDeprecator.warn "custom message" - # ActiveSupport::Deprecation.warn "message" - # end # => ["message"] - # - # source://activesupport//lib/active_support/testing/deprecation.rb#75 - def collect_deprecations(deprecator = T.unsafe(nil)); end -end - -# Adds simple access to sample files called file fixtures. -# File fixtures are normal files stored in -# ActiveSupport::TestCase.file_fixture_path. -# -# File fixtures are represented as +Pathname+ objects. -# This makes it easy to extract specific information: -# -# file_fixture("example.txt").read # get the file's content -# file_fixture("example.mp3").size # get the file size -# -# source://activesupport//lib/active_support/testing/file_fixtures.rb#16 -module ActiveSupport::Testing::FileFixtures - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - - # Returns a +Pathname+ to the fixture file named +fixture_name+. - # - # Raises +ArgumentError+ if +fixture_name+ can't be found. - # - # source://activesupport//lib/active_support/testing/file_fixtures.rb#26 - def file_fixture(fixture_name); end - - module GeneratedClassMethods - def file_fixture_path; end - def file_fixture_path=(value); end - def file_fixture_path?; end - end - - module GeneratedInstanceMethods - def file_fixture_path; end - def file_fixture_path?; end - end -end - -# source://activesupport//lib/active_support/testing/isolation.rb#5 -module ActiveSupport::Testing::Isolation - include ::ActiveSupport::Testing::Isolation::Forking - - # source://activesupport//lib/active_support/testing/isolation.rb#18 - def run; end - - class << self - # @return [Boolean] - # - # source://activesupport//lib/active_support/testing/isolation.rb#14 - def forking_env?; end - - # source://activesupport//lib/active_support/testing/isolation.rb#8 - def included(klass); end - end -end - -# source://activesupport//lib/active_support/testing/isolation.rb#26 -module ActiveSupport::Testing::Isolation::Forking - # source://activesupport//lib/active_support/testing/isolation.rb#27 - def run_in_isolation(&blk); end -end - -# source://activesupport//lib/active_support/testing/isolation.rb#63 -module ActiveSupport::Testing::Isolation::Subprocess - # Complicated H4X to get this working in windows / jruby with - # no forking. - # - # source://activesupport//lib/active_support/testing/isolation.rb#68 - def run_in_isolation(&blk); end -end - -# source://activesupport//lib/active_support/testing/isolation.rb#64 -ActiveSupport::Testing::Isolation::Subprocess::ORIG_ARGV = T.let(T.unsafe(nil), Array) - -# source://activesupport//lib/active_support/testing/parallelization/server.rb#8 -class ActiveSupport::Testing::Parallelization - # @return [Parallelization] a new instance of Parallelization - # - # source://activesupport//lib/active_support/testing/parallelization.rb#28 - def initialize(worker_count); end - - # source://activesupport//lib/active_support/testing/parallelization.rb#41 - def <<(work); end - - # source://activesupport//lib/active_support/testing/parallelization.rb#18 - def after_fork_hooks; end - - # source://activesupport//lib/active_support/testing/parallelization.rb#26 - def run_cleanup_hooks; end - - # source://activesupport//lib/active_support/testing/parallelization.rb#49 - def shutdown; end - - # source://activesupport//lib/active_support/testing/parallelization.rb#45 - def size; end - - # source://activesupport//lib/active_support/testing/parallelization.rb#35 - def start; end - - class << self - # source://activesupport//lib/active_support/testing/parallelization.rb#14 - def after_fork_hook(&blk); end - - # source://activesupport//lib/active_support/testing/parallelization.rb#18 - def after_fork_hooks; end - - # source://activesupport//lib/active_support/testing/parallelization.rb#22 - def run_cleanup_hook(&blk); end - - # source://activesupport//lib/active_support/testing/parallelization.rb#26 - def run_cleanup_hooks; end - end -end - -# source://activesupport//lib/active_support/testing/parallelization/server.rb#9 -class ActiveSupport::Testing::Parallelization::Server - include ::DRb::DRbUndumped - - # @return [Server] a new instance of Server - # - # source://activesupport//lib/active_support/testing/parallelization/server.rb#12 - def initialize; end - - # source://activesupport//lib/active_support/testing/parallelization/server.rb#28 - def <<(o); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/testing/parallelization/server.rb#48 - def active_workers?; end - - # source://activesupport//lib/active_support/testing/parallelization/server.rb#52 - def interrupt; end - - # source://activesupport//lib/active_support/testing/parallelization/server.rb#33 - def pop; end - - # @raise [DRb::DRbConnError] - # - # source://activesupport//lib/active_support/testing/parallelization/server.rb#18 - def record(reporter, result); end - - # source://activesupport//lib/active_support/testing/parallelization/server.rb#56 - def shutdown; end - - # source://activesupport//lib/active_support/testing/parallelization/server.rb#40 - def start_worker(worker_id); end - - # source://activesupport//lib/active_support/testing/parallelization/server.rb#44 - def stop_worker(worker_id); end -end - -# source://activesupport//lib/active_support/testing/parallelization/worker.rb#6 -class ActiveSupport::Testing::Parallelization::Worker - # @return [Worker] a new instance of Worker - # - # source://activesupport//lib/active_support/testing/parallelization/worker.rb#7 - def initialize(number, url); end - - # source://activesupport//lib/active_support/testing/parallelization/worker.rb#80 - def after_fork; end - - # source://activesupport//lib/active_support/testing/parallelization/worker.rb#42 - def perform_job(job); end - - # source://activesupport//lib/active_support/testing/parallelization/worker.rb#86 - def run_cleanup; end - - # source://activesupport//lib/active_support/testing/parallelization/worker.rb#56 - def safe_record(reporter, result); end - - # source://activesupport//lib/active_support/testing/parallelization/worker.rb#14 - def start; end - - # source://activesupport//lib/active_support/testing/parallelization/worker.rb#36 - def work_from_queue; end - - private - - # source://activesupport//lib/active_support/testing/parallelization/worker.rb#93 - def add_setup_exception(result); end - - # source://activesupport//lib/active_support/testing/parallelization/worker.rb#97 - def set_process_title(status); end -end - -# source://activesupport//lib/active_support/testing/parallelize_executor.rb#5 -class ActiveSupport::Testing::ParallelizeExecutor - # @return [ParallelizeExecutor] a new instance of 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 - def <<(work); end - - # Returns the value of attribute parallelize_with. - # - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#6 - def parallelize_with; end - - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#25 - def shutdown; end - - # Returns the value of attribute size. - # - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#6 - def size; end - - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#14 - def start; end - - # Returns the value of attribute threshold. - # - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#6 - def threshold; end - - private - - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#34 - def build_parallel_executor; end - - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#67 - def execution_info; end - - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#30 - def parallel_executor; end - - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#46 - def parallelize; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#51 - def parallelized?; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#55 - def should_parallelize?; end - - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#63 - def show_execution_info; end - - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#59 - def tests_count; end -end - -# Adds support for +setup+ and +teardown+ callbacks. -# These callbacks serve as a replacement to overwriting the -# #setup and #teardown methods of your TestCase. -# -# class ExampleTest < ActiveSupport::TestCase -# setup do -# # ... -# end -# -# teardown do -# # ... -# end -# end -# -# source://activesupport//lib/active_support/testing/setup_and_teardown.rb#20 -module ActiveSupport::Testing::SetupAndTeardown - # source://activesupport//lib/active_support/testing/setup_and_teardown.rb#44 - def after_teardown; end - - # source://activesupport//lib/active_support/testing/setup_and_teardown.rb#39 - def before_setup; end - - class << self - # source://activesupport//lib/active_support/testing/setup_and_teardown.rb#21 - def prepended(klass); end - end -end - -# source://activesupport//lib/active_support/testing/setup_and_teardown.rb#27 -module ActiveSupport::Testing::SetupAndTeardown::ClassMethods - # Add a callback, which runs before TestCase#setup. - # - # source://activesupport//lib/active_support/testing/setup_and_teardown.rb#29 - def setup(*args, &block); end - - # Add a callback, which runs after TestCase#teardown. - # - # source://activesupport//lib/active_support/testing/setup_and_teardown.rb#34 - def teardown(*args, &block); end -end - -# Manages stubs for TimeHelpers -# -# source://activesupport//lib/active_support/testing/time_helpers.rb#10 -class ActiveSupport::Testing::SimpleStubs - # @return [SimpleStubs] a new instance of SimpleStubs - # - # source://activesupport//lib/active_support/testing/time_helpers.rb#13 - def initialize; end - - # Stubs object.method_name with the given block - # If the method is already stubbed, remove that stub - # so that removing this stub will restore the original implementation. - # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 - # target = Time.zone.local(2004, 11, 24, 1, 4, 44) - # 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 - 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 - 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 - 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 - def unstub_all!; end - - private - - # Restores the original object.method described by the Stub - # - # source://activesupport//lib/active_support/testing/time_helpers.rb#60 - def unstub_object(stub); end -end - -# source://activesupport//lib/active_support/testing/time_helpers.rb#11 -class ActiveSupport::Testing::SimpleStubs::Stub < ::Struct - # Returns the value of attribute method_name - # - # @return [Object] the current value of method_name - def method_name; end - - # Sets the attribute method_name - # - # @param value [Object] the value to set the attribute method_name to. - # @return [Object] the newly set value - def method_name=(_); end - - # Returns the value of attribute object - # - # @return [Object] the current value of object - def object; end - - # Sets the attribute object - # - # @param value [Object] the value to set the attribute object to. - # @return [Object] the newly set value - def object=(_); end - - # Returns the value of attribute original_method - # - # @return [Object] the current value of original_method - def original_method; end - - # Sets the attribute original_method - # - # @param value [Object] the value to set the attribute original_method to. - # @return [Object] the newly set value - def original_method=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# Logs a "PostsControllerTest: test name" heading before each test to -# make test.log easier to search and follow along with. -# -# source://activesupport//lib/active_support/testing/tagged_logging.rb#7 -module ActiveSupport::Testing::TaggedLogging - # source://activesupport//lib/active_support/testing/tagged_logging.rb#10 - def before_setup; end - - # source://activesupport//lib/active_support/testing/tagged_logging.rb#8 - def tagged_logger=(_arg0); end - - private - - # source://activesupport//lib/active_support/testing/tagged_logging.rb#22 - def tagged_logger; end -end - -# Contains helpers that help you test passage of time. -# -# source://activesupport//lib/active_support/testing/time_helpers.rb#69 -module ActiveSupport::Testing::TimeHelpers - # source://activesupport//lib/active_support/testing/time_helpers.rb#70 - def after_teardown; end - - # Calls +travel_to+ with +Time.now+. - # - # Time.current # => Sun, 09 Jul 2017 15:34:49 EST -05:00 - # freeze_time - # sleep(1) - # Time.current # => Sun, 09 Jul 2017 15:34:49 EST -05:00 - # - # This method also accepts a block, which will return the current time back to its original - # state at the end of the block: - # - # Time.current # => Sun, 09 Jul 2017 15:34:49 EST -05:00 - # freeze_time do - # sleep(1) - # User::User.create.created_at # => Sun, 09 Jul 2017 15:34:49 EST -05:00 - # 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 - - # 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. - # - # 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 - # Date.current # => Sun, 10 Nov 2013 - # DateTime.current # => Sun, 10 Nov 2013 15:34:49 -0500 - # - # This method also accepts a block, which will return the current time back to its original - # state at the end of the block: - # - # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 - # travel 1.day do - # User::User.create.created_at # => Sun, 10 Nov 2013 15:34:49 EST -05:00 - # 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 - - # Returns the current time back to its original state, by removing the stubs added by - # +travel+, +travel_to+, and +freeze_time+. - # - # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 - # - # travel_to Time.zone.local(2004, 11, 24, 1, 4, 44) - # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 - # - # travel_back - # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 - # - # This method also accepts a block, which brings the stubs back at the end of the block: - # - # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 - # - # travel_to Time.zone.local(2004, 11, 24, 1, 4, 44) - # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 - # - # travel_back do - # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 - # end - # - # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 - # - # source://activesupport//lib/active_support/testing/time_helpers.rb#208 - def travel_back; end - - # Changes current time to the given time by stubbing +Time.now+, - # +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. - # - # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 - # travel_to Time.zone.local(2004, 11, 24, 1, 4, 44) - # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 - # Date.current # => Wed, 24 Nov 2004 - # DateTime.current # => Wed, 24 Nov 2004 01:04:44 -0500 - # - # Dates are taken as their timestamp at the beginning of the day in the - # application time zone. Time.current returns said timestamp, - # and Time.now its equivalent in the system time zone. Similarly, - # Date.current returns a date equal to the argument, and - # Date.today the date according to Time.now, which may - # be different. (Note that you rarely want to deal with Time.now, - # or Date.today, in order to honor the application time zone - # please always use Time.current and Date.current.) - # - # 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). - # - # This method also accepts a block, which will return the current time back to its original - # state at the end of the block: - # - # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 - # travel_to Time.zone.local(2004, 11, 24, 1, 4, 44) do - # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 - # 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 - - # Returns the current time back to its original state, by removing the stubs added by - # +travel+, +travel_to+, and +freeze_time+. - # - # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 - # - # travel_to Time.zone.local(2004, 11, 24, 1, 4, 44) - # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 - # - # travel_back - # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 - # - # This method also accepts a block, which brings the stubs back at the end of the block: - # - # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 - # - # travel_to Time.zone.local(2004, 11, 24, 1, 4, 44) - # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 - # - # travel_back do - # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 - # end - # - # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 - # - # source://activesupport//lib/active_support/testing/time_helpers.rb#208 - def unfreeze_time; end - - private - - # Returns the value of attribute in_block. - # - # source://activesupport//lib/active_support/testing/time_helpers.rb#243 - 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 - def in_block=(_arg0); end - - # source://activesupport//lib/active_support/testing/time_helpers.rb#239 - def simple_stubs; end -end - -# 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. -# -# You shouldn't ever need to create a TimeWithZone instance directly via +new+. -# Instead use methods +local+, +parse+, +at+, and +now+ on TimeZone instances, -# and +in_time_zone+ on Time and DateTime instances. -# -# Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' -# Time.zone.local(2007, 2, 10, 15, 30, 45) # => Sat, 10 Feb 2007 15:30:45.000000000 EST -05:00 -# Time.zone.parse('2007-02-10 15:30:45') # => Sat, 10 Feb 2007 15:30:45.000000000 EST -05:00 -# Time.zone.at(1171139445) # => Sat, 10 Feb 2007 15:30:45.000000000 EST -05:00 -# Time.zone.now # => Sun, 18 May 2008 13:07:55.754107581 EDT -04:00 -# Time.utc(2007, 2, 10, 20, 30, 45).in_time_zone # => Sat, 10 Feb 2007 15:30:45.000000000 EST -05:00 -# -# See Time and TimeZone for further documentation of these methods. -# -# TimeWithZone instances implement the same API as Ruby Time instances, so -# that Time and TimeWithZone instances are interchangeable. -# -# t = Time.zone.now # => Sun, 18 May 2008 13:27:25.031505668 EDT -04:00 -# t.hour # => 13 -# t.dst? # => true -# t.utc_offset # => -14400 -# t.zone # => "EDT" -# t.to_fs(:rfc822) # => "Sun, 18 May 2008 13:27:25 -0400" -# t + 1.day # => Mon, 19 May 2008 13:27:25.031505668 EDT -04:00 -# t.beginning_of_year # => Tue, 01 Jan 2008 00:00:00.000000000 EST -05:00 -# t > Time.utc(1999) # => true -# t.is_a?(Time) # => true -# t.is_a?(ActiveSupport::TimeWithZone) # => true -# -# source://activesupport//lib/active_support/time_with_zone.rb#42 -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 - 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 - # value as a new TimeWithZone object. - # - # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' - # now = Time.zone.now # => Sun, 02 Nov 2014 01:26:28.725182881 EDT -04:00 - # now + 1000 # => Sun, 02 Nov 2014 01:43:08.725182881 EDT -04:00 - # - # If we're adding a Duration of variable length (i.e., years, months, days), - # move forward from #time, otherwise move forward from #utc, for accuracy - # when moving across DST boundaries. - # - # For instance, a time + 24.hours will advance exactly 24 hours, while a - # time + 1.day will advance 23-25 hours, depending on the day. - # - # 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 - def +(other); end - - # Subtracts an interval of time and returns a new TimeWithZone object unless - # the other value +acts_like?+ time. In which case, it will subtract the - # other time and return the difference in seconds as a Float. - # - # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' - # now = Time.zone.now # => Mon, 03 Nov 2014 00:26:28.725182881 EST -05:00 - # now - 1000 # => Mon, 03 Nov 2014 00:09:48.725182881 EST -05:00 - # - # If subtracting a Duration of variable length (i.e., years, months, days), - # move backward from #time, otherwise move backward from #utc, for accuracy - # when moving across DST boundaries. - # - # For instance, a time - 24.hours will go subtract exactly 24 hours, while a - # time - 1.day will subtract 23-25 hours, depending on the day. - # - # now - 24.hours # => Sun, 02 Nov 2014 01:26:28.725182881 EDT -04:00 - # now - 1.day # => Sun, 02 Nov 2014 00:26:28.725182881 EDT -04:00 - # - # If both the TimeWithZone object and the other value act like Time, a Float - # will be returned. - # - # Time.zone.now - 1.day.ago # => 86399.999967 - # - # source://activesupport//lib/active_support/time_with_zone.rb#362 - def -(other); end - - # Use the time in UTC for comparisons. - # - # source://activesupport//lib/active_support/time_with_zone.rb#261 - def <=>(other); end - - # So that +self+ acts_like?(:time). - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/time_with_zone.rb#523 - def acts_like_time?; end - - # Uses Date to provide precise Time calculations for years, months, and days - # according to the proleptic Gregorian calendar. The result is returned as a - # new TimeWithZone object. - # - # The +options+ parameter takes a hash with any of these keys: - # :years, :months, :weeks, :days, - # :hours, :minutes, :seconds. - # - # If advancing by a value of variable length (i.e., years, weeks, months, - # days), move forward from #time, otherwise move forward from #utc, for - # accuracy when moving across DST boundaries. - # - # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' - # now = Time.zone.now # => Sun, 02 Nov 2014 01:26:28.558049687 EDT -04:00 - # now.advance(seconds: 1) # => Sun, 02 Nov 2014 01:26:29.558049687 EDT -04:00 - # now.advance(minutes: 1) # => Sun, 02 Nov 2014 01:27:28.558049687 EDT -04:00 - # now.advance(hours: 1) # => Sun, 02 Nov 2014 01:26:28.558049687 EST -05:00 - # now.advance(days: 1) # => Mon, 03 Nov 2014 01:26:28.558049687 EST -05:00 - # now.advance(weeks: 1) # => Sun, 09 Nov 2014 01:26:28.558049687 EST -05:00 - # 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 - def advance(options); end - - def after?(_arg0); end - - # Subtracts an interval of time from the current object's time and returns - # the result as a new TimeWithZone object. - # - # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' - # now = Time.zone.now # => Mon, 03 Nov 2014 00:26:28.725182881 EST -05:00 - # now.ago(1000) # => Mon, 03 Nov 2014 00:09:48.725182881 EST -05:00 - # - # If we're subtracting a Duration of variable length (i.e., years, months, - # days), move backward from #time, otherwise move backward from #utc, for - # accuracy when moving across DST boundaries. - # - # For instance, time.ago(24.hours) will move back exactly 24 hours, - # while time.ago(1.day) will move back 23-25 hours, depending on - # the day. - # - # 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 - def ago(other); end - - # Coerces time to a string for JSON encoding. The default format is ISO 8601. - # You can get %Y/%m/%d %H:%M:%S +offset style by setting - # ActiveSupport::JSON::Encoding.use_standard_json_time_format - # to +false+. - # - # # With ActiveSupport::JSON::Encoding.use_standard_json_time_format = true - # Time.utc(2005,2,1,15,15,10).in_time_zone("Hawaii").to_json - # # => "2005-02-01T05:15:10.000-10:00" - # - # # With ActiveSupport::JSON::Encoding.use_standard_json_time_format = false - # 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 - def as_json(options = T.unsafe(nil)); end - - def before?(_arg0); end - - # Returns true if the current object's time is within the specified - # +min+ and +max+ time. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/time_with_zone.rb#269 - 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 - def blank?; end - - # Returns a new +ActiveSupport::TimeWithZone+ where one or more of the elements have - # been changed according to the +options+ parameter. The time options (:hour, - # :min, :sec, :usec, :nsec) reset cascadingly, - # so if only the hour is passed, then minute, sec, usec, and nsec is set to 0. If the - # hour and minute is passed, then sec, usec, and nsec is set to 0. The +options+ - # parameter takes a hash with any of these keys: :year, :month, - # :day, :hour, :min, :sec, :usec, - # :nsec, :offset, :zone. Pass either :usec - # or :nsec, not both. Similarly, pass either :zone or - # :offset, not both. - # - # t = Time.zone.now # => Fri, 14 Apr 2017 11:45:15.116992711 EST -05:00 - # t.change(year: 2020) # => Tue, 14 Apr 2020 11:45:15.116992711 EST -05:00 - # t.change(hour: 12) # => Fri, 14 Apr 2017 12:00:00.116992711 EST -05:00 - # t.change(min: 30) # => Fri, 14 Apr 2017 11:30:00.116992711 EST -05:00 - # 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 - 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 - def comparable_time; end - - # source://activesupport//lib/active_support/time_with_zone.rb#463 - def day; end - - # Returns true if the current time is within Daylight Savings Time for the - # specified time zone. - # - # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' - # Time.zone.parse("2012-5-30").dst? # => true - # Time.zone.parse("2012-11-30").dst? # => false - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/time_with_zone.rb#104 - def dst?; end - - # source://activesupport//lib/active_support/time_with_zone.rb#188 - 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 - def eql?(other); end - - # Returns a formatted string of the offset from UTC, or an alternative - # string if the time zone is already UTC. - # - # Time.zone = 'Eastern Time (US & Canada)' # => "Eastern Time (US & Canada)" - # Time.zone.now.formatted_offset(true) # => "-05:00" - # Time.zone.now.formatted_offset(false) # => "-0500" - # Time.zone = 'UTC' # => "UTC" - # Time.zone.now.formatted_offset(true, "0") # => "0" - # - # source://activesupport//lib/active_support/time_with_zone.rb#135 - def formatted_offset(colon = T.unsafe(nil), alternate_utc_string = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/time_with_zone.rb#538 - 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 - 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 - 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 - 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 - def getutc; end - - # Returns true if the current time zone is set to UTC. - # - # Time.zone = 'UTC' # => 'UTC' - # Time.zone.now.utc? # => true - # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' - # Time.zone.now.utc? # => false - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/time_with_zone.rb#115 - def gmt?; end - - # Returns the offset from current time to UTC time in seconds. - # - # source://activesupport//lib/active_support/time_with_zone.rb#121 - 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 - def gmtime; end - - # Returns the offset from current time to UTC time in seconds. - # - # source://activesupport//lib/active_support/time_with_zone.rb#121 - def gmtoff; end - - # source://activesupport//lib/active_support/time_with_zone.rb#308 - def hash; end - - # source://activesupport//lib/active_support/time_with_zone.rb#463 - def hour; end - - # Returns a string of the object's date and time in the format used by - # HTTP requests. - # - # Time.zone.now.httpdate # => "Tue, 01 Jan 2013 04:39:43 GMT" - # - # source://activesupport//lib/active_support/time_with_zone.rb#196 - def httpdate; end - - # Adds an interval of time to the current object's time and returns that - # value as a new TimeWithZone object. - # - # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' - # now = Time.zone.now # => Sun, 02 Nov 2014 01:26:28.725182881 EDT -04:00 - # now + 1000 # => Sun, 02 Nov 2014 01:43:08.725182881 EDT -04:00 - # - # If we're adding a Duration of variable length (i.e., years, months, days), - # move forward from #time, otherwise move forward from #utc, for accuracy - # when moving across DST boundaries. - # - # For instance, a time + 24.hours will advance exactly 24 hours, while a - # time + 1.day will advance 23-25 hours, depending on the day. - # - # 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 - 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 - def in_time_zone(new_zone = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/time_with_zone.rb#184 - 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 - def inspect; end - - # Say we're a Time to thwart type checking. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/time_with_zone.rb#528 - def is_a?(klass); end - - # Returns true if the current time is within Daylight Savings Time for the - # specified time zone. - # - # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' - # Time.zone.parse("2012-5-30").dst? # => true - # Time.zone.parse("2012-11-30").dst? # => false - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/time_with_zone.rb#104 - def isdst; end - - # Returns a string of the object's date and time in the ISO 8601 standard - # format. - # - # Time.zone.now.xmlschema # => "2014-12-04T11:02:37-05:00" - # - # source://activesupport//lib/active_support/time_with_zone.rb#158 - 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 - 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 - def localtime(utc_offset = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/time_with_zone.rb#544 - def marshal_dump; end - - # source://activesupport//lib/active_support/time_with_zone.rb#548 - def marshal_load(variables); end - - # source://activesupport//lib/active_support/time_with_zone.rb#463 - 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 - def method_missing(sym, *args, &block); end - - # source://activesupport//lib/active_support/time_with_zone.rb#463 - def min; end - - # source://activesupport//lib/active_support/time_with_zone.rb#463 - def mon; end - - # source://activesupport//lib/active_support/time_with_zone.rb#463 - def month; end - - # Returns true if the current object's time falls within - # the next day (tomorrow). - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/time_with_zone.rb#286 - def next_day?; end - - # source://activesupport//lib/active_support/time_with_zone.rb#463 - 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 - def past?; end - - # Returns the underlying TZInfo::TimezonePeriod. - # - # source://activesupport//lib/active_support/time_with_zone.rb#82 - def period; end - - # Returns true if the current object's time falls within - # the previous day (yesterday). - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/time_with_zone.rb#293 - def prev_day?; end - - # respond_to_missing? is not called in some cases, such as when type conversion is - # performed with Kernel#String - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/time_with_zone.rb#554 - 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 - # format. - # - # Time.zone.now.rfc2822 # => "Tue, 01 Jan 2013 04:51:39 +0000" - # - # source://activesupport//lib/active_support/time_with_zone.rb#204 - def rfc2822; end - - # Returns a string of the object's date and time in the ISO 8601 standard - # format. - # - # Time.zone.now.xmlschema # => "2014-12-04T11:02:37-05:00" - # - # source://activesupport//lib/active_support/time_with_zone.rb#158 - def rfc3339(fraction_digits = T.unsafe(nil)); end - - # Returns a string of the object's date and time in the RFC 2822 standard - # format. - # - # Time.zone.now.rfc2822 # => "Tue, 01 Jan 2013 04:51:39 +0000" - # - # source://activesupport//lib/active_support/time_with_zone.rb#204 - def rfc822; end - - # source://activesupport//lib/active_support/time_with_zone.rb#463 - def sec; end - - # Adds an interval of time to the current object's time and returns that - # value as a new TimeWithZone object. - # - # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' - # now = Time.zone.now # => Sun, 02 Nov 2014 01:26:28.725182881 EDT -04:00 - # now + 1000 # => Sun, 02 Nov 2014 01:43:08.725182881 EDT -04:00 - # - # If we're adding a Duration of variable length (i.e., years, months, days), - # move forward from #time, otherwise move forward from #utc, for accuracy - # when moving across DST boundaries. - # - # For instance, a time + 24.hours will advance exactly 24 hours, while a - # time + 1.day will advance 23-25 hours, depending on the day. - # - # 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 - 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 - 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 - def time; end - - # Returns the value of attribute time_zone. - # - # source://activesupport//lib/active_support/time_with_zone.rb#59 - def time_zone; end - - # Returns Array of parts of Time in sequence of - # [seconds, minutes, hours, day, month, year, weekday, yearday, dst?, zone]. - # - # 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 - def to_a; end - - # source://activesupport//lib/active_support/time_with_zone.rb#463 - def to_date; end - - # Returns an instance of DateTime with the timezone's UTC offset - # - # 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 - def to_datetime; end - - # Returns the object's date and time as a floating-point number of seconds - # since the Epoch (January 1, 1970 00:00 UTC). - # - # Time.zone.now.to_f # => 1417709320.285418 - # - # source://activesupport//lib/active_support/time_with_zone.rb#482 - def to_f; end - - # Returns a string of the object's date and time. - # - # This method is aliased to to_formatted_s. - # - # 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. - # - # source://activesupport//lib/active_support/time_with_zone.rb#241 - def to_formatted_s(format = T.unsafe(nil)); end - - # Returns a string of the object's date and time. - # - # This method is aliased to to_formatted_s. - # - # 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. - # - # source://activesupport//lib/active_support/time_with_zone.rb#241 - def to_fs(format = T.unsafe(nil)); end - - # Returns the object's date and time as an integer number of seconds - # since the Epoch (January 1, 1970 00:00 UTC). - # - # Time.zone.now.to_i # => 1417709320 - # - # source://activesupport//lib/active_support/time_with_zone.rb#490 - def to_i; end - - # Returns the object's date and time as a rational number of seconds - # since the Epoch (January 1, 1970 00:00 UTC). - # - # Time.zone.now.to_r # => (708854548642709/500000) - # - # source://activesupport//lib/active_support/time_with_zone.rb#499 - 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 - - # 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 - def to_time; end - - # Returns true if the current object's time falls within - # the current day. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/time_with_zone.rb#280 - def today?; end - - # Returns true if the current object's time falls within - # the next day (tomorrow). - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/time_with_zone.rb#286 - def tomorrow?; end - - # Returns the object's date and time as an integer number of seconds - # since the Epoch (January 1, 1970 00:00 UTC). - # - # Time.zone.now.to_i # => 1417709320 - # - # source://activesupport//lib/active_support/time_with_zone.rb#490 - def tv_sec; end - - # source://activesupport//lib/active_support/time_with_zone.rb#463 - 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 - def utc; end - - # Returns true if the current time zone is set to UTC. - # - # Time.zone = 'UTC' # => 'UTC' - # Time.zone.now.utc? # => true - # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' - # Time.zone.now.utc? # => false - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/time_with_zone.rb#115 - def utc?; end - - # Returns the offset from current time to UTC time in seconds. - # - # source://activesupport//lib/active_support/time_with_zone.rb#121 - def utc_offset; end - - # source://activesupport//lib/active_support/time_with_zone.rb#463 - def wday; end - - # Returns a string of the object's date and time in the ISO 8601 standard - # format. - # - # Time.zone.now.xmlschema # => "2014-12-04T11:02:37-05:00" - # - # source://activesupport//lib/active_support/time_with_zone.rb#158 - def xmlschema(fraction_digits = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/time_with_zone.rb#463 - def yday; end - - # source://activesupport//lib/active_support/time_with_zone.rb#463 - def year; end - - # Returns true if the current object's time falls within - # the previous day (yesterday). - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/time_with_zone.rb#293 - def yesterday?; end - - # Returns the time zone abbreviation. - # - # 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 - def zone; end - - private - - # @return [Boolean] - # - # source://activesupport//lib/active_support/time_with_zone.rb#605 - def duration_of_variable_length?(obj); end - - # source://activesupport//lib/active_support/time_with_zone.rb#586 - def get_period_and_ensure_valid_local_time(period); end - - # source://activesupport//lib/active_support/time_with_zone.rb#578 - def incorporate_utc_offset(time, offset); end - - # Ensure proxy class responds to all methods that underlying time instance - # responds to. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/time_with_zone.rb#562 - def respond_to_missing?(sym, include_priv); end - - # source://activesupport//lib/active_support/time_with_zone.rb#599 - def transfer_time_values_to_utc_constructor(time); end - - # source://activesupport//lib/active_support/time_with_zone.rb#609 - 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 -ActiveSupport::TimeWithZone::PRECISIONS = T.let(T.unsafe(nil), Hash) - -# source://activesupport//lib/active_support/time_with_zone.rb#576 -ActiveSupport::TimeWithZone::SECONDS_PER_DAY = T.let(T.unsafe(nil), Integer) - -# 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. -# * 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 -# access this TimeZone object via Time.zone: -# -# # application.rb: -# class Application < Rails::Application -# config.time_zone = 'Eastern Time (US & Canada)' -# end -# -# Time.zone # => # -# 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 -class ActiveSupport::TimeZone - include ::Comparable - - # Create a new TimeZone object with the given name and offset. The - # offset is the number of seconds that this time zone is offset from UTC - # (GMT). Seconds were chosen as the offset unit because that is the unit - # that Ruby uses to represent time zone offsets (see Time#utc_offset). - # - # @return [TimeZone] a new instance of TimeZone - # - # source://activesupport//lib/active_support/values/time_zone.rb#301 - 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 - 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 - def =~(re); end - - # Method for creating new ActiveSupport::TimeWithZone instance in time zone - # of +self+ from number of seconds since the Unix epoch. - # - # Time.zone = 'Hawaii' # => "Hawaii" - # Time.utc(2000).to_f # => 946684800.0 - # Time.zone.at(946684800.0) # => Fri, 31 Dec 1999 14:00:00 HST -10:00 - # - # A second argument can be supplied to specify sub-second precision. - # - # Time.zone = 'Hawaii' # => "Hawaii" - # Time.at(946684800, 123456.789).nsec # => 123456789 - # - # source://activesupport//lib/active_support/values/time_zone.rb#370 - def at(*args); end - - # source://activesupport//lib/active_support/values/time_zone.rb#566 - def encode_with(coder); end - - # Returns a formatted string of the offset from UTC, or an alternative - # string if the time zone is already UTC. - # - # zone = ActiveSupport::TimeZone['Central Time (US & Canada)'] - # zone.formatted_offset # => "-06:00" - # zone.formatted_offset(false) # => "-0600" - # - # source://activesupport//lib/active_support/values/time_zone.rb#318 - def formatted_offset(colon = T.unsafe(nil), alternate_utc_string = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/values/time_zone.rb#562 - def init_with(coder); end - - # Method for creating new ActiveSupport::TimeWithZone instance in time zone - # of +self+ from an ISO 8601 string. - # - # Time.zone = 'Hawaii' # => "Hawaii" - # Time.zone.iso8601('1999-12-31T14:00:00') # => Fri, 31 Dec 1999 14:00:00 HST -10:00 - # - # If the time components are missing then they will be set to zero. - # - # Time.zone = 'Hawaii' # => "Hawaii" - # Time.zone.iso8601('1999-12-31') # => Fri, 31 Dec 1999 00:00:00 HST -10:00 - # - # 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 - def iso8601(str); end - - # Method for creating new ActiveSupport::TimeWithZone instance in time zone - # of +self+ from given values. - # - # 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 - 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 - def local_to_utc(time, dst = T.unsafe(nil)); end - - # Compare #name and TZInfo identifier to a supplied regexp, returning +true+ - # if a match is found. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/values/time_zone.rb#339 - def match?(re); end - - # Returns the value of attribute name. - # - # source://activesupport//lib/active_support/values/time_zone.rb#294 - def name; end - - # Returns an ActiveSupport::TimeWithZone instance representing the current - # time in the time zone represented by +self+. - # - # 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 - def now; end - - # Method for creating new ActiveSupport::TimeWithZone instance in time zone - # of +self+ from parsed string. - # - # Time.zone = 'Hawaii' # => "Hawaii" - # Time.zone.parse('1999-12-31 14:00:00') # => Fri, 31 Dec 1999 14:00:00 HST -10:00 - # - # If upper components are missing from the string, they are supplied from - # TimeZone#now: - # - # Time.zone.now # => Fri, 31 Dec 1999 14:00:00 HST -10:00 - # Time.zone.parse('22:30:00') # => Fri, 31 Dec 1999 22:30:00 HST -10:00 - # - # However, if the date component is not provided, but any other upper - # components are supplied, then the day of the month defaults to 1: - # - # Time.zone.parse('Mar 2000') # => Wed, 01 Mar 2000 00:00:00 HST -10:00 - # - # If the string is invalid then an +ArgumentError+ could be raised. - # - # source://activesupport//lib/active_support/values/time_zone.rb#444 - def parse(str, now = T.unsafe(nil)); end - - # Available so that TimeZone instances respond like TZInfo::Timezone - # instances. - # - # source://activesupport//lib/active_support/values/time_zone.rb#554 - def period_for_local(time, dst = T.unsafe(nil)); end - - # Available so that TimeZone instances respond like TZInfo::Timezone - # instances. - # - # source://activesupport//lib/active_support/values/time_zone.rb#548 - def period_for_utc(time); end - - # source://activesupport//lib/active_support/values/time_zone.rb#558 - def periods_for_local(time); end - - # Method for creating new ActiveSupport::TimeWithZone instance in time zone - # of +self+ from an RFC 3339 string. - # - # Time.zone = 'Hawaii' # => "Hawaii" - # Time.zone.rfc3339('2000-01-01T00:00:00Z') # => Fri, 31 Dec 1999 14:00:00 HST -10:00 - # - # If the time or zone components are missing then an +ArgumentError+ will - # be raised. This is much stricter than either +parse+ or +iso8601+ which - # allow for missing components. - # - # Time.zone = 'Hawaii' # => "Hawaii" - # Time.zone.rfc3339('1999-12-31') # => ArgumentError: invalid date - # - # @raise [ArgumentError] - # - # source://activesupport//lib/active_support/values/time_zone.rb#460 - def rfc3339(str); end - - # Parses +str+ according to +format+ and returns an ActiveSupport::TimeWithZone. - # - # Assumes that +str+ is a time in the time zone +self+, - # unless +format+ includes an explicit time zone. - # (This is the same behavior as +parse+.) - # In either case, the returned TimeWithZone has the timezone of +self+. - # - # Time.zone = 'Hawaii' # => "Hawaii" - # Time.zone.strptime('1999-12-31 14:00:00', '%Y-%m-%d %H:%M:%S') # => Fri, 31 Dec 1999 14:00:00 HST -10:00 - # - # If upper components are missing from the string, they are supplied from - # TimeZone#now: - # - # Time.zone.now # => Fri, 31 Dec 1999 14:00:00 HST -10:00 - # Time.zone.strptime('22:30:00', '%H:%M:%S') # => Fri, 31 Dec 1999 22:30:00 HST -10:00 - # - # However, if the date component is not provided, but any other upper - # components are supplied, then the day of the month defaults to 1: - # - # 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 - 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 - def to_s; end - - # Returns the current date in this time zone. - # - # source://activesupport//lib/active_support/values/time_zone.rb#512 - def today; end - - # Returns the next date in this time zone. - # - # source://activesupport//lib/active_support/values/time_zone.rb#517 - def tomorrow; end - - # Returns the value of attribute tzinfo. - # - # source://activesupport//lib/active_support/values/time_zone.rb#295 - def tzinfo; end - - # Returns the offset of this time zone from UTC in seconds. - # - # source://activesupport//lib/active_support/values/time_zone.rb#308 - def utc_offset; end - - # Adjust the given time to the simultaneous time in the time zone - # represented by +self+. Returns a local time with the appropriate offset - # -- if you want an ActiveSupport::TimeWithZone instance, use - # Time#in_time_zone() instead. - # - # 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 - def utc_to_local(time); end - - # Returns the previous date in this time zone. - # - # source://activesupport//lib/active_support/values/time_zone.rb#522 - def yesterday; end - - private - - # @raise [ArgumentError] - # - # source://activesupport//lib/active_support/values/time_zone.rb#572 - def parts_to_time(parts, now); end - - # source://activesupport//lib/active_support/values/time_zone.rb#597 - def time_now; end - - class << self - # Locate a specific time zone object. If the argument is a string, it - # is interpreted to mean the name of the timezone to locate. If it is a - # numeric value it is either the hour offset, or the second offset, of the - # 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 - 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 - def all; end - - # source://activesupport//lib/active_support/values/time_zone.rb#263 - 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 - def country_zones(country_code); end - - def create(*_arg0); end - - # source://activesupport//lib/active_support/values/time_zone.rb#205 - 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 - def new(name); end - - # Assumes self represents an offset from UTC in seconds (as returned from - # Time#utc_offset) and turns this into an +HH:MM formatted string. - # - # ActiveSupport::TimeZone.seconds_to_utc_offset(-21_600) # => "-06:00" - # - # source://activesupport//lib/active_support/values/time_zone.rb#197 - 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 - def us_zones; end - - private - - # source://activesupport//lib/active_support/values/time_zone.rb#271 - def load_country_zones(code); end - - # source://activesupport//lib/active_support/values/time_zone.rb#285 - def zones_map; end - end -end - -# Keys are Rails TimeZone names, values are TZInfo identifiers. -# -# source://activesupport//lib/active_support/values/time_zone.rb#31 -ActiveSupport::TimeZone::MAPPING = T.let(T.unsafe(nil), Hash) - -# source://activesupport//lib/active_support/values/time_zone.rb#186 -ActiveSupport::TimeZone::UTC_OFFSET_WITHOUT_COLON = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/values/time_zone.rb#185 -ActiveSupport::TimeZone::UTC_OFFSET_WITH_COLON = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/core_ext/object/json.rb#35 -module ActiveSupport::ToJsonWithActiveSupportEncoder - # source://activesupport//lib/active_support/core_ext/object/json.rb#36 - def to_json(options = T.unsafe(nil)); end -end - -# source://activesupport//lib/active_support/core_ext/object/try.rb#6 -module ActiveSupport::Tryable - # source://activesupport//lib/active_support/core_ext/object/try.rb#7 - def try(*args, **_arg1, &block); end - - # source://activesupport//lib/active_support/core_ext/object/try.rb#20 - def try!(*args, **_arg1, &block); end -end - -# source://activesupport//lib/active_support/gem_version.rb#9 -module ActiveSupport::VERSION; end - -# source://activesupport//lib/active_support/gem_version.rb#10 -ActiveSupport::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) - -# source://activesupport//lib/active_support/gem_version.rb#11 -ActiveSupport::VERSION::MINOR = T.let(T.unsafe(nil), Integer) - -# source://activesupport//lib/active_support/gem_version.rb#13 -ActiveSupport::VERSION::PRE = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/gem_version.rb#15 -ActiveSupport::VERSION::STRING = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/gem_version.rb#12 -ActiveSupport::VERSION::TINY = T.let(T.unsafe(nil), Integer) - -# source://activesupport//lib/active_support/core_ext/hash/conversions.rb#140 -class ActiveSupport::XMLConverter - # @return [XMLConverter] a new instance of XMLConverter - # - # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#151 - def initialize(xml, disallowed_types = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#156 - def to_h; end - - private - - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#222 - def become_array?(value); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#218 - def become_content?(value); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#226 - def become_empty_string?(value); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#232 - def become_hash?(value); end - - # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#172 - def deep_to_h(value); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#241 - def garbage?(value); end - - # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#161 - def normalize_keys(params); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#236 - def nothing?(value); end - - # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#257 - def process_array(value); end - - # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#248 - def process_content(value); end - - # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#185 - def process_hash(value); end -end - -# source://activesupport//lib/active_support/core_ext/hash/conversions.rb#149 -ActiveSupport::XMLConverter::DISALLOWED_TYPES = T.let(T.unsafe(nil), Array) - -# Raised if the XML contains attributes with type="yaml" or -# type="symbol". Read Hash#from_xml for more details. -# -# source://activesupport//lib/active_support/core_ext/hash/conversions.rb#143 -class ActiveSupport::XMLConverter::DisallowedType < ::StandardError - # @return [DisallowedType] a new instance of DisallowedType - # - # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#144 - def initialize(type); end -end - -# = XmlMini -# -# To use the much faster libxml parser: -# gem 'libxml-ruby', '=0.9.7' -# XmlMini.backend = 'LibXML' -# -# source://activesupport//lib/active_support/xml_mini.rb#17 -module ActiveSupport::XmlMini - extend ::ActiveSupport::XmlMini - - # source://activesupport//lib/active_support/xml_mini.rb#97 - def backend; end - - # source://activesupport//lib/active_support/xml_mini.rb#101 - def backend=(name); end - - # Returns the value of attribute depth. - # - # source://activesupport//lib/active_support/xml_mini.rb#92 - def depth; end - - # Sets the attribute depth - # - # @param value the value to set the attribute depth to. - # - # source://activesupport//lib/active_support/xml_mini.rb#92 - def depth=(_arg0); end - - # source://activesupport//lib/active_support/xml_mini.rb#95 - def parse(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/xml_mini.rb#148 - def rename_key(key, options = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/xml_mini.rb#115 - def to_tag(key, value, options); end - - # source://activesupport//lib/active_support/xml_mini.rb#107 - def with_backend(name); end - - private - - # source://activesupport//lib/active_support/xml_mini.rb#159 - def _dasherize(key); end - - # TODO: Add support for other encodings - # - # source://activesupport//lib/active_support/xml_mini.rb#166 - def _parse_binary(bin, entity); end - - # source://activesupport//lib/active_support/xml_mini.rb#175 - def _parse_file(file, entity); end - - # source://activesupport//lib/active_support/xml_mini.rb#191 - def cast_backend_name_to_module(name); end - - # source://activesupport//lib/active_support/xml_mini.rb#183 - def current_thread_backend; end - - # source://activesupport//lib/active_support/xml_mini.rb#187 - def current_thread_backend=(name); end -end - -# source://activesupport//lib/active_support/xml_mini.rb#34 -ActiveSupport::XmlMini::DEFAULT_ENCODINGS = T.let(T.unsafe(nil), Hash) - -# source://activesupport//lib/active_support/xml_mini.rb#55 -ActiveSupport::XmlMini::FORMATTING = T.let(T.unsafe(nil), Hash) - -# This module decorates files deserialized using Hash.from_xml with -# the original_filename and content_type methods. -# -# source://activesupport//lib/active_support/xml_mini.rb#22 -module ActiveSupport::XmlMini::FileLike - # source://activesupport//lib/active_support/xml_mini.rb#29 - def content_type; end - - # source://activesupport//lib/active_support/xml_mini.rb#23 - def content_type=(_arg0); end - - # source://activesupport//lib/active_support/xml_mini.rb#25 - def original_filename; end - - # source://activesupport//lib/active_support/xml_mini.rb#23 - def original_filename=(_arg0); end -end - -# source://activesupport//lib/active_support/xml_mini.rb#65 -ActiveSupport::XmlMini::PARSING = T.let(T.unsafe(nil), Hash) - -# source://activesupport//lib/active_support/xml_mini.rb#39 -ActiveSupport::XmlMini::TYPE_NAMES = T.let(T.unsafe(nil), Hash) - -# source://activesupport//lib/active_support/xml_mini/rexml.rb#8 -module ActiveSupport::XmlMini_REXML - extend ::ActiveSupport::XmlMini_REXML - - # Parse an XML Document string or IO into a simple hash. - # - # Same as XmlSimple::xml_in but doesn't shoot itself in the foot, - # and uses the defaults from Active Support. - # - # data:: - # XML Document string or IO to parse - # - # source://activesupport//lib/active_support/xml_mini/rexml.rb#20 - def parse(data); end - - private - - # Actually converts an XML document element into a data structure. - # - # element:: - # The document element to be collapsed. - # - # source://activesupport//lib/active_support/xml_mini/rexml.rb#63 - def collapse(element, depth); end - - # Determines if a document element has text content - # - # element:: - # XML element to be checked. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/xml_mini/rexml.rb#133 - def empty_content?(element); end - - # Converts the attributes array of an XML element into a hash. - # Returns an empty Hash if node has no attributes. - # - # element:: - # XML element to extract attributes from. - # - # source://activesupport//lib/active_support/xml_mini/rexml.rb#123 - def get_attributes(element); end - - # Adds a new key/value pair to an existing Hash. If the key to be added - # already exists and the existing value associated with key is not - # an Array, it will be wrapped in an Array. Then the new value is - # appended to that Array. - # - # hash:: - # Hash to add key/value pair to. - # key:: - # Key to be added. - # value:: - # Value to be associated with key. - # - # source://activesupport//lib/active_support/xml_mini/rexml.rb#103 - def merge!(hash, key, value); end - - # Convert an XML element and merge into the hash - # - # hash:: - # Hash to merge the converted element into. - # element:: - # XML element to merge into hash - # - # @raise [REXML::ParseException] - # - # source://activesupport//lib/active_support/xml_mini/rexml.rb#54 - def merge_element!(hash, element, depth); end - - # Merge all the texts of an element into the hash - # - # hash:: - # Hash to add the converted element to. - # element:: - # XML element whose texts are to me merged into the hash - # - # source://activesupport//lib/active_support/xml_mini/rexml.rb#81 - def merge_texts!(hash, element); end - - # source://activesupport//lib/active_support/xml_mini/rexml.rb#41 - def require_rexml; end -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 -class Array - include ::Enumerable - - # source://activesupport//lib/active_support/core_ext/object/json.rb#158 - def as_json(options = T.unsafe(nil)); end - - # Removes all blank elements from the +Array+ in place and returns self. - # Uses Object#blank? for determining if an item is blank. - # - # a = [1, "", nil, 2, " ", [], {}, false, true] - # a.compact_blank! - # # => [1, 2, true] - # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#325 - def compact_blank!; end - - # Returns a deep copy of array. - # - # array = [1, [2, 3]] - # dup = array.deep_dup - # dup[1][2] = 4 - # - # array[1][2] # => nil - # dup[1][2] # => 4 - # - # source://activesupport//lib/active_support/core_ext/object/deep_dup.rb#29 - def deep_dup; end - - # Returns a copy of the Array excluding the specified elements. - # - # ["David", "Rafael", "Aaron", "Todd"].excluding("Aaron", "Todd") # => ["David", "Rafael"] - # [ [ 0, 1 ], [ 1, 0 ] ].excluding([ [ 1, 0 ] ]) # => [ [ 0, 1 ] ] - # - # Note: This is an optimization of Enumerable#excluding that uses Array#- - # instead of Array#reject for performance reasons. - # - # source://activesupport//lib/active_support/core_ext/array/access.rb#47 - def excluding(*elements); end - - # Removes and returns the elements for which the block returns a true value. - # If no block is given, an Enumerator is returned instead. - # - # numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] - # odd_numbers = numbers.extract! { |number| number.odd? } # => [1, 3, 5, 7, 9] - # numbers # => [0, 2, 4, 6, 8] - # - # source://activesupport//lib/active_support/core_ext/array/extract.rb#10 - def extract!; end - - # Extracts options from a set of arguments. Removes and returns the last - # element in the array if it's a hash, otherwise returns a blank hash. - # - # def options(*args) - # args.extract_options! - # end - # - # options(1, 2) # => {} - # options(1, 2, a: :b) # => {:a=>:b} - # - # source://activesupport//lib/active_support/core_ext/array/extract_options.rb#24 - def extract_options!; end - - # Equal to self[4]. - # - # %w( a b c d e ).fifth # => "e" - # - # source://activesupport//lib/active_support/core_ext/array/access.rb#76 - def fifth; end - - # Equal to self[41]. Also known as accessing "the reddit". - # - # (1..42).to_a.forty_two # => 42 - # - # source://activesupport//lib/active_support/core_ext/array/access.rb#83 - def forty_two; end - - # Equal to self[3]. - # - # %w( a b c d e ).fourth # => "d" - # - # source://activesupport//lib/active_support/core_ext/array/access.rb#69 - def fourth; end - - # Returns the tail of the array from +position+. - # - # %w( a b c d ).from(0) # => ["a", "b", "c", "d"] - # %w( a b c d ).from(2) # => ["c", "d"] - # %w( a b c d ).from(10) # => [] - # %w().from(0) # => [] - # %w( a b c d ).from(-2) # => ["c", "d"] - # %w( a b c ).from(-10) # => [] - # - # source://activesupport//lib/active_support/core_ext/array/access.rb#12 - def from(position); end - - # Splits or iterates over the array in +number+ of groups, padding any - # remaining slots with +fill_with+ unless it is +false+. - # - # %w(1 2 3 4 5 6 7 8 9 10).in_groups(3) {|group| p group} - # ["1", "2", "3", "4"] - # ["5", "6", "7", nil] - # ["8", "9", "10", nil] - # - # %w(1 2 3 4 5 6 7 8 9 10).in_groups(3, ' ') {|group| p group} - # ["1", "2", "3", "4"] - # ["5", "6", "7", " "] - # ["8", "9", "10", " "] - # - # %w(1 2 3 4 5 6 7).in_groups(3, false) {|group| p group} - # ["1", "2", "3"] - # ["4", "5"] - # ["6", "7"] - # - # source://activesupport//lib/active_support/core_ext/array/grouping.rb#62 - def in_groups(number, fill_with = T.unsafe(nil), &block); end - - # Splits or iterates over the array in groups of size +number+, - # padding any remaining slots with +fill_with+ unless it is +false+. - # - # %w(1 2 3 4 5 6 7 8 9 10).in_groups_of(3) {|group| p group} - # ["1", "2", "3"] - # ["4", "5", "6"] - # ["7", "8", "9"] - # ["10", nil, nil] - # - # %w(1 2 3 4 5).in_groups_of(2, ' ') {|group| p group} - # ["1", "2"] - # ["3", "4"] - # ["5", " "] - # - # %w(1 2 3 4 5).in_groups_of(2, false) {|group| p group} - # ["1", "2"] - # ["3", "4"] - # ["5"] - # - # source://activesupport//lib/active_support/core_ext/array/grouping.rb#22 - def in_groups_of(number, fill_with = T.unsafe(nil), &block); end - - # Returns a new array that includes the passed elements. - # - # [ 1, 2, 3 ].including(4, 5) # => [ 1, 2, 3, 4, 5 ] - # [ [ 0, 1 ] ].including([ [ 1, 0 ] ]) # => [ [ 0, 1 ], [ 1, 0 ] ] - # - # source://activesupport//lib/active_support/core_ext/array/access.rb#36 - def including(*elements); end - - # Wraps the array in an ActiveSupport::ArrayInquirer object, which gives a - # friendlier way to check its string-like contents. - # - # pets = [:cat, :dog].inquiry - # - # pets.cat? # => true - # pets.ferret? # => false - # - # pets.any?(:cat, :ferret) # => true - # pets.any?(:ferret, :alligator) # => false - # - # source://activesupport//lib/active_support/core_ext/array/inquiry.rb#16 - def inquiry; end - - # Equal to self[1]. - # - # %w( a b c d e ).second # => "b" - # - # source://activesupport//lib/active_support/core_ext/array/access.rb#55 - def second; end - - # Equal to self[-2]. - # - # %w( a b c d e ).second_to_last # => "d" - # - # source://activesupport//lib/active_support/core_ext/array/access.rb#97 - def second_to_last; end - - # Divides the array into one or more subarrays based on a delimiting +value+ - # or the result of an optional block. - # - # [1, 2, 3, 4, 5].split(3) # => [[1, 2], [4, 5]] - # (1..10).to_a.split { |i| i % 3 == 0 } # => [[1, 2], [4, 5], [7, 8], [10]] - # - # 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" - # - # source://activesupport//lib/active_support/core_ext/array/access.rb#62 - def third; end - - # Equal to self[-3]. - # - # %w( a b c d e ).third_to_last # => "c" - # - # source://activesupport//lib/active_support/core_ext/array/access.rb#90 - def third_to_last; end - - # Returns the beginning of the array up to +position+. - # - # %w( a b c d ).to(0) # => ["a"] - # %w( a b c d ).to(2) # => ["a", "b", "c"] - # %w( a b c d ).to(10) # => ["a", "b", "c", "d"] - # %w().to(0) # => [] - # %w( a b c d ).to(-2) # => ["a", "b", "c"] - # %w( a b c ).to(-10) # => [] - # - # source://activesupport//lib/active_support/core_ext/array/access.rb#24 - def to(position); 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. - # - # This method is aliased to to_formatted_s. - # - # Blog.all.to_fs(:db) # => "1,2,3" - # Blog.none.to_fs(:db) # => "null" - # [1,2].to_fs # => "[1, 2]" - # - # source://activesupport//lib/active_support/core_ext/array/conversions.rb#94 - def to_formatted_s(format = T.unsafe(nil)); 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. - # - # This method is aliased to to_formatted_s. - # - # Blog.all.to_fs(:db) # => "1,2,3" - # Blog.none.to_fs(:db) # => "null" - # [1,2].to_fs # => "[1, 2]" - # - # source://activesupport//lib/active_support/core_ext/array/conversions.rb#94 - def to_fs(format = T.unsafe(nil)); end - - # Calls to_param on all its elements and joins the result with - # slashes. This is used by url_for in Action Pack. - # - # source://activesupport//lib/active_support/core_ext/object/to_query.rb#42 - def to_param; end - - # Converts an array into a string suitable for use as a URL query string, - # using the given +key+ as the param name. - # - # ['Rails', 'coding'].to_query('hobbies') # => "hobbies%5B%5D=Rails&hobbies%5B%5D=coding" - # - # 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. - # - # You can pass the following options to change the default behavior. If you - # pass an option key that doesn't exist in the list below, it will raise an - # ArgumentError. - # - # ==== Options - # - # * :words_connector - The sign or word used to join all but the last - # element in arrays with three or more elements (default: ", "). - # * :last_word_connector - The sign or word used to join the last element - # in arrays with three or more elements (default: ", and "). - # * :two_words_connector - The sign or word used to join the elements - # in arrays with two elements (default: " and "). - # * :locale - If +i18n+ is available, you can set a locale and use - # the connector options defined on the 'support.array' namespace in the - # corresponding dictionary file. - # - # ==== Examples - # - # [].to_sentence # => "" - # ['one'].to_sentence # => "one" - # ['one', 'two'].to_sentence # => "one and two" - # ['one', 'two', 'three'].to_sentence # => "one, two, and three" - # - # ['one', 'two'].to_sentence(passing: 'invalid option') - # # => ArgumentError: Unknown key: :passing. Valid keys are: :words_connector, :two_words_connector, :last_word_connector, :locale - # - # ['one', 'two'].to_sentence(two_words_connector: '-') - # # => "one-two" - # - # ['one', 'two', 'three'].to_sentence(words_connector: ' or ', last_word_connector: ' or at least ') - # # => "one or two or at least three" - # - # Using :locale option: - # - # # Given this locale dictionary: - # # - # # es: - # # support: - # # array: - # # words_connector: " o " - # # two_words_connector: " y " - # # last_word_connector: " o al menos " - # - # ['uno', 'dos'].to_sentence(locale: :es) - # # => "uno y dos" - # - # ['uno', 'dos', 'tres'].to_sentence(locale: :es) - # # => "uno o dos o al menos tres" - # - # source://activesupport//lib/active_support/core_ext/array/conversions.rb#60 - def to_sentence(options = T.unsafe(nil)); end - - # Returns a string that represents the array in XML by invoking +to_xml+ - # on each element. Active Record collections delegate their representation - # in XML to this method. - # - # All elements are expected to respond to +to_xml+, if any of them does - # not then an exception is raised. - # - # The root node reflects the class name of the first element in plural - # if all elements belong to the same type and that's not Hash: - # - # customer.projects.to_xml - # - # - # - # - # 20000.0 - # 1567 - # 2008-04-09 - # ... - # - # - # 57230.0 - # 1567 - # 2008-04-15 - # ... - # - # - # - # Otherwise the root element is "objects": - # - # [{ foo: 1, bar: 2}, { baz: 3}].to_xml - # - # - # - # - # 2 - # 1 - # - # - # 3 - # - # - # - # If the collection is empty the root element is "nil-classes" by default: - # - # [].to_xml - # - # - # - # - # To ensure a meaningful root element use the :root option: - # - # customer_with_no_projects.projects.to_xml(root: 'projects') - # - # - # - # - # By default name of the node for the children of root is root.singularize. - # You can change it with the :children option. - # - # The +options+ hash is passed downwards: - # - # Message.all.to_xml(skip_types: true) - # - # - # - # - # 2008-03-07T09:58:18+01:00 - # 1 - # 1 - # 2008-03-07T09:58:18+01:00 - # 1 - # - # - # - # source://activesupport//lib/active_support/core_ext/array/conversions.rb#184 - def to_xml(options = T.unsafe(nil)); end - - # Returns a copy of the Array excluding the specified elements. - # - # ["David", "Rafael", "Aaron", "Todd"].excluding("Aaron", "Todd") # => ["David", "Rafael"] - # [ [ 0, 1 ], [ 1, 0 ] ].excluding([ [ 1, 0 ] ]) # => [ [ 0, 1 ] ] - # - # Note: This is an optimization of Enumerable#excluding that uses Array#- - # instead of Array#reject for performance reasons. - # - # source://activesupport//lib/active_support/core_ext/array/access.rb#47 - def without(*elements); end - - class << self - # Wraps its argument in an array unless it is already an array (or array-like). - # - # Specifically: - # - # * If the argument is +nil+ an empty array is returned. - # * Otherwise, if the argument responds to +to_ary+ it is invoked, and its result returned. - # * Otherwise, returns an array with the argument as its single element. - # - # Array.wrap(nil) # => [] - # Array.wrap([1, 2, 3]) # => [1, 2, 3] - # Array.wrap(0) # => [0] - # - # This method is similar in purpose to Kernel#Array, but there are some differences: - # - # * If the argument responds to +to_ary+ the method is invoked. Kernel#Array - # moves on to try +to_a+ if the returned value is +nil+, but Array.wrap returns - # an array with the argument as its single element right away. - # * If the returned value from +to_ary+ is neither +nil+ nor an +Array+ object, Kernel#Array - # raises an exception, while Array.wrap does not, it just returns the value. - # * It does not call +to_a+ on the argument, if the argument does not respond to +to_ary+ - # it returns an array with the argument as its single element. - # - # The last point is easily explained with some enumerables: - # - # Array(foo: :bar) # => [[:foo, :bar]] - # Array.wrap(foo: :bar) # => [{:foo=>:bar}] - # - # There's also a related idiom that uses the splat operator: - # - # [*object] - # - # which returns [] for +nil+, but calls to Array(object) otherwise. - # - # The differences with Kernel#Array explained above - # apply to the rest of objects. - # - # source://activesupport//lib/active_support/core_ext/array/wrap.rb#39 - def wrap(object); end - 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 -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 - # those libraries would get in general a wrong number and no way to recover - # other than manually inspecting the string with the JSON code itself. - # - # That's why a JSON string is returned. The JSON literal is not numeric, but - # if the other end knows by contract that the data is supposed to be a - # 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 - 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/class/attribute.rb#5 -class Class < ::Module - # Declare a class-level attribute whose value is inheritable by subclasses. - # Subclasses can change their own value and it will not impact parent class. - # - # ==== Options - # - # * :instance_reader - Sets the instance reader method (defaults to true). - # * :instance_writer - Sets the instance writer method (defaults to true). - # * :instance_accessor - Sets both instance methods (defaults to true). - # * :instance_predicate - Sets a predicate method (defaults to true). - # * :default - Sets a default value for the attribute (defaults to nil). - # - # ==== Examples - # - # class Base - # class_attribute :setting - # end - # - # class Subclass < Base - # end - # - # Base.setting = true - # Subclass.setting # => true - # Subclass.setting = false - # Subclass.setting # => false - # Base.setting # => true - # - # In the above case as long as Subclass does not assign a value to setting - # by performing Subclass.setting = _something_, Subclass.setting - # would read value assigned to parent class. Once Subclass assigns a value then - # the value assigned by Subclass would be returned. - # - # This matches normal Ruby method inheritance: think of writing an attribute - # on a subclass as overriding the reader method. However, you need to be aware - # when using +class_attribute+ with mutable structures as +Array+ or +Hash+. - # In such cases, you don't want to do changes in place. Instead use setters: - # - # Base.setting = [] - # Base.setting # => [] - # Subclass.setting # => [] - # - # # Appending in child changes both parent and child because it is the same object: - # Subclass.setting << :foo - # Base.setting # => [:foo] - # Subclass.setting # => [:foo] - # - # # Use setters to not propagate changes: - # Base.setting = [] - # Subclass.setting += [:foo] - # Base.setting # => [] - # Subclass.setting # => [:foo] - # - # For convenience, an instance predicate method is defined as well. - # To skip it, pass instance_predicate: false. - # - # Subclass.setting? # => false - # - # Instances may overwrite the class value in the same way: - # - # Base.setting = true - # object = Base.new - # object.setting # => true - # object.setting = false - # object.setting # => false - # Base.setting # => true - # - # To opt out of the instance reader method, pass instance_reader: false. - # - # object.setting # => NoMethodError - # object.setting? # => NoMethodError - # - # To opt out of the instance writer method, pass instance_writer: false. - # - # object.setting = false # => NoMethodError - # - # To opt out of both instance methods, pass instance_accessor: false. - # - # To set a default value for the attribute, pass default:, like so: - # - # class_attribute :settings, default: {} - # - # source://activesupport//lib/active_support/core_ext/class/attribute.rb#85 - def class_attribute(*attrs, instance_accessor: T.unsafe(nil), instance_reader: T.unsafe(nil), instance_writer: T.unsafe(nil), instance_predicate: T.unsafe(nil), default: T.unsafe(nil)); end - - # Returns an array with all classes that are < than its receiver. - # - # class C; end - # C.descendants # => [] - # - # class B < C; end - # C.descendants # => [B] - # - # class A < B; end - # C.descendants # => [B, A] - # - # class D < C; end - # C.descendants # => [B, A, D] - # - # source://activesupport//lib/active_support/core_ext/class/subclasses.rb#20 - def descendants; end -end - -# source://activesupport//lib/active_support/core_ext/date/zones.rb#6 -class Date - include ::Comparable - include ::DateAndTime::Zones - include ::DateAndTime::Calculations - - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#90 - def +(other); end - - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#100 - def -(other); end - - # Allow Date to be compared with Time by converting to DateTime and relying on the <=> from there. - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#137 - def <=>(other); end - - # Duck-types as a Date-like class. See Object#acts_like?. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/date/acts_like.rb#7 - def acts_like_date?; end - - # Provides precise Date calculations for years, months, and days. The +options+ parameter takes a hash with - # any of these keys: :years, :months, :weeks, :days. - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#112 - def advance(options); end - - # Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00) - # and then subtracts the specified number of seconds. - # - # 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 - 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) - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#67 - def at_beginning_of_day; end - - # Converts Date to a Time (or DateTime if necessary) with the time portion set to the end of the day (23:59:59) - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#85 - def at_end_of_day; end - - # Converts Date to a Time (or DateTime if necessary) with the time portion set to the middle of the day (12:00) - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#75 - def at_midday; end - - # Converts Date to a Time (or DateTime if necessary) with the time portion set to the middle of the day (12:00) - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#75 - def at_middle_of_day; end - - # Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00) - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#67 - def at_midnight; end - - # Converts Date to a Time (or DateTime if necessary) with the time portion set to the middle of the day (12:00) - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#75 - def at_noon; end - - # Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00) - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#67 - def beginning_of_day; end - - # No Date is blank: - # - # Date.today.blank? # => false - # - # @return [false] - # - # source://activesupport//lib/active_support/core_ext/date/blank.rb#11 - def blank?; end - - # Returns a new Date where one or more of the elements have been changed according to the +options+ parameter. - # The +options+ parameter is a hash with a combination of these keys: :year, :month, :day. - # - # Date.new(2007, 5, 12).change(day: 1) # => Date.new(2007, 5, 1) - # Date.new(2007, 5, 12).change(year: 2005, month: 1) # => Date.new(2005, 1, 12) - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#128 - def change(options); end - - # Allow Date to be compared with Time by converting to DateTime and relying on the <=> from there. - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#137 - def compare_with_coercion(other); end - - # Converts Date to a Time (or DateTime if necessary) with the time portion set to the end of the day (23:59:59) - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#85 - def end_of_day; end - - # Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00) - # and then adds the specified number of seconds - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#61 - def in(seconds); end - - # 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 - 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) - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#75 - def midday; end - - # Converts Date to a Time (or DateTime if necessary) with the time portion set to the middle of the day (12:00) - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#75 - def middle_of_day; end - - # Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00) - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#67 - def midnight; end - - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#100 - def minus_with_duration(other); end - - # Converts Date to a Time (or DateTime if necessary) with the time portion set to the middle of the day (12:00) - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#75 - def noon; end - - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#90 - def plus_with_duration(other); end - - # 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 - 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) - # and then adds the specified number of seconds - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#61 - def since(seconds); end - - # Convert to a formatted string. See DATE_FORMATS for predefined formats. - # - # This method is aliased to to_formatted_s. - # - # date = Date.new(2007, 11, 10) # => Sat, 10 Nov 2007 - # - # date.to_fs(:db) # => "2007-11-10" - # date.to_formatted_s(:db) # => "2007-11-10" - # - # date.to_fs(:short) # => "10 Nov" - # date.to_fs(:number) # => "20071110" - # date.to_fs(:long) # => "November 10, 2007" - # date.to_fs(:long_ordinal) # => "November 10th, 2007" - # date.to_fs(:rfc822) # => "10 Nov 2007" - # date.to_fs(:iso8601) # => "2007-11-10" - # - # == Adding your own date formats to to_fs - # You can add your own formats to the Date::DATE_FORMATS hash. - # Use the format name as the hash key and either a strftime string - # or Proc instance that takes a date argument as the value. - # - # # config/initializers/date_formats.rb - # Date::DATE_FORMATS[:month_and_year] = '%B %Y' - # Date::DATE_FORMATS[:short_ordinal] = ->(date) { date.strftime("%B #{date.day.ordinalize}") } - # - # source://activesupport//lib/active_support/core_ext/date/conversions.rb#47 - def to_formatted_s(format = T.unsafe(nil)); end - - # Convert to a formatted string. See DATE_FORMATS for predefined formats. - # - # This method is aliased to to_formatted_s. - # - # date = Date.new(2007, 11, 10) # => Sat, 10 Nov 2007 - # - # date.to_fs(:db) # => "2007-11-10" - # date.to_formatted_s(:db) # => "2007-11-10" - # - # date.to_fs(:short) # => "10 Nov" - # date.to_fs(:number) # => "20071110" - # date.to_fs(:long) # => "November 10, 2007" - # date.to_fs(:long_ordinal) # => "November 10th, 2007" - # date.to_fs(:rfc822) # => "10 Nov 2007" - # date.to_fs(:iso8601) # => "2007-11-10" - # - # == Adding your own date formats to to_fs - # You can add your own formats to the Date::DATE_FORMATS hash. - # Use the format name as the hash key and either a strftime string - # or Proc instance that takes a date argument as the value. - # - # # config/initializers/date_formats.rb - # Date::DATE_FORMATS[:month_and_year] = '%B %Y' - # Date::DATE_FORMATS[:short_ordinal] = ->(date) { date.strftime("%B #{date.day.ordinalize}") } - # - # 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+). - # - # date = Date.new(2007, 11, 10) # => Sat, 10 Nov 2007 - # - # date.to_time # => 2007-11-10 00:00:00 0800 - # date.to_time(:local) # => 2007-11-10 00:00:00 0800 - # - # date.to_time(:utc) # => 2007-11-10 00:00:00 UTC - # - # NOTE: The +:local+ timezone is Ruby's *process* timezone, i.e. ENV['TZ']. - # If the application's timezone is needed, then use +in_time_zone+ instead. - # - # @raise [ArgumentError] - # - # source://activesupport//lib/active_support/core_ext/date/conversions.rb#82 - def to_time(form = T.unsafe(nil)); end - - # Returns a string which represents the time in used time zone as DateTime - # defined by XML Schema: - # - # 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 - def xmlschema; end - - class << self - # Returns the week start (e.g. +:monday+) for the current request, if this has been set (via Date.beginning_of_week=). - # If Date.beginning_of_week has not been set for the current request, returns the week start specified in config.beginning_of_week. - # If no +config.beginning_of_week+ was specified, returns +:monday+. - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#19 - def beginning_of_week; end - - # Sets Date.beginning_of_week to a week start (e.g. +:monday+) for current request/thread. - # - # This method accepts any of the following day symbols: - # +:monday+, +:tuesday+, +:wednesday+, +:thursday+, +:friday+, +:saturday+, +:sunday+ - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#27 - def beginning_of_week=(week_start); end - - # Returns the value of attribute beginning_of_week_default. - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#14 - def beginning_of_week_default; end - - # Sets the attribute beginning_of_week_default - # - # @param value the value to set the attribute beginning_of_week_default to. - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#14 - def beginning_of_week_default=(_arg0); end - - # Returns Time.zone.today when Time.zone or config.time_zone are set, otherwise just returns Date.today. - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#48 - def current; end - - # Returns week start day symbol (e.g. +:monday+), or raises an +ArgumentError+ for invalid day symbol. - # - # @raise [ArgumentError] - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#32 - def find_beginning_of_week!(week_start); end - - # Returns a new Date representing the date 1 day after today (i.e. tomorrow's date). - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#43 - def tomorrow; end - - # Returns a new Date representing the date 1 day ago (i.e. yesterday's date). - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#38 - def yesterday; end - end -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 - -# source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#7 -module DateAndTime::Calculations - # Returns true if the date/time falls after date_or_time. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#72 - def after?(date_or_time); end - - # 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 - 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 - 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 - 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 - 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 - def all_year; end - - # Returns a new date/time at the start of the month. - # - # today = Date.today # => Thu, 18 Jun 2015 - # today.beginning_of_month # => Mon, 01 Jun 2015 - # - # +DateTime+ objects will have a time set to 0:00. - # - # now = DateTime.current # => Thu, 18 Jun 2015 15:23:13 +0000 - # now.beginning_of_month # => Mon, 01 Jun 2015 00:00:00 +0000 - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#125 - def at_beginning_of_month; end - - # Returns a new date/time at the start of the quarter. - # - # today = Date.today # => Fri, 10 Jul 2015 - # today.beginning_of_quarter # => Wed, 01 Jul 2015 - # - # +DateTime+ objects will have a time set to 0:00. - # - # now = DateTime.current # => Fri, 10 Jul 2015 18:41:29 +0000 - # now.beginning_of_quarter # => Wed, 01 Jul 2015 00:00:00 +0000 - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#139 - def at_beginning_of_quarter; end - - # Returns a new date/time representing the start of this week on the given day. - # Week is assumed to start on +start_day+, default is - # +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 - def at_beginning_of_week(start_day = T.unsafe(nil)); end - - # Returns a new date/time at the beginning of the year. - # - # today = Date.today # => Fri, 10 Jul 2015 - # today.beginning_of_year # => Thu, 01 Jan 2015 - # - # +DateTime+ objects will have a time set to 0:00. - # - # 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 - 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 - def at_end_of_month; end - - # Returns a new date/time at the end of the quarter. - # - # today = Date.today # => Fri, 10 Jul 2015 - # today.end_of_quarter # => Wed, 30 Sep 2015 - # - # +DateTime+ objects will have a time set to 23:59:59. - # - # now = DateTime.current # => Fri, 10 Jul 2015 18:41:29 +0000 - # now.end_of_quarter # => Wed, 30 Sep 2015 23:59:59 +0000 - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#154 - def at_end_of_quarter; end - - # Returns a new date/time representing the end of this week on the given day. - # Week is assumed to start on +start_day+, default is - # +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 - 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 - def at_end_of_year; end - - # Returns true if the date/time falls before date_or_time. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#67 - def before?(date_or_time); end - - # Returns a new date/time at the start of the month. - # - # today = Date.today # => Thu, 18 Jun 2015 - # today.beginning_of_month # => Mon, 01 Jun 2015 - # - # +DateTime+ objects will have a time set to 0:00. - # - # now = DateTime.current # => Thu, 18 Jun 2015 15:23:13 +0000 - # now.beginning_of_month # => Mon, 01 Jun 2015 00:00:00 +0000 - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#125 - def beginning_of_month; end - - # Returns a new date/time at the start of the quarter. - # - # today = Date.today # => Fri, 10 Jul 2015 - # today.beginning_of_quarter # => Wed, 01 Jul 2015 - # - # +DateTime+ objects will have a time set to 0:00. - # - # now = DateTime.current # => Fri, 10 Jul 2015 18:41:29 +0000 - # now.beginning_of_quarter # => Wed, 01 Jul 2015 00:00:00 +0000 - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#139 - def beginning_of_quarter; end - - # Returns a new date/time representing the start of this week on the given day. - # Week is assumed to start on +start_day+, default is - # +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 - def beginning_of_week(start_day = T.unsafe(nil)); end - - # Returns a new date/time at the beginning of the year. - # - # today = Date.today # => Fri, 10 Jul 2015 - # today.beginning_of_year # => Thu, 01 Jan 2015 - # - # +DateTime+ objects will have a time set to 0:00. - # - # 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 - def beginning_of_year; end - - # Returns a new date/time the specified number of days ago. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#77 - def days_ago(days); end - - # Returns a new date/time the specified number of days in the future. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#82 - def days_since(days); end - - # Returns the number of days to the start of the week on the given day. - # 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 - 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 - def end_of_month; end - - # Returns a new date/time at the end of the quarter. - # - # today = Date.today # => Fri, 10 Jul 2015 - # today.end_of_quarter # => Wed, 30 Sep 2015 - # - # +DateTime+ objects will have a time set to 23:59:59. - # - # now = DateTime.current # => Fri, 10 Jul 2015 18:41:29 +0000 - # now.end_of_quarter # => Wed, 30 Sep 2015 23:59:59 +0000 - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#154 - def end_of_quarter; end - - # Returns a new date/time representing the end of this week on the given day. - # Week is assumed to start on +start_day+, default is - # +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 - 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 - def end_of_year; end - - # Returns true if the date/time is in the future. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#52 - def future?; end - - # Short-hand for months_ago(1). - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#230 - def last_month; end - - # Short-hand for months_ago(3). - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#235 - def last_quarter; end - - # Returns a new date/time representing the given day in the previous week. - # Week is assumed to start on +start_day+, default is - # +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 - 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 - def last_weekday; end - - # Short-hand for years_ago(1). - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#241 - 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 - def monday; end - - # Returns a new date/time the specified number of months ago. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#97 - def months_ago(months); end - - # Returns a new date/time the specified number of months in the future. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#102 - def months_since(months); end - - # Returns true if the date/time is tomorrow. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#35 - def next_day?; end - - # Returns a new date/time representing the next occurrence of the specified day of week. - # - # today = Date.today # => Thu, 14 Dec 2017 - # 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 - 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 - def next_quarter; end - - # Returns a new date/time representing the given day in the next week. - # - # today = Date.today # => Thu, 07 May 2015 - # today.next_week # => Mon, 11 May 2015 - # - # The +given_day_in_next_week+ defaults to the beginning of the week - # which is determined by +Date.beginning_of_week+ or +config.beginning_of_week+ - # when set. - # - # today = Date.today # => Thu, 07 May 2015 - # today.next_week(:friday) # => Fri, 15 May 2015 - # - # +DateTime+ objects have their time set to 0:00 unless +same_time+ is true. - # - # 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 - 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 - def next_weekday; end - - # Returns true if the date/time does not fall on a Saturday or Sunday. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#62 - def on_weekday?; end - - # Returns true if the date/time falls on a Saturday or Sunday. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#57 - def on_weekend?; end - - # Returns true if the date/time is in the past. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#47 - def past?; end - - # Returns true if the date/time is yesterday. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#41 - def prev_day?; end - - # Returns a new date/time representing the previous occurrence of the specified day of week. - # - # today = Date.today # => Thu, 14 Dec 2017 - # 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 - 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 - def prev_quarter; end - - # Returns a new date/time representing the given day in the previous week. - # Week is assumed to start on +start_day+, default is - # +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 - 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 - def prev_weekday; 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 - def sunday; end - - # Returns true if the date/time is today. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#30 - def today?; end - - # Returns a new date/time representing tomorrow. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#25 - def tomorrow; end - - # Returns true if the date/time is tomorrow. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#35 - def tomorrow?; end - - # Returns a new date/time the specified number of weeks ago. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#87 - def weeks_ago(weeks); end - - # Returns a new date/time the specified number of weeks in the future. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#92 - def weeks_since(weeks); end - - # Returns a new date/time the specified number of years ago. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#107 - def years_ago(years); end - - # Returns a new date/time the specified number of years in the future. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#112 - def years_since(years); end - - # Returns a new date/time representing yesterday. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#20 - def yesterday; end - - # Returns true if the date/time is yesterday. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#41 - def yesterday?; end - - private - - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#360 - def copy_time_to(other); end - - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#356 - def days_span(day); end - - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#348 - def first_hour(date_or_time); end - - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#352 - def last_hour(date_or_time); end -end - -# source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#8 -DateAndTime::Calculations::DAYS_INTO_WEEK = T.let(T.unsafe(nil), Hash) - -# source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#17 -DateAndTime::Calculations::WEEKEND_DAYS = T.let(T.unsafe(nil), Array) - -# source://activesupport//lib/active_support/core_ext/date_and_time/compatibility.rb#6 -module DateAndTime::Compatibility - # source://activesupport//lib/active_support/core_ext/date_and_time/compatibility.rb#14 - def preserve_timezone; end - - # source://activesupport//lib/active_support/core_ext/date_and_time/compatibility.rb#29 - def utc_to_local_returns_utc_offset_times; end - - class << self - # source://activesupport//lib/active_support/core_ext/date_and_time/compatibility.rb#14 - def preserve_timezone; end - - # source://activesupport//lib/active_support/core_ext/date_and_time/compatibility.rb#14 - def preserve_timezone=(val); end - - # source://activesupport//lib/active_support/core_ext/date_and_time/compatibility.rb#29 - def utc_to_local_returns_utc_offset_times; end - - # source://activesupport//lib/active_support/core_ext/date_and_time/compatibility.rb#29 - def utc_to_local_returns_utc_offset_times=(val); end - end -end - -# source://activesupport//lib/active_support/core_ext/date_and_time/zones.rb#4 -module DateAndTime::Zones - # Returns the simultaneous time in Time.zone if a zone is given or - # if Time.zone_default is set. Otherwise, it returns the current time. - # - # Time.zone = 'Hawaii' # => 'Hawaii' - # Time.utc(2000).in_time_zone # => Fri, 31 Dec 1999 14:00:00 HST -10:00 - # Date.new(2000).in_time_zone # => Sat, 01 Jan 2000 00:00:00 HST -10:00 - # - # This method is similar to Time#localtime, except that it uses Time.zone as the local zone - # instead of the operating system's time zone. - # - # You can also pass in a TimeZone instance or string that identifies a TimeZone as an argument, - # and the conversion will be based on that zone instead of Time.zone. - # - # Time.utc(2000).in_time_zone('Alaska') # => Fri, 31 Dec 1999 15:00:00 AKST -09:00 - # Date.new(2000).in_time_zone('Alaska') # => Sat, 01 Jan 2000 00:00:00 AKST -09:00 - # - # source://activesupport//lib/active_support/core_ext/date_and_time/zones.rb#20 - def in_time_zone(zone = T.unsafe(nil)); end - - private - - # source://activesupport//lib/active_support/core_ext/date_and_time/zones.rb#32 - def time_with_zone(time, zone); end -end - -# source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#5 -class DateTime < ::Date - include ::DateAndTime::Compatibility - - # Layers additional behavior on DateTime#<=> so that Time and - # ActiveSupport::TimeWithZone instances can be compared with a DateTime. - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#204 - def <=>(other); end - - # Duck-types as a Date-like class. See Object#acts_like?. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/date_time/acts_like.rb#8 - def acts_like_date?; end - - # Duck-types as a Time-like class. See Object#acts_like?. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/date_time/acts_like.rb#13 - def acts_like_time?; end - - # Uses Date to provide precise Time calculations for years, months, and days. - # The +options+ parameter takes a hash with any of these keys: :years, - # :months, :weeks, :days, :hours, - # :minutes, :seconds. - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#78 - def advance(options); end - - # Returns a new DateTime representing the time a number of seconds ago. - # Do not use this method in combination with x.months, use months_ago instead! - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#105 - def ago(seconds); end - - # source://activesupport//lib/active_support/core_ext/object/json.rb#207 - def as_json(options = T.unsafe(nil)); end - - # Returns a new DateTime representing the start of the day (0:00). - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#118 - def at_beginning_of_day; end - - # Returns a new DateTime representing the start of the hour (hh:00:00). - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#142 - def at_beginning_of_hour; end - - # Returns a new DateTime representing the start of the minute (hh:mm:00). - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#154 - def at_beginning_of_minute; end - - # Returns a new DateTime representing the end of the day (23:59:59). - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#136 - def at_end_of_day; end - - # Returns a new DateTime representing the end of the hour (hh:59:59). - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#148 - def at_end_of_hour; end - - # Returns a new DateTime representing the end of the minute (hh:mm:59). - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#160 - def at_end_of_minute; end - - # Returns a new DateTime representing the middle of the day (12:00) - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#126 - def at_midday; end - - # Returns a new DateTime representing the middle of the day (12:00) - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#126 - def at_middle_of_day; end - - # Returns a new DateTime representing the start of the day (0:00). - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#118 - def at_midnight; end - - # Returns a new DateTime representing the middle of the day (12:00) - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#126 - def at_noon; end - - # Returns a new DateTime representing the start of the day (0:00). - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#118 - def beginning_of_day; end - - # Returns a new DateTime representing the start of the hour (hh:00:00). - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#142 - def beginning_of_hour; end - - # Returns a new DateTime representing the start of the minute (hh:mm:00). - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#154 - def beginning_of_minute; end - - # No DateTime is ever blank: - # - # DateTime.now.blank? # => false - # - # @return [false] - # - # source://activesupport//lib/active_support/core_ext/date_time/blank.rb#11 - def blank?; end - - # Returns a new DateTime where one or more of the elements have been changed - # according to the +options+ parameter. The time options (:hour, - # :min, :sec) reset cascadingly, so if only the hour is - # passed, then minute and sec is set to 0. If the hour and minute is passed, - # then sec is set to 0. The +options+ parameter takes a hash with any of these - # keys: :year, :month, :day, :hour, - # :min, :sec, :offset, :start. - # - # DateTime.new(2012, 8, 29, 22, 35, 0).change(day: 1) # => DateTime.new(2012, 8, 1, 22, 35, 0) - # DateTime.new(2012, 8, 29, 22, 35, 0).change(year: 1981, day: 1) # => DateTime.new(1981, 8, 1, 22, 35, 0) - # DateTime.new(2012, 8, 29, 22, 35, 0).change(year: 1981, hour: 0) # => DateTime.new(1981, 8, 29, 0, 0, 0) - # - # @raise [ArgumentError] - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#51 - def change(options); end - - # Returns a new DateTime representing the end of the day (23:59:59). - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#136 - def end_of_day; end - - # Returns a new DateTime representing the end of the hour (hh:59:59). - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#148 - def end_of_hour; end - - # Returns a new DateTime representing the end of the minute (hh:mm:59). - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#160 - def end_of_minute; end - - # Returns a formatted string of the offset from UTC, or an alternative - # string if the time zone is already UTC. - # - # datetime = DateTime.civil(2000, 1, 1, 0, 0, 0, Rational(-6, 24)) - # datetime.formatted_offset # => "-06:00" - # datetime.formatted_offset(false) # => "-0600" - # - # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#51 - 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. - # - # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)) # => Mon, 21 Feb 2005 10:11:12 -0600 - # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)).utc # => Mon, 21 Feb 2005 16:11:12 UTC - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#180 - def getgm; end - - # Returns a Time instance of the simultaneous time in the system timezone. - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#166 - def getlocal(utc_offset = T.unsafe(nil)); end - - # Returns a Time instance of the simultaneous time in the UTC timezone. - # - # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)) # => Mon, 21 Feb 2005 10:11:12 -0600 - # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)).utc # => Mon, 21 Feb 2005 16:11:12 UTC - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#180 - def getutc; end - - # Returns a Time instance of the simultaneous time in the UTC timezone. - # - # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)) # => Mon, 21 Feb 2005 10:11:12 -0600 - # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)).utc # => Mon, 21 Feb 2005 16:11:12 UTC - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#180 - def gmtime; end - - # Returns a new DateTime representing the time a number of seconds since the - # instance time. Do not use this method in combination with x.months, use - # months_since instead! - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#112 - def in(seconds); 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 - def inspect; end - - # Returns a Time instance of the simultaneous time in the system timezone. - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#166 - def localtime(utc_offset = T.unsafe(nil)); end - - # Returns a new DateTime representing the middle of the day (12:00) - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#126 - def midday; end - - # Returns a new DateTime representing the middle of the day (12:00) - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#126 - def middle_of_day; end - - # Returns a new DateTime representing the start of the day (0:00). - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#118 - def midnight; end - - # Returns a new DateTime representing the middle of the day (12:00) - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#126 - def noon; end - - # Returns the fraction of a second as nanoseconds - # - # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#94 - 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 - def readable_inspect; end - - # Returns the number of seconds since 00:00:00. - # - # DateTime.new(2012, 8, 29, 0, 0, 0).seconds_since_midnight # => 0 - # DateTime.new(2012, 8, 29, 12, 34, 56).seconds_since_midnight # => 45296 - # DateTime.new(2012, 8, 29, 23, 59, 59).seconds_since_midnight # => 86399 - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#20 - def seconds_since_midnight; end - - # Returns the number of seconds until 23:59:59. - # - # DateTime.new(2012, 8, 29, 0, 0, 0).seconds_until_end_of_day # => 86399 - # DateTime.new(2012, 8, 29, 12, 34, 56).seconds_until_end_of_day # => 41103 - # DateTime.new(2012, 8, 29, 23, 59, 59).seconds_until_end_of_day # => 0 - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#29 - def seconds_until_end_of_day; end - - # Returns a new DateTime representing the time a number of seconds since the - # instance time. Do not use this method in combination with x.months, use - # months_since instead! - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#112 - def since(seconds); end - - # Returns the fraction of a second as a +Rational+ - # - # DateTime.new(2012, 8, 29, 0, 0, 0.5).subsec # => (1/2) - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#36 - def subsec; 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 - def to_f; end - - # Convert to a formatted string. See Time::DATE_FORMATS for predefined formats. - # - # This method is aliased to to_formatted_s. - # - # === Examples - # datetime = DateTime.civil(2007, 12, 4, 0, 0, 0, 0) # => Tue, 04 Dec 2007 00:00:00 +0000 - # - # datetime.to_fs(:db) # => "2007-12-04 00:00:00" - # datetime.to_formatted_s(:db) # => "2007-12-04 00:00:00" - # datetime.to_fs(:number) # => "20071204000000" - # datetime.to_fs(:short) # => "04 Dec 00:00" - # datetime.to_fs(:long) # => "December 04, 2007 00:00" - # datetime.to_fs(:long_ordinal) # => "December 4th, 2007 00:00" - # datetime.to_fs(:rfc822) # => "Tue, 04 Dec 2007 00:00:00 +0000" - # datetime.to_fs(:iso8601) # => "2007-12-04T00:00:00+00:00" - # - # == Adding your own datetime formats to to_fs - # DateTime formats are shared with Time. You can add your own to the - # Time::DATE_FORMATS hash. Use the format name as the hash key and - # either a strftime string or Proc instance that takes a time or - # datetime argument as the value. - # - # # config/initializers/time_formats.rb - # Time::DATE_FORMATS[:month_and_year] = '%B %Y' - # Time::DATE_FORMATS[:short_ordinal] = lambda { |time| time.strftime("%B #{time.day.ordinalize}") } - # - # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#35 - def to_formatted_s(format = T.unsafe(nil)); end - - # Convert to a formatted string. See Time::DATE_FORMATS for predefined formats. - # - # This method is aliased to to_formatted_s. - # - # === Examples - # datetime = DateTime.civil(2007, 12, 4, 0, 0, 0, 0) # => Tue, 04 Dec 2007 00:00:00 +0000 - # - # datetime.to_fs(:db) # => "2007-12-04 00:00:00" - # datetime.to_formatted_s(:db) # => "2007-12-04 00:00:00" - # datetime.to_fs(:number) # => "20071204000000" - # datetime.to_fs(:short) # => "04 Dec 00:00" - # datetime.to_fs(:long) # => "December 04, 2007 00:00" - # datetime.to_fs(:long_ordinal) # => "December 4th, 2007 00:00" - # datetime.to_fs(:rfc822) # => "Tue, 04 Dec 2007 00:00:00 +0000" - # datetime.to_fs(:iso8601) # => "2007-12-04T00:00:00+00:00" - # - # == Adding your own datetime formats to to_fs - # DateTime formats are shared with Time. You can add your own to the - # Time::DATE_FORMATS hash. Use the format name as the hash key and - # either a strftime string or Proc instance that takes a time or - # datetime argument as the value. - # - # # config/initializers/time_formats.rb - # Time::DATE_FORMATS[:month_and_year] = '%B %Y' - # Time::DATE_FORMATS[:short_ordinal] = lambda { |time| time.strftime("%B #{time.day.ordinalize}") } - # - # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#35 - def to_fs(format = T.unsafe(nil)); end - - # Converts +self+ to an integer number of seconds since the Unix epoch. - # - # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#84 - 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 - # on the setting of +ActiveSupport.to_time_preserves_timezone+. - # - # source://activesupport//lib/active_support/core_ext/date_time/compatibility.rb#15 - def to_time; end - - # Returns the fraction of a second as microseconds - # - # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#89 - def usec; end - - # Returns a Time instance of the simultaneous time in the UTC timezone. - # - # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)) # => Mon, 21 Feb 2005 10:11:12 -0600 - # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)).utc # => Mon, 21 Feb 2005 16:11:12 UTC - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#180 - def utc; end - - # Returns +true+ if offset == 0. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#193 - def utc?; end - - # Returns the offset value in seconds. - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#198 - def utc_offset; end - - private - - # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#99 - def offset_in_seconds; end - - # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#103 - def seconds_since_unix_epoch; end - - class << self - # Returns DateTime with local offset for given year if format is local else - # offset is zero. - # - # DateTime.civil_from_format :local, 2012 - # # => Sun, 01 Jan 2012 00:00:00 +0300 - # 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 - 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 - # config.time_zone are set, otherwise returns - # Time.now.to_datetime. - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#10 - def current; end - 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 -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. - # uuid_from_hash always generates the same UUID for a given name and namespace combination. - # - # 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 - 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 - def uuid_v3(uuid_namespace, name); end - - # Convenience method for SecureRandom.uuid. - # - # source://activesupport//lib/active_support/core_ext/digest/uuid.rb#54 - 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 - def uuid_v5(uuid_namespace, name); end - - private - - # source://activesupport//lib/active_support/core_ext/digest/uuid.rb#58 - def pack_uuid_namespace(namespace); end - end -end - -# source://activesupport//lib/active_support/core_ext/digest/uuid.rb#8 -Digest::UUID::DNS_NAMESPACE = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/core_ext/digest/uuid.rb#10 -Digest::UUID::OID_NAMESPACE = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/core_ext/digest/uuid.rb#9 -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 -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 - - # 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 - - # A utility method for escaping HTML without affecting existing escaped entities. - # - # html_escape_once('1 < 2 & 3') - # # => "1 < 2 & 3" - # - # html_escape_once('<< Accept & Checkout') - # # => "<< Accept & Checkout" - # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#58 - def html_escape_once(s); end - - # A utility method for escaping HTML entities in JSON strings. Specifically, the - # &, > and < characters are replaced with their equivalent unicode escaped form - - # \u0026, \u003e, and \u003c. The Unicode sequences \u2028 and \u2029 are also - # escaped as they are treated as newline characters in some JavaScript engines. - # These sequences have identical meaning as the original characters inside the - # context of a JSON string, so assuming the input is a valid and well-formed - # JSON value, the output will have equivalent meaning when parsed: - # - # json = JSON.generate({ name: ""}) - # # => "{\"name\":\"\"}" - # - # json_escape(json) - # # => "{\"name\":\"\\u003C/script\\u003E\\u003Cscript\\u003Ealert('PWNED!!!')\\u003C/script\\u003E\"}" - # - # JSON.parse(json) == JSON.parse(json_escape(json)) - # # => true - # - # The intended use case for this method is to escape JSON strings before including - # them inside a script tag to avoid XSS vulnerability: - # - # - # - # It is necessary to +raw+ the result of +json_escape+, so that quotation marks - # don't get converted to " entities. +json_escape+ doesn't - # automatically flag the result as HTML safe, since the raw value is unsafe to - # use inside HTML attributes. - # - # If your JSON is being used downstream for insertion into the DOM, be aware of - # whether or not it is being inserted via html(). Most jQuery plugins do this. - # If that is the case, be sure to +html_escape+ or +sanitize+ any user-generated - # content returned by your JSON. - # - # If you need to output JSON elsewhere in your HTML, you can just do something - # like this, as any unsafe characters (including quotation marks) will be - # automatically escaped for you: - # - #
    ...
    - # - # WARNING: this helper only works with valid JSON. Using this on non-JSON values - # will open up serious XSS vulnerabilities. For example, if you replace the - # +current_user.to_json+ in the example above with user input instead, the browser - # will happily eval() that string as JavaScript. - # - # The escaping performed in this method is identical to those performed in the - # Active Support JSON encoder when +ActiveSupport.escape_html_entities_in_json+ is - # set to true. Because this transformation is idempotent, this helper can be - # applied even if +ActiveSupport.escape_html_entities_in_json+ is already true. - # - # Therefore, when you are unsure if +ActiveSupport.escape_html_entities_in_json+ - # is enabled, or if you are unsure where your JSON string originated from, it - # is recommended that you always apply this helper (other libraries, such as the - # 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 - 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') - # # => "1___2___3" - # - # 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 - 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 - 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 - def html_escape(s); end - - # A utility method for escaping HTML without affecting existing escaped entities. - # - # html_escape_once('1 < 2 & 3') - # # => "1 < 2 & 3" - # - # html_escape_once('<< Accept & Checkout') - # # => "<< Accept & Checkout" - # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#58 - def html_escape_once(s); end - - # A utility method for escaping HTML entities in JSON strings. Specifically, the - # &, > and < characters are replaced with their equivalent unicode escaped form - - # \u0026, \u003e, and \u003c. The Unicode sequences \u2028 and \u2029 are also - # escaped as they are treated as newline characters in some JavaScript engines. - # These sequences have identical meaning as the original characters inside the - # context of a JSON string, so assuming the input is a valid and well-formed - # JSON value, the output will have equivalent meaning when parsed: - # - # json = JSON.generate({ name: ""}) - # # => "{\"name\":\"\"}" - # - # json_escape(json) - # # => "{\"name\":\"\\u003C/script\\u003E\\u003Cscript\\u003Ealert('PWNED!!!')\\u003C/script\\u003E\"}" - # - # JSON.parse(json) == JSON.parse(json_escape(json)) - # # => true - # - # The intended use case for this method is to escape JSON strings before including - # them inside a script tag to avoid XSS vulnerability: - # - # - # - # It is necessary to +raw+ the result of +json_escape+, so that quotation marks - # don't get converted to " entities. +json_escape+ doesn't - # automatically flag the result as HTML safe, since the raw value is unsafe to - # use inside HTML attributes. - # - # If your JSON is being used downstream for insertion into the DOM, be aware of - # whether or not it is being inserted via html(). Most jQuery plugins do this. - # If that is the case, be sure to +html_escape+ or +sanitize+ any user-generated - # content returned by your JSON. - # - # If you need to output JSON elsewhere in your HTML, you can just do something - # like this, as any unsafe characters (including quotation marks) will be - # automatically escaped for you: - # - #
    ...
    - # - # WARNING: this helper only works with valid JSON. Using this on non-JSON values - # will open up serious XSS vulnerabilities. For example, if you replace the - # +current_user.to_json+ in the example above with user input instead, the browser - # will happily eval() that string as JavaScript. - # - # The escaping performed in this method is identical to those performed in the - # Active Support JSON encoder when +ActiveSupport.escape_html_entities_in_json+ is - # set to true. Because this transformation is idempotent, this helper can be - # applied even if +ActiveSupport.escape_html_entities_in_json+ is already true. - # - # Therefore, when you are unsure if +ActiveSupport.escape_html_entities_in_json+ - # is enabled, or if you are unsure where your JSON string originated from, it - # is recommended that you always apply this helper (other libraries, such as the - # 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 - 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') - # # => "1___2___3" - # - # 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 - def xml_name_escape(name); end - end -end - -# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#9 -ERB::Util::HTML_ESCAPE = T.let(T.unsafe(nil), Hash) - -# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#11 -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/string/output_safety.rb#12 -ERB::Util::JSON_ESCAPE_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/string/output_safety.rb#20 -ERB::Util::TAG_NAME_REPLACEMENT_CHAR = 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) - -# 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/object/json.rb#139 -module Enumerable - extend ::ActiveSupport::EnumerableCoreExt::Constants - - # source://activesupport//lib/active_support/core_ext/object/json.rb#140 - def as_json(options = T.unsafe(nil)); end - - # Returns a new +Array+ without the blank items. - # Uses Object#blank? for determining if an item is blank. - # - # [1, "", nil, 2, " ", [], {}, false, true].compact_blank - # # => [1, 2, true] - # - # Set.new([nil, "", 1, 2]) - # # => [2, 1] (or [1, 2]) - # - # When called on a +Hash+, returns a new +Hash+ without the blank values. - # - # { 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 - def compact_blank; end - - # The negative of the Enumerable#include?. Returns +true+ if the - # collection does not include the object. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#169 - def exclude?(object); end - - # Returns a copy of the enumerable excluding the specified elements. - # - # ["David", "Rafael", "Aaron", "Todd"].excluding "Aaron", "Todd" - # # => ["David", "Rafael"] - # - # ["David", "Rafael", "Aaron", "Todd"].excluding %w[ Aaron Todd ] - # # => ["David", "Rafael"] - # - # {foo: 1, bar: 2, baz: 3}.excluding :bar - # # => {foo: 1, baz: 3} - # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#183 - 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 - # objects in the original enumerable. - # - # [ Person.find(5), Person.find(3), Person.find(1) ].in_order_of(:id, [ 1, 5, 3 ]) - # # => [ Person.find(1), Person.find(5), Person.find(3) ] - # - # 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 - def in_order_of(key, series); end - - # Returns a new array that includes the passed elements. - # - # [ 1, 2, 3 ].including(4, 5) - # # => [ 1, 2, 3, 4, 5 ] - # - # ["David", "Rafael"].including %w[ Aaron Todd ] - # # => ["David", "Rafael", "Aaron", "Todd"] - # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#163 - def including(*elements); end - - # Convert an enumerable to a hash, using the block result as the key and the - # element as the value. - # - # people.index_by(&:login) - # # => { "nextangle" => , "chade-" => , ...} - # - # 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 - def index_by; end - - # Convert an enumerable to a hash, using the element as the key and the block - # result as the value. - # - # post = Post.new(title: "hey there", body: "what's up?") - # - # %i( title body ).index_with { |attr_name| post.public_send(attr_name) } - # # => { title: "hey there", body: "what's up?" } - # - # If an argument is passed instead of a block, it will be used as the value - # for all elements: - # - # %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 - def index_with(default = T.unsafe(nil)); end - - # Returns +true+ if the enumerable has more than 1 element. Functionally - # equivalent to enum.to_a.size > 1. Can be called with a block too, - # much like any?, so people.many? { |p| p.age > 26 } returns +true+ - # if more than one person is over 26. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#144 - def many?; end - - # Calculates the maximum from the extracted elements. - # - # payments = [Payment.new(5), Payment.new(15), Payment.new(10)] - # payments.maximum(:price) # => 15 - # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#52 - def maximum(key); end - - # Calculates the minimum from the extracted elements. - # - # payments = [Payment.new(5), Payment.new(15), Payment.new(10)] - # payments.minimum(:price) # => 5 - # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#44 - def minimum(key); end - - # Extract the given key from the first element in the enumerable. - # - # [{ name: "David" }, { name: "Rafael" }, { name: "Aaron" }].pick(:name) - # # => "David" - # - # [{ id: 1, name: "David" }, { id: 2, name: "Rafael" }].pick(:id, :name) - # # => [1, "David"] - # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#212 - def pick(*keys); end - - # Extract the given key from each element in the enumerable. - # - # [{ name: "David" }, { name: "Rafael" }, { name: "Aaron" }].pluck(:name) - # # => ["David", "Rafael", "Aaron"] - # - # [{ 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 - def pluck(*keys); end - - # Returns the sole item in the enumerable. If there are no items, or more - # than one item, raises +Enumerable::SoleItemExpectedError+. - # - # ["x"].sole # => "x" - # 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 - 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" - # # => ["David", "Rafael"] - # - # ["David", "Rafael", "Aaron", "Todd"].excluding %w[ Aaron Todd ] - # # => ["David", "Rafael"] - # - # {foo: 1, bar: 2, baz: 3}.excluding :bar - # # => {foo: 1, baz: 3} - # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#183 - def without(*elements); end -end - -# Error generated by +sole+ when called on an enumerable that doesn't have -# exactly one item. -# -# 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 -class Exception - # source://activesupport//lib/active_support/core_ext/object/json.rb#241 - 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 - def as_json(options = T.unsafe(nil)); end - - # +false+ is blank: - # - # false.blank? # => true - # - # @return [true] - # - # source://activesupport//lib/active_support/core_ext/object/blank.rb#67 - def blank?; end - - # Returns +self+. - # - # source://activesupport//lib/active_support/core_ext/object/to_query.rb#34 - def to_param; end -end - -# source://activesupport//lib/active_support/core_ext/file/atomic.rb#5 -class File < ::IO - class << self - # Write to a file atomically. Useful for situations where you don't - # want other processes or threads to see half-written files. - # - # File.atomic_write('important.file') do |file| - # file.write('hello') - # end - # - # This method needs to create a temporary file. By default it will create it - # in the same directory as the destination file. If you don't like this - # behavior you can provide a different directory but it must be on the - # same physical filesystem as the file you're trying to write. - # - # File.atomic_write('/data/something.important', '/data/tmp') do |file| - # file.write('hello') - # end - # - # source://activesupport//lib/active_support/core_ext/file/atomic.rb#21 - def atomic_write(file_name, temp_dir = T.unsafe(nil)); end - - # Private utility method. - # - # source://activesupport//lib/active_support/core_ext/file/atomic.rb#56 - def probe_stat_in(dir); end - end -end - -# source://activesupport//lib/active_support/core_ext/object/json.rb#110 -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 - 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 -class Hash - include ::Enumerable - - # source://activesupport//lib/active_support/core_ext/object/json.rb#164 - def as_json(options = T.unsafe(nil)); end - - # Validates all keys in a hash match *valid_keys, raising - # +ArgumentError+ on a mismatch. - # - # Note that keys are treated differently than HashWithIndifferentAccess, - # meaning that string and symbol keys will not match. - # - # { name: 'Rob', years: '28' }.assert_valid_keys(:name, :age) # => raises "ArgumentError: Unknown key: :years. Valid keys are: :name, :age" - # { name: 'Rob', age: '28' }.assert_valid_keys('name', 'age') # => raises "ArgumentError: Unknown key: :name. Valid keys are: 'name', 'age'" - # { name: 'Rob', age: '28' }.assert_valid_keys(:name, :age) # => passes, raises nothing - # - # source://activesupport//lib/active_support/core_ext/hash/keys.rb#48 - def assert_valid_keys(*valid_keys); end - - # Hash#reject has its own definition, so this needs one too. - # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#268 - def compact_blank; end - - # Removes all blank values from the +Hash+ in place and returns self. - # Uses Object#blank? for determining if a value is blank. - # - # h = { a: "", b: 1, c: nil, d: [], e: false, f: true } - # h.compact_blank! - # # => { b: 1, f: true } - # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#278 - def compact_blank!; end - - # Returns a deep copy of hash. - # - # hash = { a: { b: 'b' } } - # dup = hash.deep_dup - # dup[:a][:c] = 'c' - # - # hash[:a][:c] # => nil - # dup[:a][:c] # => "c" - # - # 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] } } - # - # h1.deep_merge(h2) # => { a: false, b: { c: [1, 2, 3], x: [3, 4, 5] } } - # - # 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 } } - # - # 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+. - # - # source://activesupport//lib/active_support/core_ext/hash/deep_merge.rb#23 - def deep_merge!(other_hash, &block); end - - # Returns a new hash with all keys converted to strings. - # This includes the keys from the root hash and from all - # nested hashes and arrays. - # - # hash = { person: { name: 'Rob', age: '28' } } - # - # hash.deep_stringify_keys - # # => {"person"=>{"name"=>"Rob", "age"=>"28"}} - # - # source://activesupport//lib/active_support/core_ext/hash/keys.rb#84 - def deep_stringify_keys; end - - # Destructively converts all keys to strings. - # This includes the keys from the root hash and from all - # nested hashes and arrays. - # - # source://activesupport//lib/active_support/core_ext/hash/keys.rb#91 - def deep_stringify_keys!; end - - # Returns a new hash with all keys converted to symbols, as long as - # they respond to +to_sym+. This includes the keys from the root hash - # and from all nested hashes and arrays. - # - # hash = { 'person' => { 'name' => 'Rob', 'age' => '28' } } - # - # hash.deep_symbolize_keys - # # => {:person=>{:name=>"Rob", :age=>"28"}} - # - # source://activesupport//lib/active_support/core_ext/hash/keys.rb#103 - def deep_symbolize_keys; end - - # Destructively converts all keys to symbols, as long as they respond - # to +to_sym+. This includes the keys from the root hash and from all - # nested hashes and arrays. - # - # source://activesupport//lib/active_support/core_ext/hash/keys.rb#110 - def deep_symbolize_keys!; end - - # Returns a new hash with all keys converted by the block operation. - # This includes the keys from the root hash and from all - # nested hashes and arrays. - # - # hash = { person: { name: 'Rob', age: '28' } } - # - # hash.deep_transform_keys{ |key| key.to_s.upcase } - # # => {"PERSON"=>{"NAME"=>"Rob", "AGE"=>"28"}} - # - # source://activesupport//lib/active_support/core_ext/hash/keys.rb#65 - def deep_transform_keys(&block); end - - # Destructively converts all keys by using the block operation. - # This includes the keys from the root hash and from all - # nested hashes and arrays. - # - # source://activesupport//lib/active_support/core_ext/hash/keys.rb#72 - def deep_transform_keys!(&block); end - - # Returns a new hash with all values converted by the block operation. - # This includes the values from the root hash and from all - # nested hashes and arrays. - # - # hash = { person: { name: 'Rob', age: '28' } } - # - # hash.deep_transform_values{ |value| value.to_s.upcase } - # # => {person: {name: "ROB", age: "28"}} - # - # source://activesupport//lib/active_support/core_ext/hash/deep_transform_values.rb#12 - def deep_transform_values(&block); end - - # Destructively converts all values by using the block operation. - # This includes the values from the root hash and from all - # nested hashes and arrays. - # - # source://activesupport//lib/active_support/core_ext/hash/deep_transform_values.rb#19 - def deep_transform_values!(&block); end - - # Removes the given keys from hash and returns it. - # hash = { a: true, b: false, c: nil } - # hash.except!(:c) # => { a: true, b: false } - # hash # => { a: true, b: false } - # - # source://activesupport//lib/active_support/core_ext/hash/except.rb#20 - def except!(*keys); end - - # Removes and returns the key/value pairs matching the given keys. - # - # hash = { a: 1, b: 2, c: 3, d: 4 } - # hash.extract!(:a, :b) # => {:a=>1, :b=>2} - # hash # => {:c=>3, :d=>4} - # - # source://activesupport//lib/active_support/core_ext/hash/slice.rb#24 - def extract!(*keys); end - - # By default, only instances of Hash itself are extractable. - # Subclasses of Hash may implement this method and return - # true to declare themselves as extractable. If a Hash - # is extractable, Array#extract_options! pops it from - # the Array when it is the last element of the Array. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/array/extract_options.rb#9 - def extractable_options?; end - - # Returns an ActiveSupport::HashWithIndifferentAccess out of its receiver: - # - # { a: 1 }.with_indifferent_access['a'] # => 1 - # Called when object is nested under an object that receives - # #with_indifferent_access. This method will be called on the current object - # by the enclosing object and is aliased to #with_indifferent_access by - # default. Subclasses of Hash may override this method to return +self+ if - # converting to an ActiveSupport::HashWithIndifferentAccess would not be - # desirable. - # - # b = { b: 1 } - # { a: b }.with_indifferent_access['a'] # calls b.nested_under_indifferent_access - # # => {"b"=>1} - # - # source://activesupport//lib/active_support/core_ext/hash/indifferent_access.rb#9 - def nested_under_indifferent_access; end - - # Merges the caller into +other_hash+. For example, - # - # options = options.reverse_merge(size: 25, velocity: 10) - # - # is equivalent to - # - # options = { size: 25, velocity: 10 }.merge(options) - # - # This is particularly useful for initializing an options hash - # with default values. - # - # source://activesupport//lib/active_support/core_ext/hash/reverse_merge.rb#14 - def reverse_merge(other_hash); end - - # Destructive +reverse_merge+. - # - # source://activesupport//lib/active_support/core_ext/hash/reverse_merge.rb#20 - def reverse_merge!(other_hash); end - - # Destructive +reverse_merge+. - # - # source://activesupport//lib/active_support/core_ext/hash/reverse_merge.rb#20 - def reverse_update(other_hash); end - - # Replaces the hash with only the given keys. - # Returns a hash containing the removed key/value pairs. - # - # hash = { a: 1, b: 2, c: 3, d: 4 } - # hash.slice!(:a, :b) # => {:c=>3, :d=>4} - # hash # => {:a=>1, :b=>2} - # - # source://activesupport//lib/active_support/core_ext/hash/slice.rb#10 - def slice!(*keys); end - - # Returns a new hash with all keys converted to strings. - # - # hash = { name: 'Rob', age: '28' } - # - # hash.stringify_keys - # # => {"name"=>"Rob", "age"=>"28"} - # - # source://activesupport//lib/active_support/core_ext/hash/keys.rb#10 - def stringify_keys; end - - # Destructively converts all keys to strings. Same as - # +stringify_keys+, but modifies +self+. - # - # source://activesupport//lib/active_support/core_ext/hash/keys.rb#16 - def stringify_keys!; end - - # Returns a new hash with all keys converted to symbols, as long as - # they respond to +to_sym+. - # - # hash = { 'name' => 'Rob', 'age' => '28' } - # - # hash.symbolize_keys - # # => {:name=>"Rob", :age=>"28"} - # - # source://activesupport//lib/active_support/core_ext/hash/keys.rb#27 - def symbolize_keys; end - - # Destructively converts all keys to symbols, as long as they respond - # to +to_sym+. Same as +symbolize_keys+, but modifies +self+. - # - # source://activesupport//lib/active_support/core_ext/hash/keys.rb#34 - def symbolize_keys!; end - - # Returns a new hash with all keys converted to symbols, as long as - # they respond to +to_sym+. - # - # hash = { 'name' => 'Rob', 'age' => '28' } - # - # hash.symbolize_keys - # # => {:name=>"Rob", :age=>"28"} - # - # source://activesupport//lib/active_support/core_ext/hash/keys.rb#27 - def to_options; end - - # Destructively converts all keys to symbols, as long as they respond - # to +to_sym+. Same as +symbolize_keys+, but modifies +self+. - # - # source://activesupport//lib/active_support/core_ext/hash/keys.rb#34 - def to_options!; end - - # Returns a string representation of the receiver suitable for use as a URL - # query string: - # - # {name: 'David', nationality: 'Danish'}.to_query - # # => "name=David&nationality=Danish" - # - # An optional namespace can be passed to enclose key names: - # - # {name: 'David', nationality: 'Danish'}.to_query('user') - # # => "user%5Bname%5D=David&user%5Bnationality%5D=Danish" - # - # The string pairs "key=value" that conform the query string - # are sorted lexicographically in ascending order. - # - # This method is also aliased as +to_param+. - # - # source://activesupport//lib/active_support/core_ext/object/to_query.rb#77 - def to_param(namespace = T.unsafe(nil)); end - - # Returns a string representation of the receiver suitable for use as a URL - # query string: - # - # {name: 'David', nationality: 'Danish'}.to_query - # # => "name=David&nationality=Danish" - # - # An optional namespace can be passed to enclose key names: - # - # {name: 'David', nationality: 'Danish'}.to_query('user') - # # => "user%5Bname%5D=David&user%5Bnationality%5D=Danish" - # - # The string pairs "key=value" that conform the query string - # are sorted lexicographically in ascending order. - # - # This method is also aliased as +to_param+. - # - # source://activesupport//lib/active_support/core_ext/object/to_query.rb#77 - def to_query(namespace = T.unsafe(nil)); end - - # Returns a string containing an XML representation of its receiver: - # - # { foo: 1, bar: 2 }.to_xml - # # => - # # - # # - # # 1 - # # 2 - # # - # - # To do so, the method loops over the pairs and builds nodes that depend on - # the _values_. Given a pair +key+, +value+: - # - # * If +value+ is a hash there's a recursive call with +key+ as :root. - # - # * If +value+ is an array there's a recursive call with +key+ as :root, - # and +key+ singularized as :children. - # - # * If +value+ is a callable object it must expect one or two arguments. Depending - # on the arity, the callable is invoked with the +options+ hash as first argument - # with +key+ as :root, and +key+ singularized as second argument. The - # callable can add nodes by using options[:builder]. - # - # {foo: lambda { |options, key| options[:builder].b(key) }}.to_xml - # # => "foo" - # - # * If +value+ responds to +to_xml+ the method is invoked with +key+ as :root. - # - # class Foo - # def to_xml(options) - # options[:builder].bar 'fooing!' - # end - # end - # - # { foo: Foo.new }.to_xml(skip_instruct: true) - # # => - # # - # # fooing! - # # - # - # * Otherwise, a node with +key+ as tag is created with a string representation of - # +value+ as text node. If +value+ is +nil+ an attribute "nil" set to "true" is added. - # Unless the option :skip_types exists and is true, an attribute "type" is - # added as well according to the following mapping: - # - # XML_TYPE_NAMES = { - # "Symbol" => "symbol", - # "Integer" => "integer", - # "BigDecimal" => "decimal", - # "Float" => "float", - # "TrueClass" => "boolean", - # "FalseClass" => "boolean", - # "Date" => "date", - # "DateTime" => "dateTime", - # "Time" => "dateTime" - # } - # - # 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 - # configure your own builder with the :builder option. The method also accepts - # options like :dasherize and friends, they are forwarded to the builder. - # - # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#74 - def to_xml(options = T.unsafe(nil)); end - - # Merges the caller into +other_hash+. For example, - # - # options = options.reverse_merge(size: 25, velocity: 10) - # - # is equivalent to - # - # options = { size: 25, velocity: 10 }.merge(options) - # - # This is particularly useful for initializing an options hash - # with default values. - # - # source://activesupport//lib/active_support/core_ext/hash/reverse_merge.rb#14 - def with_defaults(other_hash); end - - # Destructive +reverse_merge+. - # - # source://activesupport//lib/active_support/core_ext/hash/reverse_merge.rb#20 - def with_defaults!(other_hash); end - - # Returns an ActiveSupport::HashWithIndifferentAccess out of its receiver: - # - # { a: 1 }.with_indifferent_access['a'] # => 1 - # - # source://activesupport//lib/active_support/core_ext/hash/indifferent_access.rb#9 - def with_indifferent_access; end - - private - - # Support methods for deep transforming nested hashes and arrays. - # - # source://activesupport//lib/active_support/core_ext/hash/keys.rb#116 - def _deep_transform_keys_in_object(object, &block); end - - # source://activesupport//lib/active_support/core_ext/hash/keys.rb#129 - def _deep_transform_keys_in_object!(object, &block); end - - # Support methods for deep transforming nested hashes and arrays. - # - # source://activesupport//lib/active_support/core_ext/hash/deep_transform_values.rb#25 - def _deep_transform_values_in_object(object, &block); end - - # source://activesupport//lib/active_support/core_ext/hash/deep_transform_values.rb#36 - def _deep_transform_values_in_object!(object, &block); end - - class << self - # Builds a Hash from XML just like Hash.from_xml, but also allows Symbol and YAML. - # - # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#133 - def from_trusted_xml(xml); end - - # Returns a Hash containing a collection of pairs when the key is the node name and the value is - # its content - # - # xml = <<-XML - # - # - # 1 - # 2 - # - # XML - # - # hash = Hash.from_xml(xml) - # # => {"hash"=>{"foo"=>1, "bar"=>2}} - # - # +DisallowedType+ is raised if the XML contains attributes with type="yaml" or - # type="symbol". Use Hash.from_trusted_xml to - # parse this XML. - # - # Custom +disallowed_types+ can also be passed in the form of an - # array. - # - # xml = <<-XML - # - # - # 1 - # "David" - # - # XML - # - # hash = Hash.from_xml(xml, ['integer']) - # # => ActiveSupport::XMLConverter::DisallowedType: Disallowed type attribute: "integer" - # - # Note that passing custom disallowed types will override the default types, - # which are Symbol and YAML. - # - # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#128 - def from_xml(xml, disallowed_types = T.unsafe(nil)); end - end -end - -# :stopdoc: -# -# source://activesupport//lib/active_support/hash_with_indifferent_access.rb#425 -HashWithIndifferentAccess = ActiveSupport::HashWithIndifferentAccess - -# :enddoc: -# -# source://activesupport//lib/active_support/i18n_railtie.rb#8 -module I18n - class << self - # source://i18n/1.12.0/lib/i18n/backend/cache.rb#64 - def cache_key_digest; end - - # source://i18n/1.12.0/lib/i18n/backend/cache.rb#68 - def cache_key_digest=(key_digest); end - - # source://i18n/1.12.0/lib/i18n/backend/cache.rb#56 - def cache_namespace; end - - # source://i18n/1.12.0/lib/i18n/backend/cache.rb#60 - def cache_namespace=(namespace); end - - # source://i18n/1.12.0/lib/i18n/backend/cache.rb#48 - def cache_store; end - - # source://i18n/1.12.0/lib/i18n/backend/cache.rb#52 - def cache_store=(store); end - - # source://i18n/1.12.0/lib/i18n/backend/fallbacks.rb#17 - def fallbacks; end - - # source://i18n/1.12.0/lib/i18n/backend/fallbacks.rb#23 - def fallbacks=(fallbacks); end - - # source://i18n/1.12.0/lib/i18n/interpolate/ruby.rb#16 - def interpolate(string, values); end - - # source://i18n/1.12.0/lib/i18n/interpolate/ruby.rb#22 - def interpolate_hash(string, values); end - - # source://i18n/1.12.0/lib/i18n.rb#37 - def new_double_nested_cache; end - - # source://i18n/1.12.0/lib/i18n/backend/cache.rb#72 - def perform_caching?; end - - # source://i18n/1.12.0/lib/i18n.rb#45 - def reserve_key(key); end - - # source://i18n/1.12.0/lib/i18n.rb#50 - def reserved_keys_pattern; end - end -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 - def include_fallbacks_module; end - - # source://activesupport//lib/active_support/i18n_railtie.rb#92 - def init_fallbacks(fallbacks); end - - # Setup i18n configuration. - # - # source://activesupport//lib/active_support/i18n_railtie.rb#32 - def initialize_i18n(app); end - - # source://activesupport//lib/active_support/i18n_railtie.rb#108 - def validate_fallbacks(fallbacks); end - - # source://activesupport//lib/active_support/i18n_railtie.rb#119 - def watched_dirs_with_extensions(paths); end - end -end - -# source://activesupport//lib/active_support/core_ext/object/json.rb#145 -class IO - include ::Enumerable - include ::File::Constants - - # source://activesupport//lib/active_support/core_ext/object/json.rb#146 - def as_json(options = T.unsafe(nil)); end -end - -class IO::Buffer - include ::Comparable - - def initialize(*_arg0); end - - def <=>(_arg0); end - def clear(*_arg0); end - def copy(*_arg0); end - def empty?; end - def external?; end - def free; end - def get_string(*_arg0); end - def get_value(_arg0, _arg1); end - def hexdump; end - def inspect; end - def internal?; end - def locked; end - def locked?; end - def mapped?; end - def null?; end - def pread(_arg0, _arg1, _arg2); end - def pwrite(_arg0, _arg1, _arg2); end - def read(_arg0, _arg1); end - def readonly?; end - def resize(_arg0); end - def set_string(*_arg0); end - def set_value(_arg0, _arg1, _arg2); end - def size; end - def slice(_arg0, _arg1); end - def to_s; end - def transfer; end - def valid?; end - def write(_arg0, _arg1); end - - class << self - def for(_arg0); end - def map(*_arg0); end - end -end - -class IO::Buffer::AccessError < ::RuntimeError; end -class IO::Buffer::AllocationError < ::RuntimeError; end -IO::Buffer::BIG_ENDIAN = T.let(T.unsafe(nil), Integer) -IO::Buffer::DEFAULT_SIZE = T.let(T.unsafe(nil), Integer) -IO::Buffer::EXTERNAL = T.let(T.unsafe(nil), Integer) -IO::Buffer::HOST_ENDIAN = T.let(T.unsafe(nil), Integer) -IO::Buffer::INTERNAL = T.let(T.unsafe(nil), Integer) -class IO::Buffer::InvalidatedError < ::RuntimeError; end -IO::Buffer::LITTLE_ENDIAN = T.let(T.unsafe(nil), Integer) -IO::Buffer::LOCKED = T.let(T.unsafe(nil), Integer) -class IO::Buffer::LockedError < ::RuntimeError; end -IO::Buffer::MAPPED = T.let(T.unsafe(nil), Integer) -IO::Buffer::NETWORK_ENDIAN = T.let(T.unsafe(nil), Integer) -IO::Buffer::PAGE_SIZE = T.let(T.unsafe(nil), Integer) -IO::Buffer::PRIVATE = T.let(T.unsafe(nil), Integer) -IO::Buffer::READONLY = T.let(T.unsafe(nil), Integer) - -class IO::ConsoleMode - def echo=(_arg0); end - def raw(*_arg0); end - def raw!(*_arg0); end - - private - - def initialize_copy(_arg0); end -end - -class IO::EAGAINWaitReadable < ::Errno::EAGAIN - include ::IO::WaitReadable -end - -class IO::EAGAINWaitWritable < ::Errno::EAGAIN - include ::IO::WaitWritable -end - -class IO::EINPROGRESSWaitReadable < ::Errno::EINPROGRESS - include ::IO::WaitReadable -end - -class IO::EINPROGRESSWaitWritable < ::Errno::EINPROGRESS - include ::IO::WaitWritable -end - -IO::EWOULDBLOCKWaitReadable = IO::EAGAINWaitReadable -IO::EWOULDBLOCKWaitWritable = IO::EAGAINWaitWritable -IO::PRIORITY = T.let(T.unsafe(nil), Integer) -IO::READABLE = T.let(T.unsafe(nil), Integer) -IO::WRITABLE = T.let(T.unsafe(nil), Integer) - -# source://activesupport//lib/active_support/core_ext/object/json.rb#228 -class IPAddr - # source://activesupport//lib/active_support/core_ext/object/json.rb#229 - 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. - # - # 2.months # => 2 months - # - # source://activesupport//lib/active_support/core_ext/integer/time.rb#10 - def month; end - - # Returns a Duration instance matching the number of months provided. - # - # 2.months # => 2 months - # - # 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 - # - # source://activesupport//lib/active_support/core_ext/integer/time.rb#18 - def year; end - - # Returns a Duration instance matching the number of years provided. - # - # 2.years # => 2 years - # - # source://activesupport//lib/active_support/core_ext/integer/time.rb#18 - 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 - - # Sets $VERBOSE to +true+ for the duration of the block and back to its - # original value afterwards. - # - # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#20 - def enable_warnings(&block); end - - # Sets $VERBOSE to +nil+ for the duration of the block and back to its original - # value afterwards. - # - # silence_warnings do - # value = noisy_call # no warning voiced - # end - # - # noisy_call # warning voiced - # - # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#14 - def silence_warnings(&block); end - - # Blocks and ignores any exception passed as argument if raised within the block. - # - # suppress(ZeroDivisionError) do - # 1/0 - # puts 'This code is NOT reached' - # end - # - # puts 'This code gets executed and nothing related to ZeroDivisionError was seen' - # - # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#41 - def suppress(*exception_classes); end - - # Sets $VERBOSE for the duration of the block and back to its original - # value afterwards. - # - # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#26 - def with_warnings(flag); end - - class << self - # Sets $VERBOSE to +true+ for the duration of the block and back to its - # original value afterwards. - # - # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#20 - def enable_warnings(&block); end - - # Sets $VERBOSE to +nil+ for the duration of the block and back to its original - # value afterwards. - # - # silence_warnings do - # value = noisy_call # no warning voiced - # end - # - # noisy_call # warning voiced - # - # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#14 - def silence_warnings(&block); end - - # Blocks and ignores any exception passed as argument if raised within the block. - # - # suppress(ZeroDivisionError) do - # 1/0 - # puts 'This code is NOT reached' - # end - # - # puts 'This code gets executed and nothing related to ZeroDivisionError was seen' - # - # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#41 - def suppress(*exception_classes); end - - # Sets $VERBOSE for the duration of the block and back to its original - # value afterwards. - # - # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#26 - def with_warnings(flag); end - 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 -class Method - # Methods are not duplicable: - # - # method(:puts).duplicable? # => false - # method(:puts).dup # => TypeError: allocator undefined for Method - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/object/duplicable.rb#36 - def duplicable?; end -end - -# == Attribute Accessors per Thread -# -# Extends the module object with class/module and instance accessors for -# class/module attributes, just like the native attr* accessors for instance -# attributes, but does so on a per-thread basis. -# -# So the values are scoped within the Thread.current space under the class name -# of the module. -# -# Note that it can also be scoped per-fiber if +Rails.application.config.active_support.isolation_level+ -# is set to +:fiber+. -# -# source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#8 -class Module - include ::Module::Concerning - - # Allows you to make aliases for attributes, which includes - # getter, setter, and a predicate. - # - # class Content < ActiveRecord::Base - # # has a title attribute - # end - # - # class Email < Content - # alias_attribute :subject, :title - # end - # - # e = Email.find(1) - # e.title # => "Superstars" - # e.subject # => "Superstars" - # e.subject? # => true - # e.subject = "Megastars" - # e.title # => "Megastars" - # - # source://activesupport//lib/active_support/core_ext/module/aliasing.rb#21 - def alias_attribute(new_name, old_name); end - - # A module may or may not have a name. - # - # module M; end - # M.name # => "M" - # - # m = Module.new - # m.name # => nil - # - # +anonymous?+ method returns true if module does not have a name, false otherwise: - # - # Module.new.anonymous? # => true - # - # module M; end - # M.anonymous? # => false - # - # A module gets a name when it is first assigned to a constant. Either - # via the +module+ or +class+ keyword or by an explicit assignment: - # - # m = Module.new # creates an anonymous module - # m.anonymous? # => true - # M = m # m gets a name here as a side-effect - # m.name # => "M" - # m.anonymous? # => false - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/module/anonymous.rb#27 - def anonymous?; end - - # source://activesupport//lib/active_support/core_ext/object/json.rb#53 - def as_json(options = T.unsafe(nil)); end - - # Declares an attribute reader and writer backed by an internally-named instance - # variable. - # - # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#16 - def attr_internal(*attrs); end - - # Declares an attribute reader and writer backed by an internally-named instance - # variable. - # - # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#16 - def attr_internal_accessor(*attrs); end - - # Declares an attribute reader backed by an internally-named instance variable. - # - # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#5 - def attr_internal_reader(*attrs); end - - # Declares an attribute writer backed by an internally-named instance variable. - # - # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#10 - def attr_internal_writer(*attrs); end - - # Defines both class and instance accessors for class attributes. - # All class and instance methods created will be public, even if - # this method is called with a private or protected access modifier. - # - # module HairColors - # mattr_accessor :hair_colors - # end - # - # class Person - # include HairColors - # end - # - # HairColors.hair_colors = [:brown, :black, :blonde, :red] - # HairColors.hair_colors # => [:brown, :black, :blonde, :red] - # Person.new.hair_colors # => [:brown, :black, :blonde, :red] - # - # If a subclass changes the value then that would also change the value for - # parent class. Similarly if parent class changes the value then that would - # change the value of subclasses too. - # - # class Citizen < Person - # end - # - # Citizen.new.hair_colors << :blue - # Person.new.hair_colors # => [:brown, :black, :blonde, :red, :blue] - # - # To omit the instance writer method, pass instance_writer: false. - # To omit the instance reader method, pass instance_reader: false. - # - # module HairColors - # mattr_accessor :hair_colors, instance_writer: false, instance_reader: false - # end - # - # class Person - # include HairColors - # end - # - # Person.new.hair_colors = [:brown] # => NoMethodError - # Person.new.hair_colors # => NoMethodError - # - # Or pass instance_accessor: false, to omit both instance methods. - # - # module HairColors - # mattr_accessor :hair_colors, instance_accessor: false - # end - # - # class Person - # include HairColors - # end - # - # Person.new.hair_colors = [:brown] # => NoMethodError - # Person.new.hair_colors # => NoMethodError - # - # You can set a default value for the attribute. - # - # module HairColors - # mattr_accessor :hair_colors, default: [:brown, :black, :blonde, :red] - # end - # - # class Person - # include HairColors - # end - # - # Person.class_variable_get("@@hair_colors") # => [:brown, :black, :blonde, :red] - # - # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#202 - 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. - # The underlying class variable is set to +nil+, if it is not previously - # defined. All class and instance methods created will be public, even if - # this method is called with a private or protected access modifier. - # - # module HairColors - # mattr_reader :hair_colors - # end - # - # HairColors.hair_colors # => nil - # HairColors.class_variable_set("@@hair_colors", [:brown, :black]) - # HairColors.hair_colors # => [:brown, :black] - # - # The attribute name must be a valid method name in Ruby. - # - # module Foo - # mattr_reader :"1_Badname" - # end - # # => NameError: invalid attribute name: 1_Badname - # - # To omit the instance reader method, pass - # instance_reader: false or instance_accessor: false. - # - # module HairColors - # mattr_reader :hair_colors, instance_reader: false - # end - # - # class Person - # include HairColors - # end - # - # Person.new.hair_colors # => NoMethodError - # - # You can set a default value for the attribute. - # - # module HairColors - # mattr_reader :hair_colors, default: [:brown, :black, :blonde, :red] - # end - # - # class Person - # include HairColors - # end - # - # Person.new.hair_colors # => [:brown, :black, :blonde, :red] - # - # @raise [TypeError] - # - # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#53 - 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 - # allow assignment to the attribute. All class and instance methods created - # will be public, even if this method is called with a private or protected - # access modifier. - # - # module HairColors - # mattr_writer :hair_colors - # end - # - # class Person - # include HairColors - # end - # - # HairColors.hair_colors = [:brown, :black] - # Person.class_variable_get("@@hair_colors") # => [:brown, :black] - # Person.new.hair_colors = [:blonde, :red] - # HairColors.class_variable_get("@@hair_colors") # => [:blonde, :red] - # - # To omit the instance writer method, pass - # instance_writer: false or instance_accessor: false. - # - # module HairColors - # mattr_writer :hair_colors, instance_writer: false - # end - # - # class Person - # include HairColors - # end - # - # Person.new.hair_colors = [:blonde, :red] # => NoMethodError - # - # You can set a default value for the attribute. - # - # module HairColors - # mattr_writer :hair_colors, default: [:brown, :black, :blonde, :red] - # end - # - # class Person - # include HairColors - # end - # - # Person.class_variable_get("@@hair_colors") # => [:brown, :black, :blonde, :red] - # - # @raise [TypeError] - # - # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#117 - def cattr_writer(*syms, instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), location: T.unsafe(nil)); end - - # Provides a +delegate+ class method to easily expose contained objects' - # public methods as your own. - # - # ==== Options - # * :to - Specifies the target object name as a symbol or string - # * :prefix - Prefixes the new method with the target name or a custom prefix - # * :allow_nil - If set to true, prevents a +Module::DelegationError+ - # from being raised - # * :private - If set to true, changes method visibility to private - # - # The macro receives one or more method names (specified as symbols or - # strings) and the name of the target object via the :to option - # (also a symbol or string). - # - # Delegation is particularly useful with Active Record associations: - # - # class Greeter < ActiveRecord::Base - # def hello - # 'hello' - # end - # - # def goodbye - # 'goodbye' - # end - # end - # - # class Foo < ActiveRecord::Base - # belongs_to :greeter - # delegate :hello, to: :greeter - # end - # - # Foo.new.hello # => "hello" - # Foo.new.goodbye # => NoMethodError: undefined method `goodbye' for # - # - # Multiple delegates to the same target are allowed: - # - # class Foo < ActiveRecord::Base - # belongs_to :greeter - # delegate :hello, :goodbye, to: :greeter - # end - # - # Foo.new.goodbye # => "goodbye" - # - # Methods can be delegated to instance variables, class variables, or constants - # by providing them as a symbols: - # - # class Foo - # CONSTANT_ARRAY = [0,1,2,3] - # @@class_array = [4,5,6,7] - # - # def initialize - # @instance_array = [8,9,10,11] - # end - # delegate :sum, to: :CONSTANT_ARRAY - # delegate :min, to: :@@class_array - # delegate :max, to: :@instance_array - # end - # - # Foo.new.sum # => 6 - # Foo.new.min # => 4 - # Foo.new.max # => 11 - # - # It's also possible to delegate a method to the class by using +:class+: - # - # class Foo - # def self.hello - # "world" - # end - # - # delegate :hello, to: :class - # end - # - # Foo.new.hello # => "world" - # - # Delegates can optionally be prefixed using the :prefix option. If the value - # is true, the delegate methods are prefixed with the name of the object being - # delegated to. - # - # Person = Struct.new(:name, :address) - # - # class Invoice < Struct.new(:client) - # delegate :name, :address, to: :client, prefix: true - # end - # - # john_doe = Person.new('John Doe', 'Vimmersvej 13') - # invoice = Invoice.new(john_doe) - # invoice.client_name # => "John Doe" - # invoice.client_address # => "Vimmersvej 13" - # - # It is also possible to supply a custom prefix. - # - # class Invoice < Struct.new(:client) - # delegate :name, :address, to: :client, prefix: :customer - # end - # - # invoice = Invoice.new(john_doe) - # invoice.customer_name # => 'John Doe' - # invoice.customer_address # => 'Vimmersvej 13' - # - # The delegated methods are public by default. - # Pass private: true to change that. - # - # class User < ActiveRecord::Base - # has_one :profile - # delegate :first_name, to: :profile - # delegate :date_of_birth, to: :profile, private: true - # - # def age - # Date.today.year - date_of_birth.year - # end - # end - # - # User::User.new.first_name # => "Tomas" - # User::User.new.date_of_birth # => NoMethodError: private method `date_of_birth' called for # - # User::User.new.age # => 2 - # - # If the target is +nil+ and does not respond to the delegated method a - # +Module::DelegationError+ is raised. If you wish to instead return +nil+, - # use the :allow_nil option. - # - # class User < ActiveRecord::Base - # has_one :profile - # delegate :age, to: :profile - # end - # - # User::User.new.age - # # => Module::DelegationError: User#age delegated to profile.age, but profile is nil - # - # But if not having a profile yet is fine and should not be an error - # condition: - # - # class User < ActiveRecord::Base - # has_one :profile - # delegate :age, to: :profile, allow_nil: true - # end - # - # User::User.new.age # nil - # - # Note that if the target is not +nil+ then the call is attempted regardless of the - # :allow_nil option, and thus an exception is still raised if said object - # does not respond to the method: - # - # class Foo - # def initialize(bar) - # @bar = bar - # end - # - # delegate :name, to: :@bar, allow_nil: true - # end - # - # Foo.new("Bar").name # raises NoMethodError: undefined method `name' - # - # The target method must be public, otherwise it will raise +NoMethodError+. - # - # source://activesupport//lib/active_support/core_ext/module/delegation.rb#171 - def delegate(*methods, to: T.unsafe(nil), prefix: T.unsafe(nil), allow_nil: T.unsafe(nil), private: T.unsafe(nil)); end - - # When building decorators, a common pattern may emerge: - # - # class Partition - # def initialize(event) - # @event = event - # end - # - # def person - # detail.person || creator - # end - # - # private - # def respond_to_missing?(name, include_private = false) - # @event.respond_to?(name, include_private) - # end - # - # def method_missing(method, *args, &block) - # @event.send(method, *args, &block) - # end - # end - # - # With Module#delegate_missing_to, the above is condensed to: - # - # class Partition - # delegate_missing_to :@event - # - # def initialize(event) - # @event = event - # end - # - # def person - # detail.person || creator - # end - # end - # - # The target can be anything callable within the object, e.g. instance - # variables, methods, constants, etc. - # - # The delegated method must be public on the target, otherwise it will - # raise +DelegationError+. If you wish to instead return +nil+, - # use the :allow_nil option. - # - # The marshal_dump and _dump methods are exempt from - # delegation due to possible interference when calling - # 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 - 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.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. - # - # class MyLib::Deprecator - # def deprecation_warning(deprecated_method_name, message, caller_backtrace = nil) - # message = "#{deprecated_method_name} is deprecated and will be removed from MyLibrary | #{message}" - # Kernel.warn message - # end - # end - # - # source://activesupport//lib/active_support/core_ext/module/deprecation.rb#22 - def deprecate(*method_names); end - - # Defines both class and instance accessors for class attributes. - # All class and instance methods created will be public, even if - # this method is called with a private or protected access modifier. - # - # module HairColors - # mattr_accessor :hair_colors - # end - # - # class Person - # include HairColors - # end - # - # HairColors.hair_colors = [:brown, :black, :blonde, :red] - # HairColors.hair_colors # => [:brown, :black, :blonde, :red] - # Person.new.hair_colors # => [:brown, :black, :blonde, :red] - # - # If a subclass changes the value then that would also change the value for - # parent class. Similarly if parent class changes the value then that would - # change the value of subclasses too. - # - # class Citizen < Person - # end - # - # Citizen.new.hair_colors << :blue - # Person.new.hair_colors # => [:brown, :black, :blonde, :red, :blue] - # - # To omit the instance writer method, pass instance_writer: false. - # To omit the instance reader method, pass instance_reader: false. - # - # module HairColors - # mattr_accessor :hair_colors, instance_writer: false, instance_reader: false - # end - # - # class Person - # include HairColors - # end - # - # Person.new.hair_colors = [:brown] # => NoMethodError - # Person.new.hair_colors # => NoMethodError - # - # Or pass instance_accessor: false, to omit both instance methods. - # - # module HairColors - # mattr_accessor :hair_colors, instance_accessor: false - # end - # - # class Person - # include HairColors - # end - # - # Person.new.hair_colors = [:brown] # => NoMethodError - # Person.new.hair_colors # => NoMethodError - # - # You can set a default value for the attribute. - # - # module HairColors - # mattr_accessor :hair_colors, default: [:brown, :black, :blonde, :red] - # end - # - # class Person - # include HairColors - # end - # - # Person.class_variable_get("@@hair_colors") # => [:brown, :black, :blonde, :red] - # - # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#202 - 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. - # The underlying class variable is set to +nil+, if it is not previously - # defined. All class and instance methods created will be public, even if - # this method is called with a private or protected access modifier. - # - # module HairColors - # mattr_reader :hair_colors - # end - # - # HairColors.hair_colors # => nil - # HairColors.class_variable_set("@@hair_colors", [:brown, :black]) - # HairColors.hair_colors # => [:brown, :black] - # - # The attribute name must be a valid method name in Ruby. - # - # module Foo - # mattr_reader :"1_Badname" - # end - # # => NameError: invalid attribute name: 1_Badname - # - # To omit the instance reader method, pass - # instance_reader: false or instance_accessor: false. - # - # module HairColors - # mattr_reader :hair_colors, instance_reader: false - # end - # - # class Person - # include HairColors - # end - # - # Person.new.hair_colors # => NoMethodError - # - # You can set a default value for the attribute. - # - # module HairColors - # mattr_reader :hair_colors, default: [:brown, :black, :blonde, :red] - # end - # - # class Person - # include HairColors - # end - # - # Person.new.hair_colors # => [:brown, :black, :blonde, :red] - # - # @raise [TypeError] - # - # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#53 - 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 - # allow assignment to the attribute. All class and instance methods created - # will be public, even if this method is called with a private or protected - # access modifier. - # - # module HairColors - # mattr_writer :hair_colors - # end - # - # class Person - # include HairColors - # end - # - # HairColors.hair_colors = [:brown, :black] - # Person.class_variable_get("@@hair_colors") # => [:brown, :black] - # Person.new.hair_colors = [:blonde, :red] - # HairColors.class_variable_get("@@hair_colors") # => [:blonde, :red] - # - # To omit the instance writer method, pass - # instance_writer: false or instance_accessor: false. - # - # module HairColors - # mattr_writer :hair_colors, instance_writer: false - # end - # - # class Person - # include HairColors - # end - # - # Person.new.hair_colors = [:blonde, :red] # => NoMethodError - # - # You can set a default value for the attribute. - # - # module HairColors - # mattr_writer :hair_colors, default: [:brown, :black, :blonde, :red] - # end - # - # class Person - # include HairColors - # end - # - # Person.class_variable_get("@@hair_colors") # => [:brown, :black, :blonde, :red] - # - # @raise [TypeError] - # - # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#117 - 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 - def method_visibility(method); end - - # Returns the module which contains this one according to its name. - # - # module M - # module N - # end - # end - # X = M::N - # - # M::N.module_parent # => M - # X.module_parent # => M - # - # The parent of top-level and anonymous modules is Object. - # - # M.module_parent # => Object - # Module.new.module_parent # => Object - # - # source://activesupport//lib/active_support/core_ext/module/introspection.rb#35 - 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 - def module_parent_name; end - - # Returns all the parents of this module according to its name, ordered from - # nested outwards. The receiver is not contained within the result. - # - # module M - # module N - # end - # end - # X = M::N - # - # M.module_parents # => [Object] - # M::N.module_parents # => [M, Object] - # X.module_parents # => [M, Object] - # - # source://activesupport//lib/active_support/core_ext/module/introspection.rb#51 - def module_parents; end - - # Replaces the existing method definition, if there is one, with the passed - # block as its body. - # - # source://activesupport//lib/active_support/core_ext/module/redefine_method.rb#17 - def redefine_method(method, &block); end - - # Replaces the existing singleton method definition, if there is one, with - # the passed block as its body. - # - # source://activesupport//lib/active_support/core_ext/module/redefine_method.rb#26 - def redefine_singleton_method(method, &block); end - - # Removes the named method, if it exists. - # - # source://activesupport//lib/active_support/core_ext/module/remove_method.rb#7 - def remove_possible_method(method); end - - # Removes the named singleton method, if it exists. - # - # source://activesupport//lib/active_support/core_ext/module/remove_method.rb#14 - def remove_possible_singleton_method(method); end - - # Marks the named method as intended to be redefined, if it exists. - # Suppresses the Ruby method redefinition warning. Prefer - # #redefine_method where possible. - # - # source://activesupport//lib/active_support/core_ext/module/redefine_method.rb#7 - def silence_redefinition_of_method(method); end - - # Defines both class and instance accessors for class attributes. - # - # class Account - # thread_mattr_accessor :user - # end - # - # Account.user = "DHH" - # Account.user # => "DHH" - # Account.new.user # => "DHH" - # - # Unlike +mattr_accessor+, values are *not* shared with subclasses or parent classes. - # If a subclass changes the value, the parent class' value is not changed. - # If the parent class changes the value, the value of subclasses is not changed. - # - # class Customer < Account - # end - # - # Account.user # => "DHH" - # Customer.user # => nil - # Customer.user = "Rafael" - # Customer.user # => "Rafael" - # Account.user # => "DHH" - # - # To omit the instance writer method, pass instance_writer: false. - # To omit the instance reader method, pass instance_reader: false. - # - # class Current - # thread_mattr_accessor :user, instance_writer: false, instance_reader: false - # end - # - # Current.new.user = "DHH" # => NoMethodError - # Current.new.user # => NoMethodError - # - # Or pass instance_accessor: false, to omit both instance methods. - # - # class Current - # thread_mattr_accessor :user, instance_accessor: false - # end - # - # Current.new.user = "DHH" # => NoMethodError - # Current.new.user # => NoMethodError - # - # source://activesupport//lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#152 - 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. - # The underlying per-thread class variable is set to +nil+, if it is not previously defined. - # - # module Current - # thread_mattr_reader :user - # end - # - # Current.user = "DHH" - # Current.user # => "DHH" - # Thread.new { Current.user }.value # => nil - # - # The attribute name must be a valid method name in Ruby. - # - # module Foo - # thread_mattr_reader :"1_Badname" - # end - # # => NameError: invalid attribute name: 1_Badname - # - # To omit the instance reader method, pass - # instance_reader: false or instance_accessor: false. - # - # class Current - # thread_mattr_reader :user, instance_reader: false - # end - # - # Current.new.user # => NoMethodError - # - # source://activesupport//lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#41 - def thread_cattr_reader(*syms, instance_reader: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil)); end - - # Defines a per-thread class attribute and creates a class and instance writer methods to - # allow assignment to the attribute. - # - # module Current - # thread_mattr_writer :user - # end - # - # Current.user = "DHH" - # Thread.current[:attr_Current_user] # => "DHH" - # - # To omit the instance writer method, pass - # instance_writer: false or instance_accessor: false. - # - # class Current - # thread_mattr_writer :user, instance_writer: false - # end - # - # 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 - - # Defines both class and instance accessors for class attributes. - # - # class Account - # thread_mattr_accessor :user - # end - # - # Account.user = "DHH" - # Account.user # => "DHH" - # Account.new.user # => "DHH" - # - # Unlike +mattr_accessor+, values are *not* shared with subclasses or parent classes. - # If a subclass changes the value, the parent class' value is not changed. - # If the parent class changes the value, the value of subclasses is not changed. - # - # class Customer < Account - # end - # - # Account.user # => "DHH" - # Customer.user # => nil - # Customer.user = "Rafael" - # Customer.user # => "Rafael" - # Account.user # => "DHH" - # - # To omit the instance writer method, pass instance_writer: false. - # To omit the instance reader method, pass instance_reader: false. - # - # class Current - # thread_mattr_accessor :user, instance_writer: false, instance_reader: false - # end - # - # Current.new.user = "DHH" # => NoMethodError - # Current.new.user # => NoMethodError - # - # Or pass instance_accessor: false, to omit both instance methods. - # - # class Current - # thread_mattr_accessor :user, instance_accessor: false - # end - # - # Current.new.user = "DHH" # => NoMethodError - # Current.new.user # => NoMethodError - # - # source://activesupport//lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#152 - 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. - # The underlying per-thread class variable is set to +nil+, if it is not previously defined. - # - # module Current - # thread_mattr_reader :user - # end - # - # Current.user = "DHH" - # Current.user # => "DHH" - # Thread.new { Current.user }.value # => nil - # - # The attribute name must be a valid method name in Ruby. - # - # module Foo - # thread_mattr_reader :"1_Badname" - # end - # # => NameError: invalid attribute name: 1_Badname - # - # To omit the instance reader method, pass - # instance_reader: false or instance_accessor: false. - # - # class Current - # thread_mattr_reader :user, instance_reader: false - # end - # - # Current.new.user # => NoMethodError - # - # source://activesupport//lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#41 - def thread_mattr_reader(*syms, instance_reader: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil)); end - - # Defines a per-thread class attribute and creates a class and instance writer methods to - # allow assignment to the attribute. - # - # module Current - # thread_mattr_writer :user - # end - # - # Current.user = "DHH" - # Thread.current[:attr_Current_user] # => "DHH" - # - # To omit the instance writer method, pass - # instance_writer: false or instance_accessor: false. - # - # class Current - # thread_mattr_writer :user, instance_writer: false - # end - # - # 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 - - private - - # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#30 - def attr_internal_define(attr_name, type); end - - # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#26 - def attr_internal_ivar_name(attr); end - - class << self - # Returns the value of attribute attr_internal_naming_format. - # - # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#22 - def attr_internal_naming_format; end - - # Sets the attribute attr_internal_naming_format - # - # @param value the value to set the attribute attr_internal_naming_format to. - # - # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#22 - def attr_internal_naming_format=(_arg0); end - end -end - -# = Bite-sized separation of concerns -# -# We often find ourselves with a medium-sized chunk of behavior that we'd -# like to extract, but only mix in to a single class. -# -# Extracting a plain old Ruby object to encapsulate it and collaborate or -# delegate to the original object is often a good choice, but when there's -# no additional state to encapsulate or we're making DSL-style declarations -# about the parent class, introducing new collaborators can obfuscate rather -# than simplify. -# -# The typical route is to just dump everything in a monolithic class, perhaps -# with a comment, as a least-bad alternative. Using modules in separate files -# means tedious sifting to get a big-picture view. -# -# = Dissatisfying ways to separate small concerns -# -# == Using comments: -# -# class Todo < ApplicationRecord -# # Other todo implementation -# # ... -# -# ## Event tracking -# has_many :events -# -# before_create :track_creation -# -# private -# def track_creation -# # ... -# end -# end -# -# == With an inline module: -# -# Noisy syntax. -# -# class Todo < ApplicationRecord -# # Other todo implementation -# # ... -# -# module EventTracking -# extend ActiveSupport::Concern -# -# included do -# has_many :events -# before_create :track_creation -# end -# -# private -# def track_creation -# # ... -# end -# end -# include EventTracking -# end -# -# == Mix-in noise exiled to its own file: -# -# Once our chunk of behavior starts pushing the scroll-to-understand-it -# boundary, we give in and move it to a separate file. At this size, the -# increased overhead can be a reasonable tradeoff even if it reduces our -# at-a-glance perception of how things work. -# -# class Todo < ApplicationRecord -# # Other todo implementation -# # ... -# -# include TodoEventTracking -# end -# -# = Introducing Module#concerning -# -# By quieting the mix-in noise, we arrive at a natural, low-ceremony way to -# separate bite-sized concerns. -# -# class Todo < ApplicationRecord -# # Other todo implementation -# # ... -# -# concerning :EventTracking do -# included do -# has_many :events -# before_create :track_creation -# end -# -# private -# def track_creation -# # ... -# end -# end -# end -# -# Todo.ancestors -# # => [Todo, Todo::EventTracking, ApplicationRecord, Object] -# -# This small step has some wonderful ripple effects. We can -# * grok the behavior of our class in one glance, -# * clean up monolithic junk-drawer classes by separating their concerns, and -# * stop leaning on protected/private for crude "this is internal stuff" modularity. -# -# === Prepending concerning -# -# concerning supports a prepend: true argument which will prepend the -# concern instead of using include for it. -# -# source://activesupport//lib/active_support/core_ext/module/concerning.rb#112 -module Module::Concerning - # A low-cruft shortcut to define a concern. - # - # concern :EventTracking do - # ... - # end - # - # is equivalent to - # - # module EventTracking - # extend ActiveSupport::Concern - # - # ... - # end - # - # source://activesupport//lib/active_support/core_ext/module/concerning.rb#132 - def concern(topic, &module_definition); end - - # Define a new concern and mix it in. - # - # source://activesupport//lib/active_support/core_ext/module/concerning.rb#114 - def concerning(topic, prepend: T.unsafe(nil), &block); end -end - -# source://activesupport//lib/active_support/core_ext/module/delegation.rb#13 -Module::DELEGATION_RESERVED_KEYWORDS = T.let(T.unsafe(nil), Array) - -# source://activesupport//lib/active_support/core_ext/module/delegation.rb#14 -Module::DELEGATION_RESERVED_METHOD_NAMES = T.let(T.unsafe(nil), Set) - -# Error generated by +delegate+ when a method is called on +nil+ and +allow_nil+ -# option is not used. -# -# source://activesupport//lib/active_support/core_ext/module/delegation.rb#8 -class Module::DelegationError < ::NoMethodError; end - -# source://activesupport//lib/active_support/core_ext/module/delegation.rb#10 -Module::RUBY_RESERVED_KEYWORDS = T.let(T.unsafe(nil), Array) - -# source://activesupport//lib/active_support/core_ext/name_error.rb#3 -class NameError < ::StandardError - include ::ErrorHighlight::CoreExt - include ::DidYouMean::Correctable - - # Extract the name of the missing constant from the exception message. - # - # begin - # HelloWorld - # rescue NameError => e - # e.missing_name - # end - # # => "HelloWorld" - # - # source://activesupport//lib/active_support/core_ext/name_error.rb#12 - def missing_name; end - - # Was this exception raised because the given name was missing? - # - # begin - # HelloWorld - # rescue NameError => e - # e.missing_name?("HelloWorld") - # end - # # => true - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/name_error.rb#44 - def missing_name?(name); end - - private - - # source://activesupport//lib/active_support/core_ext/name_error.rb#56 - def real_mod_name(mod); end -end - -# source://activesupport//lib/active_support/core_ext/name_error.rb#53 -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 - def as_json(options = T.unsafe(nil)); end - - # +nil+ is blank: - # - # nil.blank? # => true - # - # @return [true] - # - # source://activesupport//lib/active_support/core_ext/object/blank.rb#56 - def blank?; end - - # Returns +self+. - # - # source://activesupport//lib/active_support/core_ext/object/to_query.rb#20 - def to_param; end - - # Calling +try+ on +nil+ always returns +nil+. - # It becomes especially helpful when navigating through associations that may return +nil+. - # - # nil.try(:name) # => nil - # - # Without +try+ - # @person && @person.children.any? && @person.children.first.name - # - # With +try+ - # @person.try(:children).try(:first).try(:name) - # - # source://activesupport//lib/active_support/core_ext/object/try.rb#148 - def try(*_arg0); end - - # Calling +try!+ on +nil+ always returns +nil+. - # - # nil.try!(:name) # => nil - # - # source://activesupport//lib/active_support/core_ext/object/try.rb#155 - def try!(*_arg0); end -end - -# source://activesupport//lib/active_support/core_ext/object/blank.rb#134 -class Numeric - include ::Comparable - - # source://activesupport//lib/active_support/core_ext/object/json.rb#105 - def as_json(options = T.unsafe(nil)); end - - # No number is blank: - # - # 1.blank? # => false - # 0.blank? # => false - # - # @return [false] - # - # source://activesupport//lib/active_support/core_ext/object/blank.rb#141 - def blank?; 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 - 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 - def bytes; end - - # Returns a Duration instance matching the number of days provided. - # - # 2.days # => 2 days - # - # source://activesupport//lib/active_support/core_ext/numeric/time.rb#37 - def day; end - - # Returns a Duration instance matching the number of days provided. - # - # 2.days # => 2 days - # - # source://activesupport//lib/active_support/core_ext/numeric/time.rb#37 - def days; 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 - 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 - def exabytes; end - - # Returns a Duration instance matching the number of fortnights provided. - # - # 2.fortnights # => 4 weeks - # - # source://activesupport//lib/active_support/core_ext/numeric/time.rb#53 - def fortnight; end - - # Returns a Duration instance matching the number of fortnights provided. - # - # 2.fortnights # => 4 weeks - # - # source://activesupport//lib/active_support/core_ext/numeric/time.rb#53 - def fortnights; 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 - 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 - def gigabytes; end - - # Returns a Duration instance matching the number of hours provided. - # - # 2.hours # => 2 hours - # - # source://activesupport//lib/active_support/core_ext/numeric/time.rb#29 - def hour; end - - # Returns a Duration instance matching the number of hours provided. - # - # 2.hours # => 2 hours - # - # source://activesupport//lib/active_support/core_ext/numeric/time.rb#29 - def hours; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#156 - def html_safe?; end - - # Returns the number of milliseconds equivalent to the seconds provided. - # Used with the standard time durations. - # - # 2.in_milliseconds # => 2000 - # 1.hour.in_milliseconds # => 3600000 - # - # source://activesupport//lib/active_support/core_ext/numeric/time.rb#63 - def in_milliseconds; 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 - 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 - 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 - 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 - def megabytes; end - - # Returns a Duration instance matching the number of minutes provided. - # - # 2.minutes # => 2 minutes - # - # source://activesupport//lib/active_support/core_ext/numeric/time.rb#21 - def minute; end - - # Returns a Duration instance matching the number of minutes provided. - # - # 2.minutes # => 2 minutes - # - # source://activesupport//lib/active_support/core_ext/numeric/time.rb#21 - def minutes; 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 - 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 - def petabytes; end - - # Returns a Duration instance matching the number of seconds provided. - # - # 2.seconds # => 2 seconds - # - # source://activesupport//lib/active_support/core_ext/numeric/time.rb#13 - def second; end - - # Returns a Duration instance matching the number of seconds provided. - # - # 2.seconds # => 2 seconds - # - # source://activesupport//lib/active_support/core_ext/numeric/time.rb#13 - def seconds; 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 - 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 - def terabytes; end - - # Returns a Duration instance matching the number of weeks provided. - # - # 2.weeks # => 2 weeks - # - # source://activesupport//lib/active_support/core_ext/numeric/time.rb#45 - def week; end - - # Returns a Duration instance matching the number of weeks provided. - # - # 2.weeks # => 2 weeks - # - # source://activesupport//lib/active_support/core_ext/numeric/time.rb#45 - def weeks; end -end - -# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#9 -Numeric::EXABYTE = T.let(T.unsafe(nil), Integer) - -# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#6 -Numeric::GIGABYTE = T.let(T.unsafe(nil), Integer) - -# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#4 -Numeric::KILOBYTE = T.let(T.unsafe(nil), Integer) - -# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#5 -Numeric::MEGABYTE = T.let(T.unsafe(nil), Integer) - -# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#8 -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) - -# -- -# Most objects are cloneable, but not all. For example you can't dup methods: -# -# method(:puts).dup # => TypeError: allocator undefined for Method -# -# Classes may signal their instances are not duplicable removing +dup+/+clone+ -# or raising exceptions from them. So, to dup an arbitrary object you normally -# use an optimistic approach and are ready to catch an exception, say: -# -# arbitrary_object.dup rescue object -# -# Rails dups objects in a few critical spots where they are not that arbitrary. -# That rescue is very expensive (like 40 times slower than a predicate), and it -# is often triggered. -# -# That's why we hardcode the following cases and check duplicable? instead of -# using that rescue idiom. -# ++ -# -# source://activesupport//lib/active_support/core_ext/object/blank.rb#5 -class Object < ::BasicObject - include ::ActiveSupport::ToJsonWithActiveSupportEncoder - include ::ActiveSupport::Dependencies::RequireDependency - include ::Kernel - include ::PP::ObjectMixin - include ::ActiveSupport::Tryable - - # Provides a way to check whether some class acts like some other class based on the existence of - # an appropriately-named marker method. - # - # A class that provides the same interface as SomeClass may define a marker method named - # acts_like_some_class? to signal its compatibility to callers of - # acts_like?(:some_class). - # - # For example, Active Support extends Date to define an acts_like_date? method, - # and extends Time to define acts_like_time?. As a result, developers can call - # x.acts_like?(:time) and x.acts_like?(:date) to test duck-type compatibility, - # and classes that are able to act like Time can also define an acts_like_time? - # method to interoperate. - # - # Note that the marker method is only expected to exist. It isn't called, so its body or return - # value are irrelevant. - # - # ==== Example: A class that provides the same interface as String - # - # This class may define: - # - # class Stringish - # def acts_like_string? - # end - # end - # - # Then client code can query for duck-type-safeness this way: - # - # Stringish.new.acts_like?(:string) # => true - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/object/acts_like.rb#33 - def acts_like?(duck); end - - # source://activesupport//lib/active_support/core_ext/object/json.rb#59 - def as_json(options = T.unsafe(nil)); end - - # An object is blank if it's false, empty, or a whitespace string. - # For example, +nil+, '', ' ', [], {}, and +false+ are all blank. - # - # This simplifies - # - # !address || address.empty? - # - # to - # - # address.blank? - # - # @return [true, false] - # - # source://activesupport//lib/active_support/core_ext/object/blank.rb#18 - def blank?; end - - # Returns a deep copy of object if it's duplicable. If it's - # not duplicable, returns +self+. - # - # object = Object.new - # dup = object.deep_dup - # dup.instance_variable_set(:@a, 1) - # - # object.instance_variable_defined?(:@a) # => false - # dup.instance_variable_defined?(:@a) # => true - # - # source://activesupport//lib/active_support/core_ext/object/deep_dup.rb#15 - def deep_dup; end - - # Can you safely dup this object? - # - # False for method objects; - # true otherwise. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/object/duplicable.rb#26 - def duplicable?; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#150 - def html_safe?; end - - # Returns true if this object is included in the argument. 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?+. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/object/inclusion.rb#12 - def in?(another_object); end - - # Returns a hash with string keys that maps instance variable names without "@" to their - # corresponding values. - # - # class C - # def initialize(x, y) - # @x, @y = x, y - # end - # end - # - # C.new(0, 1).instance_values # => {"x" => 0, "y" => 1} - # - # source://activesupport//lib/active_support/core_ext/object/instance_variables.rb#14 - def instance_values; end - - # Returns an array of instance variable names as strings including "@". - # - # class C - # def initialize(x, y) - # @x, @y = x, y - # end - # end - # - # C.new(0, 1).instance_variable_names # => ["@y", "@x"] - # - # source://activesupport//lib/active_support/core_ext/object/instance_variables.rb#27 - def instance_variable_names; end - - # Returns the receiver if it's present otherwise returns +nil+. - # object.presence is equivalent to - # - # object.present? ? object : nil - # - # For example, something like - # - # state = params[:state] if params[:state].present? - # country = params[:country] if params[:country].present? - # region = state || country || 'US' - # - # becomes - # - # region = params[:state].presence || params[:country].presence || 'US' - # - # @return [Object] - # - # source://activesupport//lib/active_support/core_ext/object/blank.rb#45 - def presence; end - - # Returns the receiver if it's included in the argument otherwise returns +nil+. - # Argument must be any object which responds to +#include?+. Usage: - # - # params[:bucket_type].presence_in %w( project calendar ) - # - # This will throw an +ArgumentError+ if the argument doesn't respond to +#include?+. - # - # @return [Object] - # - # source://activesupport//lib/active_support/core_ext/object/inclusion.rb#26 - def presence_in(another_object); end - - # An object is present if it's not blank. - # - # @return [true, false] - # - # source://activesupport//lib/active_support/core_ext/object/blank.rb#25 - def present?; end - - # Alias of to_s. - # - # source://activesupport//lib/active_support/core_ext/object/to_query.rb#7 - def to_param; end - - # Converts an object into a string suitable for use as a URL query string, - # using the given key as the param name. - # - # source://activesupport//lib/active_support/core_ext/object/to_query.rb#13 - def to_query(key); 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. - # - # Without with_options, this code contains duplication: - # - # class Account < ActiveRecord::Base - # has_many :customers, dependent: :destroy - # has_many :products, dependent: :destroy - # has_many :invoices, dependent: :destroy - # has_many :expenses, dependent: :destroy - # end - # - # Using with_options, we can remove the duplication: - # - # class Account < ActiveRecord::Base - # with_options dependent: :destroy do |assoc| - # assoc.has_many :customers - # assoc.has_many :products - # assoc.has_many :invoices - # assoc.has_many :expenses - # end - # end - # - # It can also be used with an explicit receiver: - # - # I18n.with_options locale: user.locale, scope: 'newsletter' do |i18n| - # subject i18n.t :subject - # body i18n.t :body, user_name: user.name - # end - # - # When you don't pass an explicit receiver, it executes the whole block - # in merging options context: - # - # class Account < ActiveRecord::Base - # with_options dependent: :destroy do - # has_many :customers - # has_many :products - # has_many :invoices - # has_many :expenses - # end - # end - # - # with_options can also be nested since the call is forwarded to its receiver. - # - # NOTE: Each nesting level will merge inherited defaults in addition to their own. - # - # class Post < ActiveRecord::Base - # with_options if: :persisted?, length: { minimum: 50 } do - # validates :content, if: -> { content.present? } - # end - # end - # - # The code is equivalent to: - # - # validates :content, length: { minimum: 50 }, if: -> { content.present? } - # - # Hence the inherited default for +if+ key is ignored. - # - # NOTE: You cannot call class methods implicitly inside of with_options. - # You can access these methods using the class name instead: - # - # class Phone < ActiveRecord::Base - # enum phone_number_type: { home: 0, office: 1, mobile: 2 } - # - # with_options presence: true do - # validates :phone_number_type, inclusion: { in: Phone.phone_number_types.keys } - # end - # end - # - # When the block argument is omitted, the decorated Object instance is returned: - # - # module MyStyledHelpers - # def styled - # with_options style: "color: red;" - # end - # end - # - # # styled.link_to "I'm red", "/" - # # #=> I'm red - # - # # styled.button_tag "I'm red too!" - # # #=> - # - # source://activesupport//lib/active_support/core_ext/object/with_options.rb#92 - def with_options(options, &block); end -end - -# source://activesupport//lib/active_support/core_ext/object/json.rb#222 -class Pathname - # source://activesupport//lib/active_support/core_ext/object/json.rb#223 - def as_json(options = T.unsafe(nil)); end -end - -module Process - extend ::ActiveSupport::ForkTracker::ModernCoreExt - - class << self - # source://activesupport//lib/active_support/fork_tracker.rb#6 - def _fork; end - end -end - -# source://activesupport//lib/active_support/core_ext/object/json.rb#234 -class Process::Status - # source://activesupport//lib/active_support/core_ext/object/json.rb#235 - def as_json(options = T.unsafe(nil)); end -end - -# source://activesupport//lib/active_support/core_ext/object/json.rb#151 -class Range - include ::ActiveSupport::RangeWithFormat - include ::ActiveSupport::DeprecatedRangeWithFormat - include ::ActiveSupport::CompareWithRange - include ::ActiveSupport::EachTimeWithZone - include ::Enumerable - - # 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 - def as_json(options = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/core_ext/range/each.rb#7 - def each(&block); end - - # 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 - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/range/overlaps.rb#7 - def overlaps?(other); end - - # source://activesupport//lib/active_support/core_ext/range/each.rb#12 - def step(n = T.unsafe(nil), &block); end - - # Optimize range sum to use arithmetic progression if a block is not given and - # we have a range of numeric values. - # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#287 - def sum(identity = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/core_ext/range/deprecated_conversions.rb#6 - def to_s(format = T.unsafe(nil)); end -end - -class Redis - include ::Redis::Commands::Bitmaps - include ::Redis::Commands::Cluster - include ::Redis::Commands::Connection - include ::Redis::Commands::Geo - include ::Redis::Commands::Hashes - include ::Redis::Commands::HyperLogLog - include ::Redis::Commands::Keys - include ::Redis::Commands::Lists - include ::Redis::Commands::Pubsub - include ::Redis::Commands::Scripting - include ::Redis::Commands::Server - include ::Redis::Commands::Sets - include ::Redis::Commands::SortedSets - include ::Redis::Commands::Streams - include ::Redis::Commands::Strings - include ::Redis::Commands::Transactions - include ::ActiveSupport::Cache::ConnectionPoolLike -end - -class Redis::Distributed - include ::ActiveSupport::Cache::ConnectionPoolLike -end - -# source://activesupport//lib/active_support/core_ext/object/json.rb#133 -class Regexp - # source://activesupport//lib/active_support/core_ext/object/json.rb#134 - def as_json(options = T.unsafe(nil)); end - - # Returns +true+ if the regexp has the multiline flag set. - # - # (/./).multiline? # => false - # (/./m).multiline? # => true - # - # Regexp.new(".").multiline? # => false - # Regexp.new(".", Regexp::MULTILINE).multiline? # => true - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/regexp.rb#11 - def multiline?; end -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 - - # Singleton instances are not duplicable: - # - # Class.new.include(Singleton).instance.dup # TypeError (can't dup instance of singleton - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/object/duplicable.rb#57 - def duplicable?; end -end - -# String inflections define new methods on the String class to transform names for different purposes. -# For instance, you can figure out the name of a table from the name of a class. -# -# 'ScaleScore'.tableize # => "scale_scores" -# -# source://activesupport//lib/active_support/core_ext/object/blank.rb#103 -class String - include ::Comparable - - # Enables more predictable duck-typing on String-like classes. See Object#acts_like?. - # - # @return [Boolean] - # - # 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 - def as_json(options = T.unsafe(nil)); end - - # If you pass a single integer, returns a substring of one character at that - # position. The first character of the string is at position 0, the next at - # position 1, and so on. If a range is supplied, a substring containing - # characters at offsets given by the range is returned. In both cases, if an - # offset is negative, it is counted from the end of the string. Returns +nil+ - # if the initial offset falls outside the string. Returns an empty string if - # the beginning of the range is greater than the end of the string. - # - # str = "hello" - # str.at(0) # => "h" - # str.at(1..3) # => "ell" - # str.at(-2) # => "l" - # str.at(-2..-1) # => "lo" - # str.at(5) # => nil - # str.at(5..-1) # => "" - # - # If a Regexp is given, the matching portion of the string is returned. - # If a String is given, that given string is returned if it occurs in - # the string. In both cases, +nil+ is returned if there is no match. - # - # str = "hello" - # str.at(/lo/) # => "lo" - # str.at(/ol/) # => nil - # str.at("lo") # => "lo" - # str.at("ol") # => nil - # - # source://activesupport//lib/active_support/core_ext/string/access.rb#29 - def at(position); end - - # A string is blank if it's empty or contains whitespaces only: - # - # ''.blank? # => true - # ' '.blank? # => true - # "\t\n\r".blank? # => true - # ' blah '.blank? # => false - # - # Unicode whitespace is supported: - # - # "\u00a0".blank? # => true - # - # @return [true, false] - # - # source://activesupport//lib/active_support/core_ext/object/blank.rb#121 - def blank?; end - - # By default, +camelize+ converts strings to UpperCamelCase. If the argument to camelize - # is set to :lower then camelize produces lowerCamelCase. - # - # +camelize+ will also convert '/' to '::' which is useful for converting paths to namespaces. - # - # 'active_record'.camelize # => "ActiveRecord" - # 'active_record'.camelize(:lower) # => "activeRecord" - # 'active_record/errors'.camelize # => "ActiveRecord::Errors" - # 'active_record/errors'.camelize(:lower) # => "activeRecord::Errors" - # - # +camelize+ is also aliased as +camelcase+. - # - # See ActiveSupport::Inflector.camelize. - # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#103 - def camelcase(first_letter = T.unsafe(nil)); end - - # By default, +camelize+ converts strings to UpperCamelCase. If the argument to camelize - # is set to :lower then camelize produces lowerCamelCase. - # - # +camelize+ will also convert '/' to '::' which is useful for converting paths to namespaces. - # - # 'active_record'.camelize # => "ActiveRecord" - # 'active_record'.camelize(:lower) # => "activeRecord" - # 'active_record/errors'.camelize # => "ActiveRecord::Errors" - # 'active_record/errors'.camelize(:lower) # => "activeRecord::Errors" - # - # +camelize+ is also aliased as +camelcase+. - # - # See ActiveSupport::Inflector.camelize. - # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#103 - 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. - # Note that this returns a string and not a class. (To convert to an actual class - # follow +classify+ with +constantize+.) - # - # 'ham_and_eggs'.classify # => "HamAndEgg" - # 'posts'.classify # => "Post" - # - # See ActiveSupport::Inflector.classify. - # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#243 - def classify; end - - # +constantize+ tries to find a declared constant with the name specified - # in the string. It raises a NameError when the name is not in CamelCase - # or is not initialized. - # - # 'Module'.constantize # => Module - # 'Class'.constantize # => Class - # 'blargle'.constantize # => NameError: wrong constant name blargle - # - # See ActiveSupport::Inflector.constantize. - # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#73 - def constantize; end - - # Replaces underscores with dashes in the string. - # - # 'puni_puni'.dasherize # => "puni-puni" - # - # See ActiveSupport::Inflector.dasherize. - # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#152 - def dasherize; end - - # Removes the rightmost segment from the constant expression in the string. - # - # 'Net::HTTP'.deconstantize # => "Net" - # '::Net::HTTP'.deconstantize # => "::Net" - # 'String'.deconstantize # => "" - # '::String'.deconstantize # => "" - # ''.deconstantize # => "" - # - # See ActiveSupport::Inflector.deconstantize. - # - # See also +demodulize+. - # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#181 - def deconstantize; end - - # Removes the module part from the constant expression in the string. - # - # 'ActiveSupport::Inflector::Inflections'.demodulize # => "Inflections" - # 'Inflections'.demodulize # => "Inflections" - # '::Inflections'.demodulize # => "Inflections" - # ''.demodulize # => '' - # - # See ActiveSupport::Inflector.demodulize. - # - # See also +deconstantize+. - # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#166 - def demodulize; 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. - # - # str = "hello" - # str.first # => "h" - # str.first(1) # => "h" - # str.first(2) # => "he" - # str.first(0) # => "" - # str.first(6) # => "hello" - # - # source://activesupport//lib/active_support/core_ext/string/access.rb#78 - def first(limit = T.unsafe(nil)); 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'. - # - # 'Message'.foreign_key # => "message_id" - # 'Message'.foreign_key(false) # => "messageid" - # 'Admin::Post'.foreign_key # => "post_id" - # - # See ActiveSupport::Inflector.foreign_key. - # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#290 - 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. - # If the position is negative, it is counted from the end of the string. - # - # str = "hello" - # str.from(0) # => "hello" - # str.from(3) # => "lo" - # str.from(-2) # => "lo" - # - # You can mix it with +to+ method and do fun things like: - # - # str = "hello" - # str.from(0).to(-1) # => "hello" - # str.from(1).to(-2) # => "ell" - # - # source://activesupport//lib/active_support/core_ext/string/access.rb#46 - def from(position); end - - # Marks a string as trusted safe. It will be inserted into HTML with no - # additional escaping performed. It is your responsibility to ensure that the - # string contains no malicious content. This method is equivalent to the - # +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#364 - def html_safe; end - - # 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. - # - # The capitalization of the first word can be turned off by setting the - # optional parameter +capitalize+ to false. - # By default, this parameter is true. - # - # The trailing '_id' can be kept and capitalized by setting the - # optional parameter +keep_id_suffix+ to true. - # By default, this parameter is false. - # - # 'employee_salary'.humanize # => "Employee salary" - # 'author_id'.humanize # => "Author" - # 'author_id'.humanize(capitalize: false) # => "author" - # '_id'.humanize # => "Id" - # 'author_id'.humanize(keep_id_suffix: true) # => "Author id" - # - # See ActiveSupport::Inflector.humanize. - # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#266 - def humanize(capitalize: T.unsafe(nil), keep_id_suffix: T.unsafe(nil)); end - - # Converts String to a TimeWithZone in the current zone if Time.zone or Time.zone_default - # is set, otherwise converts String to a Time via String#to_time - # - # source://activesupport//lib/active_support/core_ext/string/zones.rb#9 - def in_time_zone(zone = T.unsafe(nil)); end - - # Wraps the current string in the ActiveSupport::StringInquirer class, - # which gives you a prettier way to test for equality. - # - # env = 'production'.inquiry - # env.production? # => true - # env.development? # => false - # - # source://activesupport//lib/active_support/core_ext/string/inquiry.rb#13 - def inquiry; end - - # Returns +true+ if string has utf_8 encoding. - # - # utf_8_str = "some string".encode "UTF-8" - # iso_str = "some string".encode "ISO-8859-1" - # - # utf_8_str.is_utf8? # => true - # iso_str.is_utf8? # => false - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/string/multibyte.rb#48 - def is_utf8?; end - - # Returns the last character of the string. If a limit is supplied, returns a substring - # from the end of the string until it reaches the limit value (counting backwards). If - # the given limit is greater than or equal to the string length, returns a copy of self. - # - # str = "hello" - # str.last # => "o" - # str.last(1) # => "o" - # str.last(2) # => "lo" - # str.last(0) # => "" - # str.last(6) # => "hello" - # - # source://activesupport//lib/active_support/core_ext/string/access.rb#92 - def last(limit = T.unsafe(nil)); end - - # == Multibyte proxy - # - # +mb_chars+ is a multibyte safe proxy for string methods. - # - # It creates and returns an instance of the ActiveSupport::Multibyte::Chars class which - # encapsulates the original string. A Unicode safe version of all the String methods are defined on this proxy - # class. If the proxy class doesn't respond to a certain method, it's forwarded to the encapsulated string. - # - # >> "lj".mb_chars.upcase.to_s - # => "LJ" - # - # NOTE: Ruby 2.4 and later support native Unicode case mappings: - # - # >> "lj".upcase - # => "LJ" - # - # == Method chaining - # - # All the methods on the Chars proxy which normally return a string will return a Chars object. This allows - # method chaining on the result of any of these methods. - # - # name.mb_chars.reverse.length # => 12 - # - # == Interoperability and configuration - # - # The Chars object tries to be as interchangeable with String objects as possible: sorting and comparing between - # String and Char work like expected. The bang! methods change the internal string representation in the Chars - # object. Interoperability problems can be resolved easily with a +to_s+ call. - # - # For more information about the methods defined on the Chars proxy see ActiveSupport::Multibyte::Chars. For - # information about how to change the default Multibyte behavior see ActiveSupport::Multibyte. - # - # source://activesupport//lib/active_support/core_ext/string/multibyte.rb#37 - def mb_chars; end - - # Replaces special characters in a string so that it may be used as part of a 'pretty' URL. - # - # If the optional parameter +locale+ is specified, - # the word will be parameterized as a word of that language. - # By default, this parameter is set to nil and it will use - # the configured I18n.locale. - # - # class Person - # def to_param - # "#{id}-#{name.parameterize}" - # end - # end - # - # @person = Person.find(1) - # # => # - # - # <%= link_to(@person.name, person_path) %> - # # => Donald E. Knuth - # - # To preserve the case of the characters in a string, use the +preserve_case+ argument. - # - # class Person - # def to_param - # "#{id}-#{name.parameterize(preserve_case: true)}" - # end - # end - # - # @person = Person.find(1) - # # => # - # - # <%= link_to(@person.name, person_path) %> - # # => Donald E. Knuth - # - # See ActiveSupport::Inflector.parameterize. - # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#219 - def parameterize(separator: T.unsafe(nil), preserve_case: T.unsafe(nil), locale: T.unsafe(nil)); end - - # Returns the plural form of the word in the string. - # - # If the optional parameter +count+ is specified, - # the singular form will be returned if count == 1. - # For any other value of +count+ the plural will be returned. - # - # If the optional parameter +locale+ is specified, - # the word will be pluralized as a word of that language. - # By default, this parameter is set to :en. - # You must define your own inflection rules for languages other than English. - # - # 'post'.pluralize # => "posts" - # 'octopus'.pluralize # => "octopi" - # 'sheep'.pluralize # => "sheep" - # 'words'.pluralize # => "words" - # 'the blue mailman'.pluralize # => "the blue mailmen" - # 'CamelOctopus'.pluralize # => "CamelOctopi" - # 'apple'.pluralize(1) # => "apple" - # 'apple'.pluralize(2) # => "apples" - # 'ley'.pluralize(:es) # => "leyes" - # 'ley'.pluralize(1, :es) # => "ley" - # - # See ActiveSupport::Inflector.pluralize. - # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#35 - def pluralize(count = T.unsafe(nil), locale = T.unsafe(nil)); end - - # Returns a new string with all occurrences of the patterns removed. - # str = "foo bar test" - # str.remove(" test") # => "foo bar" - # str.remove(" test", /bar/) # => "foo " - # str # => "foo bar test" - # - # source://activesupport//lib/active_support/core_ext/string/filters.rb#32 - def remove(*patterns); end - - # Alters the string by removing all occurrences of the patterns. - # str = "foo bar test" - # str.remove!(" test", /bar/) # => "foo " - # str # => "foo " - # - # source://activesupport//lib/active_support/core_ext/string/filters.rb#40 - def remove!(*patterns); end - - # +safe_constantize+ tries to find a declared constant with the name specified - # in the string. It returns +nil+ when the name is not in CamelCase - # or is not initialized. - # - # 'Module'.safe_constantize # => Module - # 'Class'.safe_constantize # => Class - # 'blargle'.safe_constantize # => nil - # - # See ActiveSupport::Inflector.safe_constantize. - # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#86 - def safe_constantize; end - - # The reverse of +pluralize+, returns the singular form of a word in a string. - # - # If the optional parameter +locale+ is specified, - # the word will be singularized as a word of that language. - # By default, this parameter is set to :en. - # You must define your own inflection rules for languages other than English. - # - # 'posts'.singularize # => "post" - # 'octopi'.singularize # => "octopus" - # 'sheep'.singularize # => "sheep" - # 'word'.singularize # => "word" - # 'the blue mailmen'.singularize # => "the blue mailman" - # 'CamelOctopi'.singularize # => "CamelOctopus" - # 'leyes'.singularize(:es) # => "ley" - # - # See ActiveSupport::Inflector.singularize. - # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#60 - def singularize(locale = T.unsafe(nil)); end - - # Returns the string, first removing all whitespace on both ends of - # the string, and then changing remaining consecutive whitespace - # groups into one space each. - # - # Note that it handles both ASCII and Unicode whitespace. - # - # %{ Multi-line - # string }.squish # => "Multi-line string" - # " foo bar \n \t boo".squish # => "foo bar boo" - # - # source://activesupport//lib/active_support/core_ext/string/filters.rb#13 - def squish; end - - # Performs a destructive squish. See String#squish. - # str = " foo bar \n \t boo" - # str.squish! # => "foo bar boo" - # str # => "foo bar boo" - # - # source://activesupport//lib/active_support/core_ext/string/filters.rb#21 - def squish!; end - - # Strips indentation in heredocs. - # - # For example in - # - # if options[:usage] - # puts <<-USAGE.strip_heredoc - # This command does such and such. - # - # Supported options are: - # -h This message - # ... - # USAGE - # end - # - # the user would see the usage message aligned against the left margin. - # - # Technically, it looks for the least indented non-empty line - # in the whole string, and removes that amount of leading whitespace. - # - # 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 - # uses the +pluralize+ method on the last word in the string. - # - # 'RawScaledScorer'.tableize # => "raw_scaled_scorers" - # 'ham_and_egg'.tableize # => "ham_and_eggs" - # 'fancyCategory'.tableize # => "fancy_categories" - # - # See ActiveSupport::Inflector.tableize. - # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#231 - def tableize; 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. - # - # The trailing '_id','Id'.. can be kept and capitalized by setting the - # optional parameter +keep_id_suffix+ to true. - # By default, this parameter is false. - # - # 'man from the boondocks'.titleize # => "Man From The Boondocks" - # 'x-men: the last stand'.titleize # => "X Men: The Last Stand" - # 'string_ending_with_id'.titleize(keep_id_suffix: true) # => "String Ending With Id" - # - # +titleize+ is also aliased as +titlecase+. - # - # See ActiveSupport::Inflector.titleize. - # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#130 - def titlecase(keep_id_suffix: T.unsafe(nil)); 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. - # - # The trailing '_id','Id'.. can be kept and capitalized by setting the - # optional parameter +keep_id_suffix+ to true. - # By default, this parameter is false. - # - # 'man from the boondocks'.titleize # => "Man From The Boondocks" - # 'x-men: the last stand'.titleize # => "X Men: The Last Stand" - # 'string_ending_with_id'.titleize(keep_id_suffix: true) # => "String Ending With Id" - # - # +titleize+ is also aliased as +titlecase+. - # - # See ActiveSupport::Inflector.titleize. - # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#130 - def titleize(keep_id_suffix: T.unsafe(nil)); end - - # Returns a substring from the beginning of the string to the given position. - # If the position is negative, it is counted from the end of the string. - # - # str = "hello" - # str.to(0) # => "h" - # str.to(3) # => "hell" - # str.to(-2) # => "hell" - # - # You can mix it with +from+ method and do fun things like: - # - # str = "hello" - # str.from(0).to(-1) # => "hello" - # str.from(1).to(-2) # => "ell" - # - # source://activesupport//lib/active_support/core_ext/string/access.rb#63 - def to(position); end - - # Converts a string to a Date value. - # - # "1-1-2012".to_date # => Sun, 01 Jan 2012 - # "01/01/2012".to_date # => Sun, 01 Jan 2012 - # "2012-12-13".to_date # => Thu, 13 Dec 2012 - # "12/13/2012".to_date # => ArgumentError: invalid date - # - # source://activesupport//lib/active_support/core_ext/string/conversions.rb#47 - def to_date; end - - # Converts a string to a DateTime value. - # - # "1-1-2012".to_datetime # => Sun, 01 Jan 2012 00:00:00 +0000 - # "01/01/2012 23:59:59".to_datetime # => Sun, 01 Jan 2012 23:59:59 +0000 - # "2012-12-13 12:50".to_datetime # => Thu, 13 Dec 2012 12:50:00 +0000 - # "12/13/2012".to_datetime # => ArgumentError: invalid date - # - # source://activesupport//lib/active_support/core_ext/string/conversions.rb#57 - def to_datetime; end - - # Converts a string to a Time value. - # The +form+ can be either +:utc+ or +:local+ (default +:local+). - # - # The time is parsed using Time.parse method. - # If +form+ is +:local+, then the time is in the system timezone. - # If the date part is missing then the current date is used and if - # the time part is missing then it is assumed to be 00:00:00. - # - # "13-12-2012".to_time # => 2012-12-13 00:00:00 +0100 - # "06:12".to_time # => 2012-12-13 06:12:00 +0100 - # "2012-12-13 06:12".to_time # => 2012-12-13 06:12:00 +0100 - # "2012-12-13T06:12".to_time # => 2012-12-13 06:12:00 +0100 - # "2012-12-13T06:12".to_time(:utc) # => 2012-12-13 06:12:00 UTC - # "12/13/2012".to_time # => ArgumentError: argument out of range - # "1604326192".to_time # => ArgumentError: argument out of range - # - # 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: - # - # 'Once upon a time in a world far far away'.truncate(27) - # # => "Once upon a time in a wo..." - # - # Pass a string or regexp :separator to truncate +text+ at a natural break: - # - # 'Once upon a time in a world far far away'.truncate(27, separator: ' ') - # # => "Once upon a time in a..." - # - # '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: - # - # '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 - - # Truncates +text+ to at most bytesize bytes in length without - # breaking string encoding by splitting multibyte characters or breaking - # grapheme clusters ("perceptual characters") by truncating at combining - # characters. - # - # >> "🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪".size - # => 20 - # >> "🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪".bytesize - # => 80 - # >> "🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪".truncate_bytes(20) - # => "🔪🔪🔪🔪…" - # - # The truncated text ends with the :omission string, defaulting - # to "…", for a total length not exceeding bytesize. - # - # source://activesupport//lib/active_support/core_ext/string/filters.rb#95 - def truncate_bytes(truncate_at, omission: T.unsafe(nil)); end - - # Truncates a given +text+ after a given number of words (words_count): - # - # 'Once upon a time in a world far far away'.truncate_words(4) - # # => "Once upon a time..." - # - # Pass a string or regexp :separator to specify a different separator of words: - # - # 'Once
    upon
    a
    time
    in
    a
    world'.truncate_words(5, separator: '
    ') - # # => "Once
    upon
    a
    time
    in..." - # - # The last characters will be replaced with the :omission string (defaults to "..."): - # - # '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 - 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. - # - # +underscore+ will also change '::' to '/' to convert namespaces to paths. - # - # 'ActiveModel'.underscore # => "active_model" - # 'ActiveModel::Errors'.underscore # => "active_model/errors" - # - # See ActiveSupport::Inflector.underscore. - # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#143 - def underscore; end - - # Converts just the first character to uppercase. - # - # 'what a Lovely Day'.upcase_first # => "What a Lovely Day" - # 'w'.upcase_first # => "W" - # ''.upcase_first # => "" - # - # See ActiveSupport::Inflector.upcase_first. - # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#277 - def upcase_first; end -end - -# source://activesupport//lib/active_support/core_ext/object/blank.rb#104 -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 -class Struct - include ::Enumerable - - # source://activesupport//lib/active_support/core_ext/object/json.rb#69 - def as_json(options = T.unsafe(nil)); end -end - -# source://activesupport//lib/active_support/core_ext/object/json.rb#98 -class Symbol - include ::Comparable - - # source://activesupport//lib/active_support/core_ext/object/json.rb#99 - def as_json(options = T.unsafe(nil)); end -end - -# source://activesupport//lib/active_support/core_ext/object/blank.rb#146 -class Time - include ::Comparable - include ::DateAndTime::Zones - include ::DateAndTime::Calculations - include ::DateAndTime::Compatibility - - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#280 - 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#303 - 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#312 - def <=>(other); end - - # Duck-types as a Time-like class. See Object#acts_like?. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/time/acts_like.rb#7 - def acts_like_time?; end - - # Uses Date to provide precise Time calculations for years, months, and days - # according to the proleptic Gregorian calendar. The +options+ parameter - # takes a hash with any of these keys: :years, :months, - # :weeks, :days, :hours, :minutes, - # :seconds. - # - # Time.new(2015, 8, 1, 14, 35, 0).advance(seconds: 1) # => 2015-08-01 14:35:01 -0700 - # Time.new(2015, 8, 1, 14, 35, 0).advance(minutes: 1) # => 2015-08-01 14:36:00 -0700 - # Time.new(2015, 8, 1, 14, 35, 0).advance(hours: 1) # => 2015-08-01 15:35:00 -0700 - # Time.new(2015, 8, 1, 14, 35, 0).advance(days: 1) # => 2015-08-02 14:35:00 -0700 - # Time.new(2015, 8, 1, 14, 35, 0).advance(weeks: 1) # => 2015-08-08 14:35:00 -0700 - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#182 - 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#208 - def ago(seconds); end - - # source://activesupport//lib/active_support/core_ext/object/json.rb#187 - 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#221 - 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#250 - 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#266 - 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#239 - 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#256 - 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#272 - 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#229 - 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#229 - 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#221 - 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#229 - 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#221 - 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#250 - 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#266 - def beginning_of_minute; end - - # No Time is blank: - # - # Time.now.blank? # => false - # - # @return [false] - # - # source://activesupport//lib/active_support/core_ext/object/blank.rb#152 - def blank?; end - - # Returns a new Time where one or more of the elements have been changed according - # to the +options+ parameter. The time options (:hour, :min, - # :sec, :usec, :nsec) reset cascadingly, so if only - # the hour is passed, then minute, sec, usec, and nsec is set to 0. If the hour - # and minute is passed, then sec, usec, and nsec is set to 0. The +options+ parameter - # takes a hash with any of these keys: :year, :month, :day, - # :hour, :min, :sec, :usec, :nsec, - # :offset. Pass either :usec or :nsec, not both. - # - # Time.new(2012, 8, 29, 22, 35, 0).change(day: 1) # => Time.new(2012, 8, 1, 22, 35, 0) - # Time.new(2012, 8, 29, 22, 35, 0).change(year: 1981, day: 1) # => Time.new(1981, 8, 1, 22, 35, 0) - # Time.new(2012, 8, 29, 22, 35, 0).change(year: 1981, hour: 0) # => Time.new(1981, 8, 29, 0, 0, 0) - # - # @raise [ArgumentError] - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#138 - def change(options); 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#312 - 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#239 - 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#256 - 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#272 - 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#327 - 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#327 - def eql_with_coercion(other); end - - # Returns a formatted string of the offset from UTC, or an alternative - # string if the time zone is already UTC. - # - # Time.local(2000).formatted_offset # => "-06:00" - # Time.local(2000).formatted_offset(false) # => "-0600" - # - # source://activesupport//lib/active_support/core_ext/time/conversions.rb#69 - def formatted_offset(colon = T.unsafe(nil), alternate_utc_string = T.unsafe(nil)); end - - # 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#213 - 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#229 - 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#229 - 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#221 - 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#303 - def minus_with_coercion(other); end - - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#290 - def minus_with_duration(other); end - - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#290 - 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#341 - 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#351 - 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#361 - 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#229 - def noon; end - - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#280 - 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#336 - 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#346 - 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#356 - def prev_year(years = T.unsafe(nil)); end - - # Returns the fraction of a second as a +Rational+ - # - # Time.new(2012, 8, 29, 0, 0, 0.5).sec_fraction # => (1/2) - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#107 - def sec_fraction; end - - # Returns the number of seconds since 00:00:00. - # - # Time.new(2012, 8, 29, 0, 0, 0).seconds_since_midnight # => 0.0 - # Time.new(2012, 8, 29, 12, 34, 56).seconds_since_midnight # => 45296.0 - # Time.new(2012, 8, 29, 23, 59, 59).seconds_since_midnight # => 86399.0 - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#91 - def seconds_since_midnight; end - - # Returns the number of seconds until 23:59:59. - # - # Time.new(2012, 8, 29, 0, 0, 0).seconds_until_end_of_day # => 86399 - # Time.new(2012, 8, 29, 12, 34, 56).seconds_until_end_of_day # => 41103 - # Time.new(2012, 8, 29, 23, 59, 59).seconds_until_end_of_day # => 0 - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#100 - def seconds_until_end_of_day; end - - # 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#213 - def since(seconds); end - - # Converts to a formatted string. See DATE_FORMATS for built-in formats. - # - # This method is aliased to to_formatted_s. - # - # time = Time.now # => 2007-01-18 06:10:17 -06:00 - # - # time.to_fs(:time) # => "06:10" - # time.to_formatted_s(:time) # => "06:10" - # - # time.to_fs(:db) # => "2007-01-18 06:10:17" - # time.to_fs(:number) # => "20070118061017" - # time.to_fs(:short) # => "18 Jan 06:10" - # time.to_fs(:long) # => "January 18, 2007 06:10" - # time.to_fs(:long_ordinal) # => "January 18th, 2007 06:10" - # time.to_fs(:rfc822) # => "Thu, 18 Jan 2007 06:10:17 -0600" - # time.to_fs(:iso8601) # => "2007-01-18T06:10:17-06:00" - # - # == Adding your own time formats to +to_fs+ - # You can add your own formats to the Time::DATE_FORMATS hash. - # Use the format name as the hash key and either a strftime string - # or Proc instance that takes a time argument as the value. - # - # # config/initializers/time_formats.rb - # Time::DATE_FORMATS[:month_and_year] = '%B %Y' - # Time::DATE_FORMATS[:short_ordinal] = ->(time) { time.strftime("%B #{time.day.ordinalize}") } - # - # source://activesupport//lib/active_support/core_ext/time/conversions.rb#53 - def to_formatted_s(format = T.unsafe(nil)); end - - # Converts to a formatted string. See DATE_FORMATS for built-in formats. - # - # This method is aliased to to_formatted_s. - # - # time = Time.now # => 2007-01-18 06:10:17 -06:00 - # - # time.to_fs(:time) # => "06:10" - # time.to_formatted_s(:time) # => "06:10" - # - # time.to_fs(:db) # => "2007-01-18 06:10:17" - # time.to_fs(:number) # => "20070118061017" - # time.to_fs(:short) # => "18 Jan 06:10" - # time.to_fs(:long) # => "January 18, 2007 06:10" - # time.to_fs(:long_ordinal) # => "January 18th, 2007 06:10" - # time.to_fs(:rfc822) # => "Thu, 18 Jan 2007 06:10:17 -0600" - # time.to_fs(:iso8601) # => "2007-01-18T06:10:17-06:00" - # - # == Adding your own time formats to +to_fs+ - # You can add your own formats to the Time::DATE_FORMATS hash. - # Use the format name as the hash key and either a strftime string - # or Proc instance that takes a time argument as the value. - # - # # config/initializers/time_formats.rb - # Time::DATE_FORMATS[:month_and_year] = '%B %Y' - # Time::DATE_FORMATS[:short_ordinal] = ->(time) { time.strftime("%B #{time.day.ordinalize}") } - # - # 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+. - # - # source://activesupport//lib/active_support/core_ext/time/compatibility.rb#13 - def to_time; end - - class << self - # Overriding case equality method so that it returns true for ActiveSupport::TimeWithZone instances - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#18 - def ===(other); end - - # Layers additional behavior on Time.at so that ActiveSupport::TimeWithZone and DateTime - # instances can be used when called with a single argument - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#45 - def at(*args, **kwargs); end - - # Layers additional behavior on Time.at so that ActiveSupport::TimeWithZone and DateTime - # instances can be used when called with a single argument - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#45 - def at_with_coercion(*args, **kwargs); end - - # Returns Time.zone.now when Time.zone or config.time_zone are set, otherwise just returns Time.now. - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#39 - def current; end - - # Returns the number of days in the given month. - # If no year is specified, it will use the current year. - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#24 - def days_in_month(month, year = T.unsafe(nil)); end - - # Returns the number of days in the given year. - # If no year is specified, it will use the current year. - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#34 - def days_in_year(year = T.unsafe(nil)); end - - # Returns a TimeZone instance matching the time zone provided. - # Accepts the time zone in any format supported by Time.zone=. - # Returns +nil+ for invalid time zones. - # - # Time.find_zone "America/New_York" # => # - # Time.find_zone "NOT-A-TIMEZONE" # => nil - # - # source://activesupport//lib/active_support/core_ext/time/zones.rb#94 - def find_zone(time_zone); end - - # Returns a TimeZone instance matching the time zone provided. - # Accepts the time zone in any format supported by Time.zone=. - # Raises an +ArgumentError+ for invalid time zones. - # - # Time.find_zone! "America/New_York" # => # - # Time.find_zone! "EST" # => # - # Time.find_zone! -5.hours # => # - # Time.find_zone! nil # => nil - # Time.find_zone! false # => false - # Time.find_zone! "NOT-A-TIMEZONE" # => ArgumentError: Invalid Timezone: NOT-A-TIMEZONE - # - # source://activesupport//lib/active_support/core_ext/time/zones.rb#82 - def find_zone!(time_zone); end - - # Creates a +Time+ instance from an RFC 3339 string. - # - # Time.rfc3339('1999-12-31T14:00:00-10:00') # => 2000-01-01 00:00:00 -1000 - # - # If the time or offset components are missing then an +ArgumentError+ will be raised. - # - # Time.rfc3339('1999-12-31') # => ArgumentError: invalid date - # - # @raise [ArgumentError] - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#69 - def rfc3339(str); end - - # Allows override of Time.zone locally inside supplied block; - # resets Time.zone to existing value when done. - # - # class ApplicationController < ActionController::Base - # around_action :set_time_zone - # - # private - # - # def set_time_zone - # Time.use_zone(current_user.timezone) { yield } - # end - # end - # - # NOTE: This won't affect any ActiveSupport::TimeWithZone - # objects that have already been created, e.g. any model timestamp - # attributes that have been read before the block will remain in - # the application's default timezone. - # - # source://activesupport//lib/active_support/core_ext/time/zones.rb#62 - def use_zone(time_zone); end - - # Returns the TimeZone for the current request, if this has been set (via Time.zone=). - # If Time.zone has not been set for the current request, returns the TimeZone specified in config.time_zone. - # - # source://activesupport//lib/active_support/core_ext/time/zones.rb#14 - def zone; end - - # Sets Time.zone to a TimeZone object for the current request/thread. - # - # 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"). - # - # 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: - # - # class ApplicationController < ActionController::Base - # around_action :set_time_zone - # - # def set_time_zone - # if logged_in? - # Time.use_zone(current_user.time_zone) { yield } - # else - # yield - # end - # end - # end - # - # source://activesupport//lib/active_support/core_ext/time/zones.rb#41 - def zone=(time_zone); end - - # Returns the value of attribute zone_default. - # - # source://activesupport//lib/active_support/core_ext/time/zones.rb#10 - def zone_default; end - - # Sets the attribute zone_default - # - # @param value the value to set the attribute zone_default to. - # - # source://activesupport//lib/active_support/core_ext/time/zones.rb#10 - def zone_default=(_arg0); end - end -end - -# source://activesupport//lib/active_support/core_ext/time/calculations.rb#14 -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 - def as_json(options = T.unsafe(nil)); end - - # +true+ is not blank: - # - # true.blank? # => false - # - # @return [false] - # - # source://activesupport//lib/active_support/core_ext/object/blank.rb#78 - def blank?; end - - # Returns +self+. - # - # source://activesupport//lib/active_support/core_ext/object/to_query.rb#27 - def to_param; end -end - -# source://activesupport//lib/active_support/core_ext/object/json.rb#216 -class URI::Generic - include ::URI::RFC2396_REGEXP - - # source://activesupport//lib/active_support/core_ext/object/json.rb#217 - def as_json(options = T.unsafe(nil)); end -end - -# source://activesupport//lib/active_support/core_ext/object/duplicable.rb#41 -class UnboundMethod - # Unbound methods are not duplicable: - # - # method(:puts).unbind.duplicable? # => false - # method(:puts).unbind.dup # => TypeError: allocator undefined for UnboundMethod - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/object/duplicable.rb#46 - def duplicable?; end -end diff --git a/sorbet/rbi/gems/addressable@2.8.1.rbi b/sorbet/rbi/gems/addressable@2.8.1.rbi deleted file mode 100644 index b77dd49..0000000 --- a/sorbet/rbi/gems/addressable@2.8.1.rbi +++ /dev/null @@ -1,1398 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `addressable` gem. -# Please instead update this file by running `bin/tapioca gem addressable`. - -# Addressable is a library for processing links and URIs. -# -# source://addressable//lib/addressable/version.rb#22 -module Addressable; end - -# source://addressable//lib/addressable/idna/pure.rb#21 -module Addressable::IDNA - class << self - # Converts from a Unicode internationalized domain name to an ASCII - # domain name as described in RFC 3490. - # - # source://addressable//lib/addressable/idna/pure.rb#67 - def to_ascii(input); end - - # Converts from an ASCII domain name to a Unicode internationalized - # domain name as described in RFC 3490. - # - # source://addressable//lib/addressable/idna/pure.rb#93 - def to_unicode(input); end - - # Unicode normalization form KC. - # - # source://addressable//lib/addressable/idna/pure.rb#116 - def unicode_normalize_kc(input); end - - private - - # source://addressable//lib/addressable/idna/pure.rb#282 - def lookup_unicode_combining_class(codepoint); end - - # source://addressable//lib/addressable/idna/pure.rb#290 - def lookup_unicode_compatibility(codepoint); end - - # source://addressable//lib/addressable/idna/pure.rb#305 - def lookup_unicode_composition(unpacked); end - - # source://addressable//lib/addressable/idna/pure.rb#297 - def lookup_unicode_lowercase(codepoint); end - - # Bias adaptation method - # - # source://addressable//lib/addressable/idna/pure.rb#660 - def punycode_adapt(delta, numpoints, firsttime); end - - # @return [Boolean] - # - # source://addressable//lib/addressable/idna/pure.rb#628 - def punycode_basic?(codepoint); end - - # source://addressable//lib/addressable/idna/pure.rb#506 - def punycode_decode(punycode); end - - # Returns the numeric value of a basic codepoint - # (for use in representing integers) in the range 0 to - # base - 1, or PUNYCODE_BASE if codepoint does not represent a value. - # - # source://addressable//lib/addressable/idna/pure.rb#646 - def punycode_decode_digit(codepoint); end - - # @return [Boolean] - # - # source://addressable//lib/addressable/idna/pure.rb#633 - def punycode_delimiter?(codepoint); end - - # source://addressable//lib/addressable/idna/pure.rb#385 - def punycode_encode(unicode); end - - # source://addressable//lib/addressable/idna/pure.rb#638 - def punycode_encode_digit(d); end - - # source://addressable//lib/addressable/idna/pure.rb#188 - def ucs4_to_utf8(char, buffer); end - - # source://addressable//lib/addressable/idna/pure.rb#139 - def unicode_compose(unpacked); end - - # source://addressable//lib/addressable/idna/pure.rb#164 - def unicode_compose_pair(ch_one, ch_two); end - - # source://addressable//lib/addressable/idna/pure.rb#244 - def unicode_decompose(unpacked); end - - # source://addressable//lib/addressable/idna/pure.rb#265 - def unicode_decompose_hangul(codepoint); end - - # Unicode aware downcase method. - # - # @api private - # @param input [String] The input string. - # @return [String] The downcased result. - # - # source://addressable//lib/addressable/idna/pure.rb#131 - def unicode_downcase(input); end - - # source://addressable//lib/addressable/idna/pure.rb#220 - def unicode_sort_canonical(unpacked); end - end -end - -# source://addressable//lib/addressable/idna/pure.rb#355 -Addressable::IDNA::ACE_MAX_LENGTH = T.let(T.unsafe(nil), Integer) - -# source://addressable//lib/addressable/idna/pure.rb#40 -Addressable::IDNA::ACE_PREFIX = T.let(T.unsafe(nil), String) - -# source://addressable//lib/addressable/idna/pure.rb#344 -Addressable::IDNA::COMPOSITION_TABLE = T.let(T.unsafe(nil), Hash) - -# source://addressable//lib/addressable/idna/pure.rb#311 -Addressable::IDNA::HANGUL_LBASE = T.let(T.unsafe(nil), Integer) - -# source://addressable//lib/addressable/idna/pure.rb#312 -Addressable::IDNA::HANGUL_LCOUNT = T.let(T.unsafe(nil), Integer) - -# 588 -# -# source://addressable//lib/addressable/idna/pure.rb#317 -Addressable::IDNA::HANGUL_NCOUNT = T.let(T.unsafe(nil), Integer) - -# source://addressable//lib/addressable/idna/pure.rb#310 -Addressable::IDNA::HANGUL_SBASE = T.let(T.unsafe(nil), Integer) - -# 11172 -# -# source://addressable//lib/addressable/idna/pure.rb#318 -Addressable::IDNA::HANGUL_SCOUNT = T.let(T.unsafe(nil), Integer) - -# source://addressable//lib/addressable/idna/pure.rb#315 -Addressable::IDNA::HANGUL_TBASE = T.let(T.unsafe(nil), Integer) - -# source://addressable//lib/addressable/idna/pure.rb#316 -Addressable::IDNA::HANGUL_TCOUNT = T.let(T.unsafe(nil), Integer) - -# source://addressable//lib/addressable/idna/pure.rb#313 -Addressable::IDNA::HANGUL_VBASE = T.let(T.unsafe(nil), Integer) - -# source://addressable//lib/addressable/idna/pure.rb#314 -Addressable::IDNA::HANGUL_VCOUNT = T.let(T.unsafe(nil), Integer) - -# source://addressable//lib/addressable/idna/pure.rb#357 -Addressable::IDNA::PUNYCODE_BASE = T.let(T.unsafe(nil), Integer) - -# source://addressable//lib/addressable/idna/pure.rb#361 -Addressable::IDNA::PUNYCODE_DAMP = T.let(T.unsafe(nil), Integer) - -# source://addressable//lib/addressable/idna/pure.rb#364 -Addressable::IDNA::PUNYCODE_DELIMITER = T.let(T.unsafe(nil), Integer) - -# source://addressable//lib/addressable/idna/pure.rb#362 -Addressable::IDNA::PUNYCODE_INITIAL_BIAS = T.let(T.unsafe(nil), Integer) - -# source://addressable//lib/addressable/idna/pure.rb#363 -Addressable::IDNA::PUNYCODE_INITIAL_N = T.let(T.unsafe(nil), Integer) - -# source://addressable//lib/addressable/idna/pure.rb#366 -Addressable::IDNA::PUNYCODE_MAXINT = T.let(T.unsafe(nil), Integer) - -# source://addressable//lib/addressable/idna/pure.rb#368 -Addressable::IDNA::PUNYCODE_PRINT_ASCII = T.let(T.unsafe(nil), String) - -# source://addressable//lib/addressable/idna/pure.rb#360 -Addressable::IDNA::PUNYCODE_SKEW = T.let(T.unsafe(nil), Integer) - -# source://addressable//lib/addressable/idna/pure.rb#359 -Addressable::IDNA::PUNYCODE_TMAX = T.let(T.unsafe(nil), Integer) - -# source://addressable//lib/addressable/idna/pure.rb#358 -Addressable::IDNA::PUNYCODE_TMIN = T.let(T.unsafe(nil), Integer) - -# Input is invalid. -# -# source://addressable//lib/addressable/idna/pure.rb#379 -class Addressable::IDNA::PunycodeBadInput < ::StandardError; end - -# Output would exceed the space provided. -# -# source://addressable//lib/addressable/idna/pure.rb#381 -class Addressable::IDNA::PunycodeBigOutput < ::StandardError; end - -# Input needs wider integers to process. -# -# source://addressable//lib/addressable/idna/pure.rb#383 -class Addressable::IDNA::PunycodeOverflow < ::StandardError; end - -# source://addressable//lib/addressable/idna/pure.rb#335 -Addressable::IDNA::UNICODE_DATA = T.let(T.unsafe(nil), Hash) - -# source://addressable//lib/addressable/idna/pure.rb#322 -Addressable::IDNA::UNICODE_DATA_CANONICAL = T.let(T.unsafe(nil), Integer) - -# source://addressable//lib/addressable/idna/pure.rb#320 -Addressable::IDNA::UNICODE_DATA_COMBINING_CLASS = T.let(T.unsafe(nil), Integer) - -# source://addressable//lib/addressable/idna/pure.rb#323 -Addressable::IDNA::UNICODE_DATA_COMPATIBILITY = T.let(T.unsafe(nil), Integer) - -# source://addressable//lib/addressable/idna/pure.rb#321 -Addressable::IDNA::UNICODE_DATA_EXCLUSION = T.let(T.unsafe(nil), Integer) - -# source://addressable//lib/addressable/idna/pure.rb#325 -Addressable::IDNA::UNICODE_DATA_LOWERCASE = T.let(T.unsafe(nil), Integer) - -# source://addressable//lib/addressable/idna/pure.rb#326 -Addressable::IDNA::UNICODE_DATA_TITLECASE = T.let(T.unsafe(nil), Integer) - -# source://addressable//lib/addressable/idna/pure.rb#324 -Addressable::IDNA::UNICODE_DATA_UPPERCASE = T.let(T.unsafe(nil), Integer) - -# source://addressable//lib/addressable/idna/pure.rb#354 -Addressable::IDNA::UNICODE_MAX_LENGTH = T.let(T.unsafe(nil), Integer) - -# source://addressable//lib/addressable/idna/pure.rb#36 -Addressable::IDNA::UNICODE_TABLE = T.let(T.unsafe(nil), String) - -# source://addressable//lib/addressable/idna/pure.rb#42 -Addressable::IDNA::UTF8_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://addressable//lib/addressable/idna/pure.rb#53 -Addressable::IDNA::UTF8_REGEX_MULTIBYTE = T.let(T.unsafe(nil), Regexp) - -# This is an implementation of a URI parser based on -# RFC 3986, -# RFC 3987. -# -# source://addressable//lib/addressable/uri.rb#31 -class Addressable::URI - # Creates a new uri object from component parts. - # - # @option [String, - # @option [String, - # @option [String, - # @option [String, - # @option [String, - # @option [String, - # @option [String, - # @option [String, - # @option [String, - # @option [String, - # @param [String, [Hash] a customizable set of options - # @return [Addressable::URI] The constructed URI object. - # - # source://addressable//lib/addressable/uri.rb#824 - def initialize(options = T.unsafe(nil)); end - - # Joins two URIs together. - # - # @param The [String, Addressable::URI, #to_str] URI to join with. - # @return [Addressable::URI] The joined URI. - # - # source://addressable//lib/addressable/uri.rb#1898 - def +(uri); end - - # Returns true if the URI objects are equal. This method - # normalizes both URIs before doing the comparison. - # - # @param uri [Object] The URI to compare. - # @return [TrueClass, FalseClass] true if the URIs are equivalent, false - # otherwise. - # - # source://addressable//lib/addressable/uri.rb#2248 - def ==(uri); end - - # Returns true if the URI objects are equal. This method - # normalizes both URIs before doing the comparison, and allows comparison - # against Strings. - # - # @param uri [Object] The URI to compare. - # @return [TrueClass, FalseClass] true if the URIs are equivalent, false - # otherwise. - # - # source://addressable//lib/addressable/uri.rb#2226 - def ===(uri); end - - # Determines if the URI is absolute. - # - # @return [TrueClass, FalseClass] true if the URI is absolute. false - # otherwise. - # - # source://addressable//lib/addressable/uri.rb#1888 - def absolute?; end - - # The authority component for this URI. - # Combines the user, password, host, and port components. - # - # @return [String] The authority component. - # - # source://addressable//lib/addressable/uri.rb#1235 - 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#1275 - 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#1593 - def basename; end - - # The default port for this URI's scheme. - # This method will always returns the default port for the URI's scheme - # regardless of the presence of an explicit port in the URI. - # - # @return [Integer] The default port. - # - # source://addressable//lib/addressable/uri.rb#1457 - def default_port; end - - # This method allows you to make several changes to a URI simultaneously, - # which separately would cause validation errors, but in conjunction, - # are valid. The URI will be revalidated as soon as the entire block has - # been executed. - # - # @param block [Proc] A set of operations to perform on a given URI. - # @raise [LocalJumpError] - # - # source://addressable//lib/addressable/uri.rb#2405 - def defer_validation; end - - # Creates a URI suitable for display to users. If semantic attacks are - # likely, the application should try to detect these and warn the user. - # See RFC 3986, - # section 7.6 for more information. - # - # @return [Addressable::URI] A URI suitable for display purposes. - # - # source://addressable//lib/addressable/uri.rb#2210 - def display_uri; end - - # Returns the public suffix domain for this host. - # - # @example - # Addressable::URI.parse("http://www.example.co.uk").domain # => "example.co.uk" - # - # source://addressable//lib/addressable/uri.rb#1226 - def domain; end - - # Clones the URI object. - # - # @return [Addressable::URI] The cloned URI. - # - # source://addressable//lib/addressable/uri.rb#2280 - 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#2342 - def empty?; end - - # Returns true if the URI objects are equal. This method - # does NOT normalize either URI before doing the comparison. - # - # @param uri [Object] The URI to compare. - # @return [TrueClass, FalseClass] true if the URIs are equivalent, false - # otherwise. - # - # source://addressable//lib/addressable/uri.rb#2262 - def eql?(uri); end - - # The extname, if any, of the file in the path component. - # Empty string if there is no extension. - # - # @return [String] The path's extname. - # - # source://addressable//lib/addressable/uri.rb#1603 - def extname; end - - # The fragment component for this URI. - # - # @return [String] The fragment component. - # - # source://addressable//lib/addressable/uri.rb#1817 - 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#1844 - def fragment=(new_fragment); end - - # Freeze URI, initializing instance variables. - # - # @return [Addressable::URI] The frozen URI object. - # - # source://addressable//lib/addressable/uri.rb#861 - def freeze; end - - # A hash value that will make a URI equivalent to its normalized - # form. - # - # @return [Integer] A hash of the URI. - # - # source://addressable//lib/addressable/uri.rb#2272 - def hash; end - - # The host component for this URI. - # - # @return [String] The host component. - # - # source://addressable//lib/addressable/uri.rb#1119 - 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#1157 - def host=(new_host); end - - # This method is same as URI::Generic#host except - # brackets for IPv6 (and 'IPvFuture') addresses are removed. - # - # @return [String] The hostname for this URI. - # @see Addressable::URI#host - # - # source://addressable//lib/addressable/uri.rb#1179 - def hostname; end - - # This method is same as URI::Generic#host= except - # the argument can be a bare IPv6 address (or 'IPvFuture'). - # - # @param new_hostname [String, #to_str] The new hostname for this URI. - # @see Addressable::URI#host= - # - # source://addressable//lib/addressable/uri.rb#1191 - def hostname=(new_hostname); end - - # The inferred port component for this URI. - # This method will normalize to the default port for the URI's scheme if - # the port isn't explicitly specified in the URI. - # - # @return [Integer] The inferred port component. - # - # source://addressable//lib/addressable/uri.rb#1443 - def inferred_port; 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#2393 - def inspect; end - - # Determines if the scheme indicates an IP-based protocol. - # - # @return [TrueClass, FalseClass] true if the scheme indicates an IP-based protocol. - # false otherwise. - # - # source://addressable//lib/addressable/uri.rb#1864 - def ip_based?; end - - # Joins two URIs together. - # - # @param The [String, Addressable::URI, #to_str] URI to join with. - # @return [Addressable::URI] The joined URI. - # - # source://addressable//lib/addressable/uri.rb#1898 - def join(uri); end - - # Destructive form of join. - # - # @param The [String, Addressable::URI, #to_str] URI to join with. - # @return [Addressable::URI] The joined URI. - # @see Addressable::URI#join - # - # source://addressable//lib/addressable/uri.rb#2001 - def join!(uri); end - - # Merges a URI with a Hash of components. - # This method has different behavior from join. Any - # components present in the hash parameter will override the - # original components. The path component is not treated specially. - # - # @param The [Hash, Addressable::URI, #to_hash] components to merge with. - # @return [Addressable::URI] The merged URI. - # @see Hash#merge - # - # source://addressable//lib/addressable/uri.rb#2016 - def merge(hash); end - - # Destructive form of merge. - # - # @param The [Hash, Addressable::URI, #to_hash] components to merge with. - # @return [Addressable::URI] The merged URI. - # @see Addressable::URI#merge - # - # source://addressable//lib/addressable/uri.rb#2081 - def merge!(uri); end - - # Returns a normalized URI object. - # - # NOTE: This method does not attempt to fully conform to specifications. - # It exists largely to correct other people's failures to read the - # specifications, and also to deal with caching issues since several - # different URIs may represent the same resource and should not be - # cached multiple times. - # - # @return [Addressable::URI] The normalized URI. - # - # source://addressable//lib/addressable/uri.rb#2173 - def normalize; end - - # Destructively normalizes this URI object. - # - # @return [Addressable::URI] The normalized URI. - # @see Addressable::URI#normalize - # - # source://addressable//lib/addressable/uri.rb#2199 - def normalize!; end - - # The authority component for this URI, normalized. - # - # @return [String] The authority component, normalized. - # - # source://addressable//lib/addressable/uri.rb#1253 - def normalized_authority; end - - # The fragment component for this URI, normalized. - # - # @return [String] The fragment component, normalized. - # - # source://addressable//lib/addressable/uri.rb#1825 - def normalized_fragment; end - - # The host component for this URI, normalized. - # - # @return [String] The host component, normalized. - # - # source://addressable//lib/addressable/uri.rb#1127 - def normalized_host; end - - # The password component for this URI, normalized. - # - # @return [String] The password component, normalized. - # - # source://addressable//lib/addressable/uri.rb#999 - def normalized_password; end - - # The path component for this URI, normalized. - # - # @return [String] The path component, normalized. - # - # source://addressable//lib/addressable/uri.rb#1540 - def normalized_path; end - - # The port component for this URI, normalized. - # - # @return [Integer] The port component, normalized. - # - # source://addressable//lib/addressable/uri.rb#1395 - def normalized_port; end - - # The query component for this URI, normalized. - # - # @return [String] The query component, normalized. - # - # source://addressable//lib/addressable/uri.rb#1620 - 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 - def normalized_scheme; end - - # The normalized combination of components that represent a site. - # Combines the scheme, user, password, host, and port components. - # Primarily useful for HTTP and HTTPS. - # - # For example, "http://example.com/path?query" would have a - # site value of "http://example.com". - # - # @return [String] The normalized components that identify a site. - # - # source://addressable//lib/addressable/uri.rb#1488 - def normalized_site; end - - # The user component for this URI, normalized. - # - # @return [String] The user component, normalized. - # - # source://addressable//lib/addressable/uri.rb#942 - def normalized_user; end - - # The userinfo component for this URI, normalized. - # - # @return [String] The userinfo component, normalized. - # - # source://addressable//lib/addressable/uri.rb#1067 - def normalized_userinfo; end - - # Omits components from a URI. - # - # @example - # uri = Addressable::URI.parse("http://example.com/path?query") - # #=> # - # uri.omit(:scheme, :authority) - # #=> # - # @param *components [Symbol] The components to be omitted. - # @return [Addressable::URI] The URI with components omitted. - # - # source://addressable//lib/addressable/uri.rb#2306 - def omit(*components); end - - # Destructive form of omit. - # - # @param *components [Symbol] The components to be omitted. - # @return [Addressable::URI] The URI with components omitted. - # @see Addressable::URI#omit - # - # source://addressable//lib/addressable/uri.rb#2333 - def omit!(*components); end - - # The origin for this URI, serialized to ASCII, as per - # RFC 6454, section 6.2. - # - # @return [String] The serialized origin. - # - # source://addressable//lib/addressable/uri.rb#1315 - def origin; end - - # Sets the origin for this URI, serialized to ASCII, as per - # RFC 6454, section 6.2. This assignment will reset the `userinfo` - # component. - # - # @param new_origin [String, #to_str] The new origin component. - # - # source://addressable//lib/addressable/uri.rb#1334 - def origin=(new_origin); end - - # The password component for this URI. - # - # @return [String] The password component. - # - # source://addressable//lib/addressable/uri.rb#991 - 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#1022 - def password=(new_password); end - - # The path component for this URI. - # - # @return [String] The path component. - # - # source://addressable//lib/addressable/uri.rb#1531 - 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#1572 - def path=(new_path); end - - # The port component for this URI. - # This is the port number actually given in the URI. This does not - # infer port numbers from default values. - # - # @return [Integer] The port component. - # - # source://addressable//lib/addressable/uri.rb#1387 - 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#1411 - def port=(new_port); end - - # The query component for this URI. - # - # @return [String] The query component. - # - # source://addressable//lib/addressable/uri.rb#1612 - 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#1648 - def query=(new_query); end - - # Converts the query component to a Hash value. - # - # @example - # Addressable::URI.parse("?one=1&two=2&three=3").query_values - # #=> {"one" => "1", "two" => "2", "three" => "3"} - # Addressable::URI.parse("?one=two&one=three").query_values(Array) - # #=> [["one", "two"], ["one", "three"]] - # Addressable::URI.parse("?one=two&one=three").query_values(Hash) - # #=> {"one" => "three"} - # Addressable::URI.parse("?").query_values - # #=> {} - # Addressable::URI.parse("").query_values - # #=> nil - # @param return_type [Class] The return type desired. Value must be either - # `Hash` or `Array`. - # @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#1679 - def query_values(return_type = T.unsafe(nil)); end - - # Sets the query component for this URI from a Hash object. - # An empty Hash or Array will result in an empty query string. - # - # @example - # uri.query_values = {:a => "a", :b => ["c", "d", "e"]} - # uri.query - # # => "a=a&b=c&b=d&b=e" - # uri.query_values = [['a', 'a'], ['b', 'c'], ['b', 'd'], ['b', 'e']] - # uri.query - # # => "a=a&b=c&b=d&b=e" - # uri.query_values = [['a', 'a'], ['b', ['c', 'd', 'e']]] - # uri.query - # # => "a=a&b=c&b=d&b=e" - # uri.query_values = [['flag'], ['key', 'value']] - # uri.query - # # => "flag&key=value" - # @param new_query_values [Hash, #to_hash, Array] The new query values. - # - # source://addressable//lib/addressable/uri.rb#1730 - def query_values=(new_query_values); end - - # Determines if the URI is relative. - # - # @return [TrueClass, FalseClass] true if the URI is relative. false - # otherwise. - # - # source://addressable//lib/addressable/uri.rb#1878 - def relative?; end - - # The HTTP request URI for this URI. This is the path and the - # query string. - # - # @return [String] The request URI required for an HTTP request. - # - # source://addressable//lib/addressable/uri.rb#1781 - 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#1793 - def request_uri=(new_request_uri); end - - # Returns the shortest normalized relative form of this URI that uses the - # supplied URI as a base for resolution. Returns an absolute URI if - # necessary. This is effectively the opposite of route_to. - # - # @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#2094 - def route_from(uri); end - - # Returns the shortest normalized relative form of the supplied URI that - # uses this URI as a base for resolution. Returns an absolute URI if - # necessary. This is effectively the opposite of route_from. - # - # @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#2159 - def route_to(uri); end - - # The scheme component for this URI. - # - # @return [String] The scheme component. - # - # source://addressable//lib/addressable/uri.rb#881 - 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 - def scheme=(new_scheme); end - - # The combination of components that represent a site. - # Combines the scheme, user, password, host, and port components. - # Primarily useful for HTTP and HTTPS. - # - # For example, "http://example.com/path?query" would have a - # site value of "http://example.com". - # - # @return [String] The components that identify a site. - # - # source://addressable//lib/addressable/uri.rb#1470 - 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#1509 - def site=(new_site); end - - # Returns the top-level domain for this host. - # - # @example - # Addressable::URI.parse("http://www.example.co.uk").tld # => "co.uk" - # - # source://addressable//lib/addressable/uri.rb#1208 - 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#1216 - 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#2376 - def to_hash; end - - # Converts the URI to a String. - # - # @return [String] The URI's String representation. - # - # source://addressable//lib/addressable/uri.rb#2350 - def to_s; end - - # Converts the URI to a String. - # URI's are glorified Strings. Allow implicit conversion. - # - # @return [String] The URI's String representation. - # - # source://addressable//lib/addressable/uri.rb#2350 - def to_str; end - - # The user component for this URI. - # - # @return [String] The user component. - # - # source://addressable//lib/addressable/uri.rb#934 - 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#965 - def user=(new_user); end - - # The userinfo component for this URI. - # Combines the user and password components. - # - # @return [String] The userinfo component. - # - # source://addressable//lib/addressable/uri.rb#1051 - 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#1090 - def userinfo=(new_userinfo); end - - protected - - # Converts the string to be UTF-8 if it is not already UTF-8 - # - # @api private - # - # source://addressable//lib/addressable/uri.rb#2554 - def force_utf8_encoding_if_needed(str); end - - # Resets composite values for the entire URI - # - # @api private - # - # source://addressable//lib/addressable/uri.rb#2545 - def remove_composite_values; end - - # Replaces the internal state of self with the specified URI's state. - # Used in destructive operations to avoid massive code repetition. - # - # @param uri [Addressable::URI] The URI to replace self with. - # @return [Addressable::URI] self. - # - # source://addressable//lib/addressable/uri.rb#2508 - def replace_self(uri); end - - # Splits path string with "/" (slash). - # It is considered that there is empty string after last slash when - # path ends with slash. - # - # @param path [String] The path to split. - # @return [Array] An array of parts of path. - # - # source://addressable//lib/addressable/uri.rb#2535 - def split_path(path); end - - # Ensures that the URI is valid. - # - # source://addressable//lib/addressable/uri.rb#2465 - def validate; end - - class << self - # Converts a path to a file scheme URI. If the path supplied is - # relative, it will be returned as a relative URI. If the path supplied - # is actually a non-file URI, it will parse the URI as if it had been - # parsed with Addressable::URI.parse. Handles all of the - # various Microsoft-specific formats for specifying paths. - # - # @example - # base = Addressable::URI.convert_path("/absolute/path/") - # uri = Addressable::URI.convert_path("relative/path") - # (base + uri).to_s - # #=> "file:///absolute/path/relative/path" - # - # Addressable::URI.convert_path( - # "c:\\windows\\My Documents 100%20\\foo.txt" - # ).to_s - # #=> "file:///c:/windows/My%20Documents%20100%20/foo.txt" - # - # Addressable::URI.convert_path("http://example.com/").to_s - # #=> "http://example.com/" - # @param path [String, Addressable::URI, #to_str] Typically a String path to a file or directory, but - # will return a sensible return value if an absolute URI is supplied - # instead. - # @return [Addressable::URI] The parsed file scheme URI or the original URI if some other URI - # scheme was provided. - # - # source://addressable//lib/addressable/uri.rb#279 - def convert_path(path); end - - # Percent encodes any special characters in the URI. - # - # @param uri [String, Addressable::URI, #to_str] The URI to encode. - # @param return_type [Class] The type of object to return. - # This value may only be set to String or - # Addressable::URI. All other values are invalid. Defaults - # to String. - # @return [String, Addressable::URI] The encoded URI. - # The return type is determined by the return_type - # parameter. - # - # source://addressable//lib/addressable/uri.rb#609 - def encode(uri, return_type = T.unsafe(nil)); end - - # Percent encodes a URI component. - # - # '9' to be percent encoded. If a Regexp is passed, the - # value /[^b-zB-Z0-9]/ would have the same effect. A set of - # useful String values may be found in the - # Addressable::URI::CharacterClasses module. The default - # value is the reserved plus unreserved character classes specified in - # RFC 3986. - # - # @example - # Addressable::URI.encode_component("simple/example", "b-zB-Z0-9") - # => "simple%2Fex%61mple" - # Addressable::URI.encode_component("simple/example", /[^b-zB-Z0-9]/) - # => "simple%2Fex%61mple" - # Addressable::URI.encode_component( - # "simple/example", Addressable::URI::CharacterClasses::UNRESERVED - # ) - # => "simple%2Fexample" - # @param component [String, #to_str] The URI component to encode. - # @param character_class [String, Regexp] The characters which are not percent encoded. If a String - # is passed, the String must be formatted as a regular - # expression character class. (Do not include the surrounding square - # brackets.) For example, "b-zB-Z0-9" would cause - # everything but the letters 'b' through 'z' and the numbers '0' through - # @param upcase_encoded [Regexp] A string of characters that may already be percent encoded, and whose - # encodings should be upcased. This allows normalization of percent - # encodings for characters not included in the - # character_class. - # @return [String] The encoded component. - # - # source://addressable//lib/addressable/uri.rb#394 - def encode_component(component, character_class = T.unsafe(nil), upcase_encoded = T.unsafe(nil)); end - - # Percent encodes any special characters in the URI. - # - # @param uri [String, Addressable::URI, #to_str] The URI to encode. - # @param return_type [Class] The type of object to return. - # This value may only be set to String or - # Addressable::URI. All other values are invalid. Defaults - # to String. - # @return [String, Addressable::URI] The encoded URI. - # The return type is determined by the return_type - # parameter. - # - # source://addressable//lib/addressable/uri.rb#609 - def escape(uri, return_type = T.unsafe(nil)); end - - # Percent encodes a URI component. - # - # '9' to be percent encoded. If a Regexp is passed, the - # value /[^b-zB-Z0-9]/ would have the same effect. A set of - # useful String values may be found in the - # Addressable::URI::CharacterClasses module. The default - # value is the reserved plus unreserved character classes specified in - # RFC 3986. - # - # @example - # Addressable::URI.encode_component("simple/example", "b-zB-Z0-9") - # => "simple%2Fex%61mple" - # Addressable::URI.encode_component("simple/example", /[^b-zB-Z0-9]/) - # => "simple%2Fex%61mple" - # Addressable::URI.encode_component( - # "simple/example", Addressable::URI::CharacterClasses::UNRESERVED - # ) - # => "simple%2Fexample" - # @param component [String, #to_str] The URI component to encode. - # @param character_class [String, Regexp] The characters which are not percent encoded. If a String - # is passed, the String must be formatted as a regular - # expression character class. (Do not include the surrounding square - # brackets.) For example, "b-zB-Z0-9" would cause - # everything but the letters 'b' through 'z' and the numbers '0' through - # @param upcase_encoded [Regexp] A string of characters that may already be percent encoded, and whose - # encodings should be upcased. This allows normalization of percent - # encodings for characters not included in the - # character_class. - # @return [String] The encoded component. - # - # source://addressable//lib/addressable/uri.rb#394 - 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 - # application/x-www-form-urlencoded MIME type. - # - # @param form_values [#to_hash, #to_ary] The form values to encode. - # @param sort [TrueClass, FalseClass] Sort the key/value pairs prior to encoding. - # Defaults to false. - # @return [String] The encoded value. - # - # source://addressable//lib/addressable/uri.rb#734 - def form_encode(form_values, sort = T.unsafe(nil)); end - - # Decodes a String according to the rules for the - # application/x-www-form-urlencoded MIME type. - # - # @param encoded_value [String, #to_str] The form values to decode. - # @return [Array] The decoded values. - # This is not a Hash because of the possibility for - # duplicate keys. - # - # source://addressable//lib/addressable/uri.rb#787 - def form_unencode(encoded_value); end - - # Converts an input to a URI. The input does not have to be a valid - # URI — the method will use heuristics to guess what URI was intended. - # This is not standards-compliant, merely user-friendly. - # - # @param uri [String, Addressable::URI, #to_str] The URI string to parse. - # No parsing is performed if the object is already an - # Addressable::URI. - # @param hints [Hash] A Hash of hints to the heuristic parser. - # Defaults to {:scheme => "http"}. - # @return [Addressable::URI] The parsed URI. - # - # source://addressable//lib/addressable/uri.rb#178 - def heuristic_parse(uri, hints = T.unsafe(nil)); end - - # Returns an array of known ip-based schemes. These schemes typically - # use a similar URI form: - # //:@:/ - # - # source://addressable//lib/addressable/uri.rb#1370 - def ip_based_schemes; end - - # Joins several URIs together. - # - # @example - # base = "http://example.com/" - # uri = Addressable::URI.parse("relative/path") - # Addressable::URI.join(base, uri) - # #=> # - # @param *uris [String, Addressable::URI, #to_str] The URIs to join. - # @return [Addressable::URI] The joined URI. - # - # source://addressable//lib/addressable/uri.rb#330 - def join(*uris); end - - # Normalizes the encoding of a URI component. - # - # @example - # Addressable::URI.normalize_component("simpl%65/%65xampl%65", "b-zB-Z") - # => "simple%2Fex%61mple" - # Addressable::URI.normalize_component( - # "simpl%65/%65xampl%65", /[^b-zB-Z]/ - # ) - # => "simple%2Fex%61mple" - # Addressable::URI.normalize_component( - # "simpl%65/%65xampl%65", - # Addressable::URI::CharacterClasses::UNRESERVED - # ) - # => "simple%2Fexample" - # Addressable::URI.normalize_component( - # "one%20two%2fthree%26four", - # "0-9a-zA-Z &/", - # "/" - # ) - # => "one two%2Fthree&four" - # @param component [String, #to_str] The URI component to encode. - # @param character_class [String, Regexp] The characters which are not percent encoded. If a String - # is passed, the String must be formatted as a regular - # expression character class. (Do not include the surrounding square - # brackets.) For example, "b-zB-Z0-9" would cause - # everything but the letters 'b' through 'z' and the numbers '0' - # through '9' to be percent encoded. If a Regexp is passed, - # the value /[^b-zB-Z0-9]/ would have the same effect. A - # set of useful String values may be found in the - # Addressable::URI::CharacterClasses module. The default - # value is the reserved plus unreserved character classes specified in - # RFC 3986. - # @param leave_encoded [String] When character_class is a String then - # leave_encoded is a string of characters that should remain - # percent encoded while normalizing the component; if they appear percent - # encoded in the original component, then they will be upcased ("%2f" - # normalized to "%2F") but otherwise left alone. - # @return [String] The normalized component. - # - # source://addressable//lib/addressable/uri.rb#544 - def normalize_component(component, character_class = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end - - # Resolves paths to their simplest form. - # - # @param path [String] The path to normalize. - # @return [String] The normalized path. - # - # source://addressable//lib/addressable/uri.rb#2429 - def normalize_path(path); end - - # Normalizes the encoding of a URI. Characters within a hostname are - # not percent encoded to allow for internationalized domain names. - # - # @param uri [String, Addressable::URI, #to_str] The URI to encode. - # @param return_type [Class] The type of object to return. - # This value may only be set to String or - # Addressable::URI. All other values are invalid. Defaults - # to String. - # @return [String, Addressable::URI] The encoded URI. - # The return type is determined by the return_type - # parameter. - # - # source://addressable//lib/addressable/uri.rb#664 - def normalized_encode(uri, return_type = T.unsafe(nil)); end - - # Returns a URI object based on the parsed string. - # - # @param uri [String, Addressable::URI, #to_str] The URI string to parse. - # No parsing is performed if the object is already an - # Addressable::URI. - # @return [Addressable::URI] The parsed URI. - # - # source://addressable//lib/addressable/uri.rb#101 - def parse(uri); end - - # Returns a hash of common IP-based schemes and their default port - # numbers. Adding new schemes to this hash, as necessary, will allow - # for better URI normalization. - # - # source://addressable//lib/addressable/uri.rb#1377 - def port_mapping; end - - # Unencodes any percent encoded characters within a URI component. - # This method may be used for unencoding either components or full URIs, - # however, it is recommended to use the unencode_component - # alias when unencoding components. - # - # @param uri [String, Addressable::URI, #to_str] The URI or component to unencode. - # @param return_type [Class] The type of object to return. - # This value may only be set to String or - # Addressable::URI. All other values are invalid. Defaults - # to String. - # @param leave_encoded [String] A string of characters to leave encoded. If a percent encoded character - # in this list is encountered then it will remain percent encoded. - # @return [String, Addressable::URI] The unencoded component or URI. - # The return type is determined by the return_type - # parameter. - # - # source://addressable//lib/addressable/uri.rb#464 - def unencode(uri, return_type = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end - - # Unencodes any percent encoded characters within a URI component. - # This method may be used for unencoding either components or full URIs, - # however, it is recommended to use the unencode_component - # alias when unencoding components. - # - # @param uri [String, Addressable::URI, #to_str] The URI or component to unencode. - # @param return_type [Class] The type of object to return. - # This value may only be set to String or - # Addressable::URI. All other values are invalid. Defaults - # to String. - # @param leave_encoded [String] A string of characters to leave encoded. If a percent encoded character - # in this list is encountered then it will remain percent encoded. - # @return [String, Addressable::URI] The unencoded component or URI. - # The return type is determined by the return_type - # parameter. - # - # source://addressable//lib/addressable/uri.rb#464 - def unencode_component(uri, return_type = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end - - # Unencodes any percent encoded characters within a URI component. - # This method may be used for unencoding either components or full URIs, - # however, it is recommended to use the unencode_component - # alias when unencoding components. - # - # @param uri [String, Addressable::URI, #to_str] The URI or component to unencode. - # @param return_type [Class] The type of object to return. - # This value may only be set to String or - # Addressable::URI. All other values are invalid. Defaults - # to String. - # @param leave_encoded [String] A string of characters to leave encoded. If a percent encoded character - # in this list is encountered then it will remain percent encoded. - # @return [String, Addressable::URI] The unencoded component or URI. - # The return type is determined by the return_type - # parameter. - # - # source://addressable//lib/addressable/uri.rb#464 - def unescape(uri, return_type = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end - - # Unencodes any percent encoded characters within a URI component. - # This method may be used for unencoding either components or full URIs, - # however, it is recommended to use the unencode_component - # alias when unencoding components. - # - # @param uri [String, Addressable::URI, #to_str] The URI or component to unencode. - # @param return_type [Class] The type of object to return. - # This value may only be set to String or - # Addressable::URI. All other values are invalid. Defaults - # to String. - # @param leave_encoded [String] A string of characters to leave encoded. If a percent encoded character - # in this list is encountered then it will remain percent encoded. - # @return [String, Addressable::URI] The unencoded component or URI. - # The return type is determined by the return_type - # parameter. - # - # source://addressable//lib/addressable/uri.rb#464 - def unescape_component(uri, return_type = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end - end -end - -# Container for the character classes specified in -# RFC 3986. -# -# Note: Concatenated and interpolated `String`s are not affected by the -# `frozen_string_literal` directive and must be frozen explicitly. -# -# Interpolated `String`s *were* frozen this way before Ruby 3.0: -# https://bugs.ruby-lang.org/issues/17104 -# -# source://addressable//lib/addressable/uri.rb#46 -module Addressable::URI::CharacterClasses; end - -# source://addressable//lib/addressable/uri.rb#47 -Addressable::URI::CharacterClasses::ALPHA = T.let(T.unsafe(nil), String) - -# source://addressable//lib/addressable/uri.rb#56 -Addressable::URI::CharacterClasses::AUTHORITY = T.let(T.unsafe(nil), String) - -# source://addressable//lib/addressable/uri.rb#48 -Addressable::URI::CharacterClasses::DIGIT = T.let(T.unsafe(nil), String) - -# source://addressable//lib/addressable/uri.rb#59 -Addressable::URI::CharacterClasses::FRAGMENT = T.let(T.unsafe(nil), String) - -# source://addressable//lib/addressable/uri.rb#49 -Addressable::URI::CharacterClasses::GEN_DELIMS = T.let(T.unsafe(nil), String) - -# source://addressable//lib/addressable/uri.rb#55 -Addressable::URI::CharacterClasses::HOST = T.let(T.unsafe(nil), String) - -# source://addressable//lib/addressable/uri.rb#57 -Addressable::URI::CharacterClasses::PATH = T.let(T.unsafe(nil), String) - -# source://addressable//lib/addressable/uri.rb#53 -Addressable::URI::CharacterClasses::PCHAR = T.let(T.unsafe(nil), String) - -# source://addressable//lib/addressable/uri.rb#58 -Addressable::URI::CharacterClasses::QUERY = T.let(T.unsafe(nil), String) - -# source://addressable//lib/addressable/uri.rb#51 -Addressable::URI::CharacterClasses::RESERVED = T.let(T.unsafe(nil), String) - -# source://addressable//lib/addressable/uri.rb#54 -Addressable::URI::CharacterClasses::SCHEME = T.let(T.unsafe(nil), String) - -# source://addressable//lib/addressable/uri.rb#50 -Addressable::URI::CharacterClasses::SUB_DELIMS = T.let(T.unsafe(nil), String) - -# source://addressable//lib/addressable/uri.rb#52 -Addressable::URI::CharacterClasses::UNRESERVED = T.let(T.unsafe(nil), String) - -# source://addressable//lib/addressable/uri.rb#72 -Addressable::URI::EMPTY_STR = T.let(T.unsafe(nil), String) - -# Raised if something other than a uri is supplied. -# -# source://addressable//lib/addressable/uri.rb#34 -class Addressable::URI::InvalidURIError < ::StandardError; end - -# source://addressable//lib/addressable/uri.rb#1535 -Addressable::URI::NORMPATH = T.let(T.unsafe(nil), Regexp) - -# source://addressable//lib/addressable/uri.rb#62 -module Addressable::URI::NormalizeCharacterClasses; end - -# source://addressable//lib/addressable/uri.rb#67 -Addressable::URI::NormalizeCharacterClasses::FRAGMENT = T.let(T.unsafe(nil), Regexp) - -# source://addressable//lib/addressable/uri.rb#63 -Addressable::URI::NormalizeCharacterClasses::HOST = T.let(T.unsafe(nil), Regexp) - -# source://addressable//lib/addressable/uri.rb#65 -Addressable::URI::NormalizeCharacterClasses::PCHAR = T.let(T.unsafe(nil), Regexp) - -# source://addressable//lib/addressable/uri.rb#68 -Addressable::URI::NormalizeCharacterClasses::QUERY = T.let(T.unsafe(nil), Regexp) - -# source://addressable//lib/addressable/uri.rb#66 -Addressable::URI::NormalizeCharacterClasses::SCHEME = T.let(T.unsafe(nil), Regexp) - -# source://addressable//lib/addressable/uri.rb#64 -Addressable::URI::NormalizeCharacterClasses::UNRESERVED = T.let(T.unsafe(nil), Regexp) - -# 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#2418 -Addressable::URI::RULE_2A = T.let(T.unsafe(nil), Regexp) - -# source://addressable//lib/addressable/uri.rb#2419 -Addressable::URI::RULE_2B_2C = T.let(T.unsafe(nil), Regexp) - -# source://addressable//lib/addressable/uri.rb#2420 -Addressable::URI::RULE_2D = T.let(T.unsafe(nil), Regexp) - -# source://addressable//lib/addressable/uri.rb#2421 -Addressable::URI::RULE_PREFIXED_PARENT = T.let(T.unsafe(nil), Regexp) - -# 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) - -# 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#71 -Addressable::URI::SLASH = T.let(T.unsafe(nil), String) - -# source://addressable//lib/addressable/uri.rb#74 -Addressable::URI::URIREGEX = T.let(T.unsafe(nil), Regexp) - -# source://addressable//lib/addressable/version.rb#23 -module Addressable::VERSION; end - -# source://addressable//lib/addressable/version.rb#24 -Addressable::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) - -# source://addressable//lib/addressable/version.rb#25 -Addressable::VERSION::MINOR = T.let(T.unsafe(nil), Integer) - -# source://addressable//lib/addressable/version.rb#28 -Addressable::VERSION::STRING = T.let(T.unsafe(nil), String) - -# source://addressable//lib/addressable/version.rb#26 -Addressable::VERSION::TINY = T.let(T.unsafe(nil), Integer) diff --git a/sorbet/rbi/gems/ast@2.4.2.rbi b/sorbet/rbi/gems/ast@2.4.2.rbi deleted file mode 100644 index 3fc4495..0000000 --- a/sorbet/rbi/gems/ast@2.4.2.rbi +++ /dev/null @@ -1,584 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `ast` gem. -# Please instead update this file by running `bin/tapioca gem ast`. - -# {AST} is a library for manipulating abstract syntax trees. -# -# It embraces immutability; each AST node is inherently frozen at -# creation, and updating a child node requires recreating that node -# and its every parent, recursively. -# This is a design choice. It does create some pressure on -# garbage collector, but completely eliminates all concurrency -# and aliasing problems. -# -# See also {AST::Node}, {AST::Processor::Mixin} and {AST::Sexp} for -# additional recommendations and design patterns. -# -# source://ast//lib/ast.rb#13 -module AST; end - -# Node is an immutable class, instances of which represent abstract -# syntax tree nodes. It combines semantic information (i.e. anything -# that affects the algorithmic properties of a program) with -# meta-information (line numbers or compiler intermediates). -# -# Notes on inheritance -# ==================== -# -# The distinction between semantics and metadata is important. Complete -# semantic information should be contained within just the {#type} and -# {#children} of a Node instance; in other words, if an AST was to be -# stripped of all meta-information, it should remain a valid AST which -# could be successfully processed to yield a result with the same -# algorithmic properties. -# -# Thus, Node should never be inherited in order to define methods which -# affect or return semantic information, such as getters for `class_name`, -# `superclass` and `body` in the case of a hypothetical `ClassNode`. The -# correct solution is to use a generic Node with a {#type} of `:class` -# and three children. See also {Processor} for tips on working with such -# ASTs. -# -# On the other hand, Node can and should be inherited to define -# application-specific metadata (see also {#initialize}) or customize the -# printing format. It is expected that an application would have one or two -# such classes and use them across the entire codebase. -# -# The rationale for this pattern is extensibility and maintainability. -# Unlike static ones, dynamic languages do not require the presence of a -# predefined, rigid structure, nor does it improve dispatch efficiency, -# and while such a structure can certainly be defined, it does not add -# any value but incurs a maintaining cost. -# For example, extending the AST even with a transformation-local -# temporary node type requires making globally visible changes to -# the codebase. -# -# source://ast//lib/ast/node.rb#40 -class AST::Node - # Constructs a new instance of Node. - # - # The arguments `type` and `children` are converted with `to_sym` and - # `to_a` respectively. Additionally, the result of converting `children` - # is frozen. While mutating the arguments is generally considered harmful, - # the most common case is to pass an array literal to the constructor. If - # your code does not expect the argument to be frozen, use `#dup`. - # - # The `properties` hash is passed to {#assign_properties}. - # - # @return [Node] a new instance of Node - # - # source://ast//lib/ast/node.rb#72 - def initialize(type, children = T.unsafe(nil), properties = T.unsafe(nil)); end - - # Concatenates `array` with `children` and returns the resulting node. - # - # @return [AST::Node] - # - # source://ast//lib/ast/node.rb#168 - def +(array); end - - # Appends `element` to `children` and returns the resulting node. - # - # @return [AST::Node] - # - # source://ast//lib/ast/node.rb#177 - def <<(element); end - - # Compares `self` to `other`, possibly converting with `to_ast`. Only - # `type` and `children` are compared; metadata is deliberately ignored. - # - # @return [Boolean] - # - # source://ast//lib/ast/node.rb#153 - def ==(other); end - - # Appends `element` to `children` and returns the resulting node. - # - # @return [AST::Node] - # - # source://ast//lib/ast/node.rb#177 - def append(element); end - - # Returns the children of this node. - # The returned value is frozen. - # The to_a alias is useful for decomposing nodes concisely. - # For example: - # - # node = s(:gasgn, :$foo, s(:integer, 1)) - # var_name, value = *node - # p var_name # => :$foo - # p value # => (integer 1) - # - # @return [Array] - # - # source://ast//lib/ast/node.rb#56 - def children; end - - # Nodes are already frozen, so there is no harm in returning the - # current node as opposed to initializing from scratch and freezing - # another one. - # - # @return self - # - # source://ast//lib/ast/node.rb#115 - def clone; end - - # Concatenates `array` with `children` and returns the resulting node. - # - # @return [AST::Node] - # - # source://ast//lib/ast/node.rb#168 - def concat(array); end - - # Enables matching for Node, where type is the first element - # and the children are remaining items. - # - # @return [Array] - # - # source://ast//lib/ast/node.rb#253 - def deconstruct; end - - # Nodes are already frozen, so there is no harm in returning the - # current node as opposed to initializing from scratch and freezing - # another one. - # - # @return self - # - # source://ast//lib/ast/node.rb#115 - def dup; end - - # Test if other object is equal to - # - # @param other [Object] - # @return [Boolean] - # - # source://ast//lib/ast/node.rb#85 - def eql?(other); end - - # Returns the precomputed hash value for this node - # - # @return [Fixnum] - # - # source://ast//lib/ast/node.rb#61 - def hash; end - - # Converts `self` to a s-expression ruby string. - # The code return will recreate the node, using the sexp module s() - # - # @param indent [Integer] Base indentation level. - # @return [String] - # - # source://ast//lib/ast/node.rb#211 - def inspect(indent = T.unsafe(nil)); end - - # Returns the children of this node. - # The returned value is frozen. - # The to_a alias is useful for decomposing nodes concisely. - # For example: - # - # node = s(:gasgn, :$foo, s(:integer, 1)) - # var_name, value = *node - # p var_name # => :$foo - # p value # => (integer 1) - # - # @return [Array] - # - # source://ast//lib/ast/node.rb#56 - def to_a; end - - # @return [AST::Node] self - # - # source://ast//lib/ast/node.rb#229 - def to_ast; end - - # Converts `self` to a pretty-printed s-expression. - # - # @param indent [Integer] Base indentation level. - # @return [String] - # - # source://ast//lib/ast/node.rb#187 - def to_s(indent = T.unsafe(nil)); end - - # Converts `self` to a pretty-printed s-expression. - # - # @param indent [Integer] Base indentation level. - # @return [String] - # - # source://ast//lib/ast/node.rb#187 - def to_sexp(indent = T.unsafe(nil)); end - - # Converts `self` to an Array where the first element is the type as a Symbol, - # and subsequent elements are the same representation of its children. - # - # @return [Array] - # - # source://ast//lib/ast/node.rb#237 - def to_sexp_array; end - - # Returns the type of this node. - # - # @return [Symbol] - # - # source://ast//lib/ast/node.rb#43 - def type; end - - # Returns a new instance of Node where non-nil arguments replace the - # corresponding fields of `self`. - # - # For example, `Node.new(:foo, [ 1, 2 ]).updated(:bar)` would yield - # `(bar 1 2)`, and `Node.new(:foo, [ 1, 2 ]).updated(nil, [])` would - # yield `(foo)`. - # - # If the resulting node would be identical to `self`, does nothing. - # - # @param type [Symbol, nil] - # @param children [Array, nil] - # @param properties [Hash, nil] - # @return [AST::Node] - # - # source://ast//lib/ast/node.rb#133 - def updated(type = T.unsafe(nil), children = T.unsafe(nil), properties = T.unsafe(nil)); end - - protected - - # By default, each entry in the `properties` hash is assigned to - # an instance variable in this instance of Node. A subclass should define - # attribute readers for such variables. The values passed in the hash - # are not frozen or whitelisted; such behavior can also be implemented - # by subclassing Node and overriding this method. - # - # @return [nil] - # - # source://ast//lib/ast/node.rb#98 - def assign_properties(properties); end - - # Returns `@type` with all underscores replaced by dashes. This allows - # to write symbol literals without quotes in Ruby sources and yet have - # nicely looking s-expressions. - # - # @return [String] - # - # source://ast//lib/ast/node.rb#264 - def fancy_type; end - - private - - def original_dup; end -end - -# This class includes {AST::Processor::Mixin}; however, it is -# deprecated, since the module defines all of the behaviors that -# the processor includes. Any new libraries should use -# {AST::Processor::Mixin} instead of subclassing this. -# -# @deprecated Use {AST::Processor::Mixin} instead. -# -# source://ast//lib/ast/processor.rb#8 -class AST::Processor - include ::AST::Processor::Mixin -end - -# The processor module is a module which helps transforming one -# AST into another. In a nutshell, the {#process} method accepts -# a {Node} and dispatches it to a handler corresponding to its -# type, and returns a (possibly) updated variant of the node. -# -# The processor module has a set of associated design patterns. -# They are best explained with a concrete example. Let's define a -# simple arithmetic language and an AST format for it: -# -# Terminals (AST nodes which do not have other AST nodes inside): -# -# * `(integer )`, -# -# Nonterminals (AST nodes with other nodes as children): -# -# * `(add )`, -# * `(multiply )`, -# * `(divide )`, -# * `(negate )`, -# * `(store )`: stores value of `` -# into a variable named ``, -# * `(load )`: loads value of a variable named -# ``, -# * `(each ...)`: computes each of the ``s and -# prints the result. -# -# All AST nodes have the same Ruby class, and therefore they don't -# know how to traverse themselves. (A solution which dynamically -# checks the type of children is possible, but is slow and -# error-prone.) So, a class including the module which knows how -# to traverse the entire tree should be defined. Such classes -# have a handler for each nonterminal node which recursively -# processes children nodes: -# -# require 'ast' -# -# class ArithmeticsProcessor -# include AST::Processor::Mixin -# # This method traverses any binary operators such as (add) -# # or (multiply). -# def process_binary_op(node) -# # Children aren't decomposed automatically; it is -# # suggested to use Ruby multiple assignment expansion, -# # as it is very convenient here. -# left_expr, right_expr = *node -# -# # AST::Node#updated won't change node type if nil is -# # passed as a first argument, which allows to reuse the -# # same handler for multiple node types using `alias' -# # (below). -# node.updated(nil, [ -# process(left_expr), -# process(right_expr) -# ]) -# end -# alias_method :on_add, :process_binary_op -# alias_method :on_multiply, :process_binary_op -# alias_method :on_divide, :process_binary_op -# -# def on_negate(node) -# # It is also possible to use #process_all for more -# # compact code if every child is a Node. -# node.updated(nil, process_all(node)) -# end -# -# def on_store(node) -# expr, variable_name = *node -# -# # Note that variable_name is not a Node and thus isn't -# # passed to #process. -# node.updated(nil, [ -# process(expr), -# variable_name -# ]) -# end -# -# # (load) is effectively a terminal node, and so it does -# # not need an explicit handler, as the following is the -# # default behavior. Essentially, for any nodes that don't -# # have a defined handler, the node remains unchanged. -# def on_load(node) -# nil -# end -# -# def on_each(node) -# node.updated(nil, process_all(node)) -# end -# end -# -# Let's test our ArithmeticsProcessor: -# -# include AST::Sexp -# expr = s(:add, s(:integer, 2), s(:integer, 2)) -# -# p ArithmeticsProcessor.new.process(expr) == expr # => true -# -# As expected, it does not change anything at all. This isn't -# actually very useful, so let's now define a Calculator, which -# will compute the expression values: -# -# # This Processor folds nonterminal nodes and returns an -# # (integer) terminal node. -# class ArithmeticsCalculator < ArithmeticsProcessor -# def compute_op(node) -# # First, node children are processed and then unpacked -# # to local variables. -# nodes = process_all(node) -# -# if nodes.all? { |node| node.type == :integer } -# # If each of those nodes represents a literal, we can -# # fold this node! -# values = nodes.map { |node| node.children.first } -# AST::Node.new(:integer, [ -# yield(values) -# ]) -# else -# # Otherwise, we can just leave the current node in the -# # tree and only update it with processed children -# # nodes, which can be partially folded. -# node.updated(nil, nodes) -# end -# end -# -# def on_add(node) -# compute_op(node) { |left, right| left + right } -# end -# -# def on_multiply(node) -# compute_op(node) { |left, right| left * right } -# end -# end -# -# Let's check: -# -# p ArithmeticsCalculator.new.process(expr) # => (integer 4) -# -# Excellent, the calculator works! Now, a careful reader could -# notice that the ArithmeticsCalculator does not know how to -# divide numbers. What if we pass an expression with division to -# it? -# -# expr_with_division = \ -# s(:add, -# s(:integer, 1), -# s(:divide, -# s(:add, s(:integer, 8), s(:integer, 4)), -# s(:integer, 3))) # 1 + (8 + 4) / 3 -# -# folded_expr_with_division = ArithmeticsCalculator.new.process(expr_with_division) -# p folded_expr_with_division -# # => (add -# # (integer 1) -# # (divide -# # (integer 12) -# # (integer 3))) -# -# As you can see, the expression was folded _partially_: the inner -# `(add)` node which could be computed was folded to -# `(integer 12)`, the `(divide)` node is left as-is because there -# is no computing handler for it, and the root `(add)` node was -# also left as it is because some of its children were not -# literals. -# -# Note that this partial folding is only possible because the -# _data_ format, i.e. the format in which the computed values of -# the nodes are represented, is the same as the AST itself. -# -# Let's extend our ArithmeticsCalculator class further. -# -# class ArithmeticsCalculator -# def on_divide(node) -# compute_op(node) { |left, right| left / right } -# end -# -# def on_negate(node) -# # Note how #compute_op works regardless of the operator -# # arity. -# compute_op(node) { |value| -value } -# end -# end -# -# Now, let's apply our renewed ArithmeticsCalculator to a partial -# result of previous evaluation: -# -# p ArithmeticsCalculator.new.process(expr_with_division) # => (integer 5) -# -# Five! Excellent. This is also pretty much how CRuby 1.8 executed -# its programs. -# -# Now, let's do some automated bug searching. Division by zero is -# an error, right? So if we could detect that someone has divided -# by zero before the program is even run, that could save some -# debugging time. -# -# class DivisionByZeroVerifier < ArithmeticsProcessor -# class VerificationFailure < Exception; end -# -# def on_divide(node) -# # You need to process the children to handle nested divisions -# # such as: -# # (divide -# # (integer 1) -# # (divide (integer 1) (integer 0)) -# left, right = process_all(node) -# -# if right.type == :integer && -# right.children.first == 0 -# raise VerificationFailure, "Ouch! This code divides by zero." -# end -# end -# -# def divides_by_zero?(ast) -# process(ast) -# false -# rescue VerificationFailure -# true -# end -# end -# -# nice_expr = \ -# s(:divide, -# s(:add, s(:integer, 10), s(:integer, 2)), -# s(:integer, 4)) -# -# p DivisionByZeroVerifier.new.divides_by_zero?(nice_expr) -# # => false. Good. -# -# bad_expr = \ -# s(:add, s(:integer, 10), -# s(:divide, s(:integer, 1), s(:integer, 0))) -# -# p DivisionByZeroVerifier.new.divides_by_zero?(bad_expr) -# # => true. WHOOPS. DO NOT RUN THIS. -# -# Of course, this won't detect more complex cases... unless you -# use some partial evaluation before! The possibilites are -# endless. Have fun. -# -# source://ast//lib/ast/processor/mixin.rb#240 -module AST::Processor::Mixin - # Default handler. Does nothing. - # - # @param node [AST::Node] - # @return [AST::Node, nil] - # - # source://ast//lib/ast/processor/mixin.rb#284 - def handler_missing(node); end - - # Dispatches `node`. If a node has type `:foo`, then a handler - # named `on_foo` is invoked with one argument, the `node`; if - # there isn't such a handler, {#handler_missing} is invoked - # with the same argument. - # - # If the handler returns `nil`, `node` is returned; otherwise, - # the return value of the handler is passed along. - # - # @param node [AST::Node, nil] - # @return [AST::Node, nil] - # - # source://ast//lib/ast/processor/mixin.rb#251 - def process(node); end - - # {#process}es each node from `nodes` and returns an array of - # results. - # - # @param nodes [Array] - # @return [Array] - # - # source://ast//lib/ast/processor/mixin.rb#274 - def process_all(nodes); end -end - -# This simple module is very useful in the cases where one needs -# to define deeply nested ASTs from Ruby code, for example, in -# tests. It should be used like this: -# -# describe YourLanguage::AST do -# include Sexp -# -# it "should correctly parse expressions" do -# YourLanguage.parse("1 + 2 * 3").should == -# s(:add, -# s(:integer, 1), -# s(:multiply, -# s(:integer, 2), -# s(:integer, 3))) -# end -# end -# -# This way the amount of boilerplate code is greatly reduced. -# -# source://ast//lib/ast/sexp.rb#20 -module AST::Sexp - # Creates a {Node} with type `type` and children `children`. - # Note that the resulting node is of the type AST::Node and not a - # subclass. - # This would not pose a problem with comparisons, as {Node#==} - # ignores metadata. - # - # source://ast//lib/ast/sexp.rb#26 - def s(type, *children); end -end diff --git a/sorbet/rbi/gems/backport@1.2.0.rbi b/sorbet/rbi/gems/backport@1.2.0.rbi deleted file mode 100644 index 7595d38..0000000 --- a/sorbet/rbi/gems/backport@1.2.0.rbi +++ /dev/null @@ -1,522 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `backport` gem. -# Please instead update this file by running `bin/tapioca gem backport`. - -# An event-driven IO library. -# -# source://backport//lib/backport/version.rb#1 -module Backport - class << self - # @return [Logger] - # - # source://backport//lib/backport.rb#75 - def logger; end - - # Prepare an interval server to run in Backport. - # - # @param period [Float] Seconds between intervals - # @return [void] - # - # source://backport//lib/backport.rb#35 - def prepare_interval(period, &block); end - - # Prepare a STDIO server to run in Backport. - # - # @param adapter [Adapter] - # @return [void] - # - # source://backport//lib/backport.rb#17 - def prepare_stdio_server(adapter: T.unsafe(nil)); end - - # Prepare a TCP server to run in Backport. - # - # @param host [String] - # @param port [Integer] - # @param adapter [Adapter] - # @return [void] - # - # source://backport//lib/backport.rb#27 - def prepare_tcp_server(host: T.unsafe(nil), port: T.unsafe(nil), adapter: T.unsafe(nil)); end - - # Run the Backport machine. The provided block will be executed before the - # machine starts. Program execution is blocked until the machine stops. - # - # @example Print "tick" once per second - # Backport.run do - # Backport.prepare_interval 1 do - # puts "tick" - # end - # end - # @return [void] - # - # source://backport//lib/backport.rb#50 - def run(&block); end - - # Stop all running Backport machines. - # - # For more accurate control, consider stopping the machine - # from the self reference in Machine#run, e.g.: - # - # ``` - # Backport.run do |machine| - # # ... - # machine.stop - # end - # ``` - # - # @return [void] - # - # source://backport//lib/backport.rb#70 - def stop; end - - private - - # @return [Array] - # - # source://backport//lib/backport.rb#82 - def machines; end - end -end - -# The application interface between Backport servers and clients. -# -# source://backport//lib/backport/adapter.rb#4 -class Backport::Adapter - # @param output [IO] - # @param remote [Hash{Symbol => String, Integer}] - # @return [Adapter] a new instance of Adapter - # - # source://backport//lib/backport/adapter.rb#7 - def initialize(output, remote = T.unsafe(nil)); end - - # Close the client connection. - # - # @note The adapter sets #closed? to true and runs the #closing callback. - # The server is responsible for implementation details like closing the - # client's socket. - # @return [void] - # - # source://backport//lib/backport/adapter.rb#80 - def close; end - - # @return [Boolean] - # - # source://backport//lib/backport/adapter.rb#69 - def closed?; end - - # A callback triggered when a client connection is closing. Subclasses - # and/or modules should override this method to provide their own - # functionality. - # - # @return [void] - # - # source://backport//lib/backport/adapter.rb#41 - def closing; end - - # A callback triggered when a client connection is opening. Subclasses - # and/or modules should override this method to provide their own - # functionality. - # - # @return [void] - # - # source://backport//lib/backport/adapter.rb#34 - def opening; end - - # A callback triggered when the server receives data from the client. - # Subclasses and/or modules should override this method to provide their - # own functionality. - # - # @param data [String] - # @return [void] - # - # source://backport//lib/backport/adapter.rb#49 - def receiving(data); end - - # A hash of information about the client connection. The data can vary - # based on the transport, e.g., :hostname and :address for TCP connections - # or :filename for file streams. - # - # @return [Hash{Symbol => String, Integer}] - # - # source://backport//lib/backport/adapter.rb#25 - def remote; end - - # Send data to the client. - # - # @param data [String] - # @return [void] - # - # source://backport//lib/backport/adapter.rb#55 - def write(data); end - - # Send a line of data to the client. - # - # @param data [String] - # @return [void] - # - # source://backport//lib/backport/adapter.rb#64 - def write_line(data); end -end - -# A client connected to a connectable Backport server. -# -# source://backport//lib/backport/client.rb#6 -class Backport::Client - include ::Observable - - # @param input [IO] - # @param output [IO] - # @param adapter [Class, Module] - # @param remote [Hash] - # @return [Client] a new instance of Client - # - # source://backport//lib/backport/client.rb#16 - def initialize(input, output, adapter, remote = T.unsafe(nil)); end - - # @return [Adapter] - # - # source://backport//lib/backport/client.rb#10 - def adapter; end - - # Start running the client. This method will start the thread that reads - # client input from IO. - # - # @deprecated Prefer #start to #run for non-blocking client/server methods - # @return [void] - # - # source://backport//lib/backport/client.rb#50 - def run; end - - # Start running the client. This method will start the thread that reads - # client input from IO. - # - # @return [void] - # - # source://backport//lib/backport/client.rb#50 - def start; end - - # Close the client connection. - # - # callback. The server is responsible for implementation details like - # closing the client's socket. - # - # @note The client sets #stopped? to true and runs the adapter's #closing - # @return [void] - # - # source://backport//lib/backport/client.rb#38 - def stop; end - - # True if the client is stopped. - # - # @return [Boolean] - # - # source://backport//lib/backport/client.rb#27 - def stopped?; end - - # Handle a tick from the server. This method will check for client input - # and update the adapter accordingly, or stop the client if the adapter is - # closed. - # - # @return [void] - # - # source://backport//lib/backport/client.rb#64 - def tick; end - - private - - # @param mod_cls [Module, Class] The Adapter module or class - # @param remote [Hash] Remote client data - # @return [Adapter] - # - # source://backport//lib/backport/client.rb#86 - def make_adapter(mod_cls, remote); end - - # @return [Mutex] - # - # source://backport//lib/backport/client.rb#98 - def mutex; end - - # Read the client input. Return nil if the input buffer is empty. - # - # @return [String, nil] - # - # source://backport//lib/backport/client.rb#74 - def read; end - - # Read input from the client. - # - # @return [void] - # - # source://backport//lib/backport/client.rb#112 - def read_input; end - - # Start the thread that checks the input IO for client data. - # - # @return [void] - # - # source://backport//lib/backport/client.rb#103 - def run_input_thread; end -end - -# The Backport server controller. -# -# source://backport//lib/backport/machine.rb#4 -class Backport::Machine - # @return [Machine] a new instance of Machine - # - # source://backport//lib/backport/machine.rb#5 - def initialize; end - - # Add a server to the machine. The server will be started when the machine - # starts. If the machine is already running, the server will be started - # immediately. - # - # @param server [Server::Base] - # @return [void] - # - # source://backport//lib/backport/machine.rb#45 - def prepare(server); end - - # Run the machine. If a block is provided, it gets executed before the - # maching starts its main loop. The main loop blocks program execution - # until the machine is stopped. - # - # @return [void] - # @yieldparam [self] - # - # source://backport//lib/backport/machine.rb#16 - def run; end - - # @return [Array] - # - # source://backport//lib/backport/machine.rb#52 - def servers; end - - # Stop the machine. - # - # @return [void] - # - # source://backport//lib/backport/machine.rb#27 - def stop; end - - # True if the machine is stopped. - # - # @return [Boolean] - # - # source://backport//lib/backport/machine.rb#35 - def stopped?; end - - # @param server [Server::Base] - # @return [void] - # - # source://backport//lib/backport/machine.rb#58 - def update(server); end - - private - - # @return [Mutex] - # - # source://backport//lib/backport/machine.rb#70 - def mutex; end - - # Start the thread that updates servers via the #tick method. - # - # @return [void] - # - # source://backport//lib/backport/machine.rb#75 - def run_server_thread; end -end - -# Classes and modules for Backport servers. -# -# source://backport//lib/backport/server.rb#4 -module Backport::Server; end - -# An extendable server class that provides basic start/stop functionality -# and common callbacks. -# -# source://backport//lib/backport/server/base.rb#8 -class Backport::Server::Base - include ::Observable - - # Start the server. - # - # @return [void] - # - # source://backport//lib/backport/server/base.rb#14 - def start; end - - # @return [Boolean] - # - # source://backport//lib/backport/server/base.rb#31 - def started?; end - - # A callback triggered when a Machine starts running or the server is - # added to a running machine. Subclasses should override this method to - # provide their own functionality. - # - # @return [void] - # - # source://backport//lib/backport/server/base.rb#44 - def starting; end - - # Stop the server. - # - # @return [void] - # - # source://backport//lib/backport/server/base.rb#23 - def stop; end - - # @return [Boolean] - # - # source://backport//lib/backport/server/base.rb#35 - def stopped?; end - - # A callback triggered when the server is stopping. Subclasses should - # override this method to provide their own functionality. - # - # @return [void] - # - # source://backport//lib/backport/server/base.rb#50 - def stopping; end - - # A callback triggered from the main loop of a running Machine. - # Subclasses should override this method to provide their own - # functionality. - # - # @return [void] - # - # source://backport//lib/backport/server/base.rb#57 - def tick; end -end - -# A mixin for Backport servers that communicate with clients. -# -# Connectable servers check clients for incoming data on each tick. -# -# source://backport//lib/backport/server/connectable.rb#7 -module Backport::Server::Connectable - # @return [Array] - # - # source://backport//lib/backport/server/connectable.rb#19 - def clients; end - - # @return [void] - # - # source://backport//lib/backport/server/connectable.rb#9 - def starting; end - - # @return [void] - # - # source://backport//lib/backport/server/connectable.rb#14 - def stopping; end - - private - - # @return [Mutex] - # - # source://backport//lib/backport/server/connectable.rb#26 - def mutex; end -end - -# A Backport periodical interval server. -# -# source://backport//lib/backport/server/interval.rb#8 -class Backport::Server::Interval < ::Backport::Server::Base - # @param period [Float] The interval time in seconds. - # @param block [Proc] The proc to run on each interval. - # @return [Interval] a new instance of Interval - # @yieldparam [Interval] - # - # source://backport//lib/backport/server/interval.rb#9 - def initialize(period, &block); end - - # source://backport//lib/backport/server/interval.rb#16 - def starting; end - - # source://backport//lib/backport/server/interval.rb#21 - def tick; end - - private - - # @return [void] - # - # source://backport//lib/backport/server/interval.rb#32 - def run_ready_thread; end -end - -# A Backport STDIO server. -# -# source://backport//lib/backport/server/stdio.rb#5 -class Backport::Server::Stdio < ::Backport::Server::Base - include ::Backport::Server::Connectable - - # @param input [IO] - # @param output [IO] - # @param adapter [Module, Class] - # @return [Stdio] a new instance of Stdio - # - # source://backport//lib/backport/server/stdio.rb#11 - def initialize(input: T.unsafe(nil), output: T.unsafe(nil), adapter: T.unsafe(nil)); end - - # @param client [Client] - # @return [void] - # - # source://backport//lib/backport/server/stdio.rb#22 - def update(client); end -end - -# A Backport TCP server. It runs a thread to accept incoming connections -# and automatically stops when the socket is closed. -# -# source://backport//lib/backport/server/tcpip.rb#8 -class Backport::Server::Tcpip < ::Backport::Server::Base - include ::Backport::Server::Connectable - - # @param host [String] - # @param port [Integer] - # @param adapter [Module, Class] - # @param socket_class [Class] - # @return [Tcpip] a new instance of Tcpip - # - # source://backport//lib/backport/server/tcpip.rb#15 - def initialize(host: T.unsafe(nil), port: T.unsafe(nil), adapter: T.unsafe(nil), socket_class: T.unsafe(nil)); end - - # Accept an incoming connection using accept_nonblock. Return the - # resulting Client if a connection was accepted or nil if no connections - # are pending. - # - # @return [Client, nil] - # - # source://backport//lib/backport/server/tcpip.rb#41 - def accept; end - - # source://backport//lib/backport/server/tcpip.rb#21 - def starting; end - - # source://backport//lib/backport/server/tcpip.rb#25 - def stopping; end - - # @param client [Client] - # @return [void] - # - # source://backport//lib/backport/server/tcpip.rb#78 - def update(client); end - - private - - # @return [TCPSocket] - # - # source://backport//lib/backport/server/tcpip.rb#89 - def socket; end - - # @return [void] - # - # source://backport//lib/backport/server/tcpip.rb#92 - def start_accept_thread; end -end - -# source://backport//lib/backport/version.rb#2 -Backport::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/benchmark@0.2.1.rbi b/sorbet/rbi/gems/benchmark@0.2.1.rbi deleted file mode 100644 index 2c21848..0000000 --- a/sorbet/rbi/gems/benchmark@0.2.1.rbi +++ /dev/null @@ -1,596 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `benchmark` gem. -# Please instead update this file by running `bin/tapioca gem benchmark`. - -# The Benchmark module provides methods to measure and report the time -# used to execute Ruby code. -# -# * Measure the time to construct the string given by the expression -# "a"*1_000_000_000: -# -# require 'benchmark' -# -# puts Benchmark.measure { "a"*1_000_000_000 } -# -# On my machine (OSX 10.8.3 on i5 1.7 GHz) this generates: -# -# 0.350000 0.400000 0.750000 ( 0.835234) -# -# This report shows the user CPU time, system CPU time, the sum of -# the user and system CPU times, and the elapsed real time. The unit -# of time is seconds. -# -# * Do some experiments sequentially using the #bm method: -# -# require 'benchmark' -# -# n = 5000000 -# Benchmark.bm do |x| -# x.report { for i in 1..n; a = "1"; end } -# x.report { n.times do ; a = "1"; end } -# x.report { 1.upto(n) do ; a = "1"; end } -# end -# -# The result: -# -# user system total real -# 1.010000 0.000000 1.010000 ( 1.014479) -# 1.000000 0.000000 1.000000 ( 0.998261) -# 0.980000 0.000000 0.980000 ( 0.981335) -# -# * Continuing the previous example, put a label in each report: -# -# require 'benchmark' -# -# n = 5000000 -# Benchmark.bm(7) do |x| -# x.report("for:") { for i in 1..n; a = "1"; end } -# x.report("times:") { n.times do ; a = "1"; end } -# x.report("upto:") { 1.upto(n) do ; a = "1"; end } -# end -# -# The result: -# -# user system total real -# for: 1.010000 0.000000 1.010000 ( 1.015688) -# times: 1.000000 0.000000 1.000000 ( 1.003611) -# upto: 1.030000 0.000000 1.030000 ( 1.028098) -# -# * The times for some benchmarks depend on the order in which items -# are run. These differences are due to the cost of memory -# allocation and garbage collection. To avoid these discrepancies, -# the #bmbm method is provided. For example, to compare ways to -# sort an array of floats: -# -# require 'benchmark' -# -# array = (1..1000000).map { rand } -# -# Benchmark.bmbm do |x| -# x.report("sort!") { array.dup.sort! } -# x.report("sort") { array.dup.sort } -# end -# -# The result: -# -# Rehearsal ----------------------------------------- -# sort! 1.490000 0.010000 1.500000 ( 1.490520) -# sort 1.460000 0.000000 1.460000 ( 1.463025) -# -------------------------------- total: 2.960000sec -# -# user system total real -# sort! 1.460000 0.000000 1.460000 ( 1.460465) -# sort 1.450000 0.010000 1.460000 ( 1.448327) -# -# * Report statistics of sequential experiments with unique labels, -# using the #benchmark method: -# -# require 'benchmark' -# include Benchmark # we need the CAPTION and FORMAT constants -# -# n = 5000000 -# Benchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x| -# tf = x.report("for:") { for i in 1..n; a = "1"; end } -# tt = x.report("times:") { n.times do ; a = "1"; end } -# tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end } -# [tf+tt+tu, (tf+tt+tu)/3] -# end -# -# The result: -# -# user system total real -# for: 0.950000 0.000000 0.950000 ( 0.952039) -# times: 0.980000 0.000000 0.980000 ( 0.984938) -# upto: 0.950000 0.000000 0.950000 ( 0.946787) -# >total: 2.880000 0.000000 2.880000 ( 2.883764) -# >avg: 0.960000 0.000000 0.960000 ( 0.961255) -# -# source://benchmark//lib/benchmark.rb#122 -module Benchmark - private - - # Invokes the block with a Benchmark::Report object, which - # may be used to collect and report on the results of individual - # benchmark tests. Reserves +label_width+ leading spaces for - # labels on each line. Prints +caption+ at the top of the - # report, and uses +format+ to format each line. - # (Note: +caption+ must contain a terminating newline character, - # see the default Benchmark::Tms::CAPTION for an example.) - # - # Returns an array of Benchmark::Tms objects. - # - # If the block returns an array of - # Benchmark::Tms objects, these will be used to format - # additional lines of output. If +labels+ parameter are - # given, these are used to label these extra lines. - # - # _Note_: Other methods provide a simpler interface to this one, and are - # suitable for nearly all benchmarking requirements. See the examples in - # Benchmark, and the #bm and #bmbm methods. - # - # Example: - # - # require 'benchmark' - # include Benchmark # we need the CAPTION and FORMAT constants - # - # n = 5000000 - # Benchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x| - # tf = x.report("for:") { for i in 1..n; a = "1"; end } - # tt = x.report("times:") { n.times do ; a = "1"; end } - # tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end } - # [tf+tt+tu, (tf+tt+tu)/3] - # end - # - # Generates: - # - # user system total real - # for: 0.970000 0.000000 0.970000 ( 0.970493) - # times: 0.990000 0.000000 0.990000 ( 0.989542) - # upto: 0.970000 0.000000 0.970000 ( 0.972854) - # >total: 2.930000 0.000000 2.930000 ( 2.932889) - # >avg: 0.976667 0.000000 0.976667 ( 0.977630) - # - # source://benchmark//lib/benchmark.rb#168 - def benchmark(caption = T.unsafe(nil), label_width = T.unsafe(nil), format = T.unsafe(nil), *labels); end - - # A simple interface to the #benchmark method, #bm generates sequential - # reports with labels. +label_width+ and +labels+ parameters have the same - # meaning as for #benchmark. - # - # require 'benchmark' - # - # n = 5000000 - # Benchmark.bm(7) do |x| - # x.report("for:") { for i in 1..n; a = "1"; end } - # x.report("times:") { n.times do ; a = "1"; end } - # x.report("upto:") { 1.upto(n) do ; a = "1"; end } - # end - # - # Generates: - # - # user system total real - # for: 0.960000 0.000000 0.960000 ( 0.957966) - # times: 0.960000 0.000000 0.960000 ( 0.960423) - # upto: 0.950000 0.000000 0.950000 ( 0.954864) - # - # source://benchmark//lib/benchmark.rb#207 - def bm(label_width = T.unsafe(nil), *labels, &blk); end - - # Sometimes benchmark results are skewed because code executed - # earlier encounters different garbage collection overheads than - # that run later. #bmbm attempts to minimize this effect by running - # the tests twice, the first time as a rehearsal in order to get the - # runtime environment stable, the second time for - # real. GC.start is executed before the start of each of - # the real timings; the cost of this is not included in the - # timings. In reality, though, there's only so much that #bmbm can - # do, and the results are not guaranteed to be isolated from garbage - # collection and other effects. - # - # Because #bmbm takes two passes through the tests, it can - # calculate the required label width. - # - # require 'benchmark' - # - # array = (1..1000000).map { rand } - # - # Benchmark.bmbm do |x| - # x.report("sort!") { array.dup.sort! } - # x.report("sort") { array.dup.sort } - # end - # - # Generates: - # - # Rehearsal ----------------------------------------- - # sort! 1.440000 0.010000 1.450000 ( 1.446833) - # sort 1.440000 0.000000 1.440000 ( 1.448257) - # -------------------------------- total: 2.890000sec - # - # user system total real - # sort! 1.460000 0.000000 1.460000 ( 1.458065) - # sort 1.450000 0.000000 1.450000 ( 1.455963) - # - # #bmbm yields a Benchmark::Job object and returns an array of - # Benchmark::Tms objects. - # - # source://benchmark//lib/benchmark.rb#249 - def bmbm(width = T.unsafe(nil)); end - - # Returns the time used to execute the given block as a - # Benchmark::Tms object. Takes +label+ option. - # - # require 'benchmark' - # - # n = 1000000 - # - # time = Benchmark.measure do - # n.times { a = "1" } - # end - # puts time - # - # Generates: - # - # 0.220000 0.000000 0.220000 ( 0.227313) - # - # source://benchmark//lib/benchmark.rb#294 - def measure(label = T.unsafe(nil)); end - - # Returns the elapsed real time used to execute the given block. - # - # source://benchmark//lib/benchmark.rb#309 - def realtime; end - - class << self - # Invokes the block with a Benchmark::Report object, which - # may be used to collect and report on the results of individual - # benchmark tests. Reserves +label_width+ leading spaces for - # labels on each line. Prints +caption+ at the top of the - # report, and uses +format+ to format each line. - # (Note: +caption+ must contain a terminating newline character, - # see the default Benchmark::Tms::CAPTION for an example.) - # - # Returns an array of Benchmark::Tms objects. - # - # If the block returns an array of - # Benchmark::Tms objects, these will be used to format - # additional lines of output. If +labels+ parameter are - # given, these are used to label these extra lines. - # - # _Note_: Other methods provide a simpler interface to this one, and are - # suitable for nearly all benchmarking requirements. See the examples in - # Benchmark, and the #bm and #bmbm methods. - # - # Example: - # - # require 'benchmark' - # include Benchmark # we need the CAPTION and FORMAT constants - # - # n = 5000000 - # Benchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x| - # tf = x.report("for:") { for i in 1..n; a = "1"; end } - # tt = x.report("times:") { n.times do ; a = "1"; end } - # tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end } - # [tf+tt+tu, (tf+tt+tu)/3] - # end - # - # Generates: - # - # user system total real - # for: 0.970000 0.000000 0.970000 ( 0.970493) - # times: 0.990000 0.000000 0.990000 ( 0.989542) - # upto: 0.970000 0.000000 0.970000 ( 0.972854) - # >total: 2.930000 0.000000 2.930000 ( 2.932889) - # >avg: 0.976667 0.000000 0.976667 ( 0.977630) - # - # source://benchmark//lib/benchmark.rb#168 - def benchmark(caption = T.unsafe(nil), label_width = T.unsafe(nil), format = T.unsafe(nil), *labels); end - - # A simple interface to the #benchmark method, #bm generates sequential - # reports with labels. +label_width+ and +labels+ parameters have the same - # meaning as for #benchmark. - # - # require 'benchmark' - # - # n = 5000000 - # Benchmark.bm(7) do |x| - # x.report("for:") { for i in 1..n; a = "1"; end } - # x.report("times:") { n.times do ; a = "1"; end } - # x.report("upto:") { 1.upto(n) do ; a = "1"; end } - # end - # - # Generates: - # - # user system total real - # for: 0.960000 0.000000 0.960000 ( 0.957966) - # times: 0.960000 0.000000 0.960000 ( 0.960423) - # upto: 0.950000 0.000000 0.950000 ( 0.954864) - # - # source://benchmark//lib/benchmark.rb#207 - def bm(label_width = T.unsafe(nil), *labels, &blk); end - - # Sometimes benchmark results are skewed because code executed - # earlier encounters different garbage collection overheads than - # that run later. #bmbm attempts to minimize this effect by running - # the tests twice, the first time as a rehearsal in order to get the - # runtime environment stable, the second time for - # real. GC.start is executed before the start of each of - # the real timings; the cost of this is not included in the - # timings. In reality, though, there's only so much that #bmbm can - # do, and the results are not guaranteed to be isolated from garbage - # collection and other effects. - # - # Because #bmbm takes two passes through the tests, it can - # calculate the required label width. - # - # require 'benchmark' - # - # array = (1..1000000).map { rand } - # - # Benchmark.bmbm do |x| - # x.report("sort!") { array.dup.sort! } - # x.report("sort") { array.dup.sort } - # end - # - # Generates: - # - # Rehearsal ----------------------------------------- - # sort! 1.440000 0.010000 1.450000 ( 1.446833) - # sort 1.440000 0.000000 1.440000 ( 1.448257) - # -------------------------------- total: 2.890000sec - # - # user system total real - # sort! 1.460000 0.000000 1.460000 ( 1.458065) - # sort 1.450000 0.000000 1.450000 ( 1.455963) - # - # #bmbm yields a Benchmark::Job object and returns an array of - # Benchmark::Tms objects. - # - # source://benchmark//lib/benchmark.rb#249 - def bmbm(width = T.unsafe(nil)); end - - # Returns the time used to execute the given block as a - # Benchmark::Tms object. Takes +label+ option. - # - # require 'benchmark' - # - # n = 1000000 - # - # time = Benchmark.measure do - # n.times { a = "1" } - # end - # puts time - # - # Generates: - # - # 0.220000 0.000000 0.220000 ( 0.227313) - # - # source://benchmark//lib/benchmark.rb#294 - def measure(label = T.unsafe(nil)); end - - # Returns the elapsed real time used to execute the given block. - # - # source://benchmark//lib/benchmark.rb#309 - def realtime; end - end -end - -# A Job is a sequence of labelled blocks to be processed by the -# Benchmark.bmbm method. It is of little direct interest to the user. -# -# source://benchmark//lib/benchmark.rb#321 -class Benchmark::Job - # Returns an initialized Job instance. - # Usually, one doesn't call this method directly, as new - # Job objects are created by the #bmbm method. - # +width+ is a initial value for the label offset used in formatting; - # the #bmbm method passes its +width+ argument to this constructor. - # - # @return [Job] a new instance of Job - # - # source://benchmark//lib/benchmark.rb#329 - def initialize(width); end - - # Registers the given label and block pair in the job list. - # - # @raise [ArgumentError] - # - # source://benchmark//lib/benchmark.rb#337 - def item(label = T.unsafe(nil), &blk); end - - # An array of 2-element arrays, consisting of label and block pairs. - # - # source://benchmark//lib/benchmark.rb#349 - def list; end - - # Registers the given label and block pair in the job list. - # - # @raise [ArgumentError] - # - # source://benchmark//lib/benchmark.rb#337 - def report(label = T.unsafe(nil), &blk); end - - # Length of the widest label in the #list. - # - # source://benchmark//lib/benchmark.rb#352 - def width; end -end - -# This class is used by the Benchmark.benchmark and Benchmark.bm methods. -# It is of little direct interest to the user. -# -# source://benchmark//lib/benchmark.rb#359 -class Benchmark::Report - # Returns an initialized Report instance. - # Usually, one doesn't call this method directly, as new - # Report objects are created by the #benchmark and #bm methods. - # +width+ and +format+ are the label offset and - # format string used by Tms#format. - # - # @return [Report] a new instance of Report - # - # source://benchmark//lib/benchmark.rb#367 - def initialize(width = T.unsafe(nil), format = T.unsafe(nil)); end - - # Prints the +label+ and measured time for the block, - # formatted by +format+. See Tms#format for the - # formatting rules. - # - # source://benchmark//lib/benchmark.rb#376 - def item(label = T.unsafe(nil), *format, &blk); end - - # An array of Benchmark::Tms objects representing each item. - # - # source://benchmark//lib/benchmark.rb#386 - def list; end - - # Prints the +label+ and measured time for the block, - # formatted by +format+. See Tms#format for the - # formatting rules. - # - # source://benchmark//lib/benchmark.rb#376 - def report(label = T.unsafe(nil), *format, &blk); end -end - -# A data object, representing the times associated with a benchmark -# measurement. -# -# source://benchmark//lib/benchmark.rb#395 -class Benchmark::Tms - # Returns an initialized Tms object which has - # +utime+ as the user CPU time, +stime+ as the system CPU time, - # +cutime+ as the children's user CPU time, +cstime+ as the children's - # system CPU time, +real+ as the elapsed real time and +label+ as the label. - # - # @return [Tms] a new instance of Tms - # - # source://benchmark//lib/benchmark.rb#430 - def initialize(utime = T.unsafe(nil), stime = T.unsafe(nil), cutime = T.unsafe(nil), cstime = T.unsafe(nil), real = T.unsafe(nil), label = T.unsafe(nil)); end - - # Returns a new Tms object obtained by memberwise multiplication - # of the individual times for this Tms object by +x+. - # - # source://benchmark//lib/benchmark.rb#478 - def *(x); end - - # Returns a new Tms object obtained by memberwise summation - # of the individual times for this Tms object with those of the +other+ - # Tms object. - # This method and #/() are useful for taking statistics. - # - # source://benchmark//lib/benchmark.rb#465 - def +(other); end - - # Returns a new Tms object obtained by memberwise subtraction - # of the individual times for the +other+ Tms object from those of this - # Tms object. - # - # source://benchmark//lib/benchmark.rb#472 - def -(other); end - - # Returns a new Tms object obtained by memberwise division - # of the individual times for this Tms object by +x+. - # This method and #+() are useful for taking statistics. - # - # source://benchmark//lib/benchmark.rb#485 - def /(x); end - - # Returns a new Tms object whose times are the sum of the times for this - # Tms object, plus the time required to execute the code block (+blk+). - # - # source://benchmark//lib/benchmark.rb#439 - def add(&blk); end - - # An in-place version of #add. - # Changes the times of this Tms object by making it the sum of the times - # for this Tms object, plus the time required to execute - # the code block (+blk+). - # - # source://benchmark//lib/benchmark.rb#449 - def add!(&blk); end - - # System CPU time of children - # - # source://benchmark//lib/benchmark.rb#413 - def cstime; end - - # User CPU time of children - # - # source://benchmark//lib/benchmark.rb#410 - def cutime; end - - # Returns the contents of this Tms object as - # a formatted string, according to a +format+ string - # like that passed to Kernel.format. In addition, #format - # accepts the following extensions: - # - # %u:: Replaced by the user CPU time, as reported by Tms#utime. - # %y:: Replaced by the system CPU time, as reported by #stime (Mnemonic: y of "s*y*stem") - # %U:: Replaced by the children's user CPU time, as reported by Tms#cutime - # %Y:: Replaced by the children's system CPU time, as reported by Tms#cstime - # %t:: Replaced by the total CPU time, as reported by Tms#total - # %r:: Replaced by the elapsed real time, as reported by Tms#real - # %n:: Replaced by the label string, as reported by Tms#label (Mnemonic: n of "*n*ame") - # - # If +format+ is not given, FORMAT is used as default value, detailing the - # user, system and real elapsed time. - # - # source://benchmark//lib/benchmark.rb#504 - def format(format = T.unsafe(nil), *args); end - - # Label - # - # source://benchmark//lib/benchmark.rb#422 - def label; end - - # Elapsed real time - # - # source://benchmark//lib/benchmark.rb#416 - def real; end - - # System CPU time - # - # source://benchmark//lib/benchmark.rb#407 - def stime; end - - # Returns a new 6-element array, consisting of the - # label, user CPU time, system CPU time, children's - # user CPU time, children's system CPU time and elapsed - # real time. - # - # source://benchmark//lib/benchmark.rb#529 - def to_a; end - - # Returns a hash containing the same data as `to_a`. - # - # source://benchmark//lib/benchmark.rb#536 - def to_h; end - - # Same as #format. - # - # source://benchmark//lib/benchmark.rb#519 - def to_s; end - - # Total time, that is +utime+ + +stime+ + +cutime+ + +cstime+ - # - # source://benchmark//lib/benchmark.rb#419 - def total; end - - # User CPU time - # - # source://benchmark//lib/benchmark.rb#404 - def utime; end - - protected - - # Returns a new Tms object obtained by memberwise operation +op+ - # of the individual times for this Tms object with those of the other - # Tms object (+x+). - # - # +op+ can be a mathematical operation such as +, -, - # *, / - # - # source://benchmark//lib/benchmark.rb#557 - def memberwise(op, x); end -end diff --git a/sorbet/rbi/gems/bindex@0.8.1.rbi b/sorbet/rbi/gems/bindex@0.8.1.rbi deleted file mode 100644 index 9547ca9..0000000 --- a/sorbet/rbi/gems/bindex@0.8.1.rbi +++ /dev/null @@ -1,8 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `bindex` gem. -# Please instead update this file by running `bin/tapioca gem bindex`. - -# THIS IS AN EMPTY RBI FILE. -# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/bootsnap@1.16.0.rbi b/sorbet/rbi/gems/bootsnap@1.16.0.rbi deleted file mode 100644 index 527a9f7..0000000 --- a/sorbet/rbi/gems/bootsnap@1.16.0.rbi +++ /dev/null @@ -1,955 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `bootsnap` gem. -# Please instead update this file by running `bin/tapioca gem bootsnap`. - -# source://bootsnap//lib/bootsnap/version.rb#3 -module Bootsnap - extend ::Bootsnap - - # @return [Boolean] - # - # source://bootsnap//lib/bootsnap/bundler.rb#6 - def bundler?; end - - private - - def instrumentation_enabled=(_arg0); end - - class << self - # source://bootsnap//lib/bootsnap.rb#34 - def _instrument(event, path); end - - # source://bootsnap//lib/bootsnap.rb#122 - def absolute_path?(path); end - - # source://bootsnap//lib/bootsnap.rb#70 - def default_setup; end - - # source://bootsnap//lib/bootsnap.rb#27 - def instrumentation=(callback); end - - def instrumentation_enabled=(_arg0); end - - # source://bootsnap//lib/bootsnap.rb#14 - def log!; end - - # Returns the value of attribute logger. - # - # source://bootsnap//lib/bootsnap.rb#12 - def logger; end - - # source://bootsnap//lib/bootsnap.rb#18 - def logger=(logger); end - - # Allow the C extension to redefine `rb_get_path` without warning. - # Allow the C extension to redefine `rb_get_path` without warning. - def rb_get_path(_arg0); end - - # source://bootsnap//lib/bootsnap.rb#38 - def setup(cache_dir:, development_mode: T.unsafe(nil), load_path_cache: T.unsafe(nil), ignore_directories: T.unsafe(nil), readonly: T.unsafe(nil), compile_cache_iseq: T.unsafe(nil), compile_cache_yaml: T.unsafe(nil), compile_cache_json: T.unsafe(nil)); end - - # source://bootsnap//lib/bootsnap.rb#66 - def unload_cache!; end - end -end - -# source://bootsnap//lib/bootsnap/compile_cache.rb#4 -module Bootsnap::CompileCache - class << self - # @raise [PermissionError] - # - # source://bootsnap//lib/bootsnap/compile_cache.rb#46 - def permission_error(path); end - - # source://bootsnap//lib/bootsnap/compile_cache.rb#13 - def setup(cache_dir:, iseq:, yaml:, json:, readonly: T.unsafe(nil)); end - - # @return [Boolean] - # - # source://bootsnap//lib/bootsnap/compile_cache.rb#55 - def supported?; end - end -end - -# source://bootsnap//lib/bootsnap/compile_cache.rb#10 -class Bootsnap::CompileCache::Error < ::StandardError; end - -# source://bootsnap//lib/bootsnap/compile_cache/iseq.rb#8 -module Bootsnap::CompileCache::ISeq - class << self - # Returns the value of attribute cache_dir. - # - # source://bootsnap//lib/bootsnap/compile_cache/iseq.rb#10 - def cache_dir; end - - # source://bootsnap//lib/bootsnap/compile_cache/iseq.rb#12 - def cache_dir=(cache_dir); end - - # source://bootsnap//lib/bootsnap/compile_cache/iseq.rb#101 - def compile_option_updated; end - - # source://bootsnap//lib/bootsnap/compile_cache/iseq.rb#59 - def fetch(path, cache_dir: T.unsafe(nil)); end - - # source://bootsnap//lib/bootsnap/compile_cache/iseq.rb#76 - def input_to_output(_data, _kwargs); end - - # source://bootsnap//lib/bootsnap/compile_cache/iseq.rb#41 - def input_to_storage(_, path); end - - # source://bootsnap//lib/bootsnap/compile_cache/iseq.rb#108 - def install!(cache_dir); end - - # source://bootsnap//lib/bootsnap/compile_cache/iseq.rb#68 - def precompile(path); end - - # source://bootsnap//lib/bootsnap/compile_cache/iseq.rb#48 - def storage_to_output(binary, _args); end - end -end - -# source://bootsnap//lib/bootsnap/compile_cache/iseq.rb#80 -module Bootsnap::CompileCache::ISeq::InstructionSequenceMixin - # source://bootsnap//lib/bootsnap/compile_cache/iseq.rb#95 - def compile_option=(hash); end - - # source://bootsnap//lib/bootsnap/compile_cache/iseq.rb#81 - def load_iseq(path); end -end - -# source://bootsnap//lib/bootsnap/compile_cache/json.rb#7 -module Bootsnap::CompileCache::JSON - class << self - # Returns the value of attribute cache_dir. - # - # source://bootsnap//lib/bootsnap/compile_cache/json.rb#10 - def cache_dir; end - - # source://bootsnap//lib/bootsnap/compile_cache/json.rb#12 - def cache_dir=(cache_dir); end - - # source://bootsnap//lib/bootsnap/compile_cache/json.rb#48 - def init!; end - - # source://bootsnap//lib/bootsnap/compile_cache/json.rb#28 - def input_to_output(data, kwargs); end - - # source://bootsnap//lib/bootsnap/compile_cache/json.rb#16 - def input_to_storage(payload, _); end - - # source://bootsnap//lib/bootsnap/compile_cache/json.rb#40 - def install!(cache_dir); end - - # Returns the value of attribute msgpack_factory. - # - # source://bootsnap//lib/bootsnap/compile_cache/json.rb#9 - def msgpack_factory; end - - # Sets the attribute msgpack_factory - # - # @param value the value to set the attribute msgpack_factory to. - # - # source://bootsnap//lib/bootsnap/compile_cache/json.rb#9 - def msgpack_factory=(_arg0); end - - # source://bootsnap//lib/bootsnap/compile_cache/json.rb#32 - def precompile(path); end - - # source://bootsnap//lib/bootsnap/compile_cache/json.rb#21 - def storage_to_output(data, kwargs); end - - # Returns the value of attribute supported_options. - # - # source://bootsnap//lib/bootsnap/compile_cache/json.rb#9 - def supported_options; end - - # Sets the attribute supported_options - # - # @param value the value to set the attribute supported_options to. - # - # source://bootsnap//lib/bootsnap/compile_cache/json.rb#9 - def supported_options=(_arg0); end - - private - - # @return [Boolean] - # - # source://bootsnap//lib/bootsnap/compile_cache/json.rb#62 - def supports_freeze?; end - end -end - -# source://bootsnap//lib/bootsnap/compile_cache/json.rb#68 -module Bootsnap::CompileCache::JSON::Patch - # source://bootsnap//lib/bootsnap/compile_cache/json.rb#69 - def load_file(path, *args, **_arg2); end -end - -module Bootsnap::CompileCache::Native - private - - def compile_option_crc32=(_arg0); end - def coverage_running?; end - def fetch(_arg0, _arg1, _arg2, _arg3); end - def precompile(_arg0, _arg1, _arg2); end - def readonly=(_arg0); end - - class << self - def compile_option_crc32=(_arg0); end - def coverage_running?; end - def fetch(_arg0, _arg1, _arg2, _arg3); end - def precompile(_arg0, _arg1, _arg2); end - def readonly=(_arg0); end - end -end - -# source://bootsnap//lib/bootsnap/compile_cache.rb#11 -class Bootsnap::CompileCache::PermissionError < ::Bootsnap::CompileCache::Error; end - -# source://bootsnap//lib/bootsnap/compile_cache.rb#5 -Bootsnap::CompileCache::UNCOMPILABLE = T.let(T.unsafe(nil), BasicObject) - -# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#7 -module Bootsnap::CompileCache::YAML - class << self - # Returns the value of attribute cache_dir. - # - # source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#20 - def cache_dir; end - - # source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#22 - def cache_dir=(cache_dir); end - - # Returns the value of attribute implementation. - # - # source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#20 - def implementation; end - - # source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#57 - def init!; end - - # source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#36 - def install!(cache_dir); end - - # Returns the value of attribute msgpack_factory. - # - # source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#19 - def msgpack_factory; end - - # Sets the attribute msgpack_factory - # - # @param value the value to set the attribute msgpack_factory to. - # - # source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#19 - def msgpack_factory=(_arg0); end - - # source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#124 - def patch; end - - # source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#26 - def precompile(path); end - - # source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#128 - def strict_load(payload); end - - # Psych coerce strings to `Encoding.default_internal` but Message Pack only support - # UTF-8, US-ASCII and BINARY. So if Encoding.default_internal is set to anything else - # we can't safely use the cache - # - # @return [Boolean] - # - # source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#45 - def supported_internal_encoding?; end - - # Returns the value of attribute supported_options. - # - # source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#19 - def supported_options; end - - # Sets the attribute supported_options - # - # @param value the value to set the attribute supported_options to. - # - # source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#19 - def supported_options=(_arg0); end - end -end - -# source://bootsnap//lib/bootsnap/setup.rb#0 -class Bootsnap::CompileCache::YAML::NoTagsVisitor < ::Psych::Visitors::NoAliasRuby - # source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#69 - def visit(target); end -end - -# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#272 -module Bootsnap::CompileCache::YAML::Psych3 - extend ::Bootsnap::CompileCache::YAML::Psych3 - - # source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#297 - def input_to_output(data, kwargs); end - - # source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#275 - def input_to_storage(contents, _); end - - # source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#287 - def storage_to_output(data, kwargs); end -end - -# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#301 -module Bootsnap::CompileCache::YAML::Psych3::Patch - # source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#302 - def load_file(path, *args, **_arg2); end - - # source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#326 - def unsafe_load_file(path, *args, **_arg2); end -end - -# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#139 -module Bootsnap::CompileCache::YAML::Psych4 - extend ::Bootsnap::CompileCache::YAML::Psych4 - - # source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#142 - def input_to_storage(contents, _); end -end - -# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#221 -module Bootsnap::CompileCache::YAML::Psych4::Patch - # source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#222 - def load_file(path, *args, **_arg2); end - - # source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#246 - def unsafe_load_file(path, *args, **_arg2); end -end - -# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#181 -module Bootsnap::CompileCache::YAML::Psych4::SafeLoad - extend ::Bootsnap::CompileCache::YAML::Psych4::SafeLoad - - # source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#216 - def input_to_output(data, kwargs); end - - # source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#184 - def input_to_storage(contents, _); end - - # source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#201 - def storage_to_output(data, kwargs); end -end - -# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#150 -module Bootsnap::CompileCache::YAML::Psych4::UnsafeLoad - extend ::Bootsnap::CompileCache::YAML::Psych4::UnsafeLoad - - # source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#176 - def input_to_output(data, kwargs); end - - # source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#153 - def input_to_storage(contents, _); end - - # source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#165 - def storage_to_output(data, kwargs); end -end - -# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#11 -Bootsnap::CompileCache::YAML::SUPPORTED_INTERNAL_ENCODINGS = T.let(T.unsafe(nil), Array) - -# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#8 -class Bootsnap::CompileCache::YAML::Uncompilable < ::StandardError; end - -# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#9 -class Bootsnap::CompileCache::YAML::UnsupportedTags < ::Bootsnap::CompileCache::YAML::Uncompilable; end - -# source://bootsnap//lib/bootsnap/explicit_require.rb#4 -module Bootsnap::ExplicitRequire - class << self - # source://bootsnap//lib/bootsnap/explicit_require.rb#17 - def from_archdir(feature); end - - # source://bootsnap//lib/bootsnap/explicit_require.rb#13 - def from_rubylibdir(feature); end - - # source://bootsnap//lib/bootsnap/explicit_require.rb#9 - def from_self(feature); end - - # Given a set of gems, run a block with the LOAD_PATH narrowed to include - # only core ruby source paths and these gems -- that is, roughly, - # temporarily remove all gems not listed in this call from the LOAD_PATH. - # - # This is useful before bootsnap is fully-initialized to load gems that it - # depends on, without forcing full LOAD_PATH traversals. - # - # source://bootsnap//lib/bootsnap/explicit_require.rb#27 - def with_gems(*gems); end - end -end - -# source://bootsnap//lib/bootsnap/explicit_require.rb#5 -Bootsnap::ExplicitRequire::ARCHDIR = T.let(T.unsafe(nil), String) - -# source://bootsnap//lib/bootsnap/explicit_require.rb#7 -Bootsnap::ExplicitRequire::DLEXT = T.let(T.unsafe(nil), String) - -# source://bootsnap//lib/bootsnap/explicit_require.rb#6 -Bootsnap::ExplicitRequire::RUBYLIBDIR = T.let(T.unsafe(nil), String) - -# source://bootsnap//lib/bootsnap.rb#9 -class Bootsnap::InvalidConfiguration < ::StandardError; end - -# source://bootsnap//lib/bootsnap/load_path_cache.rb#4 -module Bootsnap::LoadPathCache - class << self - # Returns the value of attribute enabled. - # - # source://bootsnap//lib/bootsnap/load_path_cache.rb#27 - def enabled?; end - - # Returns the value of attribute load_path_cache. - # - # source://bootsnap//lib/bootsnap/load_path_cache.rb#27 - def load_path_cache; end - - # Returns the value of attribute loaded_features_index. - # - # source://bootsnap//lib/bootsnap/load_path_cache.rb#27 - def loaded_features_index; end - - # source://bootsnap//lib/bootsnap/load_path_cache.rb#31 - def setup(cache_path:, development_mode:, ignore_directories:, readonly: T.unsafe(nil)); end - - # @return [Boolean] - # - # source://bootsnap//lib/bootsnap/load_path_cache.rb#56 - def supported?; end - - # source://bootsnap//lib/bootsnap/load_path_cache.rb#48 - def unload!; end - end -end - -# source://bootsnap//lib/bootsnap/load_path_cache.rb#22 -Bootsnap::LoadPathCache::CACHED_EXTENSIONS = T.let(T.unsafe(nil), Array) - -# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#7 -class Bootsnap::LoadPathCache::Cache - # @return [Cache] a new instance of Cache - # - # source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#10 - def initialize(store, path_obj, development_mode: T.unsafe(nil)); end - - # Try to resolve this feature to an absolute path without traversing the - # loadpath. - # - # source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#48 - def find(feature); end - - # What is the path item that contains the dir as child? - # e.g. given "/a/b/c/d" exists, and the path is ["/a/b"], load_dir("c/d") - # is "/a/b". - # - # source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#22 - def load_dir(dir); end - - # source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#108 - def push_paths(sender, *paths); end - - # source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#114 - def reinitialize(path_obj = T.unsafe(nil)); end - - # source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#102 - def unshift_paths(sender, *paths); end - - private - - # @return [Boolean] - # - # source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#127 - def dir_changed?; end - - # source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#172 - def expand_path(feature); end - - # source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#203 - def maybe_append_extension(feature); end - - # source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#180 - def now; end - - # source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#137 - def push_paths_locked(*paths); end - - # source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#199 - def search_index(feature); end - - # @return [Boolean] - # - # source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#176 - def stale?; end - - # source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#231 - def try_ext(feature); end - - # source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#211 - def try_index(feature); end - - # source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#155 - def unshift_paths_locked(*paths); end -end - -# seconds -# -# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#8 -Bootsnap::LoadPathCache::Cache::AGE_THRESHOLD = T.let(T.unsafe(nil), Integer) - -# { 'enumerator' => nil, 'enumerator.so' => nil, ... } -# -# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#28 -Bootsnap::LoadPathCache::Cache::BUILTIN_FEATURES = T.let(T.unsafe(nil), Hash) - -# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#5 -module Bootsnap::LoadPathCache::ChangeObserver - class << self - # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#59 - def register(arr, observer); end - - # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#68 - def unregister(arr); end - end -end - -# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#6 -module Bootsnap::LoadPathCache::ChangeObserver::ArrayMixin - # For each method that adds items to one end or another of the array - # (<<, push, unshift, concat), override that method to also notify the - # observer of the change. - # - # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#10 - def <<(entry); end - - # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51 - def []=(*args, &block); end - - # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#15 - def append(*entries); end - - # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51 - def clear(*args, &block); end - - # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51 - def collect!(*args, &block); end - - # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51 - def compact!(*args, &block); end - - # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#27 - def concat(entries); end - - # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51 - def delete(*args, &block); end - - # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51 - def delete_at(*args, &block); end - - # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51 - def delete_if(*args, &block); end - - # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51 - def fill(*args, &block); end - - # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51 - def flatten!(*args, &block); end - - # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51 - def insert(*args, &block); end - - # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51 - def keep_if(*args, &block); end - - # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51 - def map!(*args, &block); end - - # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51 - def pop(*args, &block); end - - # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#21 - def prepend(*entries); end - - # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#15 - def push(*entries); end - - # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51 - def reject!(*args, &block); end - - # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51 - def replace(*args, &block); end - - # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51 - def reverse!(*args, &block); end - - # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51 - def rotate!(*args, &block); end - - # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51 - def select!(*args, &block); end - - # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51 - def shift(*args, &block); end - - # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51 - def shuffle!(*args, &block); end - - # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51 - def slice!(*args, &block); end - - # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51 - def sort!(*args, &block); end - - # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51 - def sort_by!(*args, &block); end - - # uniq! keeps the first occurrence of each path, otherwise preserving - # order, preserving the effective load path - # - # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#34 - def uniq!(*args); end - - # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#21 - def unshift(*entries); end -end - -# source://bootsnap//lib/bootsnap/load_path_cache.rb#16 -Bootsnap::LoadPathCache::DLEXT = T.let(T.unsafe(nil), String) - -# This is nil on linux and darwin, but I think it's '.o' on some other -# platform. I'm not really sure which, but it seems better to replicate -# ruby's semantics as faithfully as possible. -# -# source://bootsnap//lib/bootsnap/load_path_cache.rb#20 -Bootsnap::LoadPathCache::DLEXT2 = T.let(T.unsafe(nil), T.untyped) - -# source://bootsnap//lib/bootsnap/load_path_cache.rb#11 -Bootsnap::LoadPathCache::DL_EXTENSIONS = T.let(T.unsafe(nil), Array) - -# source://bootsnap//lib/bootsnap/load_path_cache.rb#7 -Bootsnap::LoadPathCache::DOT_RB = T.let(T.unsafe(nil), String) - -# source://bootsnap//lib/bootsnap/load_path_cache.rb#8 -Bootsnap::LoadPathCache::DOT_SO = T.let(T.unsafe(nil), String) - -# source://bootsnap//lib/bootsnap/load_path_cache.rb#5 -Bootsnap::LoadPathCache::FALLBACK_SCAN = T.let(T.unsafe(nil), BasicObject) - -# LoadedFeaturesIndex partially mirrors an internal structure in ruby that -# we can't easily obtain an interface to. -# -# This works around an issue where, without bootsnap, *ruby* knows that it -# has already required a file by its short name (e.g. require 'bundler') if -# a new instance of bundler is added to the $LOAD_PATH which resolves to a -# different absolute path. This class makes bootsnap smart enough to -# realize that it has already loaded 'bundler', and not just -# '/path/to/bundler'. -# -# If you disable LoadedFeaturesIndex, you can see the problem this solves by: -# -# 1. `require 'a'` -# 2. Prepend a new $LOAD_PATH element containing an `a.rb` -# 3. `require 'a'` -# -# Ruby returns false from step 3. -# With bootsnap but with no LoadedFeaturesIndex, this loads two different -# `a.rb`s. -# With bootsnap and with LoadedFeaturesIndex, this skips the second load, -# returning false like ruby. -# -# source://bootsnap//lib/bootsnap/load_path_cache/loaded_features_index.rb#26 -class Bootsnap::LoadPathCache::LoadedFeaturesIndex - # @return [LoadedFeaturesIndex] a new instance of LoadedFeaturesIndex - # - # source://bootsnap//lib/bootsnap/load_path_cache/loaded_features_index.rb#27 - def initialize; end - - # source://bootsnap//lib/bootsnap/load_path_cache/loaded_features_index.rb#72 - def cursor(short); end - - # source://bootsnap//lib/bootsnap/load_path_cache/loaded_features_index.rb#78 - def identify(short, cursor); end - - # @return [Boolean] - # - # source://bootsnap//lib/bootsnap/load_path_cache/loaded_features_index.rb#68 - def key?(feature); end - - # We've optimized for initialize and register to be fast, and purge to be tolerable. - # If access patterns make this not-okay, we can lazy-invert the LFI on - # first purge and work from there. - # - # source://bootsnap//lib/bootsnap/load_path_cache/loaded_features_index.rb#54 - def purge(feature); end - - # source://bootsnap//lib/bootsnap/load_path_cache/loaded_features_index.rb#61 - def purge_multi(features); end - - # There is a relatively uncommon case where we could miss adding an - # entry: - # - # If the user asked for e.g. `require 'bundler'`, and we went through the - # `FALLBACK_SCAN` pathway in `kernel_require.rb` and therefore did not - # pass `long` (the full expanded absolute path), then we did are not able - # to confidently add the `bundler.rb` form to @lfi. - # - # We could either: - # - # 1. Just add `bundler.rb`, `bundler.so`, and so on, which is close but - # not quite right; or - # 2. Inspect $LOADED_FEATURES upon return from yield to find the matching - # entry. - # - # source://bootsnap//lib/bootsnap/load_path_cache/loaded_features_index.rb#105 - def register(short, long); end - - private - - # Might Ruby automatically search for this extension if - # someone tries to 'require' the file without it? E.g. Ruby - # will implicitly try 'x.rb' if you ask for 'x'. - # - # This is complex and platform-dependent, and the Ruby docs are a little - # handwavy about what will be tried when and in what order. - # So optimistically pretend that all known elidable extensions - # will be tried on all platforms, and that people are unlikely - # to name files in a way that assumes otherwise. - # (E.g. It's unlikely that someone will know that their code - # will _never_ run on MacOS, and therefore think they can get away - # with calling a Ruby file 'x.dylib.rb' and then requiring it as 'x.dylib'.) - # - # See . - # - # @return [Boolean] - # - # source://bootsnap//lib/bootsnap/load_path_cache/loaded_features_index.rb#146 - def extension_elidable?(feature); end - - # source://bootsnap//lib/bootsnap/load_path_cache/loaded_features_index.rb#150 - def strip_extension_if_elidable(feature); end -end - -# source://bootsnap//lib/bootsnap/load_path_cache/loaded_features_index.rb#129 -Bootsnap::LoadPathCache::LoadedFeaturesIndex::STRIP_EXTENSION = T.let(T.unsafe(nil), Regexp) - -# source://bootsnap//lib/bootsnap/load_path_cache/path.rb#7 -class Bootsnap::LoadPathCache::Path - # @return [Path] a new instance of Path - # - # source://bootsnap//lib/bootsnap/load_path_cache/path.rb#24 - def initialize(path, real: T.unsafe(nil)); end - - # Return a list of all the requirable files and all of the subdirectories - # of this +Path+. - # - # source://bootsnap//lib/bootsnap/load_path_cache/path.rb#59 - def entries_and_dirs(store); end - - # source://bootsnap//lib/bootsnap/load_path_cache/path.rb#82 - def expanded_path; end - - # True if the path exists, but represents a non-directory object - # - # @return [Boolean] - # - # source://bootsnap//lib/bootsnap/load_path_cache/path.rb#47 - def non_directory?; end - - # Returns the value of attribute path. - # - # source://bootsnap//lib/bootsnap/load_path_cache/path.rb#22 - def path; end - - # @return [Boolean] - # - # source://bootsnap//lib/bootsnap/load_path_cache/path.rb#53 - def relative?; end - - # A path is considered 'stable' if it is part of a Gem.path or the ruby - # distribution. When adding or removing files in these paths, the cache - # must be cleared before the change will be noticed. - # - # @return [Boolean] - # - # source://bootsnap//lib/bootsnap/load_path_cache/path.rb#11 - def stable?; end - - # source://bootsnap//lib/bootsnap/load_path_cache/path.rb#29 - def to_realpath; end - - # A path is considered volatile if it doesn't live under a Gem.path or - # the ruby distribution root. These paths are scanned for new additions - # more frequently. - # - # @return [Boolean] - # - # source://bootsnap//lib/bootsnap/load_path_cache/path.rb#18 - def volatile?; end - - private - - # last time a directory was modified in this subtree. +dirs+ should be a - # list of relative paths to directories under +path+. e.g. for /a/b and - # /a/b/c, pass ('/a/b', ['c']) - # - # source://bootsnap//lib/bootsnap/load_path_cache/path.rb#99 - def latest_mtime(path, dirs); end - - # (expensive) returns [entries, dirs] - # - # source://bootsnap//lib/bootsnap/load_path_cache/path.rb#92 - def scan!; end - - # source://bootsnap//lib/bootsnap/load_path_cache/path.rb#123 - def stability; end -end - -# Built-in ruby lib stuff doesn't change, but things can occasionally be -# installed into sitedir, which generally lives under rubylibdir. -# -# source://bootsnap//lib/bootsnap/load_path_cache/path.rb#120 -Bootsnap::LoadPathCache::Path::RUBY_LIBDIR = T.let(T.unsafe(nil), String) - -# source://bootsnap//lib/bootsnap/load_path_cache/path.rb#121 -Bootsnap::LoadPathCache::Path::RUBY_SITEDIR = T.let(T.unsafe(nil), String) - -# a Path can be either stable of volatile, depending on how frequently we -# expect its contents may change. Stable paths aren't rescanned nearly as -# often. -# -# source://bootsnap//lib/bootsnap/load_path_cache/path.rb#115 -Bootsnap::LoadPathCache::Path::STABLE = T.let(T.unsafe(nil), Symbol) - -# source://bootsnap//lib/bootsnap/load_path_cache/path.rb#116 -Bootsnap::LoadPathCache::Path::VOLATILE = T.let(T.unsafe(nil), Symbol) - -# source://bootsnap//lib/bootsnap/load_path_cache/path_scanner.rb#7 -module Bootsnap::LoadPathCache::PathScanner - class << self - # source://bootsnap//lib/bootsnap/load_path_cache/path_scanner.rb#23 - def call(path); end - - # Returns the value of attribute ignored_directories. - # - # source://bootsnap//lib/bootsnap/load_path_cache/path_scanner.rb#21 - def ignored_directories; end - - # Sets the attribute ignored_directories - # - # @param value the value to set the attribute ignored_directories to. - # - # source://bootsnap//lib/bootsnap/load_path_cache/path_scanner.rb#21 - def ignored_directories=(_arg0); end - - # source://bootsnap//lib/bootsnap/load_path_cache/path_scanner.rb#69 - def os_path(path); end - - # source://bootsnap//lib/bootsnap/load_path_cache/path_scanner.rb#49 - def walk(absolute_dir_path, relative_dir_path, &block); end - end -end - -# source://bootsnap//lib/bootsnap/load_path_cache/path_scanner.rb#10 -Bootsnap::LoadPathCache::PathScanner::ALTERNATIVE_NATIVE_EXTENSIONS_PATTERN = T.let(T.unsafe(nil), Regexp) - -# source://bootsnap//lib/bootsnap/load_path_cache/path_scanner.rb#12 -Bootsnap::LoadPathCache::PathScanner::BUNDLE_PATH = T.let(T.unsafe(nil), String) - -# source://bootsnap//lib/bootsnap/load_path_cache/path_scanner.rb#9 -Bootsnap::LoadPathCache::PathScanner::NORMALIZE_NATIVE_EXTENSIONS = T.let(T.unsafe(nil), FalseClass) - -# source://bootsnap//lib/bootsnap/load_path_cache/path_scanner.rb#8 -Bootsnap::LoadPathCache::PathScanner::REQUIRABLE_EXTENSIONS = T.let(T.unsafe(nil), Array) - -# source://bootsnap//lib/bootsnap/load_path_cache.rb#9 -Bootsnap::LoadPathCache::SLASH = T.let(T.unsafe(nil), String) - -# source://bootsnap//lib/bootsnap/load_path_cache/store.rb#9 -class Bootsnap::LoadPathCache::Store - # @return [Store] a new instance of Store - # - # source://bootsnap//lib/bootsnap/load_path_cache/store.rb#16 - def initialize(store_path, readonly: T.unsafe(nil)); end - - # @raise [SetOutsideTransactionNotAllowed] - # - # source://bootsnap//lib/bootsnap/load_path_cache/store.rb#28 - def fetch(key); end - - # source://bootsnap//lib/bootsnap/load_path_cache/store.rb#24 - def get(key); end - - # @raise [SetOutsideTransactionNotAllowed] - # - # source://bootsnap//lib/bootsnap/load_path_cache/store.rb#40 - def set(key, value); end - - # @raise [NestedTransactionError] - # - # source://bootsnap//lib/bootsnap/load_path_cache/store.rb#49 - def transaction; end - - private - - # source://bootsnap//lib/bootsnap/load_path_cache/store.rb#66 - def commit_transaction; end - - # source://bootsnap//lib/bootsnap/load_path_cache/store.rb#112 - def default_data; end - - # source://bootsnap//lib/bootsnap/load_path_cache/store.rb#95 - def dump_data; end - - # source://bootsnap//lib/bootsnap/load_path_cache/store.rb#73 - def load_data; end - - # source://bootsnap//lib/bootsnap/load_path_cache/store.rb#61 - def mark_for_mutation!; end - - # source://bootsnap//lib/bootsnap/load_path_cache/store.rb#116 - def mkdir_p(path); end -end - -# source://bootsnap//lib/bootsnap/load_path_cache/store.rb#11 -Bootsnap::LoadPathCache::Store::CURRENT_VERSION = T.let(T.unsafe(nil), String) - -# source://bootsnap//lib/bootsnap/load_path_cache/store.rb#13 -class Bootsnap::LoadPathCache::Store::NestedTransactionError < ::StandardError; end - -# source://bootsnap//lib/bootsnap/load_path_cache/store.rb#14 -class Bootsnap::LoadPathCache::Store::SetOutsideTransactionNotAllowed < ::StandardError; end - -# source://bootsnap//lib/bootsnap/load_path_cache/store.rb#10 -Bootsnap::LoadPathCache::Store::VERSION_KEY = T.let(T.unsafe(nil), String) - -# source://bootsnap//lib/bootsnap/version.rb#4 -Bootsnap::VERSION = T.let(T.unsafe(nil), String) - -module JSON - extend ::Bootsnap::CompileCache::JSON::Patch -end - -# source://bootsnap//lib/bootsnap/load_path_cache/core_ext/kernel_require.rb#3 -module Kernel - private - - # source://bootsnap//lib/bootsnap/load_path_cache/core_ext/kernel_require.rb#8 - def zeitwerk_original_require(path); end - - class << self - # source://bootsnap//lib/bootsnap/load_path_cache/core_ext/kernel_require.rb#8 - def zeitwerk_original_require(path); end - end -end - -module Psych - extend ::Bootsnap::CompileCache::YAML::Psych4::Patch -end - -class RubyVM::InstructionSequence - extend ::Bootsnap::CompileCache::ISeq::InstructionSequenceMixin -end diff --git a/sorbet/rbi/gems/builder@3.2.4.rbi b/sorbet/rbi/gems/builder@3.2.4.rbi deleted file mode 100644 index 344a340..0000000 --- a/sorbet/rbi/gems/builder@3.2.4.rbi +++ /dev/null @@ -1,8 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `builder` gem. -# Please instead update this file by running `bin/tapioca gem builder`. - -# THIS IS AN EMPTY RBI FILE. -# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/capybara@3.38.0.rbi b/sorbet/rbi/gems/capybara@3.38.0.rbi deleted file mode 100644 index ea3e90f..0000000 --- a/sorbet/rbi/gems/capybara@3.38.0.rbi +++ /dev/null @@ -1,9579 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `capybara` gem. -# Please instead update this file by running `bin/tapioca gem capybara`. - -# source://capybara//lib/capybara/session/config.rb#5 -module Capybara - extend ::Capybara::DSL - - class << self - # Parse raw html into a document using Nokogiri, and adjust textarea contents as defined by the spec. - # - # @param html [String] The raw html - # @return [Nokogiri::HTML::Document] HTML document - # - # source://capybara//lib/capybara.rb#389 - def HTML(html); end - - # Add a new selector to Capybara. Selectors can be used by various methods in Capybara - # to find certain elements on the page in a more convenient way. For example adding a - # selector to find certain table rows might look like this: - # - # Capybara.add_selector(:row) do - # xpath { |num| ".//tbody/tr[#{num}]" } - # end - # - # This makes it possible to use this selector in a variety of ways: - # - # find(:row, 3) - # page.find('table#myTable').find(:row, 3).text - # page.find('table#myTable').has_selector?(:row, 3) - # within(:row, 3) { expect(page).to have_content('$100.000') } - # - # Here is another example: - # - # Capybara.add_selector(:id) do - # xpath { |id| XPath.descendant[XPath.attr(:id) == id.to_s] } - # end - # - # Note that this particular selector already ships with Capybara. - # - # @param name [Symbol] The name of the selector to add - # @yield A block executed in the context of the new {Capybara::Selector} - # - # source://capybara//lib/capybara.rb#182 - def add_selector(name, **options, &block); end - - # source://forwardable/1.3.2/forwardable.rb#229 - def allow_gumbo(*args, **_arg1, &block); end - - # source://forwardable/1.3.2/forwardable.rb#229 - def allow_gumbo=(*args, **_arg1, &block); end - - # See {Capybara.configure} - # - # source://forwardable/1.3.2/forwardable.rb#229 - def always_include_port(*args, **_arg1, &block); end - - # source://forwardable/1.3.2/forwardable.rb#229 - def always_include_port=(*args, **_arg1, &block); end - - # See {Capybara.configure} - # - # source://forwardable/1.3.2/forwardable.rb#229 - def app(*args, **_arg1, &block); end - - # source://forwardable/1.3.2/forwardable.rb#229 - def app=(*args, **_arg1, &block); end - - # See {Capybara.configure} - # - # source://forwardable/1.3.2/forwardable.rb#229 - def app_host(*args, **_arg1, &block); end - - # source://forwardable/1.3.2/forwardable.rb#229 - def app_host=(*args, **_arg1, &block); end - - # source://forwardable/1.3.2/forwardable.rb#229 - def asset_host(*args, **_arg1, &block); end - - # source://forwardable/1.3.2/forwardable.rb#229 - def asset_host=(*args, **_arg1, &block); end - - # source://forwardable/1.3.2/forwardable.rb#229 - def automatic_label_click(*args, **_arg1, &block); end - - # source://forwardable/1.3.2/forwardable.rb#229 - def automatic_label_click=(*args, **_arg1, &block); end - - # source://forwardable/1.3.2/forwardable.rb#229 - def automatic_reload(*args, **_arg1, &block); end - - # source://forwardable/1.3.2/forwardable.rb#229 - def automatic_reload=(*args, **_arg1, &block); end - - # Configure Capybara to suit your needs. - # - # Capybara.configure do |config| - # config.run_server = false - # config.app_host = 'http://www.google.com' - # end - # - # #### Configurable options - # - # - **use_html5_parsing** (Boolean = `false`) - When Nokogiri >= 1.12.0 or `nokogumbo` is installed, whether HTML5 parsing will be used for HTML strings. - # - **always_include_port** (Boolean = `false`) - Whether the Rack server's port should automatically be inserted into every visited URL - # unless another port is explicitly specified. - # - **app_host** (String, `nil`) - The default host to use when giving a relative URL to visit, must be a valid URL e.g. `http://www.example.com`. - # - **asset_host** (String = `nil`) - Where dynamic assets are hosted - will be prepended to relative asset locations if present. - # - **automatic_label_click** (Boolean = `false`) - Whether {Capybara::Node::Element#choose Element#choose}, {Capybara::Node::Element#check Element#check}, - # {Capybara::Node::Element#uncheck Element#uncheck} will attempt to click the associated `